function _homebox_block_compare in Homebox 7.2
Same name and namespace in other branches
- 6.3 homebox.admin.inc \_homebox_block_compare()
- 6 homebox.admin.inc \_homebox_block_compare()
- 6.2 homebox.admin.inc \_homebox_block_compare()
- 7.3 homebox.admin.inc \_homebox_block_compare()
Helper function for sorting blocks on admin/build/homebox.
Active blocks are sorted by region, then by weight. Disabled blocks are sorted by name.
Parameters
$a: An array
$b: An array
Return value
Comparison result
1 string reference to '_homebox_block_compare'
- homebox_layout in ./
homebox.admin.inc - Form builder function for module settings.
File
- ./
homebox.admin.inc, line 941 - Homebox admin file, takes care admin interface for homebox
Code
function _homebox_block_compare($a, $b) {
// Sort by weight.
$weight = $a['weight'] - $b['weight'];
if ($weight) {
return $weight;
}
// Sort by title.
return strcmp($a['info'], $b['info']);
}