Nav Menus: Add a 'nav_menu_item_args' filter to `Walker_Nav_Menu::start_el()`.
Props bjornjohansen. Fixes #29417. Built from https://develop.svn.wordpress.org/trunk@34471 git-svn-id: http://core.svn.wordpress.org/trunk@34435 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
d165b25920
commit
0c1f92e301
|
@ -71,6 +71,7 @@ class Walker_Nav_Menu extends Walker {
|
|||
* @see Walker::start_el()
|
||||
*
|
||||
* @since 3.0.0
|
||||
* @since 4.4.0 'nav_menu_item_args' filter was added.
|
||||
*
|
||||
* @param string $output Passed by reference. Used to append additional content.
|
||||
* @param object $item Menu item data object.
|
||||
|
@ -84,6 +85,14 @@ class Walker_Nav_Menu extends Walker {
|
|||
$classes = empty( $item->classes ) ? array() : (array) $item->classes;
|
||||
$classes[] = 'menu-item-' . $item->ID;
|
||||
|
||||
/**
|
||||
* @since 4.4.0
|
||||
*
|
||||
* @param array $args An array of arguments.
|
||||
* @param object $item Menu item data object.
|
||||
*/
|
||||
$args = apply_filters( 'nav_menu_item_args', $args, $item );
|
||||
|
||||
/**
|
||||
* Filter the CSS class(es) applied to a menu item's list item element.
|
||||
*
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.4-alpha-34470';
|
||||
$wp_version = '4.4-alpha-34471';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue