Alert: This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.
_bp_nav_menu_sort( array $a, array $b )
Sort BuddyPress nav menu items by their position property.
Description Description
This is an internal convenience function and it will probably be removed in a later release. Do not use.
Parameters Parameters
- $a
-
(Required) First item.
- $b
-
(Required) Second item.
Return Return
(int) Returns an integer less than, equal to, or greater than zero if the first argument is considered to be respectively less than, equal to, or greater than the second.
Source Source
File: bp-core/bp-core-template.php
function _bp_nav_menu_sort( $a, $b ) { if ( $a['position'] == $b['position'] ) { return 0; } elseif ( $a['position'] < $b['position'] ) { return -1; } else { return 1; } }
Changelog Changelog
Version | Description |
---|---|
1.7.0 | Introduced. |