sort_menu [ WordPress Function ]
sort_menu ( $a, $b )
| Defined at: |
|
No description yet.
Source
<?php
function sort_menu($a, $b) {
global $menu_order, $default_menu_order;
$a = $a[2];
$b = $b[2];
if ( isset($menu_order[$a]) && !isset($menu_order[$b]) ) {
return -1;
} elseif ( !isset($menu_order[$a]) && isset($menu_order[$b]) ) {
return 1;
} elseif ( isset($menu_order[$a]) && isset($menu_order[$b]) ) {
if ( $menu_order[$a] == $menu_order[$b] )
return 0;
return ($menu_order[$a] < $menu_order[$b]) ? -1 : 1;
} else {
return ($default_menu_order[$a] <= $default_menu_order[$b]) ? -1 : 1;
}
}
usort($menu, 'sort_menu');
unset($menu_order, $default_menu_order);
}
?>
Examples [ wp-snippets.com ]
Top Google zoekresultaten
- EmacsWiki: Dired Sort Menu
Apr 6, 2011 ... dired-sort-menu is a library by FrancisJWright that sorts the directory listings in DiredMode in various ways and provides a menu bar and popup ...
emacswiki.org - Sorting items on the fly (AJAX) using jQuery UI Sortable, PHP ...
May 3, 2009 ... so, it send the sorted array as POST data to “sort_menu.php” ... Any chance that you can provide a classic ASP sample of sort_menu.php…
www.hdeya.com - Desktop "Sort by" menu grayed out
Can somebody please help me. I have windows 7 unlimited 32 bit and the desktop sort by menu is grayed out.Also auto arange icons and align ...
forum.thewindowsclub.com - Updates to News Feed - Facebook Help Center | Facebook
Click the Sort menu in the top right of your news feed to change how stories are sorted. Top Stories: Top stories are ordered by how relevant they are. R..
www.facebook.com