Fix JS error in autocomplete. props koopersmith, see #13205.
git-svn-id: https://develop.svn.wordpress.org/trunk@14405 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
d783952469
commit
60ae097b78
@ -262,7 +262,7 @@ function _wp_ajax_menu_quick_search( $request = array() ) {
|
|||||||
's' => $query,
|
's' => $query,
|
||||||
));
|
));
|
||||||
if ( ! have_posts() )
|
if ( ! have_posts() )
|
||||||
echo '-1';
|
return;
|
||||||
while ( have_posts() ) {
|
while ( have_posts() ) {
|
||||||
the_post();
|
the_post();
|
||||||
if ( 'markup' == $response_format ) {
|
if ( 'markup' == $response_format ) {
|
||||||
@ -284,7 +284,7 @@ function _wp_ajax_menu_quick_search( $request = array() ) {
|
|||||||
'number' => 10,
|
'number' => 10,
|
||||||
));
|
));
|
||||||
if ( empty( $terms ) || is_wp_error( $terms ) )
|
if ( empty( $terms ) || is_wp_error( $terms ) )
|
||||||
echo '-1';
|
return;
|
||||||
foreach( (array) $terms as $term ) {
|
foreach( (array) $terms as $term ) {
|
||||||
if ( 'markup' == $response_format ) {
|
if ( 'markup' == $response_format ) {
|
||||||
echo walk_nav_menu_tree( array_map('wp_setup_nav_menu_item', array( $term ) ), 0, (object) $args );
|
echo walk_nav_menu_tree( array_map('wp_setup_nav_menu_item', array( $term ) ), 0, (object) $args );
|
||||||
|
Loading…
x
Reference in New Issue
Block a user