WordPress.org

Make WordPress Core

Changeset 14924


Ignore:
Timestamp:
05/26/2010 02:42:15 AM (10 years ago)
Author:
ryan
Message:

Strip trailing whitespace

Location:
trunk
Files:
34 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/css/colors-fresh.dev.css

    r14918 r14924  
    10721072#adminmenu li.wp-has-current-submenu a.wp-has-current-submenu,
    10731073#adminmenu li.current a.menu-top {
    1074     background: #aaa url(../images/menu-bits.gif) top left repeat-x; 
     1074    background: #aaa url(../images/menu-bits.gif) top left repeat-x;
    10751075    border: #aaa 1px solid;
    10761076    color: #000;
  • trunk/wp-admin/css/install.dev.css

    r14847 r14924  
    208208    border: 1px solid #e6db55;
    209209    padding: 0.3em 0.6em;
    210     margin: 5px 0 15px; 
     210    margin: 5px 0 15px;
    211211    background-color: #ffffe0;
    212212}
  • trunk/wp-admin/css/nav-menu-rtl.dev.css

    r14481 r14924  
    8989#side-sortables .potential-menu-item ul {
    9090    margin-right: 0;
    91    
     91
    9292}
    9393
  • trunk/wp-admin/css/nav-menu.dev.css

    r14917 r14924  
    214214
    215215.meta-sep,
    216 .submitdelete, 
     216.submitdelete,
    217217.submitcancel {
    218218    display:block;
     
    240240}
    241241
    242 .button-controls { 
     242.button-controls {
    243243    clear:both;
    244244    margin: 10px 0;
     
    281281}
    282282
    283 .menu ul { 
     283.menu ul {
    284284    width: 100%;
    285285}
     
    526526/* Clearfix */
    527527#menu-item-name-wrap:after,
    528 #menu-item-url-wrap:after, 
     528#menu-item-url-wrap:after,
    529529#menu-name-label:after,
    530530#menu-settings-column .inside:after,
    531 #nav-menus-frame:after, 
     531#nav-menus-frame:after,
    532532#post-body-content:after,
    533 .button-controls:after, 
     533.button-controls:after,
    534534.major-publishing-actions:after,
    535535.menu-item-settings:after {
    536     clear: both; 
     536    clear: both;
    537537    content: ".";
    538538    display: block;
    539     height: 0; 
     539    height: 0;
    540540    visibility: hidden;
    541541}
  • trunk/wp-admin/css/wp-admin.dev.css

    r14907 r14924  
    11761176    position: absolute;
    11771177    font-family: Helvetica, Arial, sans-serif;
    1178     font-size: 9px; 
     1178    font-size: 9px;
    11791179    line-height: 17px;
    11801180    font-weight: bold;
    1181     margin-top: 1px; 
    1182     margin-left: 7px; 
    1183     -moz-border-radius: 10px; 
    1184     -khtml-border-radius: 10px; 
    1185     -webkit-border-radius: 10px; 
     1181    margin-top: 1px;
     1182    margin-left: 7px;
     1183    -moz-border-radius: 10px;
     1184    -khtml-border-radius: 10px;
     1185    -webkit-border-radius: 10px;
    11861186    border-radius: 10px;
    11871187}
  • trunk/wp-admin/custom-header.php

    r14907 r14924  
    119119            wp_enqueue_style('imgareaselect');
    120120    }
    121    
     121
    122122    /**
    123123     * Check if header text is allowed
     
    273273            jQuery('#name').css('color', old_color);
    274274            jQuery('#desc').css('color', old_color);
    275             pickColor(old_color); 
     275            pickColor(old_color);
    276276        } else {
    277277            //Hide text
     
    372372            maxHeight: <?php echo HEADER_IMAGE_HEIGHT; ?>,
    373373            maxWidth: <?php echo HEADER_IMAGE_WIDTH; ?>,
    374             onInit: function () { 
     374            onInit: function () {
    375375                jQuery('#width').val(xinit);
    376376                jQuery('#height').val(yinit);
  • trunk/wp-admin/export.php

    r14794 r14924  
    4949    foreach ( $monthyears as $k => $monthyear )
    5050        $monthyears[$k]->lmonth = $wp_locale->get_month( $monthyear->month, 2 );
    51     for( $s = 0, $e = count( $monthyears ) - 1; $e >= 0; $s++, $e-- ) { 
     51    for( $s = 0, $e = count( $monthyears ) - 1; $e >= 0; $s++, $e-- ) {
    5252        $dateoptions .= "\t<option value=\"" . $monthyears[$s]->year . '-' . zeroise( $monthyears[$s]->month, 2 ) . '">' . $monthyears[$s]->lmonth . ' ' . $monthyears[$s]->year . "</option>\n";
    5353        $edateoptions .= "\t<option value=\"" . $monthyears[$e]->eyear . '-' . zeroise( $monthyears[$e]->emonth, 2 ) . '">' . $monthyears[$e]->lmonth . ' ' . $monthyears[$e]->year . "</option>\n";
  • trunk/wp-admin/includes/class-wp-upgrader.php

    r14920 r14924  
    12671267
    12681268        if ( is_multisite() && current_user_can( 'manage_network_plugins' ) )
    1269             $install_actions['network_activate'] = '<a href="' . wp_nonce_url('plugins.php?action=activate&amp;networkwide=1&amp;plugin=' . $plugin_file, 'activate-plugin_' . $plugin_file) . '" title="' . __('Activate this plugin for all sites in this network') . '" target="_parent">' . __('Network Activate') . '</a>'; 
     1269            $install_actions['network_activate'] = '<a href="' . wp_nonce_url('plugins.php?action=activate&amp;networkwide=1&amp;plugin=' . $plugin_file, 'activate-plugin_' . $plugin_file) . '" title="' . __('Activate this plugin for all sites in this network') . '" target="_parent">' . __('Network Activate') . '</a>';
    12701270
    12711271        if ( $this->type == 'web' )
  • trunk/wp-admin/includes/export.php

    r14705 r14924  
    2626function export_wp( $args = array() ) {
    2727    global $wpdb, $post_ids, $post, $wp_taxonomies;
    28    
     28
    2929    if ( ! is_array( $args ) )
    3030        $args = array( 'author' => $args );
    31    
     31
    3232    $defaults = array( 'author' => null, 'taxonomy' => null, 'post_type' => null, 'post_status' => null, 'start_date' => null, 'end_date' => null );
    3333    $args = wp_parse_args( $args, $defaults );
    34    
     34
    3535    extract($args);
    36    
     36
    3737    do_action('export_wp');
    38    
     38
    3939    if( strlen( $start_date ) > 4 && strlen( $end_date ) > 4 )
    4040        $filename = 'wordpress.' . $start_date . '.' . $end_date . '.xml';
    4141    else
    4242        $filename = 'wordpress.' . date( 'Y-m-d' ) . '.xml';
    43    
     43
    4444    header( 'Content-Description: File Transfer' );
    4545    header( 'Content-Disposition: attachment; filename=' . $filename );
    4646    header( 'Content-Type: text/xml; charset=' . get_option( 'blog_charset' ), true );
    47    
     47
    4848    if ( $post_type && $post_type != 'all' )
    4949        $where = $wpdb->prepare("WHERE post_type = %s ", $post_type);
    5050    else
    5151        $where = "WHERE post_type != 'revision' ";
    52    
     52
    5353    if ( $author && $author != 'all' ) {
    5454        $author_id = (int) $author;
    5555        $where .= $wpdb->prepare( "AND post_author = %d ", $author_id );
    5656    }
    57    
     57
    5858    if ( $start_date && $start_date != 'all' )
    5959        $where .= $wpdb->prepare( "AND post_date >= %s ", $start_date );
    60    
     60
    6161    if ( $end_date && $end_date != 'all' )
    6262        $where .= $wpdb->prepare( "AND post_date < %s ", $end_date );
    63    
     63
    6464    if ( $taxonomy && is_array( $taxonomy ) ) {
    6565        foreach ( $taxonomy as $term_id ) {
     
    6868        }
    6969    }
    70    
     70
    7171    if ( $post_status && $post_status != 'all' )
    7272        $where .= $wpdb->prepare( "AND post_status = %s", $status );
    73    
     73
    7474    // grab a snapshot of post IDs, just in case it changes during the export
    7575    $post_ids = $wpdb->get_col( "SELECT ID FROM $wpdb->posts $where ORDER BY post_date_gmt ASC" );
    76    
     76
    7777    $categories = (array) get_categories( array( 'get' => 'all' ) );
    7878    $tags = (array) get_tags( array( 'get' => 'all' ) );
    79    
     79
    8080    $custom_taxonomies = $wp_taxonomies;
    8181    unset( $custom_taxonomies['category'] );
     
    8484    $custom_taxonomies = array_keys( $custom_taxonomies );
    8585    $terms = (array) get_terms( $custom_taxonomies, array( 'get' => 'all' ) );
    86    
     86
    8787    /**
    8888     * {@internal Missing Short Description}}
     
    9595        if ( ! is_array( $categories ) || empty( $categories ) )
    9696            return array();
    97    
     97
    9898        foreach ( $categories as $category ){
    9999            $parents[$category->term_id] = $category->parent;
    100100        }
    101    
     101
    102102        $parents = array_unique( array_diff( $parents, array_keys( $parents ) ) );
    103    
     103
    104104        if ( $zero = array_search( '0', $parents ) )
    105105            unset( $parents[$zero] );
    106    
     106
    107107        return $parents;
    108108    }
    109    
     109
    110110    while ( $parents = wxr_missing_parents( $categories ) ) {
    111111        $found_parents = get_categories( array( 'include' => join( ', ', $parents) ) );
     
    115115            break;
    116116    }
    117    
     117
    118118    // Put them in order to be inserted with no child going before its parent
    119119    $pass = 0;
     
    126126    }
    127127    unset( $categories );
    128    
     128
    129129    /**
    130130     * Place string in CDATA tag.
     
    137137        if ( seems_utf8( $str ) == false )
    138138            $str = utf8_encode( $str );
    139    
     139
    140140        // $str = ent2ncr(esc_html($str));
    141141        $str = "<![CDATA[$str" . ( ( substr( $str, -1 ) == ']' ) ? ' ' : '') . "]]>";
    142    
     142
    143143        return $str;
    144144    }
    145    
     145
    146146    /**
    147147     * {@internal Missing Short Description}}
     
    153153    function wxr_site_url() {
    154154        global $current_site;
    155    
     155
    156156        // mu: the base url
    157157        if ( isset( $current_site->domain ) )
     
    161161            return get_bloginfo_rss( 'url' );
    162162    }
    163    
     163
    164164    /**
    165165     * {@internal Missing Short Description}}
     
    172172        if ( empty( $c->name ) )
    173173            return;
    174    
     174
    175175        echo '<wp:cat_name>' . wxr_cdata( $c->name ) . '</wp:cat_name>';
    176176    }
    177    
     177
    178178    /**
    179179     * {@internal Missing Short Description}}
     
    186186        if ( empty( $c->description ) )
    187187            return;
    188    
     188
    189189        echo '<wp:category_description>' . wxr_cdata($c->description) . '</wp:category_description>';
    190190    }
    191    
     191
    192192    /**
    193193     * {@internal Missing Short Description}}
     
    200200        if ( empty( $t->name ) )
    201201            return;
    202    
     202
    203203        echo '<wp:tag_name>' . wxr_cdata($t->name) . '</wp:tag_name>';
    204204    }
    205    
     205
    206206    /**
    207207     * {@internal Missing Short Description}}
     
    214214        if ( empty( $t->description ) )
    215215            return;
    216    
     216
    217217        echo '<wp:tag_description>' . wxr_cdata($t->description) . '</wp:tag_description>';
    218218    }
    219    
     219
    220220    /**
    221221     * {@internal Missing Short Description}}
     
    228228        if ( empty( $t->name ) )
    229229            return;
    230    
     230
    231231        echo '<wp:term_name>' . wxr_cdata($t->name) . '</wp:term_name>';
    232232    }
    233    
     233
    234234    /**
    235235     * {@internal Missing Short Description}}
     
    242242        if ( empty( $t->description ) )
    243243            return;
    244    
     244
    245245        echo '<wp:term_description>' . wxr_cdata($t->description) . '</wp:term_description>';
    246246    }
    247    
     247
    248248    /**
    249249     * {@internal Missing Short Description}}
     
    253253    function wxr_post_taxonomy() {
    254254        global $post;
    255    
     255
    256256        $the_list = '';
    257257        $filter = 'rss';
    258    
     258
    259259        $taxonomies = get_object_taxonomies( 'post' );
    260260        $terms = wp_get_post_terms( $post->ID, $taxonomies );
     
    272272        echo $the_list;
    273273    }
    274    
     274
    275275    echo '<?xml version="1.0" encoding="' . get_bloginfo('charset') . '"?' . ">\n";
    276    
     276
    277277    ?>
    278278<!-- This is a WordPress eXtended RSS file generated by WordPress as an export of your blog. -->
     
    320320    <wp:term><wp:term_taxonomy><?php echo $t->taxonomy; ?></wp:term_taxonomy><wp:term_slug><?php echo $t->slug; ?></wp:term_slug><wp:term_parent><?php echo $t->parent ? $custom_taxonomies[$t->parent]->name : ''; ?></wp:term_parent><?php wxr_term_name( $t ); ?><?php wxr_term_description( $t ); ?></wp:term>
    321321    <?php endforeach; endif; ?>
    322    
     322
    323323    <?php do_action( 'rss2_head' ); ?>
    324324
     
    326326    global $wp_query;
    327327    $wp_query->in_the_loop = true;  // Fake being in the loop.
    328    
     328
    329329    // fetch 20 posts at a time rather than loading the entire table into memory
    330330    while ( $next_posts = array_splice( $post_ids, 0, 20 ) ) {
    331331    $where = "WHERE ID IN (" . join( ',', $next_posts ) . ")";
    332332    $posts = $wpdb->get_results( "SELECT * FROM $wpdb->posts $where ORDER BY post_date_gmt ASC" );
    333    
     333
    334334    // Begin Loop
    335335    foreach ($posts as $post) {
     
    347347        <dc:creator><?php echo wxr_cdata( get_the_author() ); ?></dc:creator>
    348348        <?php wxr_post_taxonomy() ?>
    349    
     349
    350350        <guid isPermaLink="false"><?php the_guid(); ?></guid>
    351351        <description></description>
     
    398398        <?php } } ?>
    399399    </item>
    400     <?php 
    401     } 
     400    <?php
     401    }
    402402    }
    403403} ?>
  • trunk/wp-admin/includes/file.php

    r14811 r14924  
    604604    $needed_dirs = array_unique($needed_dirs);
    605605    foreach ( $needed_dirs as $dir ) {
    606         // Check the parent folders of the folders all exist within the creation array. 
     606        // Check the parent folders of the folders all exist within the creation array.
    607607        if ( untrailingslashit($to) == $dir ) // Skip over the working directory, We know this exists (or will exist)
    608608            continue;
     
    683683    $needed_dirs = array_unique($needed_dirs);
    684684    foreach ( $needed_dirs as $dir ) {
    685         // Check the parent folders of the folders all exist within the creation array. 
     685        // Check the parent folders of the folders all exist within the creation array.
    686686        if ( untrailingslashit($to) == $dir ) // Skip over the working directory, We know this exists (or will exist)
    687687            continue;
  • trunk/wp-admin/includes/nav-menu.php

    r14917 r14924  
    681681function wp_nav_menu_item_taxonomy_meta_box( $object, $taxonomy ) {
    682682    $taxonomy_name = $taxonomy['args']->name;
    683    
     683
    684684    // paginate browsing for large numbers of objects
    685685    $per_page = 50;
     
    967967        $result .= __('Select menu items (pages, categories, links) from the boxes at left to begin building your custom menu.');
    968968        $result .= '</div>';
    969        
     969
    970970        if( empty($menu_items) )
    971971            return $result;
  • trunk/wp-admin/includes/post.php

    r14765 r14924  
    316316            if (  isset( $tax_input[$tax_name]) && current_user_can( $taxonomy_obj->cap->assign_terms ) )
    317317                $new_terms = $tax_input[$tax_name];
    318             else 
     318            else
    319319                $new_terms = array();
    320                
     320
    321321            if ( $taxonomy_obj->hierarchical )
    322322                $current_terms = (array) wp_get_object_terms( $post_ID, $tax_name, array('fields' => 'ids') );
     
    326326            $post_data['tax_input'][$tax_name] = array_merge( $current_terms, $new_terms );
    327327        }
    328        
     328
    329329        if ( isset($new_cats) && in_array( 'category', $tax_names ) ) {
    330330            $cats = (array) wp_get_post_categories($post_ID);
  • trunk/wp-admin/includes/schema.php

    r14845 r14924  
    710710        'global_terms_enabled' => global_terms_enabled() ? '1' : '0'
    711711    );
    712     if ( !intval( $subdomain_install ) ) 
     712    if ( !intval( $subdomain_install ) )
    713713        $sitemeta['illegal_names'][] = 'blog';
    714714
  • trunk/wp-admin/includes/template.php

    r14904 r14924  
    28382838    $hidden = get_hidden_meta_boxes($page);
    28392839
    2840     printf('<div id="%s-sortables" class="meta-box-sortables">', htmlspecialchars($context)); 
     2840    printf('<div id="%s-sortables" class="meta-box-sortables">', htmlspecialchars($context));
    28412841
    28422842    $i = 0;
     
    32343234function manage_columns_prefs( $page ) {
    32353235    $columns = get_column_headers( $page );
    3236     $hidden  = get_hidden_columns( $page ); 
     3236    $hidden  = get_hidden_columns( $page );
    32373237    $special = array('_title', 'cb', 'comment', 'media', 'name', 'title', 'username');
    32383238
     
    35463546/**
    35473547 * Convert a screen string to a screen object
    3548  * 
     3548 *
    35493549 * @since 3.0.0
    3550  * 
     3550 *
    35513551 * @param string $screen The name of the screen
    35523552 * @return object An object containing the safe screen name and id
     
    36163616
    36173617    if ( !empty( $screen_options ) ) {
    3618         ?> 
     3618        ?>
    36193619        <h5><?php _ex('Show on screen', 'Screen Options') ?></h5>
    36203620        <?php
    36213621    }
    3622    
     3622
    36233623    echo $screen_options;
    36243624    echo $settings; ?>
  • trunk/wp-admin/index-extra.php

    r14815 r14924  
    3333    wp_dashboard_plugins_output();
    3434    break;
    35    
     35
    3636case 'dashboard_quick_press' :
    3737    wp_dashboard_quick_press_output();
  • trunk/wp-admin/js/nav-menu.dev.js

    r14917 r14924  
    148148                getItemData : function( itemType, id ) {
    149149                    itemType = itemType || 'menu-item';
    150                    
     150
    151151                    var itemData = {}, i,
    152152                    fields = [
     
    165165                        'menu-item-xfn'
    166166                    ];
    167                    
     167
    168168                    if( !id && itemType == 'menu-item' ) {
    169169                        id = this.find('.menu-item-data-db-id').val();
    170170                    }
    171                    
     171
    172172                    if( !id ) return itemData;
    173                    
     173
    174174                    this.find('input').each(function() {
    175175                        var field;
     
    180180                            else if( itemType == 'add-menu-item' )
    181181                                field = 'menu-item[' + id + '][' + fields[i] + ']';
    182                                
     182
    183183                            if (
    184184                                this.name &&
     
    189189                        }
    190190                    });
    191                    
     191
    192192                    return itemData;
    193193                },
    194194                setItemData : function( itemData, itemType, id ) { // Can take a type, such as 'menu-item', or an id.
    195195                    itemType = itemType || 'menu-item';
    196                    
     196
    197197                    if( !id && itemType == 'menu-item' ) {
    198198                        id = $('.menu-item-data-db-id', this).val();
    199199                    }
    200                    
     200
    201201                    if( !id ) return this;
    202                    
     202
    203203                    this.find('input').each(function() {
    204204                        var t = $(this), field;
     
    208208                            else if( itemType == 'add-menu-item' )
    209209                                field = 'menu-item[' + id + '][' + attr + ']';
    210                            
     210
    211211                            if ( field == t.attr('name') ) {
    212212                                t.val( val );
  • trunk/wp-admin/nav-menus.php

    r14888 r14924  
    8484
    8585                // get next in order
    86                 if ( 
     86                if (
    8787                    isset( $orders_to_dbids[$dbids_to_orders[$menu_item_id] + 1] )
    8888                ) {
     
    9191
    9292                    // if not siblings of same parent, bubble menu item up but keep order
    93                     if ( 
     93                    if (
    9494                        ! empty( $menu_item_data['menu_item_parent'] ) &&
    9595                        (
     
    100100
    101101                        $parent_db_id = in_array( $menu_item_data['menu_item_parent'], $orders_to_dbids ) ? (int) $menu_item_data['menu_item_parent'] : 0;
    102    
     102
    103103                        $parent_object = wp_setup_nav_menu_item( get_post( $parent_db_id ) );
    104104
    105105                        if ( ! is_wp_error( $parent_object ) ) {
    106106                            $parent_data = (array) $parent_object;
    107                             $menu_item_data['menu_item_parent'] = $parent_data['menu_item_parent']; 
     107                            $menu_item_data['menu_item_parent'] = $parent_data['menu_item_parent'];
    108108                            update_post_meta( $menu_item_data['ID'], '_menu_item_menu_item_parent', (int) $menu_item_data['menu_item_parent'] );
    109109
     
    115115                        $menu_item_data['menu_order'] = $menu_item_data['menu_order'] + 1;
    116116
    117                         $menu_item_data['menu_item_parent'] = $next_item_data['ID'];   
     117                        $menu_item_data['menu_item_parent'] = $next_item_data['ID'];
    118118                        update_post_meta( $menu_item_data['ID'], '_menu_item_menu_item_parent', (int) $menu_item_data['menu_item_parent'] );
    119                        
     119
    120120                        wp_update_post($menu_item_data);
    121121                        wp_update_post($next_item_data);
    122122                    }
    123                    
     123
    124124
    125125                // the item is last but still has a parent, so bubble up
    126                 } elseif ( 
     126                } elseif (
    127127                    ! empty( $menu_item_data['menu_item_parent'] ) &&
    128128                    in_array( $menu_item_data['menu_item_parent'], $orders_to_dbids )
     
    175175
    176176                            // if there is something before the parent and parent a child of it, make menu item a child also of it
    177                             if ( 
    178                                 ! empty( $dbids_to_orders[$parent_db_id] ) && 
     177                            if (
     178                                ! empty( $dbids_to_orders[$parent_db_id] ) &&
    179179                                ! empty( $orders_to_dbids[$dbids_to_orders[$parent_db_id] - 1] ) &&
    180180                                ! empty( $parent_data['menu_item_parent'] )
     
    183183
    184184                            // else if there is something before parent and parent not a child of it, make menu item a child of that something's parent
    185                             } elseif ( 
    186                                 ! empty( $dbids_to_orders[$parent_db_id] ) && 
     185                            } elseif (
     186                                ! empty( $dbids_to_orders[$parent_db_id] ) &&
    187187                                ! empty( $orders_to_dbids[$dbids_to_orders[$parent_db_id] - 1] )
    188188                            ) {
     
    211211
    212212                    // else this menu item is not a child of the previous
    213                     } elseif ( 
     213                    } elseif (
    214214                        empty( $menu_item_data['menu_order'] ) ||
    215215                        empty( $menu_item_data['menu_item_parent'] ) ||
    216216                        ! in_array( $menu_item_data['menu_item_parent'], array_keys( $dbids_to_orders ) ) ||
    217217                        empty( $orders_to_dbids[$dbids_to_orders[$menu_item_id] - 1] ) ||
    218                         $orders_to_dbids[$dbids_to_orders[$menu_item_id] - 1] != $menu_item_data['menu_item_parent']   
     218                        $orders_to_dbids[$dbids_to_orders[$menu_item_id] - 1] != $menu_item_data['menu_item_parent']
    219219                    ) {
    220220                        // just make it a child of the previous; keep the order
     
    534534                                        else
    535535                                            $auto_add = false;
    536                                     }   
     536                                    }
    537537                                ?>
    538538                                <div class="auto-add-pages">
  • trunk/wp-admin/network.php

    r14914 r14924  
    226226                    // Uh oh:
    227227                    if ( !allow_subdirectory_install() )
    228                         echo ' <strong>' . __( 'Warning!' ) . ' ' . __( 'The main site in a sub-directory install will need to use a modified permalink structure, potentially breaking existing links.' ) . '</strong>';   
     228                        echo ' <strong>' . __( 'Warning!' ) . ' ' . __( 'The main site in a sub-directory install will need to use a modified permalink structure, potentially breaking existing links.' ) . '</strong>';
    229229                ?></td>
    230230            </tr>
     
    349349</li>
    350350<?php
    351     if (iis7_supports_permalinks()) { 
     351    if (iis7_supports_permalinks()) {
    352352            if (is_subdomain_install()) {
    353                 $web_config_file = 
     353                $web_config_file =
    354354'<?xml version="1.0" encoding="UTF-8"?>
    355355<configuration>
     
    382382</configuration>';
    383383            } else {
    384                 $web_config_file = 
     384                $web_config_file =
    385385'<?xml version="1.0" encoding="UTF-8"?>
    386386<configuration>
     
    439439# uploaded files
    440440RewriteRule ^' . ( $subdomain_install ? '' : '([_0-9a-zA-Z-]+/)?' ) . 'files/(.+) wp-includes/ms-files.php?file=$' . ( $subdomain_install ? 1 : 2 ) . ' [L]' . "\n";
    441        
     441
    442442        if ( ! $subdomain_install )
    443443            $htaccess_file .= "\n# add a trailing slash to /wp-admin\n" . 'RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]' . "\n";
    444        
     444
    445445        $htaccess_file .= "\n" . 'RewriteCond %{REQUEST_FILENAME} -f [OR]
    446446RewriteCond %{REQUEST_FILENAME} -d
    447447RewriteRule ^ - [L]';
    448        
     448
    449449        // @todo custom content dir.
    450450        if ( ! $subdomain_install )
    451451            $htaccess_file .= "\nRewriteRule  ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]\nRewriteRule  ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]";
    452        
     452
    453453        $htaccess_file .= "\nRewriteRule . index.php [L]";
    454        
     454
    455455        ?>
    456456        <li><p><?php printf( __( 'Add the following to your <code>.htaccess</code> file in <code>%s</code>, replacing other WordPress rules:' ), ABSPATH ); ?></p>
    457         <textarea class="code" readonly="readonly" cols="100" rows="<?php echo $subdomain_install ? 11 : 16; ?>"><?php 
    458         echo wp_htmledit_pre( $htaccess_file ); 
     457        <textarea class="code" readonly="readonly" cols="100" rows="<?php echo $subdomain_install ? 11 : 16; ?>"><?php
     458        echo wp_htmledit_pre( $htaccess_file );
    459459        ?>
    460460        </textarea></li>
  • trunk/wp-admin/upload.php

    r14908 r14924  
    2222
    2323    $lost = $wpdb->get_col("SELECT ID FROM $wpdb->posts WHERE post_type = 'attachment' AND post_parent > '0' and post_parent NOT IN ( SELECT ID FROM $wpdb->posts WHERE post_type NOT IN ('attachment', '" . join("', '", get_post_types( array( 'public' => false ) ) ) . "') )");
    24    
     24
    2525    $_GET['detached'] = 1;
    2626
     
    169169    '<p>' . __('Hovering over a row reveals action links: <em>Edit</em>, <em>Delete Permanently</em>, and <em>View</em>. Clicking <em>Edit</em> or on the media file&#8217;s name displays a simple screen to edit that individual file&#8217;s metadata. Clicking <em>Delete Permanently</em> will delete the file from the media library (as well as from any posts to which it is currently attached). <em>View</em> will take you to the display page for that file. ') . '</p>' .
    170170    '<p>' . __('If a media file has not been attached to any post, you will see that in the <em>Attached To</em> column, and can click on <em>Attach File</em> to launch a small popup that will allow you to search for a post and attach the file.') . '</p>' .
    171     '<p>' . __('For more information:<br /> 
     171    '<p>' . __('For more information:<br />
    172172    <a href="http://codex.wordpress.org/Media_Library_SubPanel">Media Library Documentation</a> <br />
    173173    <a href="http://wordpress.org/support/">Support Forums</a>') . '</p>'
  • trunk/wp-includes/default-constants.php

    r14485 r14924  
    287287     * Slug of the default theme for this install.
    288288     * Used as the default theme when installing new sites.
    289      * Will be used as the fallback if the current theme doesn't exist. 
     289     * Will be used as the fallback if the current theme doesn't exist.
    290290     * @since 3.0.0
    291291     */
  • trunk/wp-includes/default-widgets.php

    r14849 r14924  
    625625    function widget( $args, $instance ) {
    626626        global $comments, $comment;
    627        
     627
    628628        $cache = wp_cache_get('widget_recent_comments', 'widget');
    629        
     629
    630630        if ( ! is_array( $cache ) )
    631631            $cache = array();
    632        
     632
    633633        if ( isset( $cache[$args['widget_id']] ) ) {
    634634            echo $cache[$args['widget_id']];
     
    647647        $comments = get_comments( array( 'number' => $number, 'status' => 'approve' ) );
    648648        $output .= $before_widget;
    649         if ( $title ) 
     649        if ( $title )
    650650            $output .= $before_title . $title . $after_title;
    651651
    652652        $output .= '<ul id="recentcomments">';
    653         if ( $comments ) { 
     653        if ( $comments ) {
    654654            foreach ( (array) $comments as $comment) {
    655655                $output .=  '<li class="recentcomments">' . /* translators: comments widget: 1: comment author, 2: post link */ sprintf(_x('%1$s on %2$s', 'widgets'), get_comment_author_link(), '<a href="' . esc_url( get_comment_link($comment->comment_ID) ) . '">' . get_the_title($comment->comment_post_ID) . '</a>') . '</li>';
  • trunk/wp-includes/l10n.php

    r14647 r14924  
    193193/**
    194194 * Displays translated string with gettext context
    195  * 
     195 *
    196196 * @see _x
    197197 * @since 3.0.0
     
    507507 */
    508508function get_available_languages( $dir = null ) {
    509     $languages = array();   
    510        
     509    $languages = array();
     510
    511511    foreach( (array)glob( ( is_null( $dir) ? WP_LANG_DIR : $dir ) . '/*.mo' ) as $lang_file ) {
    512512        if ( false === strpos( $lang_file, 'continents-cities' ) ) {
     
    514514        }
    515515    }
    516    
     516
    517517    return $languages;
    518518}
  • trunk/wp-includes/link-template.php

    r14901 r14924  
    587587function get_term_feed_link( $term_id, $taxonomy = 'category', $feed = '' ) {
    588588    global $wp_rewrite;
    589    
     589
    590590    $term_id = ( int ) $term_id;
    591591
    592592    $term = get_term( $term_id, $taxonomy  );
    593    
     593
    594594    if ( empty( $term ) || is_wp_error( $term ) )
    595595        return false;
     
    602602    if ( '' == $permalink_structure ) {
    603603        if ( 'category' == $taxonomy ) {
    604             $link = home_url("?feed=$feed&amp;cat=$term_id"); 
     604            $link = home_url("?feed=$feed&amp;cat=$term_id");
    605605        }
    606606        elseif ( 'post_tag' == $taxonomy ) {
    607             $link = home_url("?feed=$feed&amp;tag=$term->slug"); 
     607            $link = home_url("?feed=$feed&amp;tag=$term->slug");
    608608        } else {
    609609            $t = get_taxonomy( $taxonomy );
     
    626626    else
    627627        $link = apply_filters( 'taxonomy_feed_link', $link, $feed, $taxonomy );
    628    
     628
    629629
    630630    return $link;
     
    21862186    } elseif ( 'post' == $context ) {
    21872187        $post = get_post($id);
    2188         $post_id = $post->ID; 
     2188        $post_id = $post->ID;
    21892189    }
    21902190
  • trunk/wp-includes/ms-default-constants.php

    r14452 r14924  
    106106    static $error = null;
    107107    static $error_warn = false;
    108    
     108
    109109    if ( false === $error )
    110110        return;
     
    131131        $error = true;
    132132        define( 'SUBDOMAIN_INSTALL', 'yes' == VHOST );
    133     } else {   
     133    } else {
    134134        define( 'SUBDOMAIN_INSTALL', false );
    135135        define( 'VHOST', 'no' );
  • trunk/wp-includes/nav-menu-template.php

    r14923 r14924  
    258258    foreach ( (array) $menu_items as $key => $menu_item )
    259259        $sorted_menu_items[$menu_item->menu_order] = $menu_item;
    260    
     260
    261261    unset($menu_items);
    262262
     
    308308    $possible_object_parents = array();
    309309    $home_page_id = (int) get_option( 'page_for_posts' );
    310    
     310
    311311    if ( $wp_query->is_singular && ! empty( $queried_object->post_type ) && ! is_post_type_hierarchical( $queried_object->post_type ) ) {
    312312        foreach ( (array) get_object_taxonomies( $queried_object->post_type ) as $taxonomy ) {
     
    329329            $active_parent_item_ids[] = (int) $menu_item->db_id;
    330330            $active_object = $queried_object->post_type;
    331        
     331
    332332        // if the menu item corresponds to the currently-queried post or taxonomy object
    333333        } elseif (
    334334            $menu_item->object_id == $queried_object_id &&
    335             ( 
     335            (
    336336                ( ! empty( $home_page_id ) && 'post_type' == $menu_item->type && $wp_query->is_home && $home_page_id = $menu_item->object_id ) ||
    337337                ( 'post_type' == $menu_item->type && $wp_query->is_singular ) ||
    338                 ( 'taxonomy' == $menu_item->type && ( $wp_query->is_category || $wp_query->is_tag || $wp_query->is_tax ) ) 
    339             ) 
     338                ( 'taxonomy' == $menu_item->type && ( $wp_query->is_category || $wp_query->is_tag || $wp_query->is_tax ) )
     339            )
    340340        ) {
    341341            $menu_items[$key]->classes = trim( $menu_item->classes . ' ' . 'current-menu-item' );
     
    364364    // set parent's class
    365365    foreach ( (array) $menu_items as $key => $parent_item ) {
    366         if ( 
    367             isset( $parent_item->type ) && 
    368             'post_type' == $parent_item->type && 
     366        if (
     367            isset( $parent_item->type ) &&
     368            'post_type' == $parent_item->type &&
    369369            ! empty( $queried_object->post_type ) &&
    370             is_post_type_hierarchical( $queried_object->post_type ) && 
     370            is_post_type_hierarchical( $queried_object->post_type ) &&
    371371            in_array( $parent_item->object_id, $queried_object->ancestors )
    372372        )
  • trunk/wp-includes/nav-menu.php

    r14878 r14924  
    764764        'menu-item-type' => 'post_type',
    765765    );
    766    
     766
    767767    foreach ( $auto_add as $menu_id ) {
    768768        $items = (array) wp_get_nav_menu_items( $menu_id );
  • trunk/wp-includes/pluggable.php

    r14803 r14924  
    106106    if ( ! is_numeric( $user_id ) )
    107107        return false;
    108        
     108
    109109    $user_id = absint( $user_id );
    110110    if ( ! $user_id )
    111111        return false;
    112    
     112
    113113    $user = wp_cache_get( $user_id, 'users' );
    114114
  • trunk/wp-includes/plugin.php

    r14691 r14924  
    744744        $function = (array) $function;
    745745    }
    746    
     746
    747747    if (is_object($function[0]) ) {
    748748        // Object Class Calling
  • trunk/wp-includes/post.php

    r14903 r14924  
    784784 * - taxonomies - An array of taxonomy identifiers that will be registered for the post type.  Default is no taxonomies. Taxonomies can be registered later with register_taxonomy() or register_taxonomy_for_object_type().
    785785 * - labels - An array of labels for this post type. You can see accepted values in {@link get_post_type_labels()}. By default post labels are used for non-hierarchical types and page labels for hierarchical ones.
    786  * - permalink_epmask - The default rewrite endpoint bitmasks. 
     786 * - permalink_epmask - The default rewrite endpoint bitmasks.
    787787 * - rewrite - false to prevent rewrite, or array('slug'=>$slug) to customize permastruct; default will use $taxonomy as slug.
    788788 * - query_var - false to prevent queries, or string to value of the query var to use for this post type
    789789 * - can_export - true allows this post type to be exported.
    790  * - show_in_nav_menus - true makes this post type available for selection in navigation menus. 
     790 * - show_in_nav_menus - true makes this post type available for selection in navigation menus.
    791791 * - _builtin - true if this post type is a native or "built-in" post_type.  THIS IS FOR INTERNAL USE ONLY!
    792  * - _edit_link - URL segement to use for edit link of this post type.  Set to 'post.php?post=%d'.  THIS IS FOR INTERNAL USE ONLY! 
     792 * - _edit_link - URL segement to use for edit link of this post type.  Set to 'post.php?post=%d'.  THIS IS FOR INTERNAL USE ONLY!
    793793 *
    794794 * @since 2.9.0
     
    889889/**
    890890 * Builds an object with all post type capabilities out of a post type object
    891  * 
     891 *
    892892 * Accepted keys of the capabilities array in the post type object:
    893893 * - edit_post - The meta capability that controls editing a particular object of this post type. Defaults to "edit_$capability_type" (edit_post).
     
    898898 * - read_private_posts - The capability that controls reading private posts. Defaults to "read_ . $capability_type . s" (read_private_posts).
    899899 * - delete_post - The meta capability that controls deleting a particular object of this post type. Defaults to "delete_$capability_type" (delete_post).
    900  * 
     900 *
    901901 * @since 3.0.0
    902902 * @param object $args
     
    919919/**
    920920 * Builds an object with all post type labels out of a post type object
    921  * 
     921 *
    922922 * Accepted keys of the label array in the post type object:
    923923 * - name - general name for the post type, usually plural. The same and overriden by $post_type_object->label. Default is Posts/Pages
     
    933933 * - not_found_in_trash - Default is No posts found in Trash/No pages found in Trash
    934934 * - parent_item_colon - This string isn't used on non-hierarchical types. In hierarchical ones the default is Parent Page:
    935  * 
     935 *
    936936 * Above, the first default value is for non-hierarchical post types (like posts) and the second one is for hierarchical post types (like pages.)
    937  * 
     937 *
    938938 * @since 3.0.0
    939939 * @param object $post_type_object
     
    959959/**
    960960 * Builds an object with custom-something object (post type, taxonomy) labels out of a custom-something object
    961  * 
     961 *
    962962 * @access private
    963963 */
    964964function _get_custom_object_labels( $object, $nohier_vs_hier_defaults ) {
    965    
     965
    966966    if ( isset( $object->label ) ) {
    967967        $object->labels['name'] = $object->label;
    968968    }
    969    
     969
    970970    if ( !isset( $object->labels['singular_name'] ) && isset( $object->labels['name'] ) ) {
    971971        $object->labels['singular_name'] = $object->labels['name'];
    972972    }
    973    
     973
    974974    $defaults = array_map( create_function( '$x', $object->hierarchical? 'return $x[1];' : 'return $x[0];' ), $nohier_vs_hier_defaults );
    975975    $labels = array_merge( $defaults, $object->labels );
    976     return (object)$labels; 
     976    return (object)$labels;
    977977}
    978978
  • trunk/wp-includes/query.php

    r14887 r14924  
    18651865            }
    18661866        }
    1867        
     1867
    18681868        // Allow plugins to contextually add/remove/modify the search section of the database query
    18691869        $search = apply_filters_ref_array('posts_search', array( $search, &$this ) );
  • trunk/wp-includes/rewrite.php

    r14885 r14924  
    17761776                ';
    17771777            }
    1778            
     1778
    17791779            $rules .= '
    17801780             <rule name="wordpress" patternSyntax="Wildcard">
  • trunk/wp-includes/taxonomy.php

    r14841 r14924  
    212212 *
    213213 * Optional $args contents:
    214  * 
     214 *
    215215 * label - Name of the taxonomy shown in the menu. Usually plural. If not set, labels['name'] will be used.
    216216 *
     
    235235 * show_tagcloud - false to prevent the taxonomy being listed in the Tag Cloud Widget;
    236236 * defaults to show_ui which defalts to public.
    237  * 
     237 *
    238238 * labels - An array of labels for this taxonomy. You can see accepted values in {@link get_taxonomy_labels()}. By default tag labels are used for non-hierarchical types and category labels for hierarchical ones.
    239239 *
     
    304304    $args['labels'] = get_taxonomy_labels( (object) $args );
    305305    $args['label'] = $args['labels']->name;
    306    
     306
    307307    $wp_taxonomies[$taxonomy] = (object) $args;
    308308
     
    313313/**
    314314 * Builds an object with all taxonomy labels out of a taxonomy object
    315  * 
     315 *
    316316 * Accepted keys of the label array in the taxonomy object:
    317317 * - name - general name for the taxonomy, usually plural. The same as and overriden by $tax->label. Default is Post Tags/Categories
     
    326326 * - add_new_item - Default is Add New Tag/Add New Category
    327327 * - new_item_name - Default is New Tag Name/New Category Name
    328  * 
     328 *
    329329 * Above, the first default value is for non-hierarchical taxonomies (like tags) and the second one is for hierarchical taxonomies (like categories.)
    330  * 
     330 *
    331331 * @since 3.0.0
    332332 * @param object $tax Taxonomy object
  • trunk/wp-includes/theme.php

    r14858 r14924  
    17171717/**
    17181718 * Checks an attachment being deleted to see if it's a header or background image.
    1719  * 
     1719 *
    17201720 * If true it removes the theme modification which would be pointing at the deleted
    17211721 * attachment
     
    17291729    $header_image = get_header_image();
    17301730    $background_image = get_background_image();
    1731    
     1731
    17321732    if ( $header_image && $header_image == $attachment_image )
    17331733        remove_theme_mod( 'header_image' );
  • trunk/wp-mail.php

    r14518 r14924  
    3737$pop3 = new POP3();
    3838
    39 if ( !$pop3->connect( get_option('mailserver_url'), get_option('mailserver_port') ) || !$pop3->user( get_option('mailserver_login') ) ) 
     39if ( !$pop3->connect( get_option('mailserver_url'), get_option('mailserver_port') ) || !$pop3->user( get_option('mailserver_login') ) )
    4040    wp_die( esc_html( $pop3->ERROR ) );
    4141
    4242$count = $pop3->pass( get_option('mailserver_pass') );
    4343
    44 if( false === $count ) 
     44if( false === $count )
    4545    wp_die( esc_html( $pop3->ERROR ) );
    46    
     46
    4747if( 0 === $count ) {
    4848    $pop3->quit();
Note: See TracChangeset for help on using the changeset viewer.