Make WordPress Core

Changeset 13733


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

Trim trailing whitespace

Location:
trunk
Files:
43 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/admin-header.php

    r13559 r13733  
    3636addLoadEvent = function(func){if(typeof jQuery!="undefined")jQuery(document).ready(func);else if(typeof wpOnload!='function'){wpOnload=func;}else{var oldonload=wpOnload;wpOnload=function(){oldonload();func();}}};
    3737var userSettings = {
    38                 'url': '<?php echo SITECOOKIEPATH; ?>', 
     38                'url': '<?php echo SITECOOKIEPATH; ?>',
    3939                'uid': '<?php if ( ! isset($current_user) ) $current_user = wp_get_current_user(); echo $current_user->ID; ?>',
    4040                'time':'<?php echo time() ?>'
    4141        },
    42         ajaxurl = '<?php echo admin_url('admin-ajax.php'); ?>', 
    43         pagenow = '<?php echo $current_screen->id; ?>', 
    44         typenow = '<?php if ( isset($current_screen->post_type) ) echo $current_screen->post_type; ?>', 
    45         adminpage = '<?php echo $admin_body_class; ?>', 
    46         thousandsSeparator = '<?php echo addslashes( $wp_locale->number_format['thousands_sep'] ); ?>', 
     42        ajaxurl = '<?php echo admin_url('admin-ajax.php'); ?>',
     43        pagenow = '<?php echo $current_screen->id; ?>',
     44        typenow = '<?php if ( isset($current_screen->post_type) ) echo $current_screen->post_type; ?>',
     45        adminpage = '<?php echo $admin_body_class; ?>',
     46        thousandsSeparator = '<?php echo addslashes( $wp_locale->number_format['thousands_sep'] ); ?>',
    4747        decimalPoint = '<?php echo addslashes( $wp_locale->number_format['decimal_point'] ); ?>';
    4848//]]>
  • trunk/wp-admin/css/install.dev.css

    r13696 r13733  
    5454        border-bottom: none;
    5555        text-align:center
    56 } 
     56}
    5757
    5858.step {
  • trunk/wp-admin/edit-tags.php

    r13693 r13733  
    306306<?php elseif ( 'post_tag' == $taxonomy ) : ?>
    307307<div class="form-wrap">
    308 <p><?php printf(__('Tags can be selectively converted to categories using the <a href="%s">tag to category converter</a>'), 'admin.php?import=wp-cat2tag&amp;step=3') ;?>.</p> 
     308<p><?php printf(__('Tags can be selectively converted to categories using the <a href="%s">tag to category converter</a>'), 'admin.php?import=wp-cat2tag&amp;step=3') ;?>.</p>
    309309</div>
    310310<?php endif;
  • trunk/wp-admin/export.php

    r13573 r13733  
    5050$months = "";
    5151for ( $i = 1; $i < 13; $i++ ) {
    52         $months .= "\t\t\t<option value=\"" . zeroise($i, 2) . '">' . 
     52        $months .= "\t\t\t<option value=\"" . zeroise($i, 2) . '">' .
    5353                $wp_locale->get_month_abbrev( $wp_locale->get_month( $i ) ) . "</option>\n";
    5454} ?>
  • trunk/wp-admin/includes/class-wp-upgrader.php

    r13686 r13733  
    10871087                if ( is_string($error) && isset( $this->upgrader->strings[$error] ) )
    10881088                        $this->error = $this->upgrader->strings[$error];
    1089                
     1089
    10901090                if ( is_wp_error($error) && $error->get_error_code() ) {
    10911091                        foreach ( $error->get_error_messages() as $emessage ) {
  • trunk/wp-admin/includes/export.php

    r13573 r13733  
    3939header('Content-Type: text/xml; charset=' . get_option('blog_charset'), true);
    4040
    41 if ( $post_type and $post_type != 'all' ) { 
    42                 $where = $wpdb->prepare("WHERE post_type = %s ", $post_type); 
    43 } else { 
    44                 $where = "WHERE post_type != 'revision' "; 
    45 } 
    46 if ( $author and $author != 'all' ) { 
    47                 $author_id = (int) $author; 
    48                 $where .= $wpdb->prepare("AND post_author = %d ", $author_id); 
    49 } 
    50 if ( $start_date and $start_date != 'all' ) { 
    51                 $where .= $wpdb->prepare("AND post_date >= %s ", $start_date); 
    52 } 
    53 if ( $end_date and $end_date != 'all' ) { 
    54                 $where .= $wpdb->prepare("AND post_date < %s ", $end_date); 
    55 } 
    56 if ( $category and $category != 'all' ) { 
    57                 $taxomony_id = (int) $category; 
    58                 $where .= $wpdb->prepare("AND ID IN (SELECT object_id FROM {$wpdb->term_relationships} " . "WHERE term_taxonomy_id = %d) ", $taxomony_id); 
    59 } 
    60 if ( $status and $status != 'all' ) { 
    61                 $where .= $wpdb->prepare("AND post_status = %s ", $status); 
    62 } 
     41if ( $post_type and $post_type != 'all' ) {
     42                $where = $wpdb->prepare("WHERE post_type = %s ", $post_type);
     43} else {
     44                $where = "WHERE post_type != 'revision' ";
     45}
     46if ( $author and $author != 'all' ) {
     47                $author_id = (int) $author;
     48                $where .= $wpdb->prepare("AND post_author = %d ", $author_id);
     49}
     50if ( $start_date and $start_date != 'all' ) {
     51                $where .= $wpdb->prepare("AND post_date >= %s ", $start_date);
     52}
     53if ( $end_date and $end_date != 'all' ) {
     54                $where .= $wpdb->prepare("AND post_date < %s ", $end_date);
     55}
     56if ( $category and $category != 'all' ) {
     57                $taxomony_id = (int) $category;
     58                $where .= $wpdb->prepare("AND ID IN (SELECT object_id FROM {$wpdb->term_relationships} " . "WHERE term_taxonomy_id = %d) ", $taxomony_id);
     59}
     60if ( $status and $status != 'all' ) {
     61                $where .= $wpdb->prepare("AND post_status = %s ", $status);
     62}
    6363
    6464// grab a snapshot of post IDs, just in case it changes during the export
  • trunk/wp-admin/includes/file.php

    r13662 r13733  
    314314        // A writable uploads dir will pass this test. Again, there's no point overriding this one.
    315315        if ( ! ( ( $uploads = wp_upload_dir($time) ) && false === $uploads['error'] ) )
    316                 return call_user_func($upload_error_handler, $file, $uploads['error'] ); 
     316                return call_user_func($upload_error_handler, $file, $uploads['error'] );
    317317
    318318        $filename = wp_unique_filename( $uploads['path'], $file['name'], $unique_filename_callback );
  • trunk/wp-admin/includes/misc.php

    r13609 r13733  
    657657/**
    658658 * Send a HTTP header to disable content type sniffing in browsers which support it.
    659  * 
     659 *
    660660 * @link http://blogs.msdn.com/ie/archive/2008/07/02/ie8-security-part-v-comprehensive-protection.aspx
    661661 * @link http://src.chromium.org/viewvc/chrome?view=rev&revision=6985
    662  * 
     662 *
    663663 * @since 3.0.0.
    664664 * @return none
    665665 */
    666666function send_nosniff_header() {
    667         @header( 'X-Content-Type-Options: nosniff' ); 
     667        @header( 'X-Content-Type-Options: nosniff' );
    668668}
    669669/**
  • trunk/wp-admin/includes/ms.php

    r13715 r13733  
    169169        if ( !is_array( $users ) )
    170170                return false;
    171        
     171
    172172    screen_icon('tools');
    173173    ?>
    … …  
    184184                if ( $val != '' && $val != '0' ) {
    185185                        $delete_user = new WP_User( $val );
    186            
     186
    187187                        if ( in_array( $delete_user->user_login, $site_admins ) )
    188188                                wp_die( sprintf( __( 'Warning! User cannot be deleted. The user %s is a network admnistrator.' ), $delete_user->user_login ) );
    189                
     189
    190190                        echo "<input type='hidden' name='user[]' value='{$val}'/>\n";
    191191                        $blogs = get_blogs_of_user( $val, true );
    192            
     192
    193193                        if ( !empty( $blogs ) ) {
    194194                                echo '<p><strong>' . sprintf( __( 'Sites from %s:' ), $delete_user->user_login ) . '</strong></p>';
  • 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;
  • trunk/wp-admin/includes/plugin.php

    r13579 r13733  
    558558 * @param string|array $plugins
    559559 * @param string $redirect Redirect to page after successful activation.
    560  * @param bool $network_wide Whether to enable the plugin for all sites in the network. 
     560 * @param bool $network_wide Whether to enable the plugin for all sites in the network.
    561561 * @return bool|WP_Error True when finished or WP_Error if there were errors during a plugin activation.
    562562 */
  • trunk/wp-admin/includes/post.php

    r13729 r13733  
    271271                        unset($post_data['post_category']);
    272272        }
    273        
     273
    274274        $tax_input = array();
    275275        if ( isset($post_data['tax_input'])) {
    … …  
    279279                        $taxonomy = get_taxonomy( $tax_name );
    280280                        if ( $taxonomy->hierarchical )
    281                                 $tax_input[$tax_name] = array_map( 'absint', $terms );                 
     281                                $tax_input[$tax_name] = array_map( 'absint', $terms );
    282282                        else {
    283283                                $tax_input[$tax_name] = preg_replace( '/\s*,\s*/', ',', rtrim( trim($terms), ' ,' ) );
    … …  
    315315                        continue;
    316316                }
    317                
     317
    318318                $tax_names = get_object_taxonomies( get_post($post_ID) );
    319                
     319
    320320                if ( isset($new_cats) && in_array( 'category', $tax_names ) ) {
    321321                        $cats = (array) wp_get_post_categories($post_ID);
    322322                        $post_data['post_category'] = array_unique( array_merge($cats, $new_cats) );
    323323                }
    324                
     324
    325325                foreach ( $tax_names as $tax_name ) {
    326326                        if( isset( $tax_input[$tax_name])  ) {
  • trunk/wp-admin/includes/template.php

    r13661 r13733  
    863863        foreach ( $taxonomy_names as $taxonomy_name ) {
    864864                $taxonomy = get_taxonomy( $taxonomy_name);
    865                
     865
    866866                if( !$taxonomy->show_ui ) continue;
    867                
     867
    868868                if( $taxonomy->hierarchical )
    869869                        $hierarchical_taxonomies[] = $taxonomy;
    870                 else 
     870                else
    871871                        $flat_taxonomies[] = $taxonomy;
    872872        }
    873        
     873
    874874        $columns = wp_manage_posts_columns($screen);
    875875        $hidden = array_intersect( array_keys( $columns ), array_filter( get_hidden_columns($screen) ) );
    … …  
    966966
    967967        <fieldset class="inline-edit-col-center inline-edit-categories"><div class="inline-edit-col">
    968        
     968
    969969<?php foreach ( $hierarchical_taxonomies as $taxonomy ) : ?>
    970970
    … …  
    29742974
    29752975 * @param string $id Slug-name to identify the section. Used in the 'id' attribute of tags.
    2976  * @param string $title Formatted title of the section. Shown as the heading for the section. 
     2976 * @param string $title Formatted title of the section. Shown as the heading for the section.
    29772977 * @param string $callback Function that echo's out content for the section heading.
    29782978 * @param string $page The slug-name of the settings page on which to show the section (general, reading, writing, ...).
    … …  
    30003000 * The $callback argument should be the name of a function that echoes out the
    30013001 * html input tags for this setting field. Use get_option() to retrive existing
    3002  * values to show. 
     3002 * values to show.
    30033003 *
    30043004 * @since 2.7.0
    … …  
    31033103 *
    31043104 * @global array $wp_settings_errors Storage array of errors registered during this pageload
    3105  * 
     3105 *
    31063106 * @param string $setting Slug title of the setting to which this error applies
    31073107 * @param string $code Slug-name to identify the error. Used as part of 'id' attribute in HTML output.
    … …  
    31303130 * pageload and returns them.
    31313131 *
    3132  * If changes were just submitted ($_GET['updated']) and settings errors were saved 
     3132 * If changes were just submitted ($_GET['updated']) and settings errors were saved
    31333133 * to the 'settings_errors' transient then those errors will be returned instead. This
    31343134 * is used to pass errors back across pageloads.
    … …  
    31783178 *
    31793179 * Part of the Settings API. Outputs a <div> for each error retrieved by get_settings_errors().
    3180  * 
     3180 *
    31813181 * This is called automatically after a settings page based on the Settings API is submitted.
    31823182 * Errors should be added during the validation callback function for a setting defined in register_setting()
    … …  
    33013301function favorite_actions( $screen = null ) {
    33023302        global $post_type_object;
    3303        
     3303
    33043304        $default_action = false;
    3305        
     3305
    33063306        if ( is_string($screen) )
    33073307                $screen = convert_to_screen($screen);
    3308                
     3308
    33093309        if ( isset($post_type_object) ) {
    33103310                switch ( $screen->id ) {
    … …  
    33173317                }
    33183318        }
    3319        
     3319
    33203320        if ( !$default_action ) {
    33213321                switch ( $screen->id ) {
  • trunk/wp-admin/includes/upgrade.php

    r13715 r13733  
    266266                                                                ));
    267267
    268         // Setup default widgets for default theme. 
    269         update_option( 'widget_search', array ( 2 => array ( 'title' => '' ), '_multiwidget' => 1 ) ); 
     268        // Setup default widgets for default theme.
     269        update_option( 'widget_search', array ( 2 => array ( 'title' => '' ), '_multiwidget' => 1 ) );
    270270        update_option( 'widget_recent-posts', array ( 2 => array ( 'title' => '', 'number' => 5 ), '_multiwidget' => 1 ) );
    271271        update_option( 'widget_recent-comments', array ( 2 => array ( 'title' => '', 'number' => 5 ), '_multiwidget' => 1 ) );
    … …  
    11101110        if ( $wp_current_db_version < 12751 ) {
    11111111                populate_roles_300();
    1112                 if ( is_multisite() && is_main_site() && ! defined( 'MULTISITE' ) && get_site_option( 'siteurl' ) === false ) 
     1112                if ( is_multisite() && is_main_site() && ! defined( 'MULTISITE' ) && get_site_option( 'siteurl' ) === false )
    11131113                        add_site_option( 'siteurl', '' );
    11141114        }
  • trunk/wp-admin/js/common.dev.js

    r13548 r13733  
    290290                        this.scrollTop = scroll;
    291291                }
    292                
     292
    293293                if ( e.stopPropagation )
    294294                        e.stopPropagation();
    … …  
    296296                        e.preventDefault();
    297297        });
    298        
     298
    299299        $('#newcontent').blur(function(e) {
    300300                if ( this.lastKey && 9 == this.lastKey )
  • trunk/wp-admin/js/inline-edit-post.dev.js

    r13535 r13733  
    159159                        }
    160160                });
    161                
     161
    162162
    163163                // handle the post status
  • trunk/wp-admin/js/nav-menu.dev.js

    r13730 r13733  
    3434        var item_classes = jQuery('#menu-item-classes' + id).val();
    3535        var item_xfn = jQuery('#menu-item-xfn' + id).val();
    36        
     36
    3737        // Only allow custom links to be editable.
    3838        if ( 'custom' != item_type )
    3939                jQuery( '#edit-menu-item-url' ).attr('disabled', 'disabled' );
    40        
     40
    4141        // Populate the fields for thickbox
    4242        jQuery( '#edit-menu-item-id' ).val(id);
    … …  
    4949        jQuery( '#edit-menu-item-classes' ).val(item_classes);
    5050        jQuery( '#edit-menu-item-xfn' ).val(item_xfn);
    51        
     51
    5252        // focus
    5353        jQuery( '#edit-menu-item-title' ).focus();
    … …  
    6666        var item_classes = jQuery('#edit-menu-item-classes').val();
    6767        var item_xfn = jQuery('#edit-menu-item-xfn').val();
    68        
     68
    6969        // update menu item settings
    7070        jQuery('.menu #menu-item' + id).find('span.item-title').html(item_title);
    … …  
    7676        jQuery('.menu #menu-item-classes' + id).val(item_classes);
    7777        jQuery('.menu #menu-item-xfn' + id).val(item_xfn);
    78        
     78
    7979        jQuery('.menu #menu-item' + id + ' dt:first').animate( { backgroundColor: '#FFFF33' }, { duration: 'normal', complete: function() { jQuery(this).css( 'backgroundColor', '' ); }});
    8080}
    … …  
    8787function wp_remove_menu_item( o ) {
    8888        var todelete = document.getElementById('menu-item' + o);
    89        
     89
    9090        if ( todelete ) {
    9191                // Give some feedback to the user
    … …  
    115115        var randomnumber = wp_get_unique_menu_id();
    116116        var hidden = wp_get_hidden_inputs( randomnumber, item_db_id, item_object_id, item_type, item_append, item_parent_id, item_title, item_url, item_description, item_attr_title, item_target, item_classes, item_xfn );
    117        
     117
    118118        // Adds the item in the queue
    119119        jQuery('.menu').append('<li id="menu-item' + randomnumber + '" value="' + randomnumber + '"><div class="dropzone ui-droppable"></div><dl class="ui-droppable"><dt><span class="item-title">' + item_title + '</span><span class="item-controls"><span class="item-type">' + item_append + '</span><a class="item-edit thickbox" id="edit' + randomnumber + '" value="' + randomnumber +'" onClick="wp_edit_menu_item('+ randomnumber +')" title="' + navMenuL10n.thickbox + '" href="#TB_inline?height=540&width=300&inlineId=menu-item-settings">' + navMenuL10n.edit + '</a> | <a class="item-delete" id="delete' + randomnumber + '" value="' + randomnumber +'">Delete</a></span></dt></dl>' + hidden + '</li>');
    120        
     120
    121121        // Give some feedback to the user
    122122        jQuery( '.menu #menu-item' + randomnumber + ' dt:first' ).animate( { backgroundColor: '#FFFF33' }, { duration: 'normal', complete: function() { jQuery(this).css( 'backgroundColor', '' ); }});
    123        
     123
    124124        // Enable drag-n-drop
    125125        wp_drag_and_drop();
    126        
     126
    127127        // Reload thickbox
    128128        tb_init('a.thickbox, area.thickbox, input.thickbox');
    … …  
    137137        // Grab checked items
    138138        var items = jQuery(button).siblings('.list-wrap').find(':checked');
    139        
     139
    140140        // If nothing was checked, cancel
    141141        if ( 0 == items.length )
    142142                return false;
    143        
     143
    144144        // Loop through each item, grab it's hidden data and add it to the menu.
    145145        jQuery(items).each(function(){
    146146                var item_type = jQuery(this).parent().siblings('.menu-item-type').val();
    147                
     147
    148148                if ( 'custom' == item_type ) {
    149149                        var item_attr_title = jQuery(this).parent().siblings('.menu-item-attr-title').val();
    … …  
    157157                        var item_xfn = '';
    158158                };
    159                
     159
    160160                var item_db_id = jQuery(this).parent().siblings('.menu-item-db-id').val();
    161161                var item_object_id = jQuery(this).parent().siblings('.menu-item-object-id').val();
    … …  
    165165                var item_url = jQuery(this).parent().siblings('.menu-item-url').val();
    166166                var item_description = jQuery(this).parent().siblings('.menu-item-description').val();
    167                
     167
    168168                if ( undefined == item_description ) {
    169169                        item_description = '';
    170170                };
    171                
     171
    172172                // Add the menu item to the menu
    173173                wp_add_item_to_menu( item_db_id, item_object_id, item_type, item_append, item_parent_id, item_title, item_url, item_description, item_attr_title, item_target, item_classes, item_xfn );
    174                
     174
    175175                // uncheck the menu item in the list
    176176                jQuery(this).attr( 'checked', false );
    … …  
    205205                        var li = jQuery(this).parent();
    206206                        var child = !jQuery(this).hasClass('dropzone');
    207                        
     207
    208208                        // Append UL to first child
    209209                        if ( child && li.children('ul').length == 0 ) {
    … …  
    221221                        var draggablevalue = ui.draggable.attr('value');
    222222                        var droppablevalue = li.attr('value');
    223                        
     223
    224224                        li.find('#menu-' + draggablevalue).find('#parent' + draggablevalue).val(droppablevalue);
    225225                        jQuery(this).parent().find('dt').removeAttr('style');
    … …  
    255255function wp_update_post_data() {
    256256        var i = 0;
    257        
     257
    258258         jQuery('.menu li').each(function(i) {
    259259                i = i + 1;
    … …  
    263263        jQuery(this).attr('id','menu-item' + i);
    264264        jQuery(this).attr('value', i);
    265                
     265
    266266        jQuery(this).find('#menu-item-db-id' + j).attr('id','menu-item-db-id' + i);
    267267        jQuery(this).find('#menu-item-object-id' + j).attr('id','menu-item-object-id' + i);
    … …  
    279279                }
    280280                jQuery(this).find('#menu-item-parent-id' + j).attr('value', p);
    281                
     281
    282282                jQuery(this).find('#menu-item-title' + j).attr('id','menu-item-title' + i);
    283283                jQuery(this).find('#menu-item-url' + j).attr('id','menu-item-url' + i);
    … …  
    288288                jQuery(this).find('#menu-item-attr-title' + j).attr('id','menu-item-attr-title' + i);
    289289                jQuery(this).find('#menu-item-target' + j).attr('id','menu-item-target' + i);
    290                
     290
    291291                jQuery('#li-count').attr( 'value', i );
    292292   });
    … …  
    322322/**
    323323 * Returns all the nessecary hidden inputs for each menu item.
    324  * 
     324 *
    325325 * @param string item_db_id - The menu item's db id.
    326326 * @param string item_object_id - The menu item's object id.
    … …  
    338338function wp_get_hidden_inputs( randomnumber, item_db_id, item_object_id, item_type, item_append, item_parent_id, item_title, item_url, item_description, item_attr_title, item_target, item_classes, item_xfn ) {
    339339        var hidden = '';
    340        
     340
    341341        hidden += '<input type="hidden" name="menu-item-db-id[]" id="menu-item-db-id' + randomnumber + '" value="' + item_db_id + '" />';
    342342        hidden += '<input type="hidden" name="menu-item-object-id[]" id="menu-item-object-id' + randomnumber + '" value="' + item_object_id + '" />';
    … …  
    352352        hidden += '<input type="hidden" name="menu-item-classes[]" id="menu-item-classes' + randomnumber + '" value="' + item_classes + '" />';
    353353        hidden += '<input type="hidden" name="menu-item-xfn[]" id="menu-item-xfn' + randomnumber + '" value="' + item_xfn + '" />';
    354        
     354
    355355        return hidden;
    356356}
    … …  
    370370 */
    371371jQuery(document).ready(function($){
    372        
     372
    373373        wp_drag_and_drop();
    374        
     374
    375375        // Delete AYS
    376376        $('#update-nav-menu .deletion').click(function(){
    … …  
    381381                };
    382382        });
    383        
     383
    384384        // Handle Save Button Clicks
    385385        $('#save_menu').click(function(){
    386386                return wp_update_post_data();
    387387        });
    388        
     388
    389389        // close postboxes that should be closed
    390390        $('.if-js-closed').removeClass('if-js-closed').addClass('closed');
    391        
     391
    392392        // postboxes setup
    393393        postboxes.add_postbox_toggles('menus');
    394        
     394
    395395        // Clear the quick search textbox
    396396        $('.quick-search').click(function(){
    397397                $(this).attr( 'value', '' );
    398398        });
    399        
     399
    400400        // Quick Search submit
    401401        $('.quick-search-submit').click(function(){
    402402                $(this).siblings('.quick-search').search();
    403403        });
    404        
     404
    405405        // Edit menu item
    406406        $('#menu-container .item-edit').click(function(){
    407407                return wp_edit_menu_item( $(this).attr('value') );
    408408        });
    409        
     409
    410410        // Delete menu item
    411411        $('#menu-container .item-delete').live( 'click', function(e){
    412412                return wp_remove_menu_item( $(this).attr('value') );
    413413        });
    414        
     414
    415415        // Update menu item settings (thickbox)
    416416        $('#update-menu-item').click(function(){
    … …  
    418418                return tb_remove();
    419419        });
    420        
     420
    421421        // Close thickbox
    422422        $('#cancel-save').click(function(){
    423423                return tb_remove();
    424424        });
    425        
     425
    426426        // Show All Button
    427427        $('.show-all').click(function(e){
    … …  
    431431                jQuery(e.currentTarget).siblings('.hide-all').show();
    432432        });
    433        
     433
    434434        // Hide All Button
    435435        $('.hide-all').click(function(e){
    … …  
    449449                var link_url = jQuery(e.currentTarget).parent().parent().find('#custom-menu-item-url').val();
    450450                var link_name = jQuery(e.currentTarget).parent().parent().find('#custom-menu-item-name').val();
    451                
     451
    452452                // Add link to menu
    453453                wp_add_item_to_menu( 0, '', 'custom', navMenuL10n.custom, 0, link_name, link_url, '', '', '_self', '', '' );
  • trunk/wp-admin/menu.php

    r13679 r13733  
    4949        if ( is_multisite() )
    5050                $submenu[ 'index.php' ][5] = array( __('My Sites'), 'read', 'my-sites.php' );
    51        
     51
    5252        if ( is_super_admin() ) {
    5353                $plugin_update_count = $theme_update_count = $wordpress_update_count = 0;
    … …  
    117117        $_wp_last_object_menu++;
    118118        $ptype_obj = get_post_type_object($ptype);
    119        
     119
    120120        $menu[$_wp_last_object_menu] = array(esc_attr($ptype_obj->label), $ptype_obj->edit_type_cap, "edit.php?post_type=$ptype", '', 'menu-top menu-icon-posts', 'menu-' . sanitize_html_class($ptype), 'div');
    121121        $submenu["edit.php?post_type=$ptype"][5]  = array( __('Edit'), 'edit_posts',  "edit.php?post_type=$ptype");
  • trunk/wp-admin/ms-edit.php

    r13715 r13733  
    306306                if ( $id != '0' && $id != $current_site->blog_id )
    307307                        wpmu_delete_blog( $id, true );
    308        
     308
    309309                wp_redirect( add_query_arg( array('updated' => 'true', 'action' => 'delete'), $_POST[ 'ref' ] ) );
    310310                exit();
    … …  
    343343                                wp_die( __('You are not allowed to change one of these sites.') );
    344344                                exit();
    345                         }; 
    346                 }; 
     345                        };
     346                };
    347347
    348348                wp_redirect( add_query_arg( array('updated' => 'true', 'action' => $blogfunction), $_SERVER['HTTP_REFERER'] ) );
  • trunk/wp-admin/ms-sites.php

    r13665 r13733  
    244244                                                foreach ( (array) $blogusers as $key => $val ) {
    245245                                                        if ( isset( $val->meta_value ) && ! $val->meta_value )
    246                                                                 continue; 
     246                                                                continue;
    247247                                                        $t = @unserialize( $val->meta_value );
    248248                                                        if ( is_array( $t ) ) {
    … …  
    338338
    339339                $s = isset($_GET['s']) ? stripslashes( trim( $_GET[ 's' ] ) ) : '';
    340                 $like_s = esc_sql( like_escape( $s ) ); 
     340                $like_s = esc_sql( like_escape( $s ) );
    341341
    342342                $query = "SELECT * FROM {$wpdb->blogs} WHERE site_id = '{$wpdb->siteid}' ";
    … …  
    420420                $status_class = '';
    421421                $count = get_blog_count();
    422                
     422
    423423                if ( empty($_GET['blogstatus']) || $_GET['blogstatus'] == 'all' )
    424424                                $status_class = ' class="current"';
    … …  
    475475                number_format_i18n( ( $pagenum - 1 ) * $per_page + 1 ),
    476476                number_format_i18n( min( $pagenum * $per_page, $num_pages ) ),
    477                 number_format_i18n( $num_pages ), 
     477                number_format_i18n( $num_pages ),
    478478                $page_links
    479479                ); echo $page_links_text; ?>
    480480                </div>
    481481                <?php } ?>
    482                
     482
    483483                <div class="view-switch">
    484484                        <a href="<?php echo esc_url(add_query_arg('mode', 'list', $_SERVER['REQUEST_URI'])) ?>"><img <?php if ( 'list' == $mode ) echo 'class="current"'; ?> id="view-switch-list" src="<?php echo esc_url( includes_url( 'images/blank.gif' ) ); ?>" width="20" height="20" title="<?php _e('List View') ?>" alt="<?php _e('List View') ?>" /></a>
    … …  
    488488                </div>
    489489
    490                 <div class="clear"></div> 
     490                <div class="clear"></div>
    491491
    492492                <?php
    … …  
    540540                                        if ( $order_by == $column_id )
    541541                                                $order2 = ($order == 'DESC') ? 'ASC' : 'DESC';
    542                                                
     542
    543543                                        $column_link .= esc_url(add_query_arg( array('order' => $order2, 'paged' => $pagenum, 'sortby' => $column_id ), remove_query_arg( array('action', 'updated'), $_SERVER['REQUEST_URI'] ) ) );
    544544                                        $column_link .= "'>{$column_display_name}</a>";
    … …  
    547547                                <th scope="col">
    548548                                        <?php echo $col_url ?>
    549                                 </th> 
     549                                </th>
    550550                                <?php } ?>
    551551                                </tr>
    … …  
    640640                                                                                $date = 'Y/m/d \<\b\r \/\> g:i:s a';
    641641                                                                        echo ( $blog['last_updated'] == '0000-00-00 00:00:00' ) ? __("Never") : mysql2date( __( $date ), $blog['last_updated'] ); ?>
    642                                                                 </td> 
     642                                                                </td>
    643643                                                        <?php
    644644                                                        break;
  • trunk/wp-admin/ms-users.php

    r13443 r13733  
    196196                                                                <td class="username column-username">
    197197                                                                        <?php echo $avatar; ?><strong><a href="<?php echo $edit; ?>" class="edit"><?php echo stripslashes($user['user_login']); ?></a><?php
    198                                                                 if ( in_array( $user[ 'user_login' ], $super_admins ) ) 
     198                                                                if ( in_array( $user[ 'user_login' ], $super_admins ) )
    199199                                                                        echo ' - ' . __( 'Super admin' );
    200200?></strong>
  • trunk/wp-admin/nav-menus.php

    r13732 r13733  
    6363                }
    6464                break;
    65        
     65
    6666        case 'update':
    6767                check_admin_referer( 'update-nav_menu' );
    68                
     68
    6969                // Add Menu
    7070                if ( isset($_POST['create-menu']) ) {
    … …  
    9292                        $new_nav_menu = wp_update_term( $nav_menu_selected_id, 'nav_menu', $args );
    9393                }
    94                
     94
    9595                // Update menu items
    9696                $update_nav_items = isset( $_POST['li-count'] ) ? (int) $_POST['li-count'] : 0;
    9797                $update_nav_menu = is_nav_menu( $nav_menu_selected_id );
    98                
     98
    9999                if ( !is_wp_error($update_nav_menu) ) {
    100100                        $menu_items = wp_get_nav_menu_items( $nav_menu_selected_id, array('orderby' => 'ID', 'output' => ARRAY_A, 'output_key' => 'ID') );
    101101                        $parent_menu_ids = array();
    102                        
     102
    103103                        // Loop through all POST variables
    104104                        for ( $k = 0; $k < $update_nav_items; $k++ ) {
    … …  
    109109                                $menu_item_type                 = isset( $_POST['menu-item-type'][$k] )                 ? $_POST['menu-item-type'][$k]          : 'custom';
    110110                                $menu_item_append               = isset( $_POST['menu-item-append'][$k] )               ? $_POST['menu-item-append'][$k]        : 'custom';
    111                                
     111
    112112                                $menu_item_title                = isset( $_POST['menu-item-title'][$k] )                ? $_POST['menu-item-title'][$k]         : '';
    113113                                $menu_item_url                  = isset( $_POST['menu-item-url'][$k] )                  ? $_POST['menu-item-url'][$k]           : '';
    … …  
    117117                                $menu_item_classes              = isset( $_POST['menu-item-classes'][$k] )              ? $_POST['menu-item-classes'][$k]       : '';
    118118                                $menu_item_xfn                  = isset( $_POST['menu-item-xfn'][$k] )                  ? $_POST['menu-item-xfn'][$k]           : '';
    119                                
     119
    120120                                // Menu item title can't be blank
    121121                                if ( '' == $menu_item_title )
    122122                                        continue;
    123                                
     123
    124124                                // Populate the menu item
    125125                                $post = array( 'post_status' => 'publish', 'post_type' => 'nav_menu_item', 'post_author' => $user_ID,
    … …  
    137137                                }
    138138                                $parent_menu_ids[$k] = $menu_item_db_id;
    139                                
     139
    140140                                // @todo sanitize type append and ID.
    141141                                update_post_meta( $menu_item_db_id, 'menu_item_type', $menu_item_type );
    … …  
    146146                                update_post_meta( $menu_item_db_id, 'menu_item_classes', sanitize_html_class($menu_item_classes) );
    147147                                update_post_meta( $menu_item_db_id, 'menu_item_xfn', sanitize_html_class($menu_item_xfn) );
    148                                
     148
    149149                                // @todo: only save custom link urls.
    150150                                update_post_meta( $menu_item_db_id, 'menu_item_url', esc_url_raw( $menu_item_url ) );
    151151                        }
    152                        
     152
    153153                        // Remove menu items from the menu that weren't in $_POST
    154154                        if ( !empty( $menu_items ) ) {
    … …  
    178178// Else try to grab the first menu from the menus list
    179179} elseif ( 0 == $nav_menu_selected_id && ! empty($nav_menus) ) {
    180         $nav_menu_selected_id = $nav_menus[0]->term_id; 
     180        $nav_menu_selected_id = $nav_menus[0]->term_id;
    181181}
    182182
    … …  
    215215                        foreach ( $nav_menus as $_nav_menu ) {
    216216                                $sep = end( $nav_menus ) == $_nav_menu ? '' : ' | ';
    217                                
     217
    218218                                if ( $nav_menu_selected_id == $_nav_menu->term_id )
    219219                                        echo '<li><a href="'. admin_url( 'nav-menus.php?action=edit&amp;menu=' . esc_attr($_nav_menu->term_id) ) .'" class="current">'. esc_html( $_nav_menu->name ) .'</a>'. $sep .'</li>';
    … …  
    233233                        <input type="hidden" name="li-count" id="li-count" value="0" />
    234234                        <input type="hidden" name="menu" id="menu" value="<?php echo esc_attr( $nav_menu_selected_id ); ?>" />
    235                        
     235
    236236                        <div id="post-body">
    237237                                <div id="post-body-content">
    … …  
    240240                                                        <h3 class="hndle"><?php echo esc_html( $nav_menu_selected_title ); ?></h3>
    241241                                                        <div class="inside">
    242                                                                
     242
    243243                                                                <?php echo wp_get_nav_menu( array( 'context' => 'backend', 'menu' => $nav_menu_selected_id ) ); ?>
    244                                                                
     244
    245245                                                        </div><!-- /.inside -->
    246246                                                <!-- /#nav-menu-canvas .postbox-->
    … …  
    253253                        </div><!--- /#post-body -->
    254254                        <div id="menu-settings-column" class="inner-sidebar">
    255                                
     255
    256256                                <?php do_meta_boxes( 'menus', 'side', null ); ?>
    257                                
     257
    258258                        </div><!-- /#menu-settings-column -->
    259259                </form><!--/#update-nav-menu-->
  • trunk/wp-admin/network.php

    r13679 r13733  
    279279        }
    280280?></textarea>
    281 <?php   
     281<?php
    282282        }
    283283?>
  • trunk/wp-admin/options.php

    r13721 r13733  
    3030if ( !current_user_can('manage_options') )
    3131        wp_die(__('Cheatin&#8217; uh?'));
    32        
     32
    3333if ( is_multisite() && !is_super_admin() && 'update' != $action )
    3434        wp_die(__('Cheatin&#8217; uh?'));
  • trunk/wp-admin/plugins.php

    r13602 r13733  
    9797                        break;
    9898                case 'update-selected' :
    99                
     99
    100100                        check_admin_referer( 'bulk-manage-plugins' );
    101                        
     101
    102102                        if ( isset( $_GET['plugins'] ) )
    103103                                $plugins = explode( ',', $_GET['plugins'] );
    … …  
    106106                        else
    107107                                $plugins = array();
    108                        
     108
    109109                        $title = __( 'Upgrade Plugins' );
    110110                        $parent_file = 'plugins.php';
    111111
    112112                        require_once( 'admin-header.php' );
    113                        
     113
    114114                        echo '<div class="wrap">';
    115115                        screen_icon();
  • trunk/wp-admin/tools.php

    r13524 r13733  
    9191$tags = get_taxonomy('post_tag');
    9292
    93 if ( current_user_can($cats->manage_cap) || current_user_can($tags->manage_cap) ) : ?> 
    94 <div class="tool-box"> 
     93if ( current_user_can($cats->manage_cap) || current_user_can($tags->manage_cap) ) : ?>
     94<div class="tool-box">
    9595    <h3 class="title"><?php _e('Category&#47;Tag Conversion') ?></h3>
    96     <p><?php printf(__('Use this to convert <a href="%s">categories to tags</a>, or <a href="%s">tags to categories</a>.'), 'admin.php?import=wp-cat2tag', 'admin.php?import=wp-cat2tag&amp;step=3'); ?></p> 
    97 </div> 
     96    <p><?php printf(__('Use this to convert <a href="%s">categories to tags</a>, or <a href="%s">tags to categories</a>.'), 'admin.php?import=wp-cat2tag', 'admin.php?import=wp-cat2tag&amp;step=3'); ?></p>
     97</div>
    9898<?php
    99 endif; 
     99endif;
    100100
    101101do_action( 'tool_box' );
  • trunk/wp-admin/update-core.php

    r13728 r13733  
    268268        foreach ( (array) $themes as $stylesheet => $theme_data) {
    269269                $screenshot = $theme_data->{'Theme Root URI'} . '/' . $stylesheet . '/' . $theme_data->Screenshot;
    270                
     270
    271271                echo "
    272272        <tr class='active'>
  • trunk/wp-admin/update.php

    r13686 r13733  
    4343
    4444                iframe_footer();
    45                        
     45
    4646        } elseif ( 'upgrade-plugin' == $action ) {
    4747                if ( ! current_user_can('update_plugins') )
  • trunk/wp-admin/upload.php

    r13690 r13733  
    397397                        echo esc_html( strtoupper( $matches[1] ) );
    398398                else
    399                         echo strtoupper( str_replace( 'image/', '', get_post_mime_type() ) ); 
     399                        echo strtoupper( str_replace( 'image/', '', get_post_mime_type() ) );
    400400                ?>
    401401
  • trunk/wp-includes/default-filters.php

    r13652 r13733  
    8787}
    8888
    89 // Format titles 
     89// Format titles
    9090foreach ( array( 'single_post_title', 'single_cat_title', 'single_tag_title', 'single_month_title' ) as $filter ) {
    9191        add_filter( $filter, 'wptexturize' );
  • trunk/wp-includes/default-widgets.php

    r13712 r13733  
    10301030
    10311031        function _get_current_taxonomy($instance) {
    1032                 if ( !empty($instance['taxonomy']) && is_taxonomy($instance['taxonomy']) ) 
     1032                if ( !empty($instance['taxonomy']) && is_taxonomy($instance['taxonomy']) )
    10331033                        return $instance['taxonomy'];
    10341034
    … …  
    10481048                parent::WP_Widget( 'nav_menu', __('Navigation Menu'), $widget_ops );
    10491049        }
    1050        
     1050
    10511051        function widget($args, $instance) {
    10521052                // Get menu
    10531053                $nav_menu = wp_get_nav_menu_object( $instance['nav_menu'] );
    1054                
     1054
    10551055                if ( !$nav_menu )
    1056                         return;         
    1057                
     1056                        return;
     1057
    10581058                echo $args['before_widget'];
    1059                
     1059
    10601060                if ( isset($instance['title']) )
    10611061                        echo $args['before_title'] . $instance['title'] . $args['after_title'];
    1062                
     1062
    10631063                wp_nav_menu( array( 'menu' => $nav_menu ) );
    1064                
     1064
    10651065                echo $args['after_widget'];
    10661066        }
    … …  
    10751075                $title = isset( $instance['title'] ) ? $instance['title'] : '';
    10761076                $nav_menu = isset( $instance['nav_menu'] ) ? $instance['nav_menu'] : '';
    1077                
     1077
    10781078                // Get menus
    10791079                $menus = get_terms( 'nav_menu', array( 'hide_empty' => false ) );
    1080                
     1080
    10811081                // If no menus exists, direct the user to go and create some.
    10821082                if ( !$menus ) {
  • trunk/wp-includes/formatting.php

    r13725 r13733  
    757757 *
    758758 * @since 3.0.0
    759  * 
     759 *
    760760 * @param string $key String key
    761761 * @return string Sanitized key
  • trunk/wp-includes/functions.php

    r13725 r13733  
    18261826                                continue;
    18271827                        if ( defined( 'CUSTOM_USER_META_TABLE' ) && CUSTOM_USER_META_TABLE == $table )
    1828                                 continue;                               
     1828                                continue;
    18291829
    18301830                        // If visiting repair.php, return true and let it take over.
  • trunk/wp-includes/l10n.php

    r13330 r13733  
    317317/**
    318318 * Unloads translations for a domain
    319  * 
     319 *
    320320 * @since 3.0.0
    321321 * @param string $domain Textdomain to be unloaded
  • trunk/wp-includes/link-template.php

    r13683 r13733  
    20602060 *
    20612061 * @since 3.0.0.
    2062  * 
     2062 *
    20632063 * @param int $id A post or blog id.  Default is 0, which means the current post or blog.
    20642064 * @param string $contex Whether the id is a 'blog' id, 'post' id, or 'media' id.  If 'post', the post_type of the post is consulted.  If 'query', the current query is consulted to determine the id and context. Default is 'post'.
  • trunk/wp-includes/nav-menu-template.php

    r13731 r13733  
    2626        $defaults = array( 'menu' => '', 'container' => 'div', 'container_class' => '', 'menu_class' => 'menu', 'echo' => true,
    2727        'fallback_cb' => 'wp_page_menu', 'before_link' => '', 'after_link' => '', 'before_title' => '', 'after_title' => '', );
    28        
     28
    2929        $args = wp_parse_args( $args, $defaults );
    3030        $args = apply_filters( 'wp_nav_menu_args', $args );
    … …  
    3333        // Get the nav menu
    3434        $menu = wp_get_nav_menu_object( $args->menu );
    35                
     35
    3636        // If we couldn't find a menu based off the name, id or slug,
    3737        // get the first menu that has items.
    … …  
    5252        if ( 'div' == $args->container ) {
    5353                $class = $args->container_class ? ' class="' . esc_attr($args->container_class) . '"' : '';
    54                
     54
    5555                if ( is_nav_menu($menu) ) {
    5656                        $nav_menu .= '<div id="menu-' . $menu->slug . '"'. $class .'>';
    … …  
    6464        if ( 'div' == $args->container )
    6565                $nav_menu .= '</div>';
    66        
     66
    6767        $nav_menu = apply_filters( 'wp_nav_menu', $nav_menu, $args );
    6868
    … …  
    8686        $defaults = array( 'menu' => '', 'menu_class' => 'menu', 'context' => 'frontend',
    8787        'fallback_cb' => '', 'before_link' => '', 'after_link' => '', 'before_title' => '', 'after_title' => '', );
    88        
     88
    8989        $args = wp_parse_args( $args, $defaults );
    9090        $args = apply_filters( 'wp_get_nav_menu_args', $args );
    9191        $args = (object) $args;
    92        
     92
    9393        // Variable setup
    9494        $nav_menu = '';
    … …  
    9797        $parent_stack = array();
    9898        $parent_menu_order = array();
    99        
     99
    100100        // Get the menu object
    101101        $menu = wp_get_nav_menu_object( $args->menu );
    102        
     102
    103103        // If the menu exists, get it's items.
    104104        if ( $menu && !is_wp_error($menu) )
    105105                $menu_items = wp_get_nav_menu_items( $menu->term_id, 'backend' );
    106        
     106
    107107        // If no menu was found or if the menu has no items, call the fallback_cb
    108108        if ( !$menu || is_wp_error($menu) || ( isset($menu_items) && empty($menu_items) ) ) {
    … …  
    112112                }
    113113        }
    114        
     114
    115115        foreach ( $menu_items as $key => $menu_item ) {
    116116                // Set up the $menu_item variables
    … …  
    120120                $maybe_value = 'frontend' == $args->context ? '' : ' value="'. $menu_item->ID .'"';
    121121                $classes = 'frontend' == $args->context ? ' class="menu-item-type-'. $type . $menu_item->li_class .'"' : '';
    122                
     122
    123123                $items .= '<li id="menu-item-'. $menu_item->ID .'"'. $maybe_value . $classes .'>';
    124124                $items .= wp_get_nav_menu_item( $menu_item, $args->context, $args );
    125                
     125
    126126                // Indent children
    127127                $last_item = ( count( $menu_items ) == $menu_item->menu_order );
    … …  
    142142                }
    143143        }
    144        
     144
    145145        // CSS class
    146146        $ul_class = $args->menu_class ? ' class="'. $args->menu_class .'"' : '';
    147147        $nav_menu .= '<ul'. $ul_class .'>';
    148        
     148
    149149        // Allow plugins to hook into the menu to add their own <li>'s
    150150        if ( 'frontend' == $args->context ) {
    … …  
    155155                $nav_menu .= $items;
    156156        }
    157        
     157
    158158        $nav_menu .= '</ul>';
    159        
     159
    160160        return apply_filters( 'wp_get_nav_menu', $nav_menu );
    161161}
    … …  
    180180                        $attributes .= ( isset($menu_item->xfn) && '' != $menu_item->xfn ) ? ' rel="'. esc_attr($menu_item->xfn) .'"' : '';
    181181                        $attributes .= ( isset($menu_item->url) && '' != $menu_item->url ) ? ' href="'. esc_attr($menu_item->url) .'"' : '';
    182                        
     182
    183183                        $output .= esc_html( $args->before_link );
    184184                        $output .= '<a'. $attributes .'>';
    … …  
    186186                        $output .= '</a>';
    187187                        $output .= esc_html( $args->after_link );
    188                        
    189                         break;
    190                
     188
     189                        break;
     190
    191191                case 'backend':
    192192                        $output .= '<dl><dt>';
    … …  
    205205                        }
    206206                        $output .= '<span class="item-type">'. esc_html($label) .'</span>';
    207                        
     207
    208208                        // Actions
    209209                        $output .= '<a class="item-edit thickbox" id="edit'. esc_attr( $menu_item->menu_order ) .'" value="'. esc_attr( $menu_item->menu_order ) .'" title="'. __('Edit Menu Item') .'" href="#TB_inline?height=540&width=300&inlineId=menu-item-settings">'. __('Edit') .'</a> | ';
    210210                        $output .= '<a class="item-delete" id="delete'. esc_attr( $menu_item->menu_order ) .'" value="'. esc_attr( $menu_item->menu_order ) .'">'. __('Delete') .'</a>';
    211                        
     211
    212212                        $output .= '</dt></dl>';
    213                        
     213
    214214                        // Menu Item Settings
    215215                        $output .= '<input type="hidden" name="menu-item-db-id[]" id="menu-item-db-id'. esc_attr( $menu_item->menu_order ) .'" value="'. esc_attr( $menu_item->ID ) .'" />';
    … …  
    227227                        $output .= '<input type="hidden" name="menu-item-target[]" id="menu-item-target'. esc_attr( $menu_item->menu_order ) .'" value="'. esc_attr( $menu_item->target ) .'" />';
    228228                        break;
    229                
     229
    230230                case 'custom':
    231231                        $menu_id = 'menu-item-' . $menu_item->db_id;
    232232                        $output .= '<label class="menu-item-title"><input type="checkbox" id="'. esc_attr( $menu_id ) .'" name="'. esc_attr( $menu_item->title ) .'" value="'. esc_attr( $menu_item->url ) .'" />'. $menu_item->title .'</label>';
    233                        
     233
    234234                        // Menu item hidden fields
    235235                        $output .= '<input type="hidden" class="menu-item-db-id" value="'. esc_attr( $menu_item->db_id ) .'" />';
    … …  
    246246                        $output .= '<input type="hidden" class="menu-item-xfn" value="'. esc_attr( $menu_item->xfn ) .'" />';
    247247                        break;
    248                
     248
    249249                case 'taxonomy':
    250250                case 'post_type':
    251251                        $menu_id = 'menu-item-' . $menu_item->db_id;
    252252                        $output .= '<label class="menu-item-title"><input type="checkbox" id="'. esc_attr( $menu_id ) .'" name="'. esc_attr( $menu_item->title ) .'" value="'. esc_attr( $menu_item->url ) .'" />'. $menu_item->title .'</label>';
    253                        
     253
    254254                        // Menu item hidden fields
    255255                        $output .= '<input type="hidden" class="menu-item-db-id" value="0" />';
    … …  
    263263                        break;
    264264        }
    265        
     265
    266266        return $output;
    267267}
  • trunk/wp-includes/nav-menu.php

    r13722 r13733  
    119119 *
    120120 * @param string $menu menu name, id, or slug
    121  * @param string $args 
     121 * @param string $args
    122122 * @return mixed $items array of menu items, else false.
    123123 */
    124124function wp_get_nav_menu_items( $menu, $args = array() ) {
    125125        $menu = wp_get_nav_menu_object( $menu );
    126        
     126
    127127        if ( !$menu )
    128128                return false;
    129        
     129
    130130        $items = get_objects_in_term( $menu->term_id, 'nav_menu' );
    131131
    … …  
    133133                $defaults = array( 'orderby' => 'menu_order', 'post_type' => 'nav_menu_item', 'post_status' => 'publish', 'output' => ARRAY_A, 'output_key' => 'menu_order' );
    134134                $args = wp_parse_args( $args, $defaults );
    135                 if ( count( $items ) > 1 )     
     135                if ( count( $items ) > 1 )
    136136                        $args['include'] = implode( ',', $items );
    137137                else
    … …  
    165165function wp_setup_nav_menu_item( $menu_item, $menu_item_type = null, $menu_item_object = '' ) {
    166166        global $wp_query;
    167        
     167
    168168        switch ( $menu_item_type ) {
    169169                case 'frontend':
    … …  
    174174
    175175                        $menu_item->append = get_post_meta( $menu_item->ID, 'menu_item_append', true );
    176                        
     176
    177177                        $menu_item->title = $menu_item->post_title;
    178178                        $menu_item->url = get_post_meta( $menu_item->ID, 'menu_item_url', true );
    179179                        $menu_item->target = get_post_meta( $menu_item->ID, 'menu_item_target', true );
    180                        
     180
    181181                        $menu_item->attr_title = strip_tags( $menu_item->post_excerpt );
    182182                        $menu_item->description = strip_tags( $menu_item->post_content );
    183                        
     183
    184184                        $menu_item->classes = get_post_meta( $menu_item->ID, 'menu_item_classes', true );;
    185185                        $menu_item->xfn = get_post_meta( $menu_item->ID, 'menu_item_xfn', true );
    186186                        $menu_item->li_class = ( $menu_item->object_id == $wp_query->get_queried_object_id() ) ? ' current_page_item' : '';
    187187                        break;
    188                        
     188
    189189                case 'custom':
    190190                        $menu_item->db_id = (int) $menu_item->ID;
    … …  
    193193                        $menu_item->type = 'custom'; //$menu_item_type
    194194                        $menu_item->append = 'custom';
    195                        
     195
    196196                        $menu_item->attr_title = strip_tags( $menu_item->post_excerpt );
    197197                        $menu_item->description = strip_tags( $menu_item->post_content );
    … …  
    201201                        $menu_item->target = get_post_meta( $menu_item->ID, 'menu_item_target', true );
    202202                        break;
    203                        
     203
    204204                case 'post_type':
    205205                        $menu_item->db_id = 0;
    … …  
    207207                        $menu_item->parent_id = (int) $menu_item->post_parent;
    208208                        $menu_item->type = $menu_item_type;
    209                        
     209
    210210                        $object = get_post_type_object( $menu_item_object );
    211211                        $menu_item->append = $object->name;
    … …  
    214214                        $menu_item->url = get_permalink( $menu_item->ID );
    215215                        $menu_item->target = '_self';
    216                        
     216
    217217                        $menu_item->attr_title = '';
    218218                        $menu_item->description = strip_tags( $menu_item->post_content );
    219219                        break;
    220                        
     220
    221221                case 'taxonomy':
    222222                        $menu_item->ID = $menu_item->term_id;
    … …  
    225225                        $menu_item->parent_id = (int) $menu_item->parent;
    226226                        $menu_item->type = $menu_item_type;
    227                        
     227
    228228                        $object = get_taxonomy( $menu_item_object );
    229229                        $menu_item->append = $object->name;
    … …  
    239239        $menu_item->classes = get_post_meta( $menu_item->ID, 'menu_item_classes', true );
    240240        $menu_item->xfn = get_post_meta( $menu_item->ID, 'menu_item_xfn', true );
    241        
     241
    242242        return $menu_item;
    243243}
  • trunk/wp-includes/pluggable.php

    r13657 r13733  
    167167
    168168        $results = $wpdb->get_results("SELECT * FROM $wpdb->users WHERE ID IN ($list)");
    169    
     169
    170170        _fill_many_users($results);
    171171}
  • trunk/wp-includes/post.php

    r13717 r13733  
    29312931        $number = (int) $number;
    29322932        $offset = (int) $offset;
    2933        
     2933
    29342934        // Make sure the post type is hierarchical
    29352935        $hierarchical_post_types = get_post_types( array( 'hierarchical' => true ) );
    29362936        if ( !in_array( $post_type, $hierarchical_post_types ) )
    29372937                return false;
    2938        
     2938
    29392939        // Make sure we have a valid post status
    29402940        if ( !in_array($post_status, get_post_stati()) )
    … …  
    30323032        if ( $parent >= 0 )
    30333033                $where .= $wpdb->prepare(' AND post_parent = %d ', $parent);
    3034                
     3034
    30353035        $where_post_type = $wpdb->prepare( "post_type = '%s' AND post_status = '%s'", $post_type, $post_status );
    30363036
    … …  
    31793179                else
    31803180                        $post_category = array();
    3181         }       
     3181        }
    31823182
    31833183        // Are we updating or creating?
    … …  
    38153815        if ( $lastpostmodified )
    38163816                return apply_filters( 'get_lastpostmodified', $lastpostmodified, $timezone );
    3817        
     3817
    38183818        switch ( strtolower($timezone) ) {
    38193819                case 'gmt':
    … …  
    38273827                        break;
    38283828        }
    3829        
     3829
    38303830        $lastpostdate = get_lastpostdate($timezone);
    38313831        if ( $lastpostdate > $lastpostmodified )
    38323832                $lastpostmodified = $lastpostdate;
    38333833
    3834         if ( $lastpostmodified ) 
    3835                 wp_cache_set( "lastpostmodified:$timezone", $lastpostmodified, 'timeinfo' ); 
     3834        if ( $lastpostmodified )
     3835                wp_cache_set( "lastpostmodified:$timezone", $lastpostmodified, 'timeinfo' );
    38363836
    38373837        return apply_filters( 'get_lastpostmodified', $lastpostmodified, $timezone );
  • trunk/wp-includes/query.php

    r13725 r13733  
    225225 *
    226226 * If no taxonomy argument is set, returns true if any taxonomy is queried.
    227  * If the taxonomy argument is passed but no term argument, returns true 
     227 * If the taxonomy argument is passed but no term argument, returns true
    228228 *    if the taxonomy or taxonomies in the argument are being queried.
    229  * If both taxonomy and term arguments are passed, returns true 
     229 * If both taxonomy and term arguments are passed, returns true
    230230 *    if the current query is for a term contained in the terms argument
    231231 *    which has a taxonomy contained in the taxonomy argument.
    … …  
    254254                return isset($queried_object->taxonomy) && count( $tax_array ) && in_array($queried_object->taxonomy, $tax_array);
    255255
    256         return isset($queried_object->term_id) && 
     256        return isset($queried_object->term_id) &&
    257257                        count(array_intersect(
    258                                 array($queried_object->term_id, $queried_object->name, $queried_object->slug), 
     258                                array($queried_object->term_id, $queried_object->name, $queried_object->slug),
    259259                                $term_array
    260260                        ));
  • trunk/wp-includes/rewrite.php

    r13689 r13733  
    17811781                        $siteurl = get_option( 'siteurl' );
    17821782                        $siteurl_len = strlen( $siteurl );
    1783                         if ( substr( WP_CONTENT_URL, 0, $siteurl_len ) == $siteurl && strlen( WP_CONTENT_URL ) > $siteurl_len ) 
     1783                        if ( substr( WP_CONTENT_URL, 0, $siteurl_len ) == $siteurl && strlen( WP_CONTENT_URL ) > $siteurl_len )
    17841784                                $content_path = substr( WP_CONTENT_URL, $siteurl_len + 1 );
    17851785                        else
    1786                                 $content_path = 'wp-content'; 
     1786                                $content_path = 'wp-content';
    17871787                        $rules = '<rule name="wordpress - strip index.php" stopProcessing="false">
    17881788                                        <match url="^index.php/(.*)$" />
  • trunk/wp-includes/taxonomy.php

    r13704 r13733  
    161161function is_taxonomy( $taxonomy ) {
    162162        global $wp_taxonomies;
    163                
     163
    164164        return isset($wp_taxonomies[$taxonomy]);
    165165}
    … …  
    262262
    263263        if ( false !== $args['rewrite'] && '' != get_option('permalink_structure') ) {
    264                 $args['rewrite'] = wp_parse_args($args['rewrite'], array( 
    265                         'slug' => sanitize_title_with_dashes($taxonomy), 
    266                         'with_front' => true, 
    267                 )); 
    268                 $wp_rewrite->add_rewrite_tag("%$taxonomy%", '([^/]+)', $args['query_var'] ? "{$args['query_var']}=" : "taxonomy=$taxonomy&term="); 
    269                 $wp_rewrite->add_permastruct($taxonomy, "{$args['rewrite']['slug']}/%$taxonomy%", $args['rewrite']['with_front']); 
     264                $args['rewrite'] = wp_parse_args($args['rewrite'], array(
     265                        'slug' => sanitize_title_with_dashes($taxonomy),
     266                        'with_front' => true,
     267                ));
     268                $wp_rewrite->add_rewrite_tag("%$taxonomy%", '([^/]+)', $args['query_var'] ? "{$args['query_var']}=" : "taxonomy=$taxonomy&term=");
     269                $wp_rewrite->add_permastruct($taxonomy, "{$args['rewrite']['slug']}/%$taxonomy%", $args['rewrite']['with_front']);
    270270        }
    271271
  • trunk/wp-signup.php

    r13629 r13733  
    236236        else
    237237                $signup[ 'blog' ] = 'checked="checked"';
    238                
     238
    239239        //TODO - This doesn't seem to do anything do we really need it?
    240240        $signup['user'] = isset( $signup['user'] ) ? $signup['user'] : '';
Note: See TracChangeset for help on using the changeset viewer.