Make WordPress Core


Ignore:
Timestamp:
11/30/2017 11:09:33 PM (9 years ago)
Author:
pento
Message:

Code is Poetry.
WordPress' code just... wasn't.
This is now dealt with.

Props jrf, pento, netweb, GaryJ, jdgrimes, westonruter, Greg Sherwood from PHPCS, and everyone who's ever contributed to WPCS and PHPCS.
Fixes #41057.

File:
1 edited

Legend:

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

    r41796 r42343  
    1010require_once( dirname( __FILE__ ) . '/admin.php' );
    1111
    12 if ( !is_multisite() )
     12if ( ! is_multisite() ) {
    1313        wp_die( __( 'Multisite support is not enabled.' ) );
     14}
    1415
    15 if ( ! current_user_can('read') )
     16if ( ! current_user_can( 'read' ) ) {
    1617        wp_die( __( 'Sorry, you are not allowed to access this page.' ) );
     18}
    1719
    1820$action = isset( $_POST['action'] ) ? $_POST['action'] : 'splash';
     
    3335}
    3436
    35 $title = __( 'My Sites' );
     37$title       = __( 'My Sites' );
    3638$parent_file = 'index.php';
    3739
    38 get_current_screen()->add_help_tab( array(
    39         'id'      => 'overview',
    40         'title'   => __('Overview'),
    41         'content' =>
    42                 '<p>' . __('This screen shows an individual user all of their sites in this network, and also allows that user to set a primary site. They can use the links under each site to visit either the front end or the dashboard for that site.') . '</p>'
    43 ) );
     40get_current_screen()->add_help_tab(
     41        array(
     42                'id'      => 'overview',
     43                'title'   => __( 'Overview' ),
     44                'content' =>
     45                        '<p>' . __( 'This screen shows an individual user all of their sites in this network, and also allows that user to set a primary site. They can use the links under each site to visit either the front end or the dashboard for that site.' ) . '</p>',
     46        )
     47);
    4448
    4549get_current_screen()->set_help_sidebar(
    46         '<p><strong>' . __('For more information:') . '</strong></p>' .
    47         '<p>' . __('<a href="https://codex.wordpress.org/Dashboard_My_Sites_Screen">Documentation on My Sites</a>') . '</p>' .
    48         '<p>' . __('<a href="https://wordpress.org/support/">Support Forums</a>') . '</p>'
     50        '<p><strong>' . __( 'For more information:' ) . '</strong></p>' .
     51        '<p>' . __( '<a href="https://codex.wordpress.org/Dashboard_My_Sites_Screen">Documentation on My Sites</a>' ) . '</p>' .
     52        '<p>' . __( '<a href="https://wordpress.org/support/">Support Forums</a>' ) . '</p>'
    4953);
    5054
     
    5660
    5761<div class="wrap">
    58 <h1 class="wp-heading-inline"><?php
     62<h1 class="wp-heading-inline">
     63<?php
    5964echo esc_html( $title );
    60 ?></h1>
     65?>
     66</h1>
    6167
    6268<?php
     
    111117                switch_to_blog( $user_blog->userblog_id );
    112118
    113                 echo "<li>";
     119                echo '<li>';
    114120                echo "<h3>{$user_blog->blogname}</h3>";
    115121
    116                 $actions = "<a href='" . esc_url( home_url() ). "'>" . __( 'Visit' ) . '</a>';
     122                $actions = "<a href='" . esc_url( home_url() ) . "'>" . __( 'Visit' ) . '</a>';
    117123
    118124                if ( current_user_can( 'read' ) ) {
     
    133139                /** This filter is documented in wp-admin/my-sites.php */
    134140                echo apply_filters( 'myblogs_options', '', $user_blog );
    135                 echo "</li>";
     141                echo '</li>';
    136142
    137143                restore_current_blog();
    138         }?>
     144        }
     145        ?>
    139146        </ul>
    140147        <?php
    141148        if ( count( $blogs ) > 1 || has_action( 'myblogs_allblogs_options' ) || has_filter( 'myblogs_options' ) ) {
    142                 ?><input type="hidden" name="action" value="updateblogsettings" /><?php
     149                ?>
     150                <input type="hidden" name="action" value="updateblogsettings" />
     151                <?php
    143152                wp_nonce_field( 'update-my-sites' );
    144153                submit_button();
Note: See TracChangeset for help on using the changeset viewer.