function theme_tripal_node_sort_toc_items
2.x tripal_core.toc.inc | theme_tripal_node_sort_toc_items($a, $b) |
3.x tripal_core.toc.inc | theme_tripal_node_sort_toc_items($a, $b) |
Parameters
$a:
$b:
1 string reference to 'theme_tripal_node_sort_toc_items'
- theme_tripal_node_toc_items_table in tripal_core/
includes/ tripal_core.toc.inc
File
- tripal_core/
includes/ tripal_core.toc.inc, line 173
Code
function theme_tripal_node_sort_toc_items($a, $b) {
if ($a['weight']['#value'] < $b['weight']['#value']) {
return -1;
}
if ($a['weight']['#value'] > $b['weight']['#value']) {
return 1;
}
if ($a['weight']['#value'] == $b['weight']['#value']) {
return strcmp($a['title']['#value'], $b['title']['#value']);
}
}