You are here

function _page_title_settings_sort in Page Title 7.2

Same name and namespace in other branches
  1. 8.2 page_title.module \_page_title_settings_sort()
  2. 6.2 page_title.module \_page_title_settings_sort()

Internal function for sorting the page title settings array.

1 string reference to '_page_title_settings_sort'
page_title_get_settings in ./page_title.module
Get the Page Title Setttings

File

./page_title.module, line 869
Enhanced control over the page title (in the head tag).

Code

function _page_title_settings_sort($a, $b) {

  // Sort by weight and, failing that, label alphabetical.
  return $a['weight'] < $b['weight'] ? -1 : ($a['weight'] > $b['weight'] ? 1 : ($a['label'] < $b['label'] ? -1 : 1));
}