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.



git-svn-id: https://develop.svn.wordpress.org/trunk@25332 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Scott Taylor 2013-09-10 23:29:04 +00:00
parent d738f5e586
commit 1a46a76c18

View File

@ -1134,7 +1134,7 @@ class WP_Widget_Tag_Cloud extends WP_Widget {
$nav_menu = isset( $instance['nav_menu'] ) ? $instance['nav_menu'] : '';
// 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 ( !$menus ) {