diff --git a/wp-includes/class-wp-customize-nav-menus.php b/wp-includes/class-wp-customize-nav-menus.php
index 2d9c13a..087b89f 100644
a
|
b
|
final class WP_Customize_Nav_Menus { |
274 | 274 | $items = array(); |
275 | 275 | |
276 | 276 | $post_type_objects = get_post_types( array( 'show_in_nav_menus' => true ), 'objects' ); |
| 277 | |
| 278 | $available_item_types = wp_list_pluck( $this->available_item_types(), 'object' ); |
| 279 | |
| 280 | foreach( $post_type_objects as $key => $value ) { |
| 281 | if( !in_array( $key, $available_item_types ) ) |
| 282 | unset( $post_type_objects[$key] ); |
| 283 | } |
| 284 | |
277 | 285 | $query = array( |
278 | 286 | 'post_type' => array_keys( $post_type_objects ), |
279 | 287 | 'suppress_filters' => true, |
… |
… |
final class WP_Customize_Nav_Menus { |
314 | 322 | } |
315 | 323 | |
316 | 324 | // Query taxonomy terms. |
317 | | $taxonomies = get_taxonomies( array( 'show_in_nav_menus' => true ), 'names' ); |
318 | | $terms = get_terms( $taxonomies, array( |
319 | | 'name__like' => $args['s'], |
320 | | 'number' => 20, |
321 | | 'offset' => 20 * ($args['pagenum'] - 1), |
322 | | ) ); |
| 325 | $taxonomies = get_taxonomies( array( 'show_in_nav_menus' => true ), 'objects' );//'names' ); |
| 326 | |
| 327 | foreach( $taxonomies as $key => $value ) { |
| 328 | if( !in_array( $key, $available_item_types ) ) |
| 329 | unset( $taxonomies[$key] ); |
| 330 | } |
| 331 | |
| 332 | $taxonomies = array_keys( $taxonomies ); |
| 333 | |
| 334 | if( !empty($taxonomies) ) |
| 335 | $terms = get_terms( $taxonomies, array( |
| 336 | 'name__like' => $args['s'], |
| 337 | 'number' => 20, |
| 338 | 'offset' => 20 * ($args['pagenum'] - 1), |
| 339 | ) ); |
| 340 | else $terms = array(); |
323 | 341 | |
324 | 342 | // Check if any taxonomies were found. |
325 | 343 | if ( ! empty( $terms ) ) { |