[ Index ] |
PHP Cross Reference of BuddyPress |
[Source view] [Print] [Project Stats]
Core component class.
File Size: | 402 lines (10 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
BP_Core_Nav:: (12 methods):
__construct()
__isset()
__get()
__set()
get()
add_nav()
edit_nav()
delete_nav()
sort_nav()
get_primary()
get_secondary()
get_item_nav()
Class: BP_Core_Nav - X-Ref
BuddyPress Nav.__construct( $object_id = 0 ) X-Ref |
Initializes the Nav belonging to the specified object. param: int $object_id The item ID to build the nav for. Default is the displayed user ID. since: 2.6.0 |
__isset( $key ) X-Ref |
Checks whether a nav item is set. param: string $key The requested nav slug. return: bool True if the nav item is set, false otherwise. since: 2.6.0 |
__get( $key ) X-Ref |
Gets a nav item. param: string $key The requested nav slug. return: mixed The value corresponding to the requested nav item. since: 2.6.0 |
__set( $key, $value ) X-Ref |
Sets a nav item. param: string $key The requested nav slug. param: mixed $value The value of the nav item. since: 2.6.0 |
get( $key = '' ) X-Ref |
Gets a specific nav item or array of nav items. param: string $key The nav item slug to get. Optional. return: mixed An array of nav item, a single nav item, or null if none found. since: 2.6.0 |
add_nav( $args ) X-Ref |
Adds a new nav item. param: array $args The nav item's arguments. return: BP_Core_Nav_Item since: 2.6.0 |
edit_nav( $args = array() X-Ref |
Edits a nav item. param: array $args The nav item's arguments. param: string $slug The slug of the nav item. param: string $parent_slug The slug of the parent nav item (required to edit a child). return: BP_Core_Nav_Item since: 2.6.0 |
delete_nav( $slug = '', $parent_slug = '' ) X-Ref |
Unset an item or a subitem of the nav. param: string $slug The slug of the main item. param: string $parent_slug The slug of the sub item. return: false|callable|array False on failure, the screen function(s) on success. since: 2.6.0 |
sort_nav( $items ) X-Ref |
Sorts a list of nav items. param: array $items The nav items to sort. return: array since: 2.6.0 |
get_primary( $args = array() X-Ref |
Gets the primary nav items. param: array $args Filters to select the specific primary items. See wp_list_filter(). param: bool $sort True to sort the nav items. False otherwise. return: array The list of primary objects nav since: 2.6.0 |
get_secondary( $args = array() X-Ref |
Gets the secondary nav items. param: array $args Filters to select the specific secondary items. See wp_list_filter(). param: bool $sort True to sort the nav items. False otherwise. return: bool|array The list of secondary objects nav, or false if none set. since: 2.6.0 |
get_item_nav() X-Ref |
Gets a nested list of visible nav items. return: array The list of visible nav items. since: 2.6.0 |
Generated: Mon Dec 16 01:01:39 2019 | Cross-referenced by PHPXref 0.7.1 |