Fix JS error in autocomplete. props koopersmith, see #13205.
git-svn-id: http://svn.automattic.com/wordpress/trunk@14405 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
7b7243d94a
commit
b093a66876
|
@ -262,7 +262,7 @@ function _wp_ajax_menu_quick_search( $request = array() ) {
|
|||
's' => $query,
|
||||
));
|
||||
if ( ! have_posts() )
|
||||
echo '-1';
|
||||
return;
|
||||
while ( have_posts() ) {
|
||||
the_post();
|
||||
if ( 'markup' == $response_format ) {
|
||||
|
@ -284,7 +284,7 @@ function _wp_ajax_menu_quick_search( $request = array() ) {
|
|||
'number' => 10,
|
||||
));
|
||||
if ( empty( $terms ) || is_wp_error( $terms ) )
|
||||
echo '-1';
|
||||
return;
|
||||
foreach( (array) $terms as $term ) {
|
||||
if ( 'markup' == $response_format ) {
|
||||
echo walk_nav_menu_tree( array_map('wp_setup_nav_menu_item', array( $term ) ), 0, (object) $args );
|
||||
|
|
Loading…
Reference in New Issue