[ Index ] |
PHP Cross Reference of BuddyPress |
[Source view] [Print] [Project Stats]
Core component classes.
File Size: | 227 lines (7 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
Class: BP_Walker_Nav_Menu - X-Ref
Create HTML list of BP nav items.do_walk( $elements, $max_depth, $args = array() X-Ref |
Display array of elements hierarchically. This method is almost identical to the version in {@link Walker::walk()}. The only change is on one line which has been commented. An IF was comparing 0 to a non-empty string which was preventing child elements being grouped under their parent menu element. This caused a problem for BuddyPress because our primary/secondary navigations don't have a unique numerical ID that describes a hierarchy (we use a slug). Obviously, WordPress Menus use Posts, and those have ID/post_parent. return: string See {@link Walker::walk()}. param: array $elements See {@link Walker::walk()}. param: int $max_depth See {@link Walker::walk()}. param: array $args Optional additional arguments. since: 1.7.0 since: 5.1.0 Method was renamed from `walk` to `do_walk` to ensure PHP 5.3 compatibility |
walk( $elements, $max_depth, ...$args ) X-Ref |
Overrides Walker::walk() method. param: array $elements See {@link Walker::walk()}. param: int $max_depth See {@link Walker::walk()}. param: mixed ...$args See {@link Walker::walk()}. since: 6.0.0 Formalized the existing `...$args` parameter by adding it |
start_el( &$output, $item, $depth = 0, $args = array() X-Ref |
Display the current <li> that we are on. param: string $output Passed by reference. Used to append param: object $item Menu item data object. param: int $depth Depth of menu item. Used for padding. Optional, param: array $args Optional. See {@link Walker::start_el()}. param: int $id Menu item ID. Optional. since: 1.7.0 |
Generated: Thu Nov 21 01:00:57 2024 | Cross-referenced by PHPXref 0.7.1 |