diff --git src/wp-admin/includes/nav-menu.php src/wp-admin/includes/nav-menu.php
index 61657c0..30f38e9 100644
|
|
|
function _wp_ajax_menu_quick_search( $request = array() ) { |
| 70 | 70 | |
| 71 | 71 | } elseif ( preg_match('/quick-search-(posttype|taxonomy)-([a-zA-Z_-]*\b)/', $type, $matches) ) { |
| 72 | 72 | if ( 'posttype' == $matches[1] && get_post_type_object( $matches[2] ) ) { |
| 73 | | $search_results_query = new WP_Query( array( |
| | 73 | $post_type_obj = _wp_nav_menu_meta_box_object( get_post_type_object( $matches[2] ) ); |
| | 74 | $args = array( |
| 74 | 75 | 'no_found_rows' => true, |
| 75 | 76 | 'update_post_meta_cache' => false, |
| 76 | 77 | 'update_post_term_cache' => false, |
| 77 | 78 | 'posts_per_page' => 10, |
| 78 | 79 | 'post_type' => $matches[2], |
| 79 | 80 | 's' => $query, |
| 80 | | ) ); |
| | 81 | ); |
| | 82 | if ( isset( $post_type_obj->_default_query ) ) { |
| | 83 | $args = array_merge( $args, (array) $post_type_obj->_default_query ); |
| | 84 | } |
| | 85 | $search_results_query = new WP_Query( $args ); |
| 81 | 86 | if ( ! $search_results_query->have_posts() ) { |
| 82 | 87 | return; |
| 83 | 88 | } |