function _views_position_sort

Same name in other branches
  1. 7.x-3.x includes/admin.inc \_views_position_sort()

Display position sorting function

1 string reference to '_views_position_sort'
views_ui_reorder_displays_form_submit in includes/admin.inc
Submit handler for rearranging display form

File

includes/admin.inc, line 2176

Code

function _views_position_sort($display1, $display2) {
    if ($display1->position != $display2->position) {
        return $display1->position < $display2->position ? -1 : 1;
    }
    return 0;
}