You are here

function picture_compare_weights in Picture 7

Same name and namespace in other branches
  1. 7.2 picture.admin.inc \picture_compare_weights()

Helper function to sort picture groups for the CKEditor image dialog

1 string reference to 'picture_compare_weights'
picture_ckeditor_settings_submit in ./picture.admin.inc
Submit handler for the picture_ckeditor_settings form. Places chosen picture groups into the variables table.

File

./picture.admin.inc, line 396
Picture - map breakpoints and image styles

Code

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