[wp-trac] [WordPress Trac] #29463: Add filter in WP_Nav_Menu_Widget
WordPress Trac
noreply at wordpress.org
Tue Sep 2 07:50:45 UTC 2014
#29463: Add filter in WP_Nav_Menu_Widget
--------------------------------------+-----------------------------
Reporter: cyman | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Widgets | Version: trunk
Severity: normal | Keywords:
Focuses: administration, template |
--------------------------------------+-----------------------------
There is currently no way to change the arguments of function
`wp_nav_menu( array( 'fallback_cb' => '', 'menu' => $nav_menu ) );` in
file wp-includes/default-widgets.php for class `WP_Nav_Menu_Widget` as
there is no hook applied to the argument.
Suggested solution:
{{{
wp_nav_menu( apply_filters( 'nav_menu_widget_args', array(
'fallback_cb' => '',
'menu' => $nav_menu
) ) );
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/29463>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list