Make WordPress Core

Ticket #13205: 13205.2.diff

File 13205.2.diff, 727 bytes (added by duck_, 15 years ago)

didn't fix for category search

  • wp-admin/includes/nav-menu.php

     
    244244                                's' => $query,
    245245                        ));
    246246                        if ( ! have_posts() )
    247                                         echo '-1';
     247                                return;
    248248                        while ( have_posts() ) {
    249249                                the_post();
    250250                                if ( 'markup' == $response_format ) {
     
    266266                                'number' => 10,
    267267                        ));
    268268                        if ( empty( $terms ) || is_wp_error( $terms ) )
    269                                 echo '-1';
     269                                return;
    270270                        foreach( (array) $terms as $term ) {
    271271                                if ( 'markup' == $response_format ) {
    272272                                        echo walk_nav_menu_tree( array_map('wp_setup_nav_menu_item', array( $term ) ), 0, (object) $args );