Make WordPress Core


Ignore:
Timestamp:
01/18/2010 08:34:48 PM (15 years ago)
Author:
ryan
Message:

Coding standards, space after if

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/ms-sites.php

    r12733 r12752  
    9696                                <th scope="row"><?php _e('Path') ?></th>
    9797                                <td><input name="blog[path]" type="text" id="path" value="<?php echo esc_attr($details['path']) ?>" size="40" style='margin-bottom:5px;' />
    98                                 <br /><input type='checkbox' style='width:20px;' name='update_home_url' value='update' <?php if( get_blog_option( $id, 'siteurl' ) == preg_replace('|/+$|', '', 'http://' . $details['domain'] . $details['path']) || get_blog_option( $id, 'home' ) == preg_replace('|/+$|', '', 'http://' . $details['domain'] . $details['path']) ) echo 'checked="checked"'; ?> /> <?php _e( "Update 'siteurl' and 'home' as well." ); ?></td>
     98                                <br /><input type='checkbox' style='width:20px;' name='update_home_url' value='update' <?php if ( get_blog_option( $id, 'siteurl' ) == preg_replace('|/+$|', '', 'http://' . $details['domain'] . $details['path']) || get_blog_option( $id, 'home' ) == preg_replace('|/+$|', '', 'http://' . $details['domain'] . $details['path']) ) echo 'checked="checked"'; ?> /> <?php _e( "Update 'siteurl' and 'home' as well." ); ?></td>
    9999                            </tr>
    100100                            <tr class="form-field">
     
    109109                                <th scope="row"><?php _e('Public') ?></th>
    110110                                <td>
    111                                     <input type='radio' style='width:20px;' name='blog[public]' value='1' <?php if( $details['public'] == '1' ) echo 'checked="checked"'; ?> /> <?php _e('Yes') ?>
    112                                     <input type='radio' style='width:20px;' name='blog[public]' value='0' <?php if( $details['public'] == '0' ) echo 'checked="checked"'; ?> /> <?php _e('No') ?>
     111                                    <input type='radio' style='width:20px;' name='blog[public]' value='1' <?php if ( $details['public'] == '1' ) echo 'checked="checked"'; ?> /> <?php _e('Yes') ?>
     112                                    <input type='radio' style='width:20px;' name='blog[public]' value='0' <?php if ( $details['public'] == '0' ) echo 'checked="checked"'; ?> /> <?php _e('No') ?>
    113113                                </td>
    114114                            </tr>
     
    116116                                <th scope="row"><?php _e( 'Archived' ); ?></th>
    117117                                <td>
    118                                     <input type='radio' style='width:20px;' name='blog[archived]' value='1' <?php if( $details['archived'] == '1' ) echo 'checked="checked"'; ?> /> <?php _e('Yes') ?>
    119                                     <input type='radio' style='width:20px;' name='blog[archived]' value='0' <?php if( $details['archived'] == '0' ) echo 'checked="checked"'; ?> /> <?php _e('No') ?>
     118                                    <input type='radio' style='width:20px;' name='blog[archived]' value='1' <?php if ( $details['archived'] == '1' ) echo 'checked="checked"'; ?> /> <?php _e('Yes') ?>
     119                                    <input type='radio' style='width:20px;' name='blog[archived]' value='0' <?php if ( $details['archived'] == '0' ) echo 'checked="checked"'; ?> /> <?php _e('No') ?>
    120120                                </td>
    121121                            </tr>
     
    123123                                <th scope="row"><?php _e( 'Mature' ); ?></th>
    124124                                <td>
    125                                     <input type='radio' style='width:20px;' name='blog[mature]' value='1' <?php if( $details['mature'] == '1' ) echo 'checked="checked"'; ?> /> <?php _e('Yes') ?>
    126                                     <input type='radio' style='width:20px;' name='blog[mature]' value='0' <?php if( $details['mature'] == '0' ) echo 'checked="checked"'; ?> /> <?php _e('No') ?>
     125                                    <input type='radio' style='width:20px;' name='blog[mature]' value='1' <?php if ( $details['mature'] == '1' ) echo 'checked="checked"'; ?> /> <?php _e('Yes') ?>
     126                                    <input type='radio' style='width:20px;' name='blog[mature]' value='0' <?php if ( $details['mature'] == '0' ) echo 'checked="checked"'; ?> /> <?php _e('No') ?>
    127127                                </td>
    128128                            </tr>
     
    130130                                <th scope="row"><?php _e( 'Spam' ); ?></th>
    131131                                <td>
    132                                     <input type='radio' style='width:20px;' name='blog[spam]' value='1' <?php if( $details['spam'] == '1' ) echo 'checked="checked"'; ?> /> <?php _e('Yes') ?>
    133                                     <input type='radio' style='width:20px;' name='blog[spam]' value='0' <?php if( $details['spam'] == '0' ) echo 'checked="checked"'; ?> /> <?php _e('No') ?>
     132                                    <input type='radio' style='width:20px;' name='blog[spam]' value='1' <?php if ( $details['spam'] == '1' ) echo 'checked="checked"'; ?> /> <?php _e('Yes') ?>
     133                                    <input type='radio' style='width:20px;' name='blog[spam]' value='0' <?php if ( $details['spam'] == '0' ) echo 'checked="checked"'; ?> /> <?php _e('No') ?>
    134134                                </td>
    135135                            </tr>
     
    137137                                <th scope="row"><?php _e( 'Deleted' ); ?></th>
    138138                                <td>
    139                                     <input type='radio' style='width:20px;' name='blog[deleted]' value='1' <?php if( $details['deleted'] == '1' ) echo 'checked="checked"'; ?> /> <?php _e('Yes') ?>
    140                                     <input type='radio' style='width:20px;' name='blog[deleted]' value='0' <?php if( $details['deleted'] == '0' ) echo 'checked="checked"'; ?> /> <?php _e('No') ?>
     139                                    <input type='radio' style='width:20px;' name='blog[deleted]' value='1' <?php if ( $details['deleted'] == '1' ) echo 'checked="checked"'; ?> /> <?php _e('Yes') ?>
     140                                    <input type='radio' style='width:20px;' name='blog[deleted]' value='0' <?php if ( $details['deleted'] == '0' ) echo 'checked="checked"'; ?> /> <?php _e('No') ?>
    141141                                </td>
    142142                            </tr>
     
    152152                            $editblog_default_role = 'subscriber';
    153153                            foreach ( $options as $key => $val ) {
    154                                 if( $val['option_name'] == 'default_role' ) {
     154                                if ( $val['option_name'] == 'default_role' ) {
    155155                                    $editblog_default_role = $val['option_value'];
    156156                                }
     
    192192                    $blog_allowed_themes = wpmu_get_blog_allowedthemes( $id );
    193193                    $allowed_themes = get_site_option( "allowedthemes" );
    194                     if( $allowed_themes == false ) {
     194                    if ( $allowed_themes == false ) {
    195195                        $allowed_themes = array_keys( $themes );
    196196                    }
     
    198198                    foreach( $themes as $key => $theme ) {
    199199                        $theme_key = wp_specialchars( $theme['Stylesheet'] );
    200                         if( isset($allowed_themes[$theme_key] ) == false ) {
     200                        if ( isset($allowed_themes[$theme_key] ) == false ) {
    201201                            $checked = ( isset($blog_allowed_themes[ $theme_key ]) ) ? 'checked="checked"' : '';
    202202                            $out .= '<tr class="form-field form-required">
     
    223223                    // Blog users
    224224                    $blogusers = get_users_of_blog( $id );
    225                     if( is_array( $blogusers ) ) {
     225                    if ( is_array( $blogusers ) ) {
    226226                        echo '<div id="blogedit_blogusers" class="postbox"><h3 class="hndle"><span>' . __('Blog Users') . '</span></h3><div class="inside">';
    227227                        echo '<table class="form-table">';
     
    230230                        foreach ( (array) $blogusers as $key => $val ) {
    231231                            $t = @unserialize( $val->meta_value );
    232                             if( is_array( $t ) ) {
     232                            if ( is_array( $t ) ) {
    233233                                reset( $t );
    234234                                $existing_role = key( $t );
    235235                            }
    236236                            echo '<tr><td><a href="user-edit.php?user_id=' . $val->user_id . '">' . $val->user_login . '</a></td>';
    237                             if( $val->user_id != $current_user->data->ID ) {
     237                            if ( $val->user_id != $current_user->data->ID ) {
    238238                                ?>
    239239                                <td>
     
    317317        $query = "SELECT * FROM {$wpdb->blogs} WHERE site_id = '{$wpdb->siteid}' ";
    318318
    319         if( isset($_GET['blog_name']) ) {
     319        if ( isset($_GET['blog_name']) ) {
    320320            $query .= " AND ( {$wpdb->blogs}.domain LIKE '%{$like_s}%' OR {$wpdb->blogs}.path LIKE '%{$like_s}%' ) ";
    321         } elseif( isset($_GET['blog_id']) ) {
     321        } elseif ( isset($_GET['blog_id']) ) {
    322322            $query .= " AND   blog_id = '". absint( $_GET['blog_id'] )."' ";
    323         } elseif( isset($_GET['blog_ip']) ) {
     323        } elseif ( isset($_GET['blog_ip']) ) {
    324324            $query = "SELECT *
    325325                FROM {$wpdb->blogs}, {$wpdb->registration_log}
     
    329329        }
    330330
    331         if( isset( $_GET['sortby'] ) == false ) {
     331        if ( isset( $_GET['sortby'] ) == false ) {
    332332            $_GET['sortby'] = 'id';
    333333        }
    334334
    335         if( $_GET['sortby'] == 'registered' ) {
     335        if ( $_GET['sortby'] == 'registered' ) {
    336336            $query .= ' ORDER BY registered ';
    337         } elseif( $_GET['sortby'] == 'id' ) {
     337        } elseif ( $_GET['sortby'] == 'id' ) {
    338338            $query .= ' ORDER BY ' . $wpdb->blogs . '.blog_id ';
    339         } elseif( $_GET['sortby'] == 'lastupdated' ) {
     339        } elseif ( $_GET['sortby'] == 'lastupdated' ) {
    340340            $query .= ' ORDER BY last_updated ';
    341         } elseif( $_GET['sortby'] == 'blogname' ) {
     341        } elseif ( $_GET['sortby'] == 'blogname' ) {
    342342            $query .= ' ORDER BY domain ';
    343343        }
     
    345345        $query .= ( $_GET['order'] == 'DESC' ) ? 'DESC' : 'ASC';
    346346
    347         if( !empty($s) ) {
     347        if ( !empty($s) ) {
    348348            $total = $wpdb->get_var( str_replace('SELECT *', 'SELECT COUNT(blog_id)', $query) );
    349349        } else {
     
    356356        // Pagination
    357357        $url2 = "&amp;order=" . $_GET['order'] . "&amp;sortby=" . $_GET['sortby'] . "&amp;s=";
    358         if( $_GET[ 'blog_ip' ] ) {
     358        if ( $_GET[ 'blog_ip' ] ) {
    359359            $url2 .= "&amp;ip_address=" . urlencode( $s );
    360360        } else {
     
    396396        <br class="clear" />
    397397
    398         <?php if( isset($_GET['s']) && !empty($_GET['s']) ) : ?>
     398        <?php if ( isset($_GET['s']) && !empty($_GET['s']) ) : ?>
    399399            <p><a href="ms-users.php?action=users&s=<?php echo urlencode( stripslashes( $s ) ) ?>"><?php _e('Search Users:') ?> <strong><?php echo stripslashes( $s ); ?></strong></a></p>
    400400        <?php endif; ?>
     
    411411        );
    412412
    413         if( has_filter( 'wpmublogsaction' ) )
     413        if ( has_filter( 'wpmublogsaction' ) )
    414414            $posts_columns['plugins'] = __('Actions');
    415415
     
    417417
    418418        $sortby_url = "s=";
    419         if( $_GET[ 'blog_ip' ] ) {
     419        if ( $_GET[ 'blog_ip' ] ) {
    420420            $sortby_url .= "&ip_address=" . urlencode( $s );
    421421        } else {
     
    430430                <?php foreach($posts_columns as $column_id => $column_display_name) {
    431431                    $column_link = "<a href='ms-sites.php?{$sortby_url}&amp;sortby={$column_id}&amp;";
    432                     if( $_GET['sortby'] == $column_id ) {
     432                    if ( $_GET['sortby'] == $column_id ) {
    433433                        $column_link .= $_GET[ 'order' ] == 'DESC' ? 'order=ASC&amp;' : 'order=DESC&amp;';
    434434                    }
     
    452452                    $bgcolour = "";
    453453                    foreach ( $status_list as $status => $col ) {
    454                         if( get_blog_status( $blog['blog_id'], $status ) == 1 ) {
     454                        if ( get_blog_status( $blog['blog_id'], $status ) == 1 ) {
    455455                            $bgcolour = "style='background: $col'";
    456456                        }
     
    480480                                    $controlActions[]   = "<a href='{$protocol}{$blog['domain']}{$blog['path']}wp-admin/' class='edit'>" . __('Backend') . '</a>';
    481481
    482                                     if( get_blog_status( $blog['blog_id'], "deleted" ) == '1' )
     482                                    if ( get_blog_status( $blog['blog_id'], "deleted" ) == '1' )
    483483                                        $controlActions[]   = '<a class="delete" href="ms-edit.php?action=confirm&amp;action2=activateblog&amp;ref=' . urlencode( $_SERVER['REQUEST_URI'] ) . '&amp;id=' . $blog['blog_id'] . '&amp;msg=' . urlencode( sprintf( __( "You are about to activate the blog %s" ), $blogname ) ) . '">' . __('Activate') . '</a>';
    484484                                    else
    485485                                        $controlActions[]   = '<a class="delete" href="ms-edit.php?action=confirm&amp;action2=deactivateblog&amp;ref=' . urlencode( $_SERVER['REQUEST_URI'] ) . '&amp;id=' . $blog['blog_id'] . '&amp;msg=' . urlencode( sprintf( __( "You are about to deactivate the blog %s" ), $blogname ) ) . '">' . __('Deactivate') . '</a>';
    486486
    487                                     if( get_blog_status( $blog['blog_id'], "archived" ) == '1' )
     487                                    if ( get_blog_status( $blog['blog_id'], "archived" ) == '1' )
    488488                                        $controlActions[]   = '<a class="delete" href="ms-edit.php?action=confirm&amp;action2=unarchiveblog&amp;id=' .  $blog['blog_id'] . '&amp;msg=' . urlencode( sprintf( __( "You are about to unarchive the blog %s" ), $blogname ) ) . '">' . __('Unarchive') . '</a>';
    489489                                    else
    490490                                        $controlActions[]   = '<a class="delete" href="ms-edit.php?action=confirm&amp;action2=archiveblog&amp;id=' . $blog['blog_id'] . '&amp;msg=' . urlencode( sprintf( __( "You are about to archive the blog %s" ), $blogname ) ) . '">' . __('Archive') . '</a>';
    491491
    492                                     if( get_blog_status( $blog['blog_id'], "spam" ) == '1' )
     492                                    if ( get_blog_status( $blog['blog_id'], "spam" ) == '1' )
    493493                                        $controlActions[]   = '<a class="delete" href="ms-edit.php?action=confirm&amp;action2=unspamblog&amp;id=' . $blog['blog_id'] . '&amp;msg=' . urlencode( sprintf( __( "You are about to unspam the blog %s" ), $blogname ) ) . '">' . __('Not Spam') . '</a>';
    494494                                    else
     
    535535                                            echo '<a href="user-edit.php?user_id=' . $val->user_id . '">' . $val->user_login . '</a> ('.$val->user_email.')<br />';
    536536                                        }
    537                                         if( $blogusers_warning != '' ) {
     537                                        if ( $blogusers_warning != '' ) {
    538538                                            echo '<strong>' . $blogusers_warning . '</strong><br />';
    539539                                        }
     
    545545
    546546                            case 'plugins': ?>
    547                                 <?php if( has_filter( 'wpmublogsaction' ) ) { ?>
     547                                <?php if ( has_filter( 'wpmublogsaction' ) ) { ?>
    548548                                <td valign="top">
    549549                                    <?php do_action( "wpmublogsaction", $blog['blog_id'] ); ?>
     
    553553
    554554                            default: ?>
    555                                 <?php if( has_filter( 'manage_blogs_custom_column' ) ) { ?>
     555                                <?php if ( has_filter( 'manage_blogs_custom_column' ) ) { ?>
    556556                                <td valign="top">
    557557                                    <?php do_action('manage_blogs_custom_column', $column_name, $blog['blog_id']); ?>
Note: See TracChangeset for help on using the changeset viewer.