Make WordPress Core

Ticket #13205: 13205.3.diff

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

refreshed for r14387

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

     
    262262                                's' => $query,
    263263                        ));
    264264                        if ( ! have_posts() )
    265                                         echo '-1';
     265                                return;
    266266                        while ( have_posts() ) {
    267267                                the_post();
    268268                                if ( 'markup' == $response_format ) {
     
    284284                                'number' => 10,
    285285                        ));
    286286                        if ( empty( $terms ) || is_wp_error( $terms ) )
    287                                 echo '-1';
     287                                return;
    288288                        foreach( (array) $terms as $term ) {
    289289                                if ( 'markup' == $response_format ) {
    290290                                        echo walk_nav_menu_tree( array_map('wp_setup_nav_menu_item', array( $term ) ), 0, (object) $args );