WordPress.org

Make WordPress Core

Changeset 28300


Ignore:
Timestamp:
05/06/2014 04:54:10 PM (7 years ago)
Author:
wonderboymusic
Message:

In wp-admin/includes/nav-menu.php, remove dead code:

  • In _wp_ajax_menu_quick_search(), in an else block, $post_obj was set and not used. Another block sets it again and does use it.
  • In wp_nav_menu_item_post_type_meta_box(), $post_type_object was set and, sadly, never used. $error was set and not used.

See #27882.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/nav-menu.php

    r28213 r28300  
    357357                    echo walk_nav_menu_tree( array_map('wp_setup_nav_menu_item', array( get_post( $object_id ) ) ), 0, (object) $args );
    358358                } elseif ( 'json' == $response_format ) {
    359                     $post_obj = get_post( $object_id );
    360359                    echo json_encode(
    361360                        array(
     
    644643    }
    645644
    646     $post_type_object = get_post_type_object($post_type_name);
    647 
    648645    $num_pages = $get_posts->max_num_pages;
    649646
     
    663660        'current' => $pagenum
    664661    ));
    665 
    666     if ( !$posts )
    667         $error = '<li id="error">'. $post_type['args']->labels->not_found .'</li>';
    668662
    669663    $db_fields = false;
Note: See TracChangeset for help on using the changeset viewer.