Use `wp_get_nav_menus()` instead of `get_terms('nav_menu')` in `WP_Nav_Menu_Widget` to preserve use of `wp_get_nav_menus' filter.
Props Frank Klein. Fixes #25263. Built from https://develop.svn.wordpress.org/trunk@25332 git-svn-id: http://core.svn.wordpress.org/trunk@25294 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
dbec80b469
commit
569bcc5dad
|
@ -1134,7 +1134,7 @@ class WP_Widget_Tag_Cloud extends WP_Widget {
|
||||||
$nav_menu = isset( $instance['nav_menu'] ) ? $instance['nav_menu'] : '';
|
$nav_menu = isset( $instance['nav_menu'] ) ? $instance['nav_menu'] : '';
|
||||||
|
|
||||||
// Get menus
|
// Get menus
|
||||||
$menus = get_terms( 'nav_menu', array( 'hide_empty' => false ) );
|
$menus = wp_get_nav_menus( array( 'orderby' => 'name' ) );
|
||||||
|
|
||||||
// If no menus exists, direct the user to go and create some.
|
// If no menus exists, direct the user to go and create some.
|
||||||
if ( !$menus ) {
|
if ( !$menus ) {
|
||||||
|
|
Loading…
Reference in New Issue