Make WordPress Core


Ignore:
Timestamp:
03/17/2010 04:27:25 PM (16 years ago)
Author:
ryan
Message:

Trim trailing whitespace

File:
1 edited

Legend:

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

    r13727 r13733  
    1414function wp_nav_menu_post_type_metaboxes() {
    1515    $post_types = get_post_types( array( 'public' => true ), 'object' );
    16    
     16
    1717    if ( !$post_types )
    1818        return false;
     
    100100function wp_nav_menu_item_link_metabox() {
    101101    $args = array( 'post_status' => 'any', 'post_type' => 'nav_menu_item', 'meta_value' => 'custom', 'showposts' => -1 );
    102    
     102
    103103    // @todo transient caching of these results with proper invalidation on updating links
    104104    $query = new WP_Query( $args );
    105    
     105
    106106    ?>
    107107    <p id="menu-item-url-wrap">
     
    118118        </label>
    119119    </p>
    120    
     120
    121121    <p class="button-controls">
    122122        <a class="show-all"><?php _e('View All'); ?></a>
     
    147147function wp_nav_menu_item_post_type_metabox( $object, $post_type ) {
    148148    $args = array( 'post_type' => $post_type['args']->name, 'post_status' => 'publish', 'showposts' => -1 );
    149    
     149
    150150    if ( 'attachment' == $post_type['args']->name )
    151151        $args['post_status'] = 'any';
    152    
     152
    153153    // @todo transient caching of these results with proper invalidation on updating of a post of this type
    154154    $query = new WP_Query( $args );
    155    
     155
    156156    if ( !$query->posts )
    157157        $error = '<li id="error">'. sprintf( __( 'No %s exists' ), $post_type['args']->label ) .'</li>';
    158    
     158
    159159    $pt_names = '';
    160160    if ( is_array($query->posts) ) {
     
    167167        }
    168168    }
    169    
     169
    170170    $id = $post_type['args']->name;
    171171    ?>
     
    174174        <a class="quick-search-submit button-secondary"><?php _e('Search'); ?></a>
    175175    </p>
    176    
     176
    177177    <p class="button-controls">
    178178        <a class="show-all"><?php _e('View All'); ?></a>
    179179        <a class="hide-all"><?php _e('Hide All'); ?></a>
    180180    </p>
    181    
     181
    182182    <div id="existing-<?php echo esc_attr( $id ); ?>" class="list-wrap">
    183183        <div class="list-container">
     
    219219    // @todo transient caching of these results with proper invalidation on updating of a tax of this type
    220220    $terms = get_terms( $taxonomy['args']->name, $args );
    221    
     221
    222222    if ( !$terms )
    223223        $error = '<li id="error">'. sprintf( __( 'No %s exists' ), $taxonomy['args']->label ) .'</li>';
    224    
     224
    225225    $term_names = '';
    226226    if ( is_array($terms) ) {
     
    233233        }
    234234    }
    235    
     235
    236236    $id = $taxonomy['args']->name;
    237237    ?>
     
    240240        <a class="quick-search-submit button-secondary"><?php _e('Search'); ?></a>
    241241    </p>
    242    
     242
    243243    <p class="button-controls">
    244244        <a class="show-all"><?php _e('View All'); ?></a>
    245245        <a class="hide-all"><?php _e('Hide All'); ?></a>
    246246    </p>
    247    
     247
    248248    <div id="existing-<?php echo esc_attr( $id ); ?>" class="list-wrap">
    249249        <div class="list-container">
     
    282282    if ( !$menu_items )
    283283        return __( 'Not Found' );
    284        
     284
    285285    $output = '';
    286286    $i = 1;
     
    290290        if ( !isset($menu_item->post_parent) )
    291291            $menu_item->post_parent = $menu_item->parent;
    292        
     292
    293293        // Cleanest way to get all attachements
    294294        if ( 'attachment' == $object )
    295295            $menu_item->post_parent = 0;
    296        
     296
    297297        if ( 0 == $menu_item->post_parent ) {
    298298            // Set up the menu item
    299             $menu_item = wp_setup_nav_menu_item( $menu_item, $object_type, $object );           
     299            $menu_item = wp_setup_nav_menu_item( $menu_item, $object_type, $object );
    300300            $attributes = ( 'backend' == $context ) ? ' id="menu-item-'. $i .'" value="'. $i .'"' : '';
    301            
     301
    302302            $output .= '<li'. $attributes .'>';
    303303            $output .= wp_get_nav_menu_item( $menu_item, $object_type, $object );
     
    308308        }
    309309    }
    310    
     310
    311311    return $output;
    312312}
     
    324324function wp_get_nav_menu_sub_items( $childof, $object_type, $object = null, $context = 'frontend' ) {
    325325    $args = array( 'child_of' => $childof, 'parent' => $childof, 'hide_empty' => false, );
    326    
     326
    327327    switch ( $object_type ) {
    328328        case 'post_type':
     
    335335            }
    336336            break;
    337            
     337
    338338        case 'taxonomy':
    339339            if ( is_taxonomy_hierarchical( $object ) ) {
     
    343343            }
    344344            break;
    345        
     345
    346346        default:
    347347            $sub_menu_items = array();
    348348            break;
    349349    }
    350    
     350
    351351    $output = '';
    352352    $i = 1;
Note: See TracChangeset for help on using the changeset viewer.