WordPress.org

Make WordPress Core

Changeset 34471


Ignore:
Timestamp:
09/24/2015 03:16:44 AM (6 years ago)
Author:
wonderboymusic
Message:

Nav Menus: Add a 'nav_menu_item_args' filter to Walker_Nav_Menu::start_el().

Props bjornjohansen.
Fixes #29417.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/nav-menu-template.php

    r34321 r34471  
    7272     *
    7373     * @since 3.0.0
     74     * @since 4.4.0 'nav_menu_item_args' filter was added.
    7475     *
    7576     * @param string $output Passed by reference. Used to append additional content.
     
    8485        $classes = empty( $item->classes ) ? array() : (array) $item->classes;
    8586        $classes[] = 'menu-item-' . $item->ID;
     87
     88        /**
     89         * @since 4.4.0
     90         *
     91         * @param array  $args  An array of arguments.
     92         * @param object $item  Menu item data object.
     93         */
     94        $args = apply_filters( 'nav_menu_item_args', $args, $item );
    8695
    8796        /**
Note: See TracChangeset for help on using the changeset viewer.