You are here

function dynamic_background_weight_cmp in Dynamic Background 7

Same name and namespace in other branches
  1. 7.2 includes/weight.admin.inc \dynamic_background_weight_cmp()

Sorts values based on their weight, used by usort when build the form.

1 string reference to 'dynamic_background_weight_cmp'
dynamic_background_admin_weight_form in includes/weight.admin.inc
Creates a form which can be used to order the sub-modules/extension weights so the override order of the CSS can be weighted.

File

includes/weight.admin.inc, line 82
Hanldes the re-ordring of dynamic background extension weights to determind overrid order.

Code

function dynamic_background_weight_cmp($a, $b) {
  if ($a['weight'] == $b['weight']) {
    return 0;
  }
  return $a['weight'] < $b['weight'] ? -1 : 1;
}