| 7 common.inc | element_sort_by_title($a, $b) |
| 8 common.inc | element_sort_by_title($a, $b) |
Array sorting callback; sorts elements by title.
2 string references to 'element_sort_by_title'
File
- includes/
common.inc, line 6169 - Common functions that many Drupal modules will need to reference.
Code
function element_sort_by_title($a, $b) {
$a_title = (is_array($a) && isset($a['#title'])) ? $a['#title'] : '';
$b_title = (is_array($b) && isset($b['#title'])) ? $b['#title'] : '';
return strnatcasecmp($a_title, $b_title);
}
Login or register to post comments