Menus: Restore checkboxes in post type search which were lost in [38584].
The `$args` variable was being overridden instead of extended, therefore causing the `walker` to be dropped. Fixes #33742. git-svn-id: https://develop.svn.wordpress.org/trunk@38702 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
eef4795716
commit
a39953e1e3
|
@ -71,13 +71,16 @@ function _wp_ajax_menu_quick_search( $request = array() ) {
|
||||||
} elseif ( preg_match('/quick-search-(posttype|taxonomy)-([a-zA-Z_-]*\b)/', $type, $matches) ) {
|
} elseif ( preg_match('/quick-search-(posttype|taxonomy)-([a-zA-Z_-]*\b)/', $type, $matches) ) {
|
||||||
if ( 'posttype' == $matches[1] && get_post_type_object( $matches[2] ) ) {
|
if ( 'posttype' == $matches[1] && get_post_type_object( $matches[2] ) ) {
|
||||||
$post_type_obj = _wp_nav_menu_meta_box_object( get_post_type_object( $matches[2] ) );
|
$post_type_obj = _wp_nav_menu_meta_box_object( get_post_type_object( $matches[2] ) );
|
||||||
$args = array(
|
$args = array_merge(
|
||||||
'no_found_rows' => true,
|
$args,
|
||||||
'update_post_meta_cache' => false,
|
array(
|
||||||
'update_post_term_cache' => false,
|
'no_found_rows' => true,
|
||||||
'posts_per_page' => 10,
|
'update_post_meta_cache' => false,
|
||||||
'post_type' => $matches[2],
|
'update_post_term_cache' => false,
|
||||||
's' => $query,
|
'posts_per_page' => 10,
|
||||||
|
'post_type' => $matches[2],
|
||||||
|
's' => $query,
|
||||||
|
)
|
||||||
);
|
);
|
||||||
if ( isset( $post_type_obj->_default_query ) ) {
|
if ( isset( $post_type_obj->_default_query ) ) {
|
||||||
$args = array_merge( $args, (array) $post_type_obj->_default_query );
|
$args = array_merge( $args, (array) $post_type_obj->_default_query );
|
||||||
|
|
Loading…
Reference in New Issue