Make WordPress Core

Changeset 14404


Ignore:
Timestamp:
05/03/2010 08:26:11 PM (16 years ago)
Author:
ryan
Message:

Strip trailing whites.

Location:
trunk
Files:
45 edited

Legend:

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

    r14295 r14404  
    135135        if ( ! current_user_can( 'switch_themes' ) )
    136136                die('-1');
    137        
     137
    138138        require_once ABSPATH . 'wp-admin/includes/nav-menu.php';
    139139
    … …  
    400400        $menu_item_id = (int) $_POST['menu-item'];
    401401        check_admin_referer( 'delete-menu_item_' . $menu_item_id );
    402         if ( ! current_user_can( 'switch_themes' ) ) 
     402        if ( ! current_user_can( 'switch_themes' ) )
    403403                die('-1');
    404404
    … …  
    828828        if ( isset( $_POST['menu-item'] ) ) {
    829829                $item_ids = wp_save_nav_menu_item( $menu_id, $_POST['menu-item'] );
    830                 if ( is_wp_error( $item_ids ) ) 
     830                if ( is_wp_error( $item_ids ) )
    831831                        die('-1');
    832832        } else {
    833833                $item_ids = array();
    834834        }
    835        
     835
    836836        foreach ( (array) $item_ids as $menu_item_id ) {
    837837                $menu_obj = get_post( $menu_item_id );
    … …  
    848848                        'link_after' => '',
    849849                        'link_before' => '',
    850                         'walker' => new Walker_Nav_Menu_Edit, 
     850                        'walker' => new Walker_Nav_Menu_Edit,
    851851                );
    852852                echo walk_nav_menu_tree( $menu_items, 0, (object) $args );
    … …  
    10941094        if ( ! current_user_can( 'switch_themes' ) )
    10951095                die('-1');
    1096        
     1096
    10971097        require_once ABSPATH . 'wp-admin/includes/nav-menu.php';
    10981098
  • trunk/wp-admin/css/ms.dev.css

    r14024 r14404  
    1010}
    1111
    12 #dashboard_right_now div.musubtable { 
    13         border-top: none; 
     12#dashboard_right_now div.musubtable {
     13        border-top: none;
    1414}
    1515
  • trunk/wp-admin/css/nav-menu-rtl.dev.css

    r14279 r14404  
    1 .howto span { 
    2         float: right; 
     1.howto span {
     2        float: right;
    33}
    4 .menu-item-textbox { 
    5         float: left; 
     4.menu-item-textbox {
     5        float: left;
    66}
    7 .add-to-menu { 
    8         float: left; 
     7.add-to-menu {
     8        float: left;
    99}
    1010.menu-item-title input[type="checkbox"] {
    11         margin-left: 3px; 
     11        margin-left: 3px;
    1212}
    1313.menu li dl dt {
    … …  
    1717.menu li ul li {
    1818        margin-left: 0;
    19         margin-right: 20px; 
     19        margin-right: 20px;
    2020}
    21 .menu li .item-title { 
     21.menu li .item-title {
    2222        margin-right: 0;
    23         margin-left: 18em; 
     23        margin-left: 18em;
    2424}
    25 .item-controls { 
     25.item-controls {
    2626        right: auto;
    27         left: 15px; 
     27        left: 15px;
    2828}
    2929.item-type {
    3030        padding-right: 0;
    31         padding-left: 10px; 
     31        padding-left: 10px;
    3232}
  • trunk/wp-admin/css/nav-menu.dev.css

    r14373 r14404  
    5656                margin-bottom: 20px;
    5757        }
    58        
     58
    5959        #nav-menu-header, #post-body {
    6060                border-color: #ccc;
    6161                border-style: solid;
    6262        }
    63        
     63
    6464        #nav-menu-header {
    6565                background: url("../images/gray-grad.png") repeat-x scroll left top #dfdfdf;
    … …  
    7474                border-top-right-radius: 6px;
    7575        }
    76        
     76
    7777        #post-body {
    7878                background: #fff;
    … …  
    8888                border-bottom-right-radius: 6px;
    8989        }
    90        
     90
    9191        #post-body-content {
    9292                position: relative;
    9393        }
    94        
     94
    9595        .post-body-plain {
    9696                padding: 10px 10px 0 0;
    … …  
    100100                font-weight:bold;
    101101        }
    102        
     102
    103103/* Menu Tabs */
    104        
     104
    105105#menu-management .nav-tabs-nav {
    106106        margin: 0 20px;
    … …  
    163163        padding: 0 10px 3px 10px;
    164164        margin-bottom: 5px;
    165 }       
     165}
    166166        #select-nav-menu {
    167167                width: 100px;
    168168                display: inline;
    169169        }
    170        
     170
    171171/* Menu Toolbar */
    172172#menu-management #major-publishing-actions #delete-action {
    … …  
    185185        padding-right: 10px;
    186186}
    187        
     187
    188188        .js .input-with-default-title {
    189189                color: #aaa;
    … …  
    211211/* Button Secondary Actions */
    212212.list-controls { float: left; margin-top: 5px; }
    213 .add-to-menu { 
     213.add-to-menu {
    214214        float: right;
    215215}
    … …  
    266266.menu ul.sub-menu {
    267267}
    268 .menu li { 
     268.menu li {
    269269        margin-bottom: 0;
    270270}
    … …  
    277277.menu li dl dt {
    278278        background: url("../images/gray-grad.png") repeat-x scroll left top #DFDFDF;
    279         border: 1px solid #E6E6E6; 
     279        border: 1px solid #E6E6E6;
    280280        clear:both;
    281         position: relative; 
     281        position: relative;
    282282        padding-left: 10px;
    283283        height: auto;
    284         width: 400px; 
     284        width: 400px;
    285285        line-height: 35px;
    286286        text-shadow: 0 1px 0 #FFFFFF;
    … …  
    290290.menu li dl.menu-item-edit-inactive dt {
    291291        border-radius: 6px;
    292         -webkit-border-radius: 6px; 
     292        -webkit-border-radius: 6px;
    293293        -moz-border-radius: 6px;
    294294        -khtml-border-radius: 6px;
    … …  
    312312}
    313313
    314 .menu li .item-title { 
     314.menu li .item-title {
    315315        padding: 7px 0;
    316316        line-height: 20px;
    … …  
    425425        color: #777;
    426426        font-style: italic;
    427         border: 1px solid #dfdfdf;     
     427        border: 1px solid #dfdfdf;
    428428        border-radius: 6px;
    429         -webkit-border-radius: 6px; 
     429        -webkit-border-radius: 6px;
    430430        -moz-border-radius: 6px;
    431431        -khtml-border-radius: 6px;
  • trunk/wp-admin/css/press-this.dev.css

    r14149 r14404  
    317317        margin: 1px;
    318318}
    319        
     319
    320320.category-add select {
    321321        width: 100%;
  • trunk/wp-admin/css/wp-admin.dev.css

    r14390 r14404  
    20152015
    20162016div.tabs-panel-active {
    2017         display:block; 
     2017        display:block;
    20182018}
    20192019
    20202020div.tabs-panel-inactive {
    2021         display:none;   
     2021        display:none;
    20222022}
    20232023
  • trunk/wp-admin/custom-background.php

    r14379 r14404  
    155155<th scope="row"><?php _e('Current Image'); ?></th>
    156156<td>
    157 <style type="text/css"> 
     157<style type="text/css">
    158158#custom-background-image {
    159159        background-color: #<?php echo get_background_color()?>;
    … …  
    165165        <?php } ?>
    166166}
    167 </style> 
     167</style>
    168168<div id="custom-background-image">
    169169<?php if ( get_background_image() ) { ?>
  • trunk/wp-admin/includes/file.php

    r14400 r14404  
    642642
    643643                if ( '__MACOSX/' === substr($info['name'], 0, 9) ) // Don't extract the OS X-created __MACOSX directory files
    644                         continue; 
     644                        continue;
    645645
    646646                $contents = $z->getFromIndex($i);
    … …  
    686686        // Determine any children directories needed (From within the archive)
    687687        foreach ( $archive_files as $file ) {
    688                 if ( '__MACOSX/' === substr($file['filename'], 0, 9) ) // Skip the OS X-created __MACOSX directory 
     688                if ( '__MACOSX/' === substr($file['filename'], 0, 9) ) // Skip the OS X-created __MACOSX directory
    689689                        continue;
    690        
     690
    691691                $needed_dirs[] = $to . untrailingslashit( $file['folder'] ? $file['filename'] : dirname($file['filename']) );
    692692        }
  • trunk/wp-admin/includes/media.php

    r14374 r14404  
    21612161        if ( !post_type_supports(get_post_type($_GET['post_id']), 'editor') )
    21622162                return '';
    2163        
     2163
    21642164        if ( 'image' == $type )
    21652165        return '
    … …  
    21692169                                <input type="button" class="button" id="go_button" style="color:#bbb;" onclick="addExtImage.insert()" value="' . esc_attr__('Insert into Post') . '" />
    21702170                        </td>
    2171                 </tr>           
     2171                </tr>
    21722172        ';
    21732173
  • trunk/wp-admin/includes/meta-boxes.php

    r14390 r14404  
    249249        $help_nojs  = isset( $taxonomy->help_nojs  ) ? $taxonomy->help_nojs         : __('Add or remove tags');
    250250        $help_cloud = isset( $taxonomy->help_cloud ) ? $taxonomy->help_cloud        : __('Choose from the most used tags in %s');
    251        
     251
    252252        $disabled = !current_user_can($taxonomy->assign_cap) ? 'disabled="disabled"' : '';
    253253?>
  • trunk/wp-admin/includes/ms.php

    r14374 r14404  
    453453                $space .= __( 'GB' );
    454454        } else {
    455                 /* translators: Megabytes */           
     455                /* translators: Megabytes */
    456456                $space .= __( 'MB' );
    457457        }
    … …  
    547547function format_code_lang( $code = '' ) {
    548548        $code = strtolower( substr( $code, 0, 2 ) );
    549         $lang_codes = array( 
     549        $lang_codes = array(
    550550                'aa' => 'Afar', 'ab' => 'Abkhazian', 'af' => 'Afrikaans', 'ak' => 'Akan', 'sq' => 'Albanian', 'am' => 'Amharic', 'ar' => 'Arabic', 'an' => 'Aragonese', 'hy' => 'Armenian', 'as' => 'Assamese', 'av' => 'Avaric', 'ae' => 'Avestan', 'ay' => 'Aymara', 'az' => 'Azerbaijani', 'ba' => 'Bashkir', 'bm' => 'Bambara', 'eu' => 'Basque', 'be' => 'Belarusian', 'bn' => 'Bengali',
    551551                'bh' => 'Bihari', 'bi' => 'Bislama', 'bs' => 'Bosnian', 'br' => 'Breton', 'bg' => 'Bulgarian', 'my' => 'Burmese', 'ca' => 'Catalan; Valencian', 'ch' => 'Chamorro', 'ce' => 'Chechen', 'zh' => 'Chinese', 'cu' => 'Church Slavic; Old Slavonic; Church Slavonic; Old Bulgarian; Old Church Slavonic', 'cv' => 'Chuvash', 'kw' => 'Cornish', 'co' => 'Corsican', 'cr' => 'Cree',
    … …  
    631631                if ( $code_lang == 'en_US' ) { // American English
    632632                        $flag = true;
    633                         $ae = __( 'American English' ); 
     633                        $ae = __( 'American English' );
    634634                        $output[$ae] = '<option value="' . esc_attr( $code_lang ) . '"' . selected( $current, $code_lang ) . '> ' . $ae . '</option>';
    635635                } elseif ( $code_lang == 'en_GB' ) { // British English
  • trunk/wp-admin/includes/nav-menu.php

    r14374 r14404  
    1717         */
    1818        function start_lvl(&$output, $depth) {}
    19        
     19
    2020        /**
    2121         * @see Walker_Nav_Menu::end_lvl()
    … …  
    2626         */
    2727        function end_lvl(&$output, $depth) {}
    28        
     28
    2929        /**
    3030         * @see Walker::start_el()
    … …  
    5050                        '_wpnonce',
    5151                );
    52                
     52
    5353                $original_title = '';
    5454                if ( 'taxonomy' == $item->type ) {
    … …  
    6060                ?>
    6161                <li id="menu-item-<?php echo $item_id; ?>" class="menu-item menu-item-depth-<?php echo $depth; ?> menu-item-<?php echo strtolower(esc_attr( $item->append )); ?>">
    62                         <dl class="<?php 
     62                        <dl class="<?php
    6363                                if ( isset($_GET['edit-menu-item']) && $item_id == $_GET['edit-menu-item'] )
    6464                                        echo 'menu-item-edit-active';
    … …  
    7272                                                <span class="item-order">
    7373                                                        <a href="<?php
    74                                                                 echo wp_nonce_url( 
     74                                                                echo wp_nonce_url(
    7575                                                                        add_query_arg(
    7676                                                                                array(
    77                                                                                         'action' => 'move-up-menu-item', 
     77                                                                                        'action' => 'move-up-menu-item',
    7878                                                                                        'menu-item' => $item_id,
    7979                                                                                ),
    80                                                                                 remove_query_arg($removed_args, admin_url( 'nav-menus.php' ) ) 
    81                                                                         ), 
    82                                                                         'move-item' 
    83                                                                 ); 
     80                                                                                remove_query_arg($removed_args, admin_url( 'nav-menus.php' ) )
     81                                                                        ),
     82                                                                        'move-item'
     83                                                                );
    8484                                                        ?>" class="item-move-up"><abbr title="<?php esc_attr_e('Move up'); ?>">&#8593;</abbr></a>
    8585                                                        |
    8686                                                        <a href="<?php
    87                                                                 echo wp_nonce_url( 
     87                                                                echo wp_nonce_url(
    8888                                                                        add_query_arg(
    8989                                                                                array(
    90                                                                                         'action' => 'move-down-menu-item', 
     90                                                                                        'action' => 'move-down-menu-item',
    9191                                                                                        'menu-item' => $item_id,
    9292                                                                                ),
    93                                                                                 remove_query_arg($removed_args, admin_url( 'nav-menus.php' ) ) 
    94                                                                         ), 
     93                                                                                remove_query_arg($removed_args, admin_url( 'nav-menus.php' ) )
     94                                                                        ),
    9595                                                                        'move-item'
    96                                                                 ); 
     96                                                                );
    9797                                                        ?>" class="item-move-down"><abbr title="<?php esc_attr_e('Move down'); ?>">&#8595;</abbr></a>
    9898                                                </span>
    99                                                 <a class="item-edit" id="edit-<?php echo $item_id; ?>" title="<?php _e('Edit Menu Item'); ?>" href="<?php 
    100                                                         echo add_query_arg('edit-menu-item', $item_id, remove_query_arg($removed_args, admin_url( 'nav-menus.php' ) ) ); 
     99                                                <a class="item-edit" id="edit-<?php echo $item_id; ?>" title="<?php _e('Edit Menu Item'); ?>" href="<?php
     100                                                        echo add_query_arg('edit-menu-item', $item_id, remove_query_arg($removed_args, admin_url( 'nav-menus.php' ) ) );
    101101                                                ?>#menu-item-settings-<?php echo $item_id; ?>">Edit Menu Item</a>
    102102                                        </span>
    … …  
    104104                        </dl>
    105105
    106                         <div class="menu-item-settings <?php 
     106                        <div class="menu-item-settings <?php
    107107                                if ( isset($_GET['edit-menu-item']) && $item_id == $_GET['edit-menu-item'] )
    108108                                        echo 'menu-item-edit-active';
    109109                                else
    110110                                        echo 'menu-item-edit-inactive';
    111                         ?>" id="menu-item-settings-<?php echo $item_id; ?>">           
     111                        ?>" id="menu-item-settings-<?php echo $item_id; ?>">
    112112                                <?php if( 'custom' == $item->type ) : ?>
    113113                                        <p class="field-url description description-wide">
    … …  
    158158                                        </label>
    159159                                </p>
    160                                
     160
    161161                                <span class="menu-item-actions description-wide submitbox">
    162162                                        <?php if( 'custom' != $item->type ) : ?>
    163163                                                <p class="link-to-original"><?php
    164                                                         _e('Original '); 
     164                                                        _e('Original ');
    165165                                                        echo esc_html( $item->append );
    166166                                                        echo ":"; ?>
    … …  
    170170                                                </p>
    171171                                        <?php endif; ?>
    172                                         <a class="item-delete submitdelete deletion" id="delete-<?php echo $item_id; ?>" href="<?php 
     172                                        <a class="item-delete submitdelete deletion" id="delete-<?php echo $item_id; ?>" href="<?php
    173173                                        echo wp_nonce_url(
    174174                                                add_query_arg(
    … …  
    177177                                                                'menu-item' => $item_id,
    178178                                                        ),
    179                                                         remove_query_arg($removed_args, admin_url( 'nav-menus.php' ) ) 
     179                                                        remove_query_arg($removed_args, admin_url( 'nav-menus.php' ) )
    180180                                                ),
    181181                                                'delete-menu_item_' . $item_id
    … …  
    183183                                        <input class="button-primary save-menu-item" name="save_menu_item" type="submit" value="<?php esc_attr_e('Save Menu Item'); ?>" />
    184184                                </span>
    185                                
     185
    186186                                <input class="menu-item-data-append" type="hidden" name="menu-item-append[<?php echo $item_id; ?>]" value="<?php echo $item->append; ?>" />
    187187                                <input class="menu-item-data-db-id" type="hidden" name="menu-item-db-id[<?php echo $item_id; ?>]" value="<?php echo $item_id; ?>" />
    … …  
    191191                                <input class="menu-item-data-position" type="hidden" class="menu-item-position" name="menu-item-position[<?php echo $item_id; ?>]" value="<?php echo esc_attr( $item->menu_order ); ?>" />
    192192                                <input class="menu-item-data-type" type="hidden" name="menu-item-type[<?php echo $item_id; ?>]" value="<?php echo esc_attr( $item->type ); ?>" />
    193                         </div><!-- .menu-item-settings-->       
     193                        </div><!-- .menu-item-settings-->
    194194                        <ul class="menu-item-transport"></ul>
    195195                <?php
    … …  
    202202 *
    203203 * @since 3.0.0
    204  * 
     204 *
    205205 * @param array $request The unsanitized request values.
    206206 */
    … …  
    314314        wp_nav_menu_post_type_meta_boxes();
    315315        wp_nav_menu_taxonomy_meta_boxes();
    316        
    317        
     316
     317
    318318        // Register advanced menu items (columns)
    319319        add_filter( 'manage_nav-menus_columns', 'wp_nav_menu_manage_columns');
    320        
     320
    321321        add_filter( 'columns_prefs_header', create_function( '', "return __('Show advanced menu properties');" ));
    322        
    323        
    324        
     322
     323
     324
    325325        // If first time editing, disable advanced items by default.
    326326        if( false === get_user_option( 'managenav-menuscolumnshidden' ) ) {
    … …  
    423423
    424424        $removed_args = array(
    425                 'action', 
     425                'action',
    426426                'customlink-tab',
    427427                'edit-menu-item',
    … …  
    477477        $offset = 0 < $pagenum ? $per_page * ( $pagenum - 1 ) : 0;
    478478
    479         $args = array( 
    480                 'offset' => $offset, 
     479        $args = array(
     480                'offset' => $offset,
    481481                'order' => 'ASC',
    482                 'orderby' => 'title', 
    483                 'posts_per_page' => $per_page, 
    484                 'post_type' => $post_type_name, 
    485                 'suppress_filters' => true, 
     482                'orderby' => 'title',
     483                'posts_per_page' => $per_page,
     484                'post_type' => $post_type_name,
     485                'suppress_filters' => true,
    486486        );
    487487
    … …  
    512512                $parent_ids = array_unique($parent_ids);
    513513                $child_ids = array_unique($child_ids);
    514                
     514
    515515                $missing_parents = array();
    516516                do {
    … …  
    521521                                $parent_ids[] = $missing_parent->post_parent;
    522522                        }
    523                        
     523
    524524                        $missing_parents = array_filter( array_diff( array_unique( $parent_ids ), array_unique( $child_ids ) ) );
    525525
    526526                } while( 0 < count( $missing_parents ) );
    527                
     527
    528528        }
    529529
    530530        $page_links = paginate_links( array(
    531                 'base' => add_query_arg( 
     531                'base' => add_query_arg(
    532532                        array(
    533533                                $post_type_name . '-tab' => 'all',
    … …  
    535535                        )
    536536                ),
    537                 'format' => '', 
     537                'format' => '',
    538538                'prev_text' => __('&laquo;'),
    539539                'next_text' => __('&raquo;'),
    … …  
    541541                'current' => $pagenum
    542542        ));
    543        
     543
    544544        if ( !$posts )
    545545                $error = '<li id="error">'. sprintf( __( 'No %s exists' ), $post_type['args']->label ) .'</li>';
    … …  
    555555
    556556        $removed_args = array(
    557                 'action', 
     557                'action',
    558558                'customlink-tab',
    559559                'edit-menu-item',
    … …  
    570570                </ul>
    571571
    572                 <div class="tabs-panel <?php 
     572                <div class="tabs-panel <?php
    573573                        echo ( 'search' == $current_tab ? 'tabs-panel-active' : 'tabs-panel-inactive' );
    574574                ?>" id="tabs-panel-posttype-<?php echo $post_type_name; ?>-search">
    575                         <?php 
     575                        <?php
    576576                        if ( isset( $_REQUEST['quick-search-posttype-' . $post_type_name] ) ) {
    577577                                $searched = esc_attr( $_REQUEST['quick-search-posttype-' . $post_type_name] );
    … …  
    615615                                if ( 'all' == $current_tab && ! empty( $_REQUEST['selectall'] ) ) {
    616616                                        $checkbox_items = preg_replace('/(type=(.)checkbox(\2))/', '$1 checked=$2checked$2', $checkbox_items);
    617                                        
     617
    618618                                }
    619619                                echo $checkbox_items;
    … …  
    628628                <p class="button-controls">
    629629                        <span class="list-controls">
    630                                 <a href="<?php 
     630                                <a href="<?php
    631631                                        echo add_query_arg(
    632632                                                array(
    … …  
    670670
    671671        $args = array(
    672                 'child_of' => 0, 
     672                'child_of' => 0,
    673673                'exclude' => '',
    674                 'hide_empty' => false, 
    675                 'hierarchical' => 1, 
    676                 'include' => '', 
    677                 'include_last_update_time' => false, 
    678                 'number' => $per_page, 
     674                'hide_empty' => false,
     675                'hierarchical' => 1,
     676                'include' => '',
     677                'include_last_update_time' => false,
     678                'number' => $per_page,
    679679                'offset' => $offset,
    680680                'order' => 'ASC',
    681                 'orderby' => 'name', 
     681                'orderby' => 'name',
    682682                'pad_counts' => false,
    683683        );
    … …  
    686686
    687687        $page_links = paginate_links( array(
    688                 'base' => add_query_arg( 
     688                'base' => add_query_arg(
    689689                        array(
    690690                                $taxonomy_name . '-tab' => 'all',
    … …  
    692692                        )
    693693                ),
    694                 'format' => '', 
     694                'format' => '',
    695695                'prev_text' => __('&laquo;'),
    696696                'next_text' => __('&raquo;'),
    … …  
    698698                'current' => $pagenum
    699699        ));
    700        
     700
    701701        $walker = new Walker_Nav_Menu_Checklist;
    702702        // @todo transient caching of these results with proper invalidation on updating of a tax of this type
    … …  
    716716
    717717        $removed_args = array(
    718                 'action', 
     718                'action',
    719719                'customlink-tab',
    720720                'edit-menu-item',
    … …  
    741741                                echo walk_nav_menu_tree( array_map('wp_setup_nav_menu_item', $popular_terms), 0, (object) $args );
    742742                                ?>
    743                                 <?php 
     743                                <?php
    744744                                ?>
    745745                        </ul>
    746746                </div><!-- /.tabs-panel -->
    747747
    748                 <div class="tabs-panel <?php 
     748                <div class="tabs-panel <?php
    749749                        echo ( 'search' == $current_tab ? 'tabs-panel-active' : 'tabs-panel-inactive' );
    750750                ?>" id="tabs-panel-search-taxonomy-<?php echo $taxonomy_name; ?>">
    751                         <?php 
     751                        <?php
    752752                        if ( isset( $_REQUEST['quick-search-taxonomy-' . $taxonomy_name] ) ) {
    753753                                $searched = esc_attr( $_REQUEST['quick-search-taxonomy-' . $taxonomy_name] );
    … …  
    762762                                <input type="submit" class="quick-search-submit button-secondary" value="<?php esc_attr_e('Search'); ?>" />
    763763                        </p>
    764                
     764
    765765                        <ul id="<?php echo $taxonomy_name; ?>-search-checklist" class="list:<?php echo $taxonomy_name?> categorychecklist form-no-clear">
    766766                        <?php if ( ! empty( $search_results ) && ! is_wp_error( $search_results ) ) : ?>
    … …  
    796796                <p class="button-controls">
    797797                        <span class="list-controls">
    798                                 <a href="<?php 
     798                                <a href="<?php
    799799                                        echo add_query_arg(
    800800                                                array(
    … …  
    835835                // Loop through all the menu items' POST values
    836836                foreach( (array) $menu_data as $_possible_db_id => $_item_object_data ) {
    837                         if ( 
     837                        if (
    838838                                empty( $_item_object_data['menu-item-object-id'] ) && // checkbox is not checked
    839                                 ( 
    840                                         ! isset( $_item_object_data['menu-item-type'] ) || // and item type either isn't set 
     839                                (
     840                                        ! isset( $_item_object_data['menu-item-type'] ) || // and item type either isn't set
    841841                                        in_array( $_item_object_data['menu-item-url'], array( 'http://', '' ) ) || // or URL is the default
    842                                         'custom' != $_item_object_data['menu-item-type'] ||  // or it's not a custom menu item 
     842                                        'custom' != $_item_object_data['menu-item-type'] ||  // or it's not a custom menu item
    843843                                        ! empty( $_item_object_data['menu-item-db-id'] ) // or it *is* a custom menu item that already exists
    844844                                )
    … …  
    848848
    849849                        // if this possible menu item doesn't actually have a menu database ID yet
    850                         if ( 
     850                        if (
    851851                                empty( $_item_object_data['menu-item-db-id'] ) ||
    852852                                ( 0 > $_possible_db_id ) ||
    … …  
    857857                                $_actual_db_id = (int) $_item_object_data['menu-item-db-id'];
    858858                        }
    859                        
     859
    860860                        $args = array(
    861861                                'menu-item-db-id' => ( isset( $_item_object_data['menu-item-db-id'] ) ? $_item_object_data['menu-item-db-id'] : '' ),
    … …  
    886886 *
    887887 * @since 3.0.0
    888  * 
     888 *
    889889 * @access private
    890890 *
    … …  
    897897                if ( 'attachment' == $object->name )
    898898                        return false;
    899        
     899
    900900                // pages should show most recent
    901901                if ( 'page' == $object->name ) {
    … …  
    920920                }
    921921        }
    922        
     922
    923923        return $object;
    924924}
    … …  
    934934function wp_get_nav_menu_to_edit( $menu_item_id = 0 ) {
    935935        $menu = wp_get_nav_menu_object( $menu_item_id );
    936        
     936
    937937        // If the menu exists, get its items.
    938938        if ( is_nav_menu( $menu ) ) {
    939939                $menu_items = wp_get_nav_menu_items( $menu->term_id, array('post_status' => 'any') );
    940940
    941                 $walker = new Walker_Nav_Menu_Edit; 
     941                $walker = new Walker_Nav_Menu_Edit;
    942942
    943943                return walk_nav_menu_tree( array_map('wp_setup_nav_menu_item', $menu_items), 0, (object) array('walker' => $walker ) );
    944944        } elseif ( is_wp_error( $menu ) ) {
    945                 return $menu;   
     945                return $menu;
    946946        }
    947947
  • trunk/wp-admin/includes/post.php

    r14399 r14404  
    11991199        $now = time();
    12001200
    1201         update_post_meta( $post->ID, '_edit_lock', $now );     
     1201        update_post_meta( $post->ID, '_edit_lock', $now );
    12021202}
    12031203
  • trunk/wp-admin/includes/template.php

    r14374 r14404  
    898898<?php
    899899
    900 if ( post_type_supports( $screen->post_type, 'title' ) ) : 
     900if ( post_type_supports( $screen->post_type, 'title' ) ) :
    901901        if ( $bulk ) : ?>
    902902                <div id="bulk-title-div">
    … …  
    10321032                </label>
    10331033
    1034 <?php 
     1034<?php
    10351035        endif; // post_type_supports page-attributes
    10361036endif; // $post_type_object->hierarchical ?>
  • trunk/wp-admin/includes/theme.php

    r14393 r14404  
    211211/**
    212212 * Check the current theme for reliance on deprecated theme compatibility
    213  * 
     213 *
    214214 * Check to see if the current theme has all the required templates available
    215215 * from itself or its parent
    216  
     216
    217217 * @since 3.0
    218218 * @access private
    … …  
    221221function _check_theme_deprecated_files() {
    222222        $files = array( );
    223        
     223
    224224        if ( ! locate_template( array( 'header.php' ) ) )
    225225                $files[] = 'header.php';
    … …  
    228228        if ( ! locate_template( array( 'sidebar.php' ) ) )
    229229                $files[] = 'sidebar.php';
    230        
    231         // Only notify if both are missing as you can use one or the other     
     230
     231        // Only notify if both are missing as you can use one or the other
    232232        if ( ! locate_template( array( 'comments.php' ) ) && ! locate_template( array( 'comments-popup.php' ) ) ) {
    233233                $files[] = 'comments.php';
    234234                $files[] = 'comments-popup.php';
    235         }       
    236                
     235        }
     236
    237237        if ( ! empty( $files ) ) : ?>
    238238                <div id="deprecated-files-message" class="error"><p>
  • trunk/wp-admin/js/common.dev.js

    r14286 r14404  
    145145                });
    146146        },
    147        
     147
    148148        checked : function(column) {
    149149                $('.column-' + column).show();
    150150        },
    151        
     151
    152152        unchecked : function(column) {
    153153                $('.column-' + column).hide();
    154154        },
    155        
     155
    156156        hidden : function() {
    157157                return $('.manage-column').filter(':hidden').map(function() { return this.id; }).get().join(',');
    158158        },
    159        
     159
    160160        useCheckboxesForHidden : function() {
    161161                this.hidden = function(){
  • trunk/wp-admin/js/custom-background.dev.js

    r13856 r14404  
    2828                jQuery('#custom-background-image').css('background-repeat', jQuery(this).val());
    2929        });
    30        
     30
    3131        farbtastic = jQuery.farbtastic('#colorPickerDiv', function(color) {
    3232                pickColor(color);
  • trunk/wp-admin/js/nav-menu.dev.js

    r14394 r14404  
    1111var WPNavMenuHandler = function ($) {
    1212        var autoCompleteData = {},
    13        
     13
    1414        menuItemDepthPerLevel = 30, // Do not use directly. Use depthToPx and pxToDepth instead.
    1515        globalMaxDepth = 11,
    … …  
    3333                }
    3434        },
    35        
     35
    3636        getListDataFromID = function(menuItemID, parentEl) {
    37                 if ( ! menuItemID ) 
     37                if ( ! menuItemID )
    3838                        return false;
    3939                parentEl = parentEl || document;
    … …  
    6363                        j = fields.length;
    6464                        while ( j-- ) {
    65                                 if ( 
     65                                if (
    6666                                        inputs[i] &&
    6767                                        inputs[i].name &&
    68                                         'menu-item[' + menuItemID + '][' + fields[j] + ']' == inputs[i].name 
     68                                        'menu-item[' + menuItemID + '][' + fields[j] + ']' == inputs[i].name
    6969                                ) {
    7070                                        itemData[fields[j]] = inputs[i].value;
    … …  
    7575                return itemData;
    7676        },
    77        
     77
    7878        recalculateMenuItemPositions = function() {
    7979                menuList.find('.menu-item-data-position').val( function(index) { return index + 1; } );
    8080        },
    81        
     81
    8282        depthToPx = function(depth) {
    8383                return depth * menuItemDepthPerLevel;
    8484        },
    85        
     85
    8686        pxToDepth = function(px) {
    8787                return Math.floor(px / menuItemDepthPerLevel);
    … …  
    8989
    9090        menuList;
    91        
     91
    9292        // jQuery extensions
    9393        $.fn.extend({
    … …  
    150150
    151151        return {
    152                
     152
    153153                // Functions that run on init.
    154154                init : function() {
    155155                        menuList = $('#menu-to-edit');
    156                        
     156
    157157                        this.attachMenuEditListeners();
    158158
    159159                        this.attachMenuMetaListeners(document.getElementById('nav-menu-meta'));
    160                        
     160
    161161                        this.attachTabsPanelListeners();
    162                        
     162
    163163                        if( menuList.length ) // If no menu, we're in the + tab.
    164164                                this.initSortables();
    165165
    166166                        this.initToggles();
    167                        
     167
    168168                        this.initTabManager();
    169169                },
    170                
     170
    171171                initToggles : function() {
    172172                        // init postboxes
    173173                        postboxes.add_postbox_toggles('nav-menus');
    174                        
     174
    175175                        // adjust columns functions for menus UI
    176176                        columns.useCheckboxesForHidden();
    … …  
    184184                        menuList.hideAdvancedMenuItemFields();
    185185                },
    186                
     186
    187187                initSortables : function() {
    188188                        var currentDepth = 0, originalDepth, minDepth, maxDepth,
    189189                                menuLeft = menuList.offset().left;
    190                        
     190
    191191                        menuList.sortable({
    192192                                handle: ' > dl',
    … …  
    195195                                        var next, height, width, parent, children, maxChildDepth,
    196196                                                transport = ui.item.children('.menu-item-transport');
    197                                        
     197
    198198                                        // Set depths
    199199                                        originalDepth = ui.item.menuItemDepth();
    200200                                        updateCurrentDepth(ui, originalDepth);
    201                                        
     201
    202202                                        // Attach child elements to parent
    203203                                        // Skip the placeholder
    … …  
    208208                                        // Now that the element is complete, we can update...
    209209                                        updateDepthRange(ui);
    210                                        
     210
    211211                                        // Update the height of the placeholder to match the moving item.
    212212                                        height = transport.outerHeight();
    … …  
    216216                                        height -= 2; // Subtract 2 for borders
    217217                                        ui.placeholder.height(height);
    218                                        
     218
    219219                                        // Update the width of the placeholder to match the moving item.
    220220                                        maxChildDepth = originalDepth;
    … …  
    230230                                stop: function(e, ui) {
    231231                                        var children, depthChange = currentDepth - originalDepth;
    232                                        
     232
    233233                                        // Return child elements to the list
    234234                                        children = ui.item.children('.menu-item-transport').children().insertAfter(ui.item);
    235                                        
     235
    236236                                        // Update depth classes
    237237                                        if( depthChange != 0 ) {
    … …  
    248248                                        if( ! ui.placeholder.parent().hasClass('menu') )
    249249                                                ui.placeholder.appendTo(menuList);
    250                                                
     250
    251251                                        updateDepthRange(ui);
    252252                                },
    … …  
    256256                                        if ( depth < minDepth ) depth = minDepth;
    257257                                        else if ( depth > maxDepth ) depth = maxDepth;
    258                                        
     258
    259259                                        if( depth != currentDepth )
    260260                                                updateCurrentDepth(ui, depth);
    261261                                }
    262262                        });
    263                        
     263
    264264                        function updateDepthRange(ui) {
    265265                                var prev = ui.placeholder.prev(),
    266266                                        next = ui.placeholder.next(), depth;
    267                                        
     267
    268268                                // Make sure we don't select the moving item.
    269                                 if( prev[0] == ui.item[0] ) prev = prev.prev(); 
     269                                if( prev[0] == ui.item[0] ) prev = prev.prev();
    270270                                if( next[0] == ui.item[0] ) next = next.next();
    271                                
     271
    272272                                minDepth = (next.length) ? next.menuItemDepth() : 0;
    273                                
     273
    274274                                if( prev.length )
    275275                                        maxDepth = ( (depth = prev.menuItemDepth() + 1) > globalMaxDepth ) ? globalMaxDepth : depth;
    … …  
    277277                                        maxDepth = 0;
    278278                        }
    279                        
     279
    280280                        function updateCurrentDepth(ui, depth) {
    281281                                ui.placeholder.updateDepthClass( depth, currentDepth );
    … …  
    283283                        }
    284284                },
    285                
     285
    286286                attachMenuEditListeners : function() {
    287287                        var that = this;
    … …  
    300300                        });
    301301                },
    302                
     302
    303303                /**
    304304                 * An interface for managing default values for input elements
    … …  
    310310                setupInputWithDefaultTitle : function() {
    311311                        var name = 'input-with-default-title';
    312                        
     312
    313313                        $('.' + name).each( function(){
    314314                                var $t = $(this), title = $t.attr('title'), val = $t.val();
    315315                                $t.data( name, title );
    316                                
     316
    317317                                if( '' == val ) $t.val( title );
    318318                                else if ( title == val ) return;
    … …  
    335335                        var that = this;
    336336                        this.setupInputWithDefaultTitle();
    337                        
     337
    338338                        // auto-suggest for the quick-search boxes
    339339                        $('input.quick-search').each(function(i, el) {
    340                                 that.setupQuickSearchEventListeners(el); 
    341                         });
    342                        
     340                                that.setupQuickSearchEventListeners(el);
     341                        });
     342
    343343                        $(formEL).bind('submit', function(e) {
    344344                                return that.eventSubmitMetaForm.call(that, this, e);
    345345                        });
    346                         $(formEL).find('input:submit').click(function() { 
    347                                 $(this).siblings('img.waiting').show(); 
     346                        $(formEL).find('input:submit').click(function() {
     347                                $(this).siblings('img.waiting').show();
    348348                        });
    349349                },
    … …  
    360360
    361361                                        // upon changing tabs, we want to uncheck all checkboxes
    362                                         while( i-- ) 
     362                                        while( i-- )
    363363                                                inputs[i].checked = false;
    364364
    … …  
    380380                                                }
    381381                                        }
    382                                        
     382
    383383                                        return false;
    384384                                } else if ( e.target && e.target.className && -1 != e.target.className.indexOf('select-all') ) {
    … …  
    391391                        });
    392392                },
    393                
     393
    394394                initTabManager : function() {
    395395                        var fixed = $('.nav-tabs-wrapper'),
    … …  
    401401                                arrowLeft, arrowRight
    402402                                resizing = false;
    403                        
     403
    404404                        function resetMenuTabs() {
    405405                                fixedLeft = fixed.offset().left;
    … …  
    407407                                active.makeTabVisible();
    408408                        }
    409                        
     409
    410410                        $.fn.extend({
    411411                                makeTabVisible : function() {
    … …  
    427427                                }
    428428                        });
    429                        
     429
    430430                        // Find the width of all tabs
    431431                        tabs.each(function(){
    432432                                tabsWidth += $(this).outerWidth(true);
    433433                        });
    434                        
     434
    435435                        // Check if we need the tab manager
    436436                        if( tabsWidth <= fixed.width()
    … …  
    438438                                - fluid.css('padding-right').slice(0,-2) )
    439439                                return;
    440                        
     440
    441441                        // Set up right margin for overflow, unset padding
    442442                        fluid.css({
    … …  
    444444                                'padding' : 0,
    445445                        });
    446                        
     446
    447447                        // Build tab navigation
    448448                        arrowLeft = $('<div class="nav-tabs-arrow nav-tabs-arrow-left"><a>&laquo;</a></div>');
    … …  
    450450                        // Attach to the document
    451451                        fixed.wrap('<div class="nav-tabs-nav"/>').parent().prepend( arrowLeft ).append( arrowRight );
    452                        
     452
    453453                        // Set the menu tabs
    454454                        resetMenuTabs();
    … …  
    457457                                if( resizing ) return;
    458458                                resizing = true;
    459                                 setTimeout(function(){ 
     459                                setTimeout(function(){
    460460                                        resetMenuTabs();
    461461                                        resizing = false;
    462462                                }, 1000);
    463463                        });
    464                        
    465                         // Build arrow functions                       
     464
     465                        // Build arrow functions
    466466                        $.each([{
    467467                                        arrow : arrowLeft,
    … …  
    502502                setupQuickSearchEventListeners : function(el) {
    503503                        var that = this;
    504                         $(el).autocomplete( ajaxurl + '?action=menu-quick-search&type=' + el.name, 
    505                                 { 
    506                                         delay: 500, 
     504                        $(el).autocomplete( ajaxurl + '?action=menu-quick-search&type=' + el.name,
     505                                {
     506                                        delay: 500,
    507507                                        formatItem: formatAutocompleteResponse,
    508508                                        formatResult: formatAutocompleteResult,
    509                                         minchars: 2, 
    510                                         multiple: false 
     509                                        minchars: 2,
     510                                        multiple: false
    511511                                }
    512512                        ).bind('blur', function(e) {
    … …  
    514514                                inputEl = this;
    515515                                if ( changedData ) {
    516                                         $.post( 
     516                                        $.post(
    517517                                                ajaxurl + '?action=menu-quick-search&type=get-post-item&response-format=markup',
    518518                                                changedData,
    519519                                                function(r) {
    520                                                         that.processQuickSearchQueryResponse.call(that, r, changedData); 
     520                                                        that.processQuickSearchQueryResponse.call(that, r, changedData);
    521521                                                        autoCompleteData[inputEl.value] = false;
    522522                                                }
    … …  
    547547                        }
    548548                },
    549                
     549
    550550                eventOnClickCloseLink : function(clickedEl) {
    551551                        $(clickedEl).closest('.menu-item-settings').siblings('dl').find('.item-edit').click();
    552552                        return false;
    553553                },
    554                
     554
    555555                eventOnClickMenuDelete : function(clickedEl) {
    556556                        // Delete warning AYS
    … …  
    571571                                matchedSection = /_wpnonce=([a-zA-Z0-9]*)$/.exec(clickedEl.href);
    572572                                if ( matchedSection && matchedSection[1] ) {
    573                                         itemID = parseInt(clickedEl.id.replace('delete-', ''), 10);     
     573                                        itemID = parseInt(clickedEl.id.replace('delete-', ''), 10);
    574574                                        $.post(
    575575                                                ajaxurl,
    … …  
    584584                                                }
    585585                                        );
    586                                         return false;   
     586                                        return false;
    587587                                }
    588588                                return true;
    … …  
    630630                                        listItemDBID = 'undefined' == typeof listItemDBIDMatch[1] ? 0 : parseInt(listItemDBIDMatch[1], 10);
    631631                                        listItemData = getListDataFromID(listItemDBID);
    632                                        
     632
    633633                                        for ( j in listItemData ) {
    634634                                                params['menu-item[' + listItemDBID + '][' + j + ']'] = listItemData[j];
    … …  
    655655
    656656                        $.post( ajaxurl, params, function(menuMarkup) {
    657                                 processMethod.call(that, menuMarkup, params);   
     657                                processMethod.call(that, menuMarkup, params);
    658658                                $(thisForm).find('img.waiting').hide();
    659659                        });
    … …  
    678678                /**
    679679                 * Process the quick search response into a search result
    680                  * 
     680                 *
    681681                 * @param string resp The server response to the query.
    682682                 * @param object req The request arguments.
    … …  
    709709
    710710                        wrap.innerHTML = resp;
    711                        
     711
    712712                        items = wrap.getElementsByTagName('li');
    713713
    … …  
    739739                        el = $(el)
    740740                        var children = el.childMenuItems();
    741                        
     741
    742742                        el.addClass('deleting').fadeOut( 350 , function() {
    743743                                el.remove();
  • trunk/wp-admin/js/theme-preview.dev.js

    r14030 r14404  
    5151                $('#TB_iframeContent').width('100%');
    5252                thickDims();
    53                
     53
    5454                return false;
    5555        } );
  • trunk/wp-admin/ms-delete-site.php

    r14374 r14404  
    1616if ( ! current_user_can( 'manage_options' ) )
    1717        wp_die(__( 'You do not have sufficient permissions to delete this site.'));
    18        
     18
    1919if ( isset( $_GET['h'] ) && $_GET['h'] != '' && get_option( 'delete_blog_hash' ) != false ) {
    2020        if ( get_option( 'delete_blog_hash' ) == $_GET['h'] ) {
  • trunk/wp-admin/ms-edit.php

    r14374 r14404  
    330330                        if ( ! current_user_can( 'manage_sites' ) )
    331331                                wp_die( __( 'You do not have permission to access this page.' ) );
    332        
     332
    333333                        if ( $_GET['action'] != -1 || $_POST['action2'] != -1 )
    334334                                $doaction = $_POST['action'] != -1 ? $_POST['action'] : $_POST['action2'];
    … …  
    455455                        header( 'Content-Type: text/html; charset=utf-8' );
    456456                }
    457                 if ( $current_site->blog_id == $id )   
     457                if ( $current_site->blog_id == $id )
    458458                        wp_die( __( 'You are not allowed to change the current site.' ) );
    459459                ?>
    … …  
    490490                if ( $id != '0' && $id != '1' ) {
    491491                        $_POST['allusers'] = array( $id ); // confirm_delete_users() can only handle with arrays
    492                         $title = __( 'Users' ); 
    493                         $parent_file = 'ms-admin.php'; 
     492                        $title = __( 'Users' );
     493                        $parent_file = 'ms-admin.php';
    494494                        require_once( 'admin-header.php' );
    495495                        echo '<div class="wrap">';
    … …  
    499499            exit();
    500500                } else {
    501                         wp_redirect( admin_url( 'ms-users.php' ) );     
     501                        wp_redirect( admin_url( 'ms-users.php' ) );
    502502                }
    503503        break;
    … …  
    517517                                        switch ( $doaction ) {
    518518                                                case 'delete':
    519                                                         $title = __( 'Users' ); 
    520                                                         $parent_file = 'ms-admin.php'; 
     519                                                        $title = __( 'Users' );
     520                                                        $parent_file = 'ms-admin.php';
    521521                                                        require_once( 'admin-header.php' );
    522522                                                        echo '<div class="wrap">';
    … …  
    544544                                                        $userfunction = 'all_notspam';
    545545                                                        $blogs = get_blogs_of_user( $val, true );
    546                                                         foreach ( (array) $blogs as $key => $details ) 
     546                                                        foreach ( (array) $blogs as $key => $details )
    547547                                                                update_blog_status( $details->userblog_id, 'spam', '0' );
    548548
    549549                                                        update_user_status( $val, 'spam', '0', 1 );
    550550                                                break;
    551                                         }               
    552                                 }                       
     551                                        }
     552                                }
    553553                        }
    554554
    … …  
    579579                        foreach( $_POST['user'] as $id ) {
    580580                                wpmu_delete_user( $id );
    581                                 $i++;   
     581                                $i++;
    582582                        }
    583583
  • trunk/wp-admin/ms-options.php

    r14374 r14404  
    9393                                <td><input name="admin_notice_feed" class="large-text" type="text" id="admin_notice_feed" value="<?php echo esc_attr( get_site_option( 'admin_notice_feed' ) ) ?>" size="80" /><br />
    9494                                <?php _e( 'Display the latest post from this RSS or Atom feed on all site dashboards. Leave blank to disable.' ); ?><br />
    95                                
     95
    9696                                <?php if ( get_site_option( 'admin_notice_feed' ) != get_home_url( $current_site->id, 'feed/' ) )
    9797                                        echo __( 'A good one to use would be the feed from your main site: ' ) . esc_url( get_home_url( $current_site->id, 'feed/' ) ) ?></td>
  • trunk/wp-admin/ms-users.php

    r14374 r14404  
    256256                                                        break;
    257257
    258                                                         case 'registered': 
     258                                                        case 'registered':
    259259                                                                if ( 'list' == $mode )
    260260                                                                        $date = 'Y/m/d';
    … …  
    285285                                                                                                echo 'style="background-color: #faa" ';
    286286                                                                                        echo 'href="' .  esc_url( get_home_url( $val->userblog_id ) )  . '">' . __( 'View' ) . '</a>';
    287                                                                                        
     287
    288288                                                                                        echo '</small><br />';
    289289                                                                                }
  • trunk/wp-admin/my-sites.php

    r14374 r14404  
    3232                $updated = true;
    3333        } else {
    34                 wp_die( __( 'The primary site you chose does not exist.' ) );   
     34                wp_die( __( 'The primary site you chose does not exist.' ) );
    3535        }
    3636}
  • trunk/wp-admin/nav-menus.php

    r14368 r14404  
    108108                                                                $dbids_to_objectids[$ordered_menu_item_object->ID] = $possible_object_id;
    109109                                                                $objectids_to_dbids[$possible_object_id] = $ordered_menu_item_object->ID;
    110                                                         } 
     110                                                        }
    111111                                                }
    112112                                        }
    … …  
    115115                                        // if this menu item is not first
    116116                                        if ( ! empty( $dbids_to_orders[$menu_item_id] ) && ! empty( $orders_to_dbids[$dbids_to_orders[$menu_item_id] - 1] ) ) {
    117                                                
     117
    118118                                                // if this menu item is a child of the previous
    119                                                 if ( 
    120                                                         ! empty( $menu_item_data['post_parent'] ) && 
     119                                                if (
     120                                                        ! empty( $menu_item_data['post_parent'] ) &&
    121121                                                        isset( $objectids_to_dbids[$menu_item_data['post_parent']] ) &&
    122122                                                        isset( $orders_to_dbids[$dbids_to_orders[$menu_item_id] - 1] ) &&
    … …  
    128128
    129129                                                        if ( ! is_wp_error( $parent_data ) ) {
    130                                                                
     130
    131131                                                                // if there is something before the parent, make menu item a child of the parent's parent
    132132                                                                if ( ! empty( $dbids_to_orders[$parent_db_id] ) && ! empty( $orders_to_dbids[$dbids_to_orders[$parent_db_id] - 1] ) ) {
    … …  
    137137                                                                        $menu_item_data['post_parent'] = 0;
    138138                                                                }
    139                                                                
     139
    140140                                                                // set former parent's [menu_order] to that of menu-item's
    141141                                                                $parent_data['menu_order'] = $parent_data['menu_order'] + 1;
    … …  
    143143                                                                // set menu-item's [menu_order] to that of former parent
    144144                                                                $menu_item_data['menu_order'] = $menu_item_data['menu_order'] - 1;
    145                                                                
     145
    146146                                                                // save changes
    147147                                                                wp_update_post($menu_item_data);
    … …  
    169169                if ( is_nav_menu_item( $menu_item_id ) ) {
    170170                        if ( wp_delete_post( $menu_item_id, true ) ) {
    171                                
     171
    172172                                $messages[] = '<div id="message" class="updated"><p>' . __('The menu item has been successfully deleted.') . '</p></div>';
    173173                        }
    … …  
    249249                                                $menu_item_db_id = wp_update_nav_menu_item( $nav_menu_selected_id, ( $_POST['menu-item-db-id'][$_key] != $_key ? 0 : $_key ), $args );
    250250
    251                                                 if ( is_wp_error( $menu_item_db_id ) ) 
     251                                                if ( is_wp_error( $menu_item_db_id ) )
    252252                                                        $messages[] = '<div id="message" class="error"><p>' . $menu_item_db_id->get_error_message() . '</p></div>';
    253253                                                elseif ( isset( $menu_items[$menu_item_db_id] ) )
    … …  
    328328        <?php screen_icon(); ?>
    329329        <h2><?php esc_html_e('Menus'); ?></h2>
    330         <?php 
     330        <?php
    331331        foreach( $messages as $message ) :
    332                 echo $message . "\n"; 
     332                echo $message . "\n";
    333333        endforeach;
    334334        ?>
    335        
     335
    336336        <?php if ( current_theme_supports('nav-menus') || current_theme_supports('widgets') ) : ?>
    337337        <div id="nav-menus-frame">
    … …  
    365365                        <div class="nav-tabs-wrapper">
    366366                        <div class="nav-tabs">
    367                                 <?php 
     367                                <?php
    368368                                foreach( (array) $nav_menus as $_nav_menu ) :
    369                        
    370                                         ?><a href="<?php 
     369
     370                                        ?><a href="<?php
    371371                                                echo add_query_arg(
    372372                                                        array(
    … …  
    376376                                                        admin_url( 'nav-menus.php' )
    377377                                                );
    378                                         ?>" class="nav-tab<?php 
    379                                                 if ( $nav_menu_selected_id == $_nav_menu->term_id ) 
     378                                        ?>" class="nav-tab<?php
     379                                                if ( $nav_menu_selected_id == $_nav_menu->term_id )
    380380                                                        echo ' nav-tab-active';
    381381                                                else
    … …  
    383383                                        ?>"><?php echo esc_html( $_nav_menu->name ); ?></a><?php
    384384                                endforeach;
    385                                 ?><a href="<?php 
     385                                ?><a href="<?php
    386386                                        echo add_query_arg(
    387387                                                array(
    … …  
    391391                                                admin_url( 'nav-menus.php' )
    392392                                        );
    393                                 ?>" class="nav-tab menu-add-new<?php 
    394                                         if ( 0 == $nav_menu_selected_id ) 
     393                                ?>" class="nav-tab menu-add-new<?php
     394                                        if ( 0 == $nav_menu_selected_id )
    395395                                                echo ' nav-tab-active';
    396396                                ?>"><?php printf( '<abbr title="%s">+</abbr>', esc_html__( 'Add menu' ) ); ?></a>
    … …  
    407407                                                                        <br class="clear" />
    408408                                                                </label>
    409                                                        
     409
    410410                                                                <div class="publishing-action">
    411411                                                                        <input class="button-primary" name="save_menu" type="submit" value="<?php empty($nav_menu_selected_id) ? esc_attr_e('Create Menu') : esc_attr_e('Save Menu'); ?>" />
    412412                                                                </div><!--END .publishing-action-->
    413                                                        
     413
    414414                                                                <?php if ( ! empty( $nav_menu_selected_id ) ) : ?>
    415415                                                                <div class="delete-action">
    … …  
    430430                                                        <?php if ( is_nav_menu( $nav_menu_selected_id ) && ( current_theme_supports('nav-menus') || current_theme_supports('widgets') ) ) : ?>
    431431                                                                <ul class="menu" id="menu-to-edit">
    432                                                                 <?php 
    433                                                                 $edit_markup = wp_get_nav_menu_to_edit( $nav_menu_selected_id  ); 
     432                                                                <?php
     433                                                                $edit_markup = wp_get_nav_menu_to_edit( $nav_menu_selected_id  );
    434434                                                                if ( ! is_wp_error( $edit_markup ) ) {
    435435                                                                        echo $edit_markup;
  • trunk/wp-admin/press-this.php

    r14374 r14404  
    487487                                <div class="inside">
    488488                                <div id="taxonomy-category" class="categorydiv">
    489                                
     489
    490490                                        <ul id="category-tabs" class="category-tabs">
    491491                                                <li class="tabs"><a href="#category-all" tabindex="3"><?php printf( __( 'All %s' ), $tax->label ); ?></a></li>
  • trunk/wp-admin/setup-config.php

    r14363 r14404  
    161161                $prefix = 'wp_';
    162162
    163         // Validate $prefix: it can only contain letters, numbers and underscores 
    164         if ( preg_match( '|[^a-z0-9_]|i', $prefix ) ) 
    165                 wp_die( /*WP_I18N_BAD_PREFIX*/'<strong>ERROR</strong>: "Table Prefix" can only contain numbers, letters, and underscores.'/*/WP_I18N_BAD_PREFIX*/ ); 
     163        // Validate $prefix: it can only contain letters, numbers and underscores
     164        if ( preg_match( '|[^a-z0-9_]|i', $prefix ) )
     165                wp_die( /*WP_I18N_BAD_PREFIX*/'<strong>ERROR</strong>: "Table Prefix" can only contain numbers, letters, and underscores.'/*/WP_I18N_BAD_PREFIX*/ );
    166166
    167167        // Test the db connection.
  • trunk/wp-includes/canonical.php

    r14355 r14404  
    8787                if ( $id && $redirect_url = get_permalink($id) )
    8888                        $redirect['query'] = remove_query_arg(array('p', 'page_id', 'attachment_id'), $redirect['query']);
    89        
     89
    9090                if ( ! $redirect_url )
    9191                        $redirect_url = redirect_guess_404_permalink();
  • trunk/wp-includes/capabilities.php

    r14256 r14404  
    11811181 *
    11821182 * @since 3.0.0
    1183  * 
     1183 *
    11841184 * @uses $super_admins Super admins global variable, if set.
    1185  * 
     1185 *
    11861186 * @return array List of super admin logins
    11871187 */
  • trunk/wp-includes/category-template.php

    r13943 r14404  
    474474                $r['exclude'] = '';
    475475        }
    476        
     476
    477477        if ( !isset( $r['class'] ) )
    478478                $r['class'] = ( 'category' == $r['taxonomy'] ) ? 'categories' : $r['taxonomy'];
  • trunk/wp-includes/class-http.php

    r14363 r14404  
    392392        function processResponse($strResponse) {
    393393                $res = explode("\r\n\r\n", $strResponse, 2);
    394                
     394
    395395                return array('headers' => isset($res[0]) ? $res[0] : array(), 'body' => isset($res[1]) ? $res[1] : '');
    396396        }
  • trunk/wp-includes/class-oembed.php

    r14249 r14404  
    169169                $provider = add_query_arg( 'maxheight', $args['height'], $provider );
    170170                $provider = add_query_arg( 'url', urlencode($url), $provider );
    171                
     171
    172172                foreach( array( 'json', 'xml' ) as $format ) {
    173173                        $result = $this->_fetch_with_format( $provider, $format );
  • trunk/wp-includes/comment-template.php

    r14378 r14404  
    12581258         * the highest depth level displayed. This prevents them being orphaned
    12591259         * at the end of the comment list.
    1260          * 
     1260         *
    12611261         * Example: max_depth = 2, with 5 levels of nested content.
    12621262         * 1
  • trunk/wp-includes/formatting.php

    r14381 r14404  
    5353                        $cockneyreplace = array("&#8217;tain&#8217;t","&#8217;twere","&#8217;twas","&#8217;tis","&#8217;twill","&#8217;til","&#8217;bout","&#8217;nuff","&#8217;round","&#8217;cause");
    5454                }
    55                
     55
    5656                $static_characters = array_merge(array('---', ' -- ', '--', ' - ', 'xn&#8211;', '...', '``', '\'\'', ' (tm)'), $cockney);
    5757                $static_replacements = array_merge(array('&#8212;', ' &#8212; ', '&#8211;', ' &#8211; ', 'xn--', '&#8230;', $opening_quote, $closing_quote, ' &#8482;'), $cockneyreplace);
    58  
     58
    5959                $dynamic_characters = array('/\'(\d\d(?:&#8217;|\')?s)/', '/\'(\d+)/', '/(\s|\A|[([{<]|")\'/', '/(\d+)"/', '/(\d+)\'/', '/(\S)\'([^\'\s])/', '/(\s|\A|[([{<])"(?!\s)/', '/"(\s|\S|\Z)/', '/\'([\s.]|\Z)/', '/\b(\d+)x(\d+)\b/');
    6060                $dynamic_replacements = array('&#8217;$1','&#8217;$1', '$1&#8216;', '$1&#8243;', '$1&#8242;', '$1&#8217;$2', '$1' . $opening_quote . '$2', $closing_quote . '$1', '&#8217;$1', '$1&#215;$2');
  • trunk/wp-includes/functions.php

    r14370 r14404  
    29132913 * @param array $list An array of objects to filter
    29142914 * @param array $args An array of key => value arguments to match against each object
    2915  * @param string $operator The logical operation to perform. 'or' means only one element 
     2915 * @param string $operator The logical operation to perform. 'or' means only one element
    29162916 *      from the array needs to match; 'and' means all elements must match. The default is 'and'.
    29172917 * @param bool|string $field A field from the object to place instead of the entire object
  • trunk/wp-includes/locale.php

    r14360 r14404  
    182182                $trans = __('number_format_thousands_sep');
    183183                $this->number_format['thousands_sep'] = ('number_format_thousands_sep' == $trans) ? ',' : $trans;
    184                
     184
    185185                /* translators: $dec_point argument for http://php.net/number_format, default is . */
    186186                $trans = __('number_format_decimal_point');
  • trunk/wp-includes/ms-functions.php

    r14374 r14404  
    13261326        if ( empty( $details ) || is_wp_error( add_existing_user_to_blog( $details ) ) )
    13271327                wp_die( sprintf(__('An error occurred adding you to this site. Back to the <a href="%s">homepage</a>.'), site_url() ) );
    1328        
     1328
    13291329        wp_die( sprintf(__('You have been added to this site. Please visit the <a href="%s">homepage</a> or <a href="%s">login</a> using your username and password.'), site_url(), admin_url() ), __('Success') );
    13301330}
  • trunk/wp-includes/nav-menu-template.php

    r14293 r14404  
    8585
    8686                $output .= $indent . '<li id="menu-item-'. $item->ID . '"' . $value . $classes .'>';
    87                
     87
    8888                $attributes  = ! empty( $item->attr_title ) ? ' title="'  . esc_attr( $item->attr_title ) .'"' : '';
    8989                $attributes .= ! empty( $item->target )     ? ' target="' . esc_attr( $item->target     ) .'"' : '';
    … …  
    9696                $item_output .= '</a>';
    9797                $item_output .= $args->after;
    98        
     98
    9999                $output .= apply_filters( 'wp_get_nav_menu_item', $item_output, $args );
    100100        }
    … …  
    209209                }
    210210        }
    211        
     211
    212212        // If the menu exists, get its items.
    213213        if ( $menu && ! is_wp_error($menu) )
    … …  
    220220                }
    221221        }
    222        
     222
    223223        $nav_menu = '';
    224224        $items = '';
    … …  
    237237        $items .= walk_nav_menu_tree( $sorted_menu_items, $args->depth, $args );
    238238
    239         // Attributes   
     239        // Attributes
    240240        $attributes  = ' id="menu-' . $menu->slug . '"';
    241241        $attributes .= $args->menu_class ? ' class="'. $args->menu_class .'"' : '';
    242        
     242
    243243        $nav_menu .= '<ul'. $attributes .'>';
    244244
  • trunk/wp-includes/nav-menu.php

    r14297 r14404  
    1717 */
    1818function wp_get_nav_menu_object( $menu ) {
    19         if ( ! $menu ) 
     19        if ( ! $menu )
    2020                return false;
    2121
    … …  
    4848        if ( ! $menu )
    4949                return false;
    50        
     50
    5151        $menu_obj = wp_get_nav_menu_object( $menu );
    5252
    53         if ( 
    54                 $menu_obj && 
    55                 ! is_wp_error( $menu_obj ) && 
     53        if (
     54                $menu_obj &&
     55                ! is_wp_error( $menu_obj ) &&
    5656                ! empty( $menu_obj->taxonomy ) &&
    5757                'nav_menu' == $menu_obj->taxonomy
    58         ) 
     58        )
    5959                return true;
    60        
     60
    6161        return false;
    6262}
    … …  
    164164
    165165        if ( $_menu && isset( $_menu->term_id ) ) {
    166                 $args = array( 
    167                         'description' => ( isset( $menu_data['description'] ) ? $menu_data['description'] : '' ), 
    168                         'name' => ( isset( $menu_data['menu-name'] ) ? $menu_data['menu-name'] : '' ), 
    169                         'parent' => ( isset( $menu_data['parent'] ) ? (int) $menu_data['parent'] : 0 ), 
    170                         'slug' => null, 
     166                $args = array(
     167                        'description' => ( isset( $menu_data['description'] ) ? $menu_data['description'] : '' ),
     168                        'name' => ( isset( $menu_data['menu-name'] ) ? $menu_data['menu-name'] : '' ),
     169                        'parent' => ( isset( $menu_data['parent'] ) ? (int) $menu_data['parent'] : 0 ),
     170                        'slug' => null,
    171171                );
    172        
     172
    173173                $menu_id = (int) $_menu->term_id;
    174174
    175175                // double-check that we're not changing a menu to the name of another
    176                 $_possible_existing = get_term_by( 'name', $menu_data['menu-name'], 'nav_menu' ); 
    177                 if ( 
    178                         $_possible_existing && 
    179                         ! is_wp_error( $_possible_existing ) && 
     176                $_possible_existing = get_term_by( 'name', $menu_data['menu-name'], 'nav_menu' );
     177                if (
     178                        $_possible_existing &&
     179                        ! is_wp_error( $_possible_existing ) &&
    180180                        isset( $_possible_existing->term_id ) &&
    181                         $_possible_existing->term_id != $menu_id 
     181                        $_possible_existing->term_id != $menu_id
    182182                ) {
    183183                        return new WP_Error( 'menu_exists', sprintf( __('The menu name <strong>%s</strong> conflicts with another menu name. Please try another.'), esc_html( $menu_data['menu-name'] ) ) );
    … …  
    256256                }
    257257        }
    258        
     258
    259259        if ( 'custom' != $args['menu-item-type'] ) {
    260260                /* if non-custom menu item, then:
    … …  
    298298                'post_content' => $args['menu-item-description'],
    299299                'post_excerpt' => $args['menu-item-attr-title'],
    300                 'post_parent' => $args['menu-item-parent-id'], 
    301                 'post_title' => $args['menu-item-title'], 
    302                 'post_type' => 'nav_menu_item', 
     300                'post_parent' => $args['menu-item-parent-id'],
     301                'post_title' => $args['menu-item-title'],
     302                'post_type' => 'nav_menu_item',
    303303                'tax_input' => array( 'nav_menu' => $menu->name ),
    304304        );
    … …  
    377377
    378378                if ( $a->$_menu_item_sort_prop == $b->$_menu_item_sort_prop ) {
    379                         return 0;       
    380                 } elseif ( 
    381                         ( $_a == $a->$_menu_item_sort_prop ) && 
    382                         ( $_b == $b->$_menu_item_sort_prop ) 
     379                        return 0;
     380                } elseif (
     381                        ( $_a == $a->$_menu_item_sort_prop ) &&
     382                        ( $_b == $b->$_menu_item_sort_prop )
    383383                ) {
    384384                        return $_a < $_b ? -1 : 1;
    … …  
    405405        if ( ! $menu )
    406406                return false;
    407        
     407
    408408        $items = get_objects_in_term( $menu->term_id, 'nav_menu' );
    409409
    … …  
    449449 * - title:             The title of this menu item.
    450450 * - target:            The target attribute of the link element for this menu item.
    451  * - attr_title:        The title attribute of the link element for this menu item.     
     451 * - attr_title:        The title attribute of the link element for this menu item.
    452452 * - classes:           The class attribute value for the link element of this menu item.
    453453 * - xfn:               The XFN relationship expressed in the link of this menu item.
    … …  
    466466                        $menu_item->object = get_post_meta( $menu_item->ID, '_menu_item_object', true );
    467467                        $menu_item->type = get_post_meta( $menu_item->ID, '_menu_item_type', true );
    468                        
     468
    469469                        if ( 'post_type' == $menu_item->type ) {
    470470                                $object = get_post_type_object( $menu_item->object );
    471471                                $menu_item->append = $object->singular_label;
    472472                                $menu_item->url = get_permalink( $menu_item->object_id );
    473                        
     473
    474474                                $original_object = get_post( $menu_item->object_id );
    475475                                $original_title = $original_object->post_title;
    … …  
    489489                                $menu_item->url = get_post_meta( $menu_item->ID, '_menu_item_url', true );
    490490                        }
    491                        
     491
    492492                        $menu_item->target = get_post_meta( $menu_item->ID, '_menu_item_target', true );
    493493
    … …  
    543543 *
    544544 * @since 3.0.0
    545  * 
     545 *
    546546 * @param int $object_id The ID of the original object.
    547547 * @param string $object_type The type of object, such as "taxonomy" or "post_type."
  • trunk/wp-includes/post.php

    r14399 r14404  
    633633 * @param array|string $args An array of key => value arguments to match against the post status objects.
    634634 * @param string $output The type of output to return, either post status 'names' or 'objects'. 'names' is the default.
    635  * @param string $operator The logical operation to perform. 'or' means only one element 
     635 * @param string $operator The logical operation to perform. 'or' means only one element
    636636 *  from the array needs to match; 'and' means all elements must match. The default is 'and'.
    637637 * @return array A list of post type names or objects
    … …  
    739739 * @param array|string $args An array of key => value arguments to match against the post type objects.
    740740 * @param string $output The type of output to return, either post type 'names' or 'objects'. 'names' is the default.
    741  * @param string $operator The logical operation to perform. 'or' means only one element 
     741 * @param string $operator The logical operation to perform. 'or' means only one element
    742742 *  from the array needs to match; 'and' means all elements must match. The default is 'and'.
    743743 * @return array A list of post type names or objects
  • trunk/wp-includes/query.php

    r14402 r14404  
    17201720                                        $q['name'] = $q[ $ptype_obj->query_var ];
    17211721                                } else {
    1722                                         // Hierarchical post_types will operate through the 
     1722                                        // Hierarchical post_types will operate through the
    17231723                                        $q['pagename'] = $q[ $ptype_obj->query_var ];
    17241724                                        $q['name'] = '';
    … …  
    24832483                                foreach ( $stickies as $sticky_post ) {
    24842484                                        // Ignore sticky posts the current user cannot read or are not published.
    2485                                         if ( 'publish' != $sticky_post->post_status ) 
     2485                                        if ( 'publish' != $sticky_post->post_status )
    24862486                                                continue;
    24872487                                        array_splice($this->posts, $sticky_offset, 0, array($sticky_post));
  • trunk/wp-includes/rewrite.php

    r14273 r14404  
    15681568                $home_path = parse_url( home_url() );
    15691569                $robots_rewrite = ( empty( $home_path['path'] ) || '/' == $home_path['path'] ) ? array( 'robots\.txt$' => $this->index . '?robots=1' ) : array();
    1570                        
     1570
    15711571                // Default Feed rules - These are require to allow for the direct access files to work with permalink structure starting with %category%
    15721572                $default_feeds = array( '.*wp-atom.php$'        =>      $this->index . '?feed=atom',
  • trunk/wp-includes/taxonomy.php

    r14234 r14404  
    7070 * @param array $args An array of key => value arguments to match against the taxonomy objects.
    7171 * @param string $output The type of output to return, either taxonomy 'names' or 'objects'. 'names' is the default.
    72  * @param string $operator The logical operation to perform. 'or' means only one element 
     72 * @param string $operator The logical operation to perform. 'or' means only one element
    7373 *  from the array needs to match; 'and' means all elements must match. The default is 'and'.
    7474 * @return array A list of taxonomy names or objects
    … …  
    15721572
    15731573        // Seems unreachable, However, Is used in the case that a term name is provided, which sanitizes to an empty string.
    1574         if ( empty($slug) ) { 
     1574        if ( empty($slug) ) {
    15751575                $slug = sanitize_title($slug, $term_id);
    15761576                do_action( 'edit_terms', $term_id );
  • trunk/wp-includes/theme.php

    r14365 r14404  
    845845/**
    846846 * Retrieve path of home template in current or parent template.
    847  * 
     847 *
    848848 * This is the template used for the page containing the blog posts
    849  * 
     849 *
    850850 * Attempts to locate 'home.php' first before falling back to 'index.php'.
    851851 *
  • trunk/wp-includes/widgets.php

    r14382 r14404  
    559559
    560560        add_theme_support('widgets');
    561        
     561
    562562        do_action( 'register_sidebar', $sidebar );
    563        
     563
    564564        return $sidebar['id'];
    565565}
    … …  
    691691function wp_unregister_sidebar_widget($id) {
    692692        do_action( 'wp_unregister_sidebar_widget', $id );
    693        
     693
    694694        wp_register_sidebar_widget($id, '', '');
    695695        wp_unregister_widget_control($id);
    … …  
    885885
    886886                $callback = $wp_registered_widgets[$id]['callback'];
    887                
     887
    888888                do_action( 'dynamic_sidebar', $wp_registered_widgets[$id] );
    889889
Note: See TracChangeset for help on using the changeset viewer.