function dynamic_background_revers_weight_cmp in Dynamic Background 7
Same name and namespace in other branches
- 7.2 dynamic_background.module \dynamic_background_revers_weight_cmp()
Helper function to sort image configuration arrays based on weight.
Parameters
array $a:
array $b:
Return value
int
1 string reference to 'dynamic_background_revers_weight_cmp'
- dynamic_background_load_image_configuration in ./
dynamic_background.module - Helper function that calls hook_dynamic_background_css() and sorts the returned image configurations based on weight. This function may be called by more then one preprocessor function, so a static cache applied.
File
- ./
dynamic_background.module, line 259 - This module enables administrators to upload images used as background on the site. The selected background image link is exposed as either $background in the page.tpl file or as /background.css.
Code
function dynamic_background_revers_weight_cmp($a, $b) {
if ($a['weight'] == $b['weight']) {
return 0;
}
return $a['weight'] > $b['weight'] ? -1 : 1;
}