WordPress.org

Make WordPress Core

Changeset 34662


Ignore:
Timestamp:
09/28/2015 03:30:21 PM (4 years ago)
Author:
DrewAPicture
Message:

Widgets: Pass $instance to the widget_nav_menu_args filter in the Custom Menu widget.

Props walterbarcelos for the initial patch.
Fixes #33944.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/widgets/class-wp-nav-menu-widget.php

    r34621 r34662  
    6262         *
    6363         * @since 4.2.0
     64         * @since 4.4.0 Added the `$instance` parameter.
    6465         *
    6566         * @param array    $nav_menu_args {
     
    7172         * @param stdClass $nav_menu      Nav menu object for the current menu.
    7273         * @param array    $args          Display arguments for the current widget.
     74         * @param array    $instance      Array of settings for the current widget.
    7375         */
    74         wp_nav_menu( apply_filters( 'widget_nav_menu_args', $nav_menu_args, $nav_menu, $args ) );
     76        wp_nav_menu( apply_filters( 'widget_nav_menu_args', $nav_menu_args, $nav_menu, $args, $instance ) );
    7577
    7678        echo $args['after_widget'];
Note: See TracChangeset for help on using the changeset viewer.