Make WordPress Core

Changeset 43569


Ignore:
Timestamp:
08/15/2018 06:22:00 AM (6 years ago)
Author:
pento
Message:

Coding Standards: Prepare for upgrading WPCS to 1.0.0.

In order to get the best result when running phpcbf across the codebase, there are some manual tweaks we need to make.

These fall into three categories:

  • Fixing incorrectly indented code which has flow-on effects when auto-fixing.
  • Tweaking the layout of inline PHP inside HTML tags.
  • Moving more complex inline PHP inside HTML tags, to execute earlier.

See #44600.

Location:
trunk/src
Files:
15 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/index.php

    r43328 r43569  
    2727// Die with an error message
    2828$die  = sprintf(
    29         /* translators: %1$s: WordPress, %2$s: src, %3$s: build */
    30             __( 'You seem to be running %1$s from the %2$s directory. %1$s needs to be built and run from the %3$s directory before we can get started.' ),
    31             'WordPress',
    32             '<code>src</code>',
    33             '<code>build</code>'
    34         ) . '</p>';
     29    /* translators: %1$s: WordPress, %2$s: src, %3$s: build */
     30    __( 'You seem to be running %1$s from the %2$s directory. %1$s needs to be built and run from the %3$s directory before we can get started.' ),
     31    'WordPress',
     32    '<code>src</code>',
     33    '<code>build</code>'
     34) . '</p>';
    3535$die .= '<p>' . sprintf(
    3636    /* translators: %s: WordPress */
    37         __( 'You can build %s by running:' ),
    38         'WordPress'
    39     ) . '</p>';
     37    __( 'You can build %s by running:' ),
     38    'WordPress'
     39) . '</p>';
    4040$die .= '<p><code>npm install && grunt build</code></p>';
    4141$die .= '<p>' . sprintf(
    4242    /* translators: %1$s: NPM URL, %2$s: Grunt URL */
    43         __( 'This requires <a href="%1$s">NPM</a> and <a href="%2$s">Grunt</a>. <a href="%3$s">Read more about setting up your local development environment</a>.' ),
    44         'https://www.npmjs.com/',
    45         'https://gruntjs.com/',
    46         __( 'https://make.wordpress.org/core/handbook/tutorials/installing-wordpress-locally/' )
    47     ) . '</p>';
     43    __( 'This requires <a href="%1$s">NPM</a> and <a href="%2$s">Grunt</a>. <a href="%3$s">Read more about setting up your local development environment</a>.' ),
     44    'https://www.npmjs.com/',
     45    'https://gruntjs.com/',
     46    __( 'https://make.wordpress.org/core/handbook/tutorials/installing-wordpress-locally/' )
     47) . '</p>';
    4848
    4949wp_die( $die, __( 'WordPress &rsaquo; Error' ) );
  • trunk/src/wp-activate.php

    r43065 r43569  
    7777<div id="signup-content" class="widecolumn">
    7878    <div class="wp-activate-container">
    79     <?php if ( empty( $_GET['key'] ) && empty( $_POST['key'] ) ) { ?>
     79    <?php
     80    if ( empty( $_GET['key'] ) && empty( $_POST['key'] ) ) {
     81        ?>
    8082
    8183        <h2><?php _e( 'Activation Key Required' ); ?></h2>
     
    9092        </form>
    9193
    92     <?php
    93 } else {
     94        <?php
     95    } else {
    9496
    95     $key    = ! empty( $_GET['key'] ) ? $_GET['key'] : $_POST['key'];
    96     $result = wpmu_activate_signup( $key );
    97     if ( is_wp_error( $result ) ) {
    98         if ( 'already_active' == $result->get_error_code() || 'blog_taken' == $result->get_error_code() ) {
    99             $signup = $result->get_error_data();
     97        $key    = ! empty( $_GET['key'] ) ? $_GET['key'] : $_POST['key'];
     98        $result = wpmu_activate_signup( $key );
     99        if ( is_wp_error( $result ) ) {
     100            if ( 'already_active' == $result->get_error_code() || 'blog_taken' == $result->get_error_code() ) {
     101                $signup = $result->get_error_data();
     102                ?>
     103                <h2><?php _e( 'Your account is now active!' ); ?></h2>
     104                    <?php
     105                    echo '<p class="lead-in">';
     106                    if ( $signup->domain . $signup->path == '' ) {
     107                        printf(
     108                            /* translators: 1: login URL, 2: username, 3: user email, 4: lost password URL */
     109                            __( 'Your account has been activated. You may now <a href="%1$s">log in</a> to the site using your chosen username of &#8220;%2$s&#8221;. Please check your email inbox at %3$s for your password and login instructions. If you do not receive an email, please check your junk or spam folder. If you still do not receive an email within an hour, you can <a href="%4$s">reset your password</a>.' ),
     110                            network_site_url( 'wp-login.php', 'login' ),
     111                            $signup->user_login,
     112                            $signup->user_email,
     113                            wp_lostpassword_url()
     114                        );
     115                    } else {
     116                        printf(
     117                            /* translators: 1: site URL, 2: username, 3: user email, 4: lost password URL */
     118                            __( 'Your site at %1$s is active. You may now log in to your site using your chosen username of &#8220;%2$s&#8221;. Please check your email inbox at %3$s for your password and login instructions. If you do not receive an email, please check your junk or spam folder. If you still do not receive an email within an hour, you can <a href="%4$s">reset your password</a>.' ),
     119                            sprintf( '<a href="http://%1$s">%1$s</a>', $signup->domain ),
     120                            $signup->user_login,
     121                            $signup->user_email,
     122                            wp_lostpassword_url()
     123                        );
     124                    }
     125                    echo '</p>';
     126            } else {
     127                ?>
     128                <h2><?php _e( 'An error occurred during the activation' ); ?></h2>
     129                <p><?php echo $result->get_error_message(); ?></p>
     130                <?php
     131            }
     132        } else {
     133            $url  = isset( $result['blog_id'] ) ? get_home_url( (int) $result['blog_id'] ) : '';
     134            $user = get_userdata( (int) $result['user_id'] );
    100135            ?>
    101136            <h2><?php _e( 'Your account is now active!' ); ?></h2>
    102                 <?php
    103                 echo '<p class="lead-in">';
    104                 if ( $signup->domain . $signup->path == '' ) {
    105                     printf(
    106                         /* translators: 1: login URL, 2: username, 3: user email, 4: lost password URL */
    107                         __( 'Your account has been activated. You may now <a href="%1$s">log in</a> to the site using your chosen username of &#8220;%2$s&#8221;. Please check your email inbox at %3$s for your password and login instructions. If you do not receive an email, please check your junk or spam folder. If you still do not receive an email within an hour, you can <a href="%4$s">reset your password</a>.' ),
    108                         network_site_url( 'wp-login.php', 'login' ),
    109                         $signup->user_login,
    110                         $signup->user_email,
    111                         wp_lostpassword_url()
    112                     );
    113                 } else {
    114                     printf(
    115                         /* translators: 1: site URL, 2: username, 3: user email, 4: lost password URL */
    116                         __( 'Your site at %1$s is active. You may now log in to your site using your chosen username of &#8220;%2$s&#8221;. Please check your email inbox at %3$s for your password and login instructions. If you do not receive an email, please check your junk or spam folder. If you still do not receive an email within an hour, you can <a href="%4$s">reset your password</a>.' ),
    117                         sprintf( '<a href="http://%1$s">%1$s</a>', $signup->domain ),
    118                         $signup->user_login,
    119                         $signup->user_email,
    120                         wp_lostpassword_url()
    121                     );
    122                 }
    123                 echo '</p>';
    124         } else {
    125             ?>
    126             <h2><?php _e( 'An error occurred during the activation' ); ?></h2>
    127                 <p><?php echo $result->get_error_message(); ?></p>
    128                 <?php
    129         }
    130     } else {
    131         $url  = isset( $result['blog_id'] ) ? get_home_url( (int) $result['blog_id'] ) : '';
    132         $user = get_userdata( (int) $result['user_id'] );
    133         ?>
    134         <h2><?php _e( 'Your account is now active!' ); ?></h2>
    135137
    136138            <div id="signup-welcome">
     
    160162            <?php
    161163            endif;
     164        }
    162165    }
    163 }
    164166    ?>
    165167    </div>
  • trunk/src/wp-admin/freedoms.php

    r42814 r43569  
    1818$is_privacy_notice = isset( $_GET['privacy-notice'] );
    1919
     20if ( $is_privacy_notice ) {
     21    $freedoms_class = '';
     22    $privacy_class  = ' nav-tab-active';
     23} else {
     24    $freedoms_class = ' nav-tab-active';
     25    $privacy_class  = '';
     26}
     27
    2028?>
    2129<div class="wrap about-wrap full-width-layout">
     
    3038    <a href="about.php" class="nav-tab"><?php _e( 'What&#8217;s New' ); ?></a>
    3139    <a href="credits.php" class="nav-tab"><?php _e( 'Credits' ); ?></a>
    32     <a href="freedoms.php" class="nav-tab<?php if ( ! $is_privacy_notice ) { echo ' nav-tab-active'; } ?>"><?php _e( 'Freedoms' ); ?></a>
    33     <a href="freedoms.php?privacy-notice" class="nav-tab<?php if ( $is_privacy_notice ) { echo ' nav-tab-active'; } ?>"><?php _e( 'Privacy' ); ?></a>
     40    <a href="freedoms.php" class="nav-tab<?php echo $freedoms_class; ?>"><?php _e( 'Freedoms' ); ?></a>
     41    <a href="freedoms.php?privacy-notice" class="nav-tab<?php echo $privacy_class; ?>"><?php _e( 'Privacy' ); ?></a>
    3442</h2>
    3543
  • trunk/src/wp-admin/includes/file.php

    r43568 r43569  
    18181818    _e( 'If you do not remember your credentials, you should contact your web host.' );
    18191819
     1820    $hostname_value = esc_attr( $hostname );
     1821    if ( ! empty( $port ) ) {
     1822        $hostname_value .= ":$port";
     1823    }
     1824
    18201825    $password_value = '';
    1821 if ( defined( 'FTP_PASS' ) ) {
    1822     $password_value = '*****';
    1823 }
     1826    if ( defined( 'FTP_PASS' ) ) {
     1827        $password_value = '*****';
     1828    }
    18241829?>
    18251830</p>
    18261831<label for="hostname">
    18271832    <span class="field-title"><?php _e( 'Hostname' ); ?></span>
    1828     <input name="hostname" type="text" id="hostname" aria-describedby="request-filesystem-credentials-desc" class="code" placeholder="<?php esc_attr_e( 'example: www.wordpress.org' ); ?>" value="
    1829                                                                                                                                                         <?php
    1830                                                                                                                                                         echo esc_attr( $hostname );
    1831                                                                                                                                                         if ( ! empty( $port ) ) {
    1832                                                                                                                                                             echo ":$port";}
    1833 ?>
    1834 "<?php disabled( defined( 'FTP_HOST' ) ); ?> />
     1833    <input name="hostname" type="text" id="hostname" aria-describedby="request-filesystem-credentials-desc" class="code" placeholder="<?php esc_attr_e( 'example: www.wordpress.org' ); ?>" value="<?php echo $hostname_value; ?>"<?php disabled( defined( 'FTP_HOST' ) ); ?> />
    18351834</label>
    18361835<div class="ftp-username">
     
    18591858    ?>
    18601859    <label for="<?php echo esc_attr( $name ); ?>">
    1861         <input type="radio" name="connection_type" id="<?php echo esc_attr( $name ); ?>" value="<?php echo esc_attr( $name ); ?>"
    1862                                                                     <?php
    1863                                                                     checked( $name, $connection_type );
    1864                                                                     echo $disabled;
    1865 ?>
    1866  />
     1860        <input type="radio" name="connection_type" id="<?php echo esc_attr( $name ); ?>" value="<?php echo esc_attr( $name ); ?>" <?php checked( $name, $connection_type ); ?> <?php echo $disabled; ?> />
    18671861        <?php echo $text; ?>
    18681862    </label>
  • trunk/src/wp-admin/includes/meta-boxes.php

    r43174 r43569  
    758758<p class="meta-options">
    759759    <label for="comment_status" class="selectit"><input name="comment_status" type="checkbox" id="comment_status" value="open" <?php checked( $post->comment_status, 'open' ); ?> /> <?php _e( 'Allow comments' ); ?></label><br />
    760     <label for="ping_status" class="selectit"><input name="ping_status" type="checkbox" id="ping_status" value="open" <?php checked( $post->ping_status, 'open' ); ?> /> 
    761                                                                                                                                                         <?php
    762                                                                                                                                                         printf(
    763                                                                                                                                                             /* translators: %s: Codex URL */
    764                                                                                                                                                             __( 'Allow <a href="%s">trackbacks and pingbacks</a> on this page' ),
    765                                                                                                                                                             __( 'https://codex.wordpress.org/Introduction_to_Blogging#Managing_Comments' )
    766                                                                                                                                                         );
     760    <label for="ping_status" class="selectit"><input name="ping_status" type="checkbox" id="ping_status" value="open" <?php checked( $post->ping_status, 'open' ); ?> />
     761        <?php
     762        printf(
     763            /* translators: %s: Codex URL */
     764            __( 'Allow <a href="%s">trackbacks and pingbacks</a> on this page' ),
     765            __( 'https://codex.wordpress.org/Introduction_to_Blogging#Managing_Comments' )
     766        );
    767767        ?>
    768         </label>
     768    </label>
    769769    <?php
    770770    /**
     
    13511351
    13521352    foreach ( wp_get_attachment_id3_keys( $post, 'edit' ) as $key => $label ) :
     1353        $value = '';
     1354        if ( ! empty( $meta[ $key ] ) ) {
     1355            $value = $meta[ $key ];
     1356        }
    13531357    ?>
    13541358    <p>
    13551359        <label for="title"><?php echo $label; ?></label><br />
    1356         <input type="text" name="id3_<?php echo esc_attr( $key ); ?>" id="id3_<?php echo esc_attr( $key ); ?>" class="large-text" value="
    1357                                                 <?php
    1358                                                 if ( ! empty( $meta[ $key ] ) ) {
    1359                                                     echo esc_attr( $meta[ $key ] );
    1360                                                 }
    1361         ?>
    1362         " />
     1360        <input type="text" name="id3_<?php echo esc_attr( $key ); ?>" id="id3_<?php echo esc_attr( $key ); ?>" class="large-text" value="<?php echo esc_attr( $value ); ?>" />
    13631361    </p>
    13641362    <?php
  • trunk/src/wp-admin/includes/nav-menu.php

    r42679 r43569  
    436436        </ul><!-- .posttype-tabs -->
    437437
    438         <div id="tabs-panel-posttype-<?php echo $post_type_name; ?>-most-recent" class="tabs-panel
    439                                                 <?php
    440                                                 echo ( 'most-recent' == $current_tab ? 'tabs-panel-active' : 'tabs-panel-inactive' );
    441         ?>
    442         ">
     438        <div id="tabs-panel-posttype-<?php echo $post_type_name; ?>-most-recent" class="tabs-panel <?php echo ( 'most-recent' == $current_tab ? 'tabs-panel-active' : 'tabs-panel-inactive' ); ?>">
    443439            <ul id="<?php echo $post_type_name; ?>checklist-most-recent" class="categorychecklist form-no-clear">
    444440                <?php
     
    474470        </div><!-- /.tabs-panel -->
    475471
    476         <div class="tabs-panel
    477         <?php
    478             echo ( 'search' == $current_tab ? 'tabs-panel-active' : 'tabs-panel-inactive' );
    479         ?>
    480         " id="tabs-panel-posttype-<?php echo $post_type_name; ?>-search">
     472        <div class="tabs-panel <?php echo ( 'search' == $current_tab ? 'tabs-panel-active' : 'tabs-panel-inactive' ); ?>" id="tabs-panel-posttype-<?php echo $post_type_name; ?>-search">
    481473            <?php
    482474            if ( isset( $_REQUEST[ 'quick-search-posttype-' . $post_type_name ] ) ) {
     
    516508        </div><!-- /.tabs-panel -->
    517509
    518         <div id="<?php echo $post_type_name; ?>-all" class="tabs-panel tabs-panel-view-all
    519                             <?php
    520                             echo ( 'all' == $current_tab ? 'tabs-panel-active' : 'tabs-panel-inactive' );
    521         ?>
    522         ">
     510        <div id="<?php echo $post_type_name; ?>-all" class="tabs-panel tabs-panel-view-all <?php echo ( 'all' == $current_tab ? 'tabs-panel-active' : 'tabs-panel-inactive' ); ?>">
    523511            <?php if ( ! empty( $page_links ) ) : ?>
    524512                <div class="add-menu-item-pagelinks">
     
    772760        </ul><!-- .taxonomy-tabs -->
    773761
    774         <div id="tabs-panel-<?php echo $taxonomy_name; ?>-pop" class="tabs-panel
    775                                         <?php
    776                                         echo ( 'most-used' == $current_tab ? 'tabs-panel-active' : 'tabs-panel-inactive' );
    777         ?>
    778         ">
     762        <div id="tabs-panel-<?php echo $taxonomy_name; ?>-pop" class="tabs-panel <?php echo ( 'most-used' == $current_tab ? 'tabs-panel-active' : 'tabs-panel-inactive' ); ?> ">
    779763            <ul id="<?php echo $taxonomy_name; ?>checklist-pop" class="categorychecklist form-no-clear" >
    780764                <?php
     
    793777        </div><!-- /.tabs-panel -->
    794778
    795         <div id="tabs-panel-<?php echo $taxonomy_name; ?>-all" class="tabs-panel tabs-panel-view-all
    796                                         <?php
    797                                         echo ( 'all' == $current_tab ? 'tabs-panel-active' : 'tabs-panel-inactive' );
    798         ?>
    799         ">
     779        <div id="tabs-panel-<?php echo $taxonomy_name; ?>-all" class="tabs-panel tabs-panel-view-all <?php echo ( 'all' == $current_tab ? 'tabs-panel-active' : 'tabs-panel-inactive' ); ?> ">
    800780            <?php if ( ! empty( $page_links ) ) : ?>
    801781                <div class="add-menu-item-pagelinks">
     
    816796        </div><!-- /.tabs-panel -->
    817797
    818         <div class="tabs-panel
    819         <?php
    820             echo ( 'search' == $current_tab ? 'tabs-panel-active' : 'tabs-panel-inactive' );
    821         ?>
    822         " id="tabs-panel-search-taxonomy-<?php echo $taxonomy_name; ?>">
     798        <div class="tabs-panel <?php echo ( 'search' == $current_tab ? 'tabs-panel-active' : 'tabs-panel-inactive' ); ?>" id="tabs-panel-search-taxonomy-<?php echo $taxonomy_name; ?>">
    823799            <?php
    824800            if ( isset( $_REQUEST[ 'quick-search-taxonomy-' . $taxonomy_name ] ) ) {
  • trunk/src/wp-admin/includes/plugin-install.php

    r43436 r43569  
    659659            <?php } if ( isset( $api->active_installs ) ) { ?>
    660660                <li><strong><?php _e( 'Active Installations:' ); ?></strong>
    661                                         <?php
    662                                         if ( $api->active_installs >= 1000000 ) {
    663                                             $active_installs_millions = floor( $api->active_installs / 1000000 );
    664                                             printf(
    665                                                 _nx( '%s+ Million', '%s+ Million', $active_installs_millions, 'Active plugin installations' ),
    666                                                 number_format_i18n( $active_installs_millions )
    667                                             );
    668                                         } elseif ( 0 == $api->active_installs ) {
    669                                             _ex( 'Less Than 10', 'Active plugin installations' );
    670                                         } else {
    671                                             echo number_format_i18n( $api->active_installs ) . '+';
    672                                         }
    673                     ?>
    674                     </li>
     661                <?php
     662                if ( $api->active_installs >= 1000000 ) {
     663                    $active_installs_millions = floor( $api->active_installs / 1000000 );
     664                    printf(
     665                        _nx( '%s+ Million', '%s+ Million', $active_installs_millions, 'Active plugin installations' ),
     666                        number_format_i18n( $active_installs_millions )
     667                    );
     668                } elseif ( 0 == $api->active_installs ) {
     669                    _ex( 'Less Than 10', 'Active plugin installations' );
     670                } else {
     671                    echo number_format_i18n( $api->active_installs ) . '+';
     672                }
     673                ?>
     674                </li>
    675675            <?php } if ( ! empty( $api->slug ) && empty( $api->external ) ) { ?>
    676676                <li><a target="_blank" href="<?php echo __( 'https://wordpress.org/plugins/' ) . $api->slug; ?>/"><?php _e( 'WordPress.org Plugin Page &#187;' ); ?></a></li>
  • trunk/src/wp-admin/includes/template.php

    r43495 r43569  
    21782178<!--[if IE 8]>
    21792179<html xmlns="http://www.w3.org/1999/xhtml" class="ie8 <?php echo $admin_html_class; ?>"
    2180                                                                     <?php
    2181                                                                     /**
    2182                                                                      * Fires inside the HTML tag in the admin header.
    2183                                                                      *
    2184                                                                      * @since 2.2.0
    2185                                                                      */
    2186                                                                     do_action( 'admin_xml_ns' );
    2187 ?>
    2188     <?php language_attributes(); ?>>
     2180    <?php
     2181    /**
     2182     * Fires inside the HTML tag in the admin header.
     2183     *
     2184     * @since 2.2.0
     2185     */
     2186    do_action( 'admin_xml_ns' );
     2187
     2188    language_attributes();
     2189    ?>
     2190    >
    21892191<![endif]-->
    21902192<!--[if !(IE 8) ]><!-->
    21912193<html xmlns="http://www.w3.org/1999/xhtml" class="<?php echo $admin_html_class; ?>"
    2192                                                                 <?php
    2193                                                                 /** This action is documented in wp-admin/includes/template.php */
    2194                                                                 do_action( 'admin_xml_ns' );
    2195 ?>
    2196     <?php language_attributes(); ?>>
     2194    <?php
     2195    /** This action is documented in wp-admin/includes/template.php */
     2196    do_action( 'admin_xml_ns' );
     2197
     2198    language_attributes();
     2199    ?>
     2200    >
    21972201<!--<![endif]-->
    21982202<head>
  • trunk/src/wp-admin/index.php

    r43328 r43569  
    2727// Die with an error message
    2828$die  = sprintf(
    29         /* translators: %1$s: WordPress, %2$s: src, %3$s: build */
    30             __( 'You seem to be running %1$s from the %2$s directory. %1$s needs to be built and run from the %3$s directory before we can get started.' ),
    31             'WordPress',
    32             '<code>src</code>',
    33             '<code>build</code>'
    34         ) . '</p>';
     29    /* translators: %1$s: WordPress, %2$s: src, %3$s: build */
     30    __( 'You seem to be running %1$s from the %2$s directory. %1$s needs to be built and run from the %3$s directory before we can get started.' ),
     31    'WordPress',
     32    '<code>src</code>',
     33    '<code>build</code>'
     34) . '</p>';
    3535$die .= '<p>' . sprintf(
    3636    /* translators: %s: WordPress */
    37         __( 'You can build %s by running:' ),
    38         'WordPress'
    39     ) . '</p>';
     37    __( 'You can build %s by running:' ),
     38    'WordPress'
     39) . '</p>';
    4040$die .= '<p><code>npm install && grunt build</code></p>';
    4141$die .= '<p>' . sprintf(
    4242    /* translators: %1$s: NPM URL, %2$s: Grunt URL */
    43         __( 'This requires <a href="%1$s">NPM</a> and <a href="%2$s">Grunt</a>. <a href="%3$s">Read more about setting up your local development environment</a>.' ),
    44         'https://www.npmjs.com/',
    45         'https://gruntjs.com/',
    46         __( 'https://make.wordpress.org/core/handbook/tutorials/installing-wordpress-locally/' )
    47     ) . '</p>';
     43    __( 'This requires <a href="%1$s">NPM</a> and <a href="%2$s">Grunt</a>. <a href="%3$s">Read more about setting up your local development environment</a>.' ),
     44    'https://www.npmjs.com/',
     45    'https://gruntjs.com/',
     46    __( 'https://make.wordpress.org/core/handbook/tutorials/installing-wordpress-locally/' )
     47) . '</p>';
    4848
    4949wp_die( $die, __( 'WordPress &rsaquo; Error' ) );
  • trunk/src/wp-admin/nav-menus.php

    r42857 r43569  
    629629    <h2 class="nav-tab-wrapper wp-clearfix">
    630630        <a href="<?php echo admin_url( 'nav-menus.php' ); ?>" class="nav-tab<?php echo $nav_tab_active_class; ?>"><?php esc_html_e( 'Edit Menus' ); ?></a>
    631         <?php if ( $num_locations && $menu_count ) : ?>
    632             <a href="<?php echo esc_url( add_query_arg( array( 'action' => 'locations' ), admin_url( 'nav-menus.php' ) ) ); ?>" class="nav-tab
    633                                 <?php
    634                                 if ( $locations_screen ) {
    635                                     echo ' nav-tab-active';}
    636 ?>
    637 "><?php esc_html_e( 'Manage Locations' ); ?></a>
    638631        <?php
    639             endif;
     632        if ( $num_locations && $menu_count ) {
     633            $active_tab_class = '';
     634            if ( $locations_screen ) {
     635                $active_tab_class = ' nav-tab-active';
     636            }
     637            ?>
     638            <a href="<?php echo esc_url( add_query_arg( array( 'action' => 'locations' ), admin_url( 'nav-menus.php' ) ) ); ?>" class="nav-tab<?php echo $active_tab_class; ?>"><?php esc_html_e( 'Manage Locations' ); ?></a>
     639            <?php
     640        }
    640641        ?>
    641642    </h2>
     
    695696                                        )
    696697                                    );
    697 ?>
    698 ">
     698                                    ?>
     699                                    ">
    699700                                        <span aria-hidden="true"><?php _ex( 'Edit', 'menu' ); ?></span><span class="screen-reader-text"><?php _e( 'Edit selected menu' ); ?></span>
    700701                                    </a>
     
    713714                                        )
    714715                                    );
    715 ?>
    716 ">
     716                                    ?>
     717                                    ">
    717718                                        <?php _ex( 'Use new menu', 'menu' ); ?>
    718719                                    </a>
     
    819820
    820821        $metabox_holder_disabled_class = '';
    821 if ( isset( $_GET['menu'] ) && '0' == $_GET['menu'] ) {
    822     $metabox_holder_disabled_class = ' metabox-holder-disabled';
    823 }
     822        if ( isset( $_GET['menu'] ) && '0' == $_GET['menu'] ) {
     823            $metabox_holder_disabled_class = ' metabox-holder-disabled';
     824        }
    824825    ?>
    825826    </div><!-- /manage-menus -->
     
    843844            <?php
    844845                $new_screen_class = '';
    845             if ( $add_new_screen ) {
    846                 $new_screen_class = 'blank-slate';
    847             }
     846                if ( $add_new_screen ) {
     847                    $new_screen_class = 'blank-slate';
     848                }
    848849            ?>
    849850                <h2><?php _e( 'Menu structure' ); ?></h2>
     
    907908
    908909                                $no_menus_style = '';
    909 if ( $one_theme_location_no_menus ) {
    910     $no_menus_style = 'style="display: none;"';
    911 }
     910                                if ( $one_theme_location_no_menus ) {
     911                                    $no_menus_style = 'style="display: none;"';
     912                                }
    912913                            ?>
    913914                            <div class="menu-settings" <?php echo $no_menus_style; ?>>
     
    977978                                    )
    978979                                );
    979 ?>
    980 "><?php _e( 'Delete Menu' ); ?></a>
     980                                ?>
     981                                "><?php _e( 'Delete Menu' ); ?></a>
    981982                            </span><!-- END .delete-action -->
    982983                            <?php endif; ?>
  • trunk/src/wp-admin/network/site-info.php

    r42343 r43569  
    194194            <legend class="screen-reader-text"><?php _e( 'Set site attributes' ); ?></legend>
    195195            <?php foreach ( $attribute_fields as $field_key => $field_label ) : ?>
    196                 <label><input type="checkbox" name="blog[<?php echo $field_key; ?>]" value="1"
    197                                                                     <?php
    198                                                                     checked( (bool) $details->$field_key, true );
    199                                                                     disabled( ! in_array( $details->$field_key, array( 0, 1 ) ) );
    200 ?>
    201  />
     196                <label><input type="checkbox" name="blog[<?php echo $field_key; ?>]" value="1" <?php checked( (bool) $details->$field_key, true ); ?> <?php disabled( ! in_array( $details->$field_key, array( 0, 1 ) ) ); ?> />
    202197                <?php echo $field_label; ?></label><br/>
    203198            <?php endforeach; ?>
  • trunk/src/wp-admin/theme-editor.php

    r42757 r43569  
    297297                        <?php
    298298                        if ( is_writeable( $file ) ) {
    299 ?>
    300 <strong><?php _e( 'Caution:' ); ?></strong><?php } ?>
     299                        ?>
     300                        <strong><?php _e( 'Caution:' ); ?></strong><?php } ?>
    301301                        <?php _e( 'This is a file in your current parent theme.' ); ?>
    302302                    </p>
  • trunk/src/wp-admin/update-core.php

    r43090 r43569  
    311311            <input type="checkbox" name="checked[]" id="<?php echo $checkbox_id; ?>" value="<?php echo esc_attr( $plugin_file ); ?>" />
    312312            <label for="<?php echo $checkbox_id; ?>" class="screen-reader-text">
    313                                         <?php
    314                                         /* translators: %s: plugin name */
    315                                         printf(
    316                                             __( 'Select %s' ),
    317                                             $plugin_data->Name
    318                                         );
    319                 ?>
    320                 </label>
    321             </td>
    322             <td class="plugin-title"><p>
    323                 <?php echo $icon; ?>
    324                 <strong><?php echo $plugin_data->Name; ?></strong>
    325                 <?php
    326                 /* translators: 1: plugin version, 2: new version */
     313            <?php
     314                /* translators: %s: plugin name */
    327315                printf(
    328                     __( 'You have version %1$s installed. Update to %2$s.' ),
    329                     $plugin_data->Version,
    330                     $plugin_data->update->new_version
     316                    __( 'Select %s' ),
     317                    $plugin_data->Name
    331318                );
    332                 echo ' ' . $details . $compat . $upgrade_notice;
    333319            ?>
    334             </p></td>
    335         </tr>
     320            </label>
     321        </td>
     322        <td class="plugin-title"><p>
     323            <?php echo $icon; ?>
     324            <strong><?php echo $plugin_data->Name; ?></strong>
     325            <?php
     326            /* translators: 1: plugin version, 2: new version */
     327            printf(
     328                __( 'You have version %1$s installed. Update to %2$s.' ),
     329                $plugin_data->Version,
     330                $plugin_data->update->new_version
     331            );
     332            echo ' ' . $details . $compat . $upgrade_notice;
     333        ?>
     334        </p></td>
     335    </tr>
    336336        <?php
    337337}
     
    387387            <input type="checkbox" name="checked[]" id="<?php echo $checkbox_id; ?>" value="<?php echo esc_attr( $stylesheet ); ?>" />
    388388            <label for="<?php echo $checkbox_id; ?>" class="screen-reader-text">
    389                                         <?php
    390                                         /* translators: %s: theme name */
    391                                         printf(
    392                                             __( 'Select %s' ),
    393                                             $theme->display( 'Name' )
    394                                         );
    395                 ?>
    396                 </label>
    397             </td>
    398             <td class="plugin-title"><p>
    399                 <img src="<?php echo esc_url( $theme->get_screenshot() ); ?>" width="85" height="64" class="updates-table-screenshot" alt="" />
    400                 <strong><?php echo $theme->display( 'Name' ); ?></strong>
    401                 <?php
    402                 /* translators: 1: theme version, 2: new version */
     389            <?php
     390                /* translators: %s: theme name */
    403391                printf(
    404                     __( 'You have version %1$s installed. Update to %2$s.' ),
    405                     $theme->display( 'Version' ),
    406                     $theme->update['new_version']
     392                    __( 'Select %s' ),
     393                    $theme->display( 'Name' )
    407394                );
    408395            ?>
    409             </p></td>
    410         </tr>
     396            </label>
     397        </td>
     398        <td class="plugin-title"><p>
     399            <img src="<?php echo esc_url( $theme->get_screenshot() ); ?>" width="85" height="64" class="updates-table-screenshot" alt="" />
     400            <strong><?php echo $theme->display( 'Name' ); ?></strong>
     401            <?php
     402            /* translators: 1: theme version, 2: new version */
     403            printf(
     404                __( 'You have version %1$s installed. Update to %2$s.' ),
     405                $theme->display( 'Version' ),
     406                $theme->update['new_version']
     407            );
     408        ?>
     409        </p></td>
     410    </tr>
    411411        <?php
    412412}
  • trunk/src/wp-login.php

    r43542 r43569  
    257257    ?>
    258258    <p id="backtoblog"><a href="<?php echo esc_url( home_url( '/' ) ); ?>">
    259                                             <?php
    260                                             /* translators: %s: site title */
    261                                             printf( _x( '&larr; Back to %s', 'site' ), get_bloginfo( 'title', 'display' ) );
     259    <?php
     260        /* translators: %s: site title */
     261        printf( _x( '&larr; Back to %s', 'site' ), get_bloginfo( 'title', 'display' ) );
    262262    ?>
    263263    </a></p>
  • trunk/src/xmlrpc.php

    r42343 r43569  
    3232if ( isset( $_GET['rsd'] ) ) { // http://cyber.law.harvard.edu/blogs/gems/tech/rsd.html
    3333    header( 'Content-Type: text/xml; charset=' . get_option( 'blog_charset' ), true );
    34 ?>
    35 <?php echo '<?xml version="1.0" encoding="' . get_option( 'blog_charset' ) . '"?' . '>'; ?>
     34    echo '<?xml version="1.0" encoding="' . get_option( 'blog_charset' ) . '"?' . '>';
     35    ?>
    3636<rsd version="1.0" xmlns="http://archipelago.phrasewise.com/rsd">
    3737    <service>
Note: See TracChangeset for help on using the changeset viewer.