[ Index ]

PHP Cross Reference of BuddyPress

title

Body

[close]

/src/bp-core/classes/ -> class-bp-core-nav.php (summary)

Core component class.

File Size: 402 lines (10 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

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.

This class is used to build each component's navigation.

__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.
since: 2.6.0
return: bool True if the nav item is set, false otherwise.

__get( $key )   X-Ref
Gets a nav item.

param: string $key The requested nav slug.
since: 2.6.0
return: mixed The value corresponding to the requested nav item.

__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.
since: 2.6.0
return: mixed       An array of nav item, a single nav item, or null if none found.

add_nav( $args )   X-Ref
Adds a new nav item.

param: array $args The nav item's arguments.
since: 2.6.0
return: BP_Core_Nav_Item

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).
since: 2.6.0
return: BP_Core_Nav_Item

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.
since: 2.6.0
return: false|callable|array False on failure, the screen function(s) on success.

sort_nav( $items )   X-Ref
Sorts a list of nav items.

param: array $items The nav items to sort.
since: 2.6.0
return: array

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.
since: 2.6.0
return: array The list of primary objects nav

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.
since: 2.6.0
return: bool|array The list of secondary objects nav, or false if none set.

get_item_nav()   X-Ref
Gets a nested list of visible nav items.

since: 2.6.0
return: array The list of visible nav items.



Generated: Mon Jul 22 01:01:43 2019 Cross-referenced by PHPXref 0.7.1