Make WordPress Core

Changeset 44574


Ignore:
Timestamp:
01/12/2019 06:40:16 AM (8 years ago)
Author:
pento
Message:

Coding Standards: Upgrade WPCS to 1.2.1.

This upgrade fixes quite a few false positives, as well as auto-fixing some indenting issues.

Fixes #45956.

Location:
trunk
Files:
45 edited

Legend:

Unmodified
Added
Removed
  • trunk/composer.json

    r43571 r44574  
    1111        },
    1212        "require-dev": {
    13                 "dealerdirect/phpcodesniffer-composer-installer": "~0.4.4",
    14                 "wp-coding-standards/wpcs": "~1.0.0"
     13                "dealerdirect/phpcodesniffer-composer-installer": "~0.5.0",
     14                "wp-coding-standards/wpcs": "~1.2.0"
    1515        },
    1616        "scripts": {
  • trunk/composer.lock

    r43571 r44574  
    55        "This file is @generated automatically"
    66    ],
    7     "content-hash": "525cadb533bc92cc922d79144b33b14a",
     7    "content-hash": "c3625c9fc2ce3a44cad41a64f258bafd",
    88    "packages": [],
    99    "packages-dev": [
    1010        {
    1111            "name": "dealerdirect/phpcodesniffer-composer-installer",
    12             "version": "v0.4.4",
     12            "version": "v0.5.0",
    1313            "source": {
    1414                "type": "git",
    1515                "url": "https://github.com/Dealerdirect/phpcodesniffer-composer-installer.git",
    16                 "reference": "2e41850d5f7797cbb1af7b030d245b3b24e63a08"
     16                "reference": "e749410375ff6fb7a040a68878c656c2e610b132"
    1717            },
    1818            "dist": {
    1919                "type": "zip",
    20                 "url": "https://api.github.com/repos/Dealerdirect/phpcodesniffer-composer-installer/zipball/2e41850d5f7797cbb1af7b030d245b3b24e63a08",
    21                 "reference": "2e41850d5f7797cbb1af7b030d245b3b24e63a08",
     20                "url": "https://api.github.com/repos/Dealerdirect/phpcodesniffer-composer-installer/zipball/e749410375ff6fb7a040a68878c656c2e610b132",
     21                "reference": "e749410375ff6fb7a040a68878c656c2e610b132",
    2222                "shasum": ""
    2323            },
     
    2525                "composer-plugin-api": "^1.0",
    2626                "php": "^5.3|^7",
    27                 "squizlabs/php_codesniffer": "*"
     27                "squizlabs/php_codesniffer": "^2|^3"
    2828            },
    2929            "require-dev": {
    3030                "composer/composer": "*",
    31                 "wimg/php-compatibility": "^8.0"
    32             },
    33             "suggest": {
    34                 "dealerdirect/qa-tools": "All the PHP QA tools you'll need"
     31                "phpcompatibility/php-compatibility": "^9.0",
     32                "sensiolabs/security-checker": "^4.1.0"
    3533            },
    3634            "type": "composer-plugin",
     
    5048                {
    5149                    "name": "Franck Nijhof",
    52                     "email": "f.nijhof@dealerdirect.nl",
    53                     "homepage": "http://workingatdealerdirect.eu",
    54                     "role": "Developer"
     50                    "email": "franck.nijhof@dealerdirect.com",
     51                    "homepage": "http://www.frenck.nl",
     52                    "role": "Developer / IT Manager"
    5553                }
    5654            ],
    5755            "description": "PHP_CodeSniffer Standards Composer Installer Plugin",
    58             "homepage": "http://workingatdealerdirect.eu",
     56            "homepage": "http://www.dealerdirect.com",
    5957            "keywords": [
    6058                "PHPCodeSniffer",
     
    7472                "tests"
    7573            ],
    76             "time": "2017-12-06T16:27:17+00:00"
     74            "time": "2018-10-26T13:21:45+00:00"
    7775        },
    7876        {
    7977            "name": "squizlabs/php_codesniffer",
    80             "version": "3.3.1",
     78            "version": "3.4.0",
    8179            "source": {
    8280                "type": "git",
    8381                "url": "https://github.com/squizlabs/PHP_CodeSniffer.git",
    84                 "reference": "628a481780561150481a9ec74709092b9759b3ec"
     82                "reference": "379deb987e26c7cd103a7b387aea178baec96e48"
    8583            },
    8684            "dist": {
    8785                "type": "zip",
    88                 "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/628a481780561150481a9ec74709092b9759b3ec",
    89                 "reference": "628a481780561150481a9ec74709092b9759b3ec",
     86                "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/379deb987e26c7cd103a7b387aea178baec96e48",
     87                "reference": "379deb987e26c7cd103a7b387aea178baec96e48",
    9088                "shasum": ""
    9189            },
     
    125123                "standards"
    126124            ],
    127             "time": "2018-07-26T23:47:18+00:00"
     125            "time": "2018-12-19T23:57:18+00:00"
    128126        },
    129127        {
    130128            "name": "wp-coding-standards/wpcs",
    131             "version": "1.0.0",
     129            "version": "1.2.1",
    132130            "source": {
    133131                "type": "git",
    134132                "url": "https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards.git",
    135                 "reference": "539c6d74e6207daa22b7ea754d6f103e9abb2755"
     133                "reference": "f328bcafd97377e8e5e5d7b244d5ddbf301a3a5c"
    136134            },
    137135            "dist": {
    138136                "type": "zip",
    139                 "url": "https://api.github.com/repos/WordPress-Coding-Standards/WordPress-Coding-Standards/zipball/539c6d74e6207daa22b7ea754d6f103e9abb2755",
    140                 "reference": "539c6d74e6207daa22b7ea754d6f103e9abb2755",
     137                "url": "https://api.github.com/repos/WordPress-Coding-Standards/WordPress-Coding-Standards/zipball/f328bcafd97377e8e5e5d7b244d5ddbf301a3a5c",
     138                "reference": "f328bcafd97377e8e5e5d7b244d5ddbf301a3a5c",
    141139                "shasum": ""
    142140            },
     
    146144            },
    147145            "require-dev": {
    148                 "phpcompatibility/php-compatibility": "*"
     146                "phpcompatibility/php-compatibility": "^9.0"
    149147            },
    150148            "suggest": {
     
    168166                "wordpress"
    169167            ],
    170             "time": "2018-07-25T18:10:35+00:00"
     168            "time": "2018-12-18T09:43:51+00:00"
    171169        }
    172170    ],
  • trunk/phpcs.xml.dist

    r44573 r44574  
    55        <rule ref="WordPress-Core"/>
    66        <rule ref="WordPress.CodeAnalysis.EmptyStatement"/>
    7 
    8         <rule ref="PEAR.Functions.FunctionCallSignature">
    9                 <properties>
    10                         <property name="allowMultipleArguments" value="false"/>
    11                 </properties>
    12         </rule>
    137
    148        <rule ref="WordPress.NamingConventions.ValidVariableName">
  • trunk/src/wp-activate.php

    r44048 r44574  
    136136
    137137                <?php
    138 } else {
    139         if ( is_wp_error( $result ) && in_array( $result->get_error_code(), $valid_error_codes ) ) {
    140                 $signup = $result->get_error_data();
    141                 ?>
     138        } else {
     139                if ( is_wp_error( $result ) && in_array( $result->get_error_code(), $valid_error_codes ) ) {
     140                        $signup = $result->get_error_data();
     141                        ?>
    142142                        <h2><?php _e( 'Your account is now active!' ); ?></h2>
    143143                        <?php
     
    163163                        }
    164164                        echo '</p>';
    165         } elseif ( $result === null || is_wp_error( $result ) ) {
    166                 ?>
     165                } elseif ( $result === null || is_wp_error( $result ) ) {
     166                        ?>
    167167                        <h2><?php _e( 'An error occurred during the activation' ); ?></h2>
    168168                        <?php if ( is_wp_error( $result ) ) : ?>
     
    170170                        <?php endif; ?>
    171171                        <?php
    172         } else {
    173                 $url  = isset( $result['blog_id'] ) ? get_home_url( (int) $result['blog_id'] ) : '';
    174                 $user = get_userdata( (int) $result['user_id'] );
    175                 ?>
     172                } else {
     173                        $url  = isset( $result['blog_id'] ) ? get_home_url( (int) $result['blog_id'] ) : '';
     174                        $user = get_userdata( (int) $result['user_id'] );
     175                        ?>
    176176                        <h2><?php _e( 'Your account is now active!' ); ?></h2>
    177177
     
    200200                                ?>
    201201                                </p>
    202                         <?php
    203                         endif;
     202                                <?php
     203                                endif;
     204                }
    204205        }
    205 }
    206 ?>
     206        ?>
    207207        </div>
    208208</div>
  • trunk/src/wp-admin/custom-header.php

    r43571 r44574  
    643643                        <?php
    644644        endif;
    645 if ( ! empty( $this->default_headers ) ) :
    646         ?>
     645                if ( ! empty( $this->default_headers ) ) :
     646                        ?>
    647647<tr>
    648648<th scope="row"><?php _e( 'Default Images' ); ?></th>
    649649<td>
    650         <?php if ( current_theme_supports( 'custom-header', 'uploads' ) ) : ?>
     650                        <?php if ( current_theme_supports( 'custom-header', 'uploads' ) ) : ?>
    651651        <p><?php _e( 'If you don&lsquo;t want to upload your own image, you can use one of these cool headers, or show a random one.' ); ?></p>
    652652        <?php else : ?>
    653653        <p><?php _e( 'You can use one of these cool headers or show a random one on each page.' ); ?></p>
    654654        <?php endif; ?>
    655         <?php
    656         $this->show_header_selector( 'default' );
    657         ?>
     655                        <?php
     656                        $this->show_header_selector( 'default' );
     657                        ?>
    658658</td>
    659659</tr>
    660         <?php
     660                        <?php
    661661        endif;
    662 if ( get_header_image() ) :
    663         ?>
     662                if ( get_header_image() ) :
     663                        ?>
    664664<tr>
    665665<th scope="row"><?php _e( 'Remove Image' ); ?></th>
    666666<td>
    667667        <p><?php _e( 'This will remove the header image. You will not be able to restore any customizations.' ); ?></p>
    668         <?php submit_button( __( 'Remove Header Image' ), '', 'removeheader', false ); ?>
     668                        <?php submit_button( __( 'Remove Header Image' ), '', 'removeheader', false ); ?>
    669669</td>
    670670</tr>
    671         <?php
     671                        <?php
    672672        endif;
    673673
    674         $default_image = sprintf( get_theme_support( 'custom-header', 'default-image' ), get_template_directory_uri(), get_stylesheet_directory_uri() );
    675 if ( $default_image && get_header_image() != $default_image ) :
    676         ?>
     674                $default_image = sprintf( get_theme_support( 'custom-header', 'default-image' ), get_template_directory_uri(), get_stylesheet_directory_uri() );
     675                if ( $default_image && get_header_image() != $default_image ) :
     676                        ?>
    677677<tr>
    678678<th scope="row"><?php _e( 'Reset Image' ); ?></th>
    679679<td>
    680680        <p><?php _e( 'This will restore the original header image. You will not be able to restore any customizations.' ); ?></p>
    681         <?php submit_button( __( 'Restore Original Header Image' ), '', 'resetheader', false ); ?>
     681                        <?php submit_button( __( 'Restore Original Header Image' ), '', 'resetheader', false ); ?>
    682682</td>
    683683</tr>
     
    742742
    743743                wp_nonce_field( 'custom-header-options', '_wpnonce-custom-header-options' );
    744 ?>
     744                ?>
    745745
    746746                <?php submit_button( null, 'primary', 'save-header-options' ); ?>
  • trunk/src/wp-admin/includes/class-wp-list-table.php

    r43571 r44574  
    12191219                $this->extra_tablenav( $which );
    12201220                $this->pagination( $which );
    1221 ?>
     1221                ?>
    12221222
    12231223                <br class="clear" />
  • trunk/src/wp-admin/includes/class-wp-plugin-install-list-table.php

    r44420 r44574  
    281281                        <div class="no-plugin-results"><?php _e( 'No plugins found. Try a different search.' ); ?></div>
    282282                        <?php
    283 }
     283                }
    284284        }
    285285
     
    393393                        </div>
    394394                        <?php
    395 }
     395                }
    396396        }
    397397
  • trunk/src/wp-admin/includes/class-wp-posts-list-table.php

    r44221 r44574  
    14721472                        </label>
    14731473
    1474                 <?php if ( is_post_type_viewable( $screen->post_type ) ) : // is_post_type_viewable check ?>
     1474                                <?php if ( is_post_type_viewable( $screen->post_type ) ) : // is_post_type_viewable check ?>
    14751475
    14761476                        <label>
     
    14791479                        </label>
    14801480
    1481                         <?php
     1481                                        <?php
    14821482        endif; // is_post_type_viewable check
    14831483        endif; // $bulk
     
    14941494        endif; // $bulk
    14951495
    1496 if ( post_type_supports( $screen->post_type, 'author' ) ) :
    1497         $authors_dropdown = '';
    1498 
    1499         if ( current_user_can( $post_type_object->cap->edit_others_posts ) ) :
    1500                 $users_opt = array(
    1501                         'hide_if_only_one_author' => false,
    1502                         'who'                     => 'authors',
    1503                         'name'                    => 'post_author',
    1504                         'class'                   => 'authors',
    1505                         'multi'                   => 1,
    1506                         'echo'                    => 0,
    1507                         'show'                    => 'display_name_with_login',
    1508                 );
    1509                 if ( $bulk ) {
    1510                         $users_opt['show_option_none'] = __( '&mdash; No Change &mdash;' );
    1511                 }
    1512 
    1513                 if ( $authors = wp_dropdown_users( $users_opt ) ) :
    1514                         $authors_dropdown  = '<label class="inline-edit-author">';
    1515                         $authors_dropdown .= '<span class="title">' . __( 'Author' ) . '</span>';
    1516                         $authors_dropdown .= $authors;
    1517                         $authors_dropdown .= '</label>';
    1518                 endif;
    1519         endif; // authors
    1520         ?>
    1521 
    1522         <?php
    1523         if ( ! $bulk ) {
    1524                 echo $authors_dropdown;}
     1496                        if ( post_type_supports( $screen->post_type, 'author' ) ) :
     1497                                $authors_dropdown = '';
     1498
     1499                                if ( current_user_can( $post_type_object->cap->edit_others_posts ) ) :
     1500                                        $users_opt = array(
     1501                                                'hide_if_only_one_author' => false,
     1502                                                'who'                     => 'authors',
     1503                                                'name'                    => 'post_author',
     1504                                                'class'                   => 'authors',
     1505                                                'multi'                   => 1,
     1506                                                'echo'                    => 0,
     1507                                                'show'                    => 'display_name_with_login',
     1508                                        );
     1509                                        if ( $bulk ) {
     1510                                                $users_opt['show_option_none'] = __( '&mdash; No Change &mdash;' );
     1511                                        }
     1512
     1513                                        if ( $authors = wp_dropdown_users( $users_opt ) ) :
     1514                                                $authors_dropdown  = '<label class="inline-edit-author">';
     1515                                                $authors_dropdown .= '<span class="title">' . __( 'Author' ) . '</span>';
     1516                                                $authors_dropdown .= $authors;
     1517                                                $authors_dropdown .= '</label>';
     1518                                        endif;
     1519                                endif; // authors
     1520                                ?>
     1521
     1522                                <?php
     1523                                if ( ! $bulk ) {
     1524                                        echo $authors_dropdown;}
    15251525        endif; // post_type_supports author
    15261526
    1527 if ( ! $bulk && $can_publish ) :
    1528         ?>
     1527                        if ( ! $bulk && $can_publish ) :
     1528                                ?>
    15291529
    15301530                <div class="inline-edit-group wp-clearfix">
     
    15461546                        </div>
    15471547
    1548         <?php endif; ?>
     1548                                <?php endif; ?>
    15491549
    15501550                </div></fieldset>
     
    16911691
    16921692                        <div class="inline-edit-group wp-clearfix">
    1693                         <?php if ( post_type_supports( $screen->post_type, 'comments' ) ) : ?>
     1693                                <?php if ( post_type_supports( $screen->post_type, 'comments' ) ) : ?>
    16941694                                <label class="alignleft">
    16951695                                        <input type="checkbox" name="comment_status" value="open" />
     
    17041704                        </div>
    17051705
    1706         <?php
     1706                                <?php
    17071707        endif; // $bulk
    17081708        endif; // post_type_supports comments or pings
  • trunk/src/wp-admin/includes/class-wp-screen.php

    r44130 r44574  
    919919                        <?php
    920920                endif;
    921 if ( $this->show_screen_options() ) :
    922         ?>
     921                if ( $this->show_screen_options() ) :
     922                        ?>
    923923                        <div id="screen-options-link-wrap" class="hide-if-no-js screen-meta-toggle">
    924924                        <button type="button" id="show-settings-link" class="button show-settings" aria-controls="screen-options-wrap" aria-expanded="false"><?php _e( 'Screen Options' ); ?></button>
  • trunk/src/wp-admin/includes/class-wp-users-list-table.php

    r43571 r44574  
    287287                 */
    288288                do_action( 'restrict_manage_users', $which );
    289 ?>
     289                ?>
    290290                </div>
    291291                <?php
  • trunk/src/wp-admin/includes/meta-boxes.php

    r44551 r44574  
    319319                <input name="original_publish" type="hidden" id="original_publish" value="<?php esc_attr_e( 'Publish' ); ?>" />
    320320                <?php submit_button( __( 'Publish' ), 'primary large', 'publish', false ); ?>
    321         <?php
     321                <?php
    322322        endif;
    323323        else :
  • trunk/src/wp-admin/includes/ms.php

    r44469 r44574  
    999999        <?php else : ?>
    10001000                <p><?php _e( 'Once you hit &#8220;Confirm Deletion&#8221;, these users will be permanently removed.' ); ?></p>
    1001         <?php
     1001                <?php
    10021002        endif;
    10031003
    10041004        submit_button( __( 'Confirm Deletion' ), 'primary' );
    1005 ?>
     1005        ?>
    10061006        </form>
    10071007        <?php
  • trunk/src/wp-admin/includes/plugin-install.php

    r44420 r44574  
    697697                        <p aria-hidden="true" class="fyi-description"><?php printf( _n( '(based on %s rating)', '(based on %s ratings)', $api->num_ratings ), number_format_i18n( $api->num_ratings ) ); ?></p>
    698698                        <?php
    699 }
    700 
    701 if ( ! empty( $api->ratings ) && array_sum( (array) $api->ratings ) > 0 ) {
    702         ?>
     699                }
     700
     701                if ( ! empty( $api->ratings ) && array_sum( (array) $api->ratings ) > 0 ) {
     702                        ?>
    703703                        <h3><?php _e( 'Reviews' ); ?></h3>
    704704                        <p class="fyi-description"><?php _e( 'Read all reviews on WordPress.org or write your own!' ); ?></p>
     
    728728                                <?php
    729729                        }
    730 }
    731 if ( ! empty( $api->contributors ) ) {
    732         ?>
     730                }
     731                if ( ! empty( $api->contributors ) ) {
     732                        ?>
    733733                        <h3><?php _e( 'Contributors' ); ?></h3>
    734734                        <ul class="contributors">
     
    748748                                ?>
    749749                        </ul>
    750                         <?php if ( ! empty( $api->donate_link ) ) { ?>
     750                                        <?php if ( ! empty( $api->donate_link ) ) { ?>
    751751                                <a target="_blank" href="<?php echo esc_url( $api->donate_link ); ?>"><?php _e( 'Donate to this plugin &#187;' ); ?></a>
    752752                        <?php } ?>
    753                 <?php } ?>
     753                                <?php } ?>
    754754        </div>
    755755        <div id="section-holder" class="wrap">
  • trunk/src/wp-admin/includes/post.php

    r44540 r44574  
    17331733                <a class="button<?php echo $tab_last; ?>" href="<?php echo esc_url( $preview_link ); ?>"><?php _e( 'Preview' ); ?></a>
    17341734                        <?php
    1735 }
     1735                }
    17361736
    17371737                // Allow plugins to prevent some users overriding the post lock
    1738 if ( $override ) {
    1739         ?>
     1738                if ( $override ) {
     1739                        ?>
    17401740        <a class="button button-primary wp-tab-last" href="<?php echo esc_url( add_query_arg( 'get-post-lock', '1', wp_nonce_url( get_edit_post_link( $post->ID, 'url' ), 'lock-post_' . $post->ID ) ) ); ?>"><?php _e( 'Take over' ); ?></a>
    17411741                        <?php
    1742 }
    1743 
    1744 ?>
     1742                }
     1743
     1744                ?>
    17451745                </p>
    17461746                </div>
  • trunk/src/wp-admin/nav-menus.php

    r44151 r44574  
    823823                        </span><!-- /add-new-menu-action -->
    824824                </form>
    825         <?php
     825                        <?php
    826826                endif;
    827827
    828828                $metabox_holder_disabled_class = '';
    829 if ( isset( $_GET['menu'] ) && '0' == $_GET['menu'] ) {
    830         $metabox_holder_disabled_class = ' metabox-holder-disabled';
    831 }
    832 ?>
     829                if ( isset( $_GET['menu'] ) && '0' == $_GET['menu'] ) {
     830                        $metabox_holder_disabled_class = ' metabox-holder-disabled';
     831                }
     832                ?>
    833833        </div><!-- /manage-menus -->
    834834        <div id="nav-menus-frame" class="wp-clearfix">
     
    915915
    916916                                                                $no_menus_style = '';
    917 if ( $one_theme_location_no_menus ) {
    918         $no_menus_style = 'style="display: none;"';
    919 }
    920 ?>
     917                                                        if ( $one_theme_location_no_menus ) {
     918                                                                $no_menus_style = 'style="display: none;"';
     919                                                        }
     920                                                        ?>
    921921                                                        <div class="menu-settings" <?php echo $no_menus_style; ?>>
    922922                                                                <h3><?php _e( 'Menu Settings' ); ?></h3>
  • trunk/src/wp-admin/network/site-new.php

    r43571 r44574  
    232232                                <input name="blog[domain]" type="text" class="regular-text" id="site-address" aria-describedby="site-address-desc" autocapitalize="none" autocorrect="off" required /><span class="no-break">.<?php echo preg_replace( '|^www\.|', '', get_network()->domain ); ?></span>
    233233                                <?php
    234 } else {
    235         echo get_network()->domain . get_network()->path
    236         ?>
     234                        } else {
     235                                echo get_network()->domain . get_network()->path
     236                                ?>
    237237                                <input name="blog[domain]" type="text" class="regular-text" id="site-address" aria-describedby="site-address-desc" autocapitalize="none" autocorrect="off" required />
    238         <?php
    239 }
     238                                <?php
     239                        }
    240240                        echo '<p class="description" id="site-address-desc">' . __( 'Only lowercase letters (a-z), numbers, and hyphens are allowed.' ) . '</p>';
    241 ?>
     241                        ?>
    242242                        </td>
    243243                </tr>
  • trunk/src/wp-admin/options-permalink.php

    r43571 r44574  
    350350                <?php else : ?>
    351351<p>
    352         <?php
    353         printf(
    354                 /* translators: 1: Codex URL, 2: web.config, 3: CTRL + a */
    355                 __( 'If the root directory of your site was <a href="%1$s">writable</a>, we could do this automatically, but it isn&#8217;t so this is the url rewrite rule you should have in your %2$s file. Create a new file, called %2$s in the root directory of your site. Click in the field and press %3$s to select all. Then insert this code into the %2$s file.' ),
    356                 __( 'https://codex.wordpress.org/Changing_File_Permissions' ),
    357                 '<code>web.config</code>',
    358                 '<kbd>CTRL + a</kbd>'
    359         );
    360         ?>
     352                        <?php
     353                        printf(
     354                                /* translators: 1: Codex URL, 2: web.config, 3: CTRL + a */
     355                                __( 'If the root directory of your site was <a href="%1$s">writable</a>, we could do this automatically, but it isn&#8217;t so this is the url rewrite rule you should have in your %2$s file. Create a new file, called %2$s in the root directory of your site. Click in the field and press %3$s to select all. Then insert this code into the %2$s file.' ),
     356                                __( 'https://codex.wordpress.org/Changing_File_Permissions' ),
     357                                '<code>web.config</code>',
     358                                '<kbd>CTRL + a</kbd>'
     359                        );
     360                        ?>
    361361</p>
    362362<form action="options-permalink.php" method="post">
    363         <?php wp_nonce_field( 'update-permalink' ); ?>
     363                        <?php wp_nonce_field( 'update-permalink' ); ?>
    364364        <p><textarea rows="18" class="large-text readonly" name="rules" id="rules" readonly="readonly"><?php echo esc_textarea( $wp_rewrite->iis7_url_rewrite_rules( true ) ); ?></textarea></p>
    365365</form>
    366366<p>
    367         <?php
    368         printf(
    369                 /* translators: %s: web.config */
    370                 __( 'If you temporarily make your site&#8217;s root directory writable for us to generate the %s file automatically, do not forget to revert the permissions after the file has been created.' ),
    371                 '<code>web.config</code>'
    372         );
    373         ?>
     367                        <?php
     368                        printf(
     369                                /* translators: %s: web.config */
     370                                __( 'If you temporarily make your site&#8217;s root directory writable for us to generate the %s file automatically, do not forget to revert the permissions after the file has been created.' ),
     371                                '<code>web.config</code>'
     372                        );
     373                        ?>
    374374</p>
    375375                <?php endif; ?>
  • trunk/src/wp-admin/user-edit.php

    r44565 r44574  
    229229                <a href="user-new.php" class="page-title-action"><?php echo esc_html_x( 'Add Existing', 'user' ); ?></a>
    230230                                <?php
    231 }
     231        }
    232232                }
    233233                ?>
     
    305305                        <?php
    306306endif; // $_wp_admin_css_colors
    307 if ( ! ( IS_PROFILE_PAGE && ! $user_can_edit ) ) :
    308         ?>
     307                if ( ! ( IS_PROFILE_PAGE && ! $user_can_edit ) ) :
     308                        ?>
    309309<tr class="user-comment-shortcuts-wrap">
    310310<th scope="row"><?php _e( 'Keyboard Shortcuts' ); ?></th>
    311311<td><label for="comment_shortcuts"><input type="checkbox" name="comment_shortcuts" id="comment_shortcuts" value="true" <?php checked( 'true', $profileuser->comment_shortcuts ); ?> /> <?php _e( 'Enable keyboard shortcuts for comment moderation.' ); ?></label> <?php _e( '<a href="https://codex.wordpress.org/Keyboard_Shortcuts" target="_blank">More information</a>' ); ?></td>
    312312</tr>
    313 <?php endif; ?>
     313                <?php endif; ?>
    314314<tr class="show-admin-bar user-admin-bar-front-wrap">
    315315<th scope="row"><?php _e( 'Toolbar' ); ?></th>
     
    415415endif; //!IS_PROFILE_PAGE
    416416
    417 if ( is_multisite() && is_network_admin() && ! IS_PROFILE_PAGE && current_user_can( 'manage_network_options' ) && ! isset( $super_admins ) ) {
    418         ?>
     417                if ( is_multisite() && is_network_admin() && ! IS_PROFILE_PAGE && current_user_can( 'manage_network_options' ) && ! isset( $super_admins ) ) {
     418                        ?>
    419419<tr class="user-super-admin-wrap"><th><?php _e( 'Super Admin' ); ?></th>
    420420<td>
    421         <?php if ( $profileuser->user_email != get_site_option( 'admin_email' ) || ! is_super_admin( $profileuser->ID ) ) : ?>
     421                        <?php if ( $profileuser->user_email != get_site_option( 'admin_email' ) || ! is_super_admin( $profileuser->ID ) ) : ?>
    422422<p><label><input type="checkbox" id="super_admin" name="super_admin"<?php checked( is_super_admin( $profileuser->ID ) ); ?> /> <?php _e( 'Grant this user super admin privileges for the Network.' ); ?></label></p>
    423423<?php else : ?>
     
    425425<?php endif; ?>
    426426</td></tr>
    427 <?php } ?>
     427                <?php } ?>
    428428
    429429<tr class="user-first-name-wrap">
  • trunk/src/wp-admin/users.php

    r43571 r44574  
    289289                        <input type="hidden" name="delete_option" value="delete" />
    290290                        <?php else : ?>
    291                 <?php if ( 1 == $go_delete ) : ?>
     291                                <?php if ( 1 == $go_delete ) : ?>
    292292                        <fieldset><p><legend><?php _e( 'What should be done with content owned by this user?' ); ?></legend></p>
    293293                <?php else : ?>
     
    296296                <ul style="list-style:none;">
    297297                        <li><label><input type="radio" id="delete_option0" name="delete_option" value="delete" />
    298                         <?php _e( 'Delete all content.' ); ?></label></li>
     298                                <?php _e( 'Delete all content.' ); ?></label></li>
    299299                        <li><input type="radio" id="delete_option1" name="delete_option" value="reassign" />
    300                         <?php
    301                         echo '<label for="delete_option1">' . __( 'Attribute all content to:' ) . '</label> ';
    302                         wp_dropdown_users(
    303                                 array(
    304                                         'name'    => 'reassign_user',
    305                                         'exclude' => array_diff( $userids, array( $current_user->ID ) ),
    306                                         'show'    => 'display_name_with_login',
    307                                 )
    308                         );
    309                         ?>
     300                                <?php
     301                                echo '<label for="delete_option1">' . __( 'Attribute all content to:' ) . '</label> ';
     302                                wp_dropdown_users(
     303                                        array(
     304                                                'name'    => 'reassign_user',
     305                                                'exclude' => array_diff( $userids, array( $current_user->ID ) ),
     306                                                'show'    => 'display_name_with_login',
     307                                        )
     308                                );
     309                                ?>
    310310                        </li>
    311311                </ul></fieldset>
    312         <?php
     312                                <?php
    313313        endif;
    314         /**
    315         * Fires at the end of the delete users form prior to the confirm button.
    316         *
    317         * @since 4.0.0
    318         * @since 4.5.0 The `$userids` parameter was added.
    319         *
    320         * @param WP_User $current_user WP_User object for the current user.
    321         * @param int[]   $userids      Array of IDs for users being deleted.
    322         */
    323         do_action( 'delete_user_form', $current_user, $userids );
    324 ?>
     314                        /**
     315                        * Fires at the end of the delete users form prior to the confirm button.
     316                        *
     317                        * @since 4.0.0
     318                        * @since 4.5.0 The `$userids` parameter was added.
     319                        *
     320                        * @param WP_User $current_user WP_User object for the current user.
     321                        * @param int[]   $userids      Array of IDs for users being deleted.
     322                        */
     323                        do_action( 'delete_user_form', $current_user, $userids );
     324                        ?>
    325325        <input type="hidden" name="action" value="dodelete" />
    326326                        <?php submit_button( __( 'Confirm Deletion' ), 'primary' ); ?>
     
    523523        endif;
    524524
    525 if ( ! empty( $messages ) ) {
    526         foreach ( $messages as $msg ) {
    527                 echo $msg;
    528         }
    529 }
    530 ?>
     525                if ( ! empty( $messages ) ) {
     526                        foreach ( $messages as $msg ) {
     527                                echo $msg;
     528                        }
     529                }
     530                ?>
    531531
    532532        <div class="wrap">
  • trunk/src/wp-content/themes/twentyeleven/comments.php

    r44562 r44574  
    2525                        return;
    2626                endif;
    27 ?>
     27        ?>
    2828
    2929        <?php // You can start editing here -- including this comment! ?>
  • trunk/src/wp-content/themes/twentyeleven/content-gallery.php

    r43571 r44574  
    5656                                <?php the_excerpt(); ?>
    5757                <?php endif; ?>
    58                 <?php
    59                 wp_link_pages(
    60                         array(
    61                                 'before' => '<div class="page-link"><span>' . __( 'Pages:', 'twentyeleven' ) . '</span>',
    62                                 'after'  => '</div>',
    63                         )
    64                 );
    65                 ?>
     58                        <?php
     59                        wp_link_pages(
     60                                array(
     61                                        'before' => '<div class="page-link"><span>' . __( 'Pages:', 'twentyeleven' ) . '</span>',
     62                                        'after'  => '</div>',
     63                                )
     64                        );
     65                        ?>
    6666        </div><!-- .entry-content -->
    6767        <?php endif; ?>
  • trunk/src/wp-content/themes/twentyfifteen/header.php

    r44500 r44574  
    3737                                        <?php else : ?>
    3838                                                <p class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></p>
    39                                         <?php
     39                                                <?php
    4040                                        endif;
    4141
    4242                                        $description = get_bloginfo( 'description', 'display' );
    43 if ( $description || is_customize_preview() ) :
    44         ?>
     43                                        if ( $description || is_customize_preview() ) :
     44                                                ?>
    4545                                                <p class="site-description"><?php echo $description; ?></p>
    46                                         <?php
     46                                                <?php
    4747                                        endif;
    48 ?>
     48                                        ?>
    4949                                <button class="secondary-toggle"><?php _e( 'Menu and widgets', 'twentyfifteen' ); ?></button>
    5050                        </div><!-- .site-branding -->
  • trunk/src/wp-content/themes/twentyfifteen/inc/template-tags.php

    r43571 r44574  
    210210        </a>
    211211
    212         <?php
     212                <?php
    213213        endif; // End is_singular()
    214214        }
  • trunk/src/wp-content/themes/twentyfourteen/content-aside.php

    r43571 r44574  
    2020                        endif;
    2121
    22 if ( is_single() ) :
    23         the_title( '<h1 class="entry-title">', '</h1>' );
     22                if ( is_single() ) :
     23                        the_title( '<h1 class="entry-title">', '</h1>' );
    2424                        else :
    2525                                the_title( '<h1 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h1>' );
  • trunk/src/wp-content/themes/twentyfourteen/content-audio.php

    r43571 r44574  
    2020                        endif;
    2121
    22 if ( is_single() ) :
    23         the_title( '<h1 class="entry-title">', '</h1>' );
     22                if ( is_single() ) :
     23                        the_title( '<h1 class="entry-title">', '</h1>' );
    2424                        else :
    2525                                the_title( '<h1 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h1>' );
  • trunk/src/wp-content/themes/twentyfourteen/content-gallery.php

    r43571 r44574  
    2020                        endif;
    2121
    22 if ( is_single() ) :
    23         the_title( '<h1 class="entry-title">', '</h1>' );
     22                if ( is_single() ) :
     23                        the_title( '<h1 class="entry-title">', '</h1>' );
    2424                        else :
    2525                                the_title( '<h1 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h1>' );
  • trunk/src/wp-content/themes/twentyfourteen/content-image.php

    r43571 r44574  
    2020                        endif;
    2121
    22 if ( is_single() ) :
    23         the_title( '<h1 class="entry-title">', '</h1>' );
     22                if ( is_single() ) :
     23                        the_title( '<h1 class="entry-title">', '</h1>' );
    2424                        else :
    2525                                the_title( '<h1 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h1>' );
  • trunk/src/wp-content/themes/twentyfourteen/content-link.php

    r43571 r44574  
    2020                        endif;
    2121
    22 if ( is_single() ) :
    23         the_title( '<h1 class="entry-title">', '</h1>' );
     22                if ( is_single() ) :
     23                        the_title( '<h1 class="entry-title">', '</h1>' );
    2424                        else :
    2525                                the_title( '<h1 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h1>' );
  • trunk/src/wp-content/themes/twentyfourteen/content-none.php

    r25769 r44574  
    2121
    2222        <p><?php _e( 'Sorry, but nothing matched your search terms. Please try again with some different keywords.', 'twentyfourteen' ); ?></p>
    23         <?php get_search_form(); ?>
     23                <?php get_search_form(); ?>
    2424
    2525        <?php else : ?>
    2626
    2727        <p><?php _e( 'It seems we can&rsquo;t find what you&rsquo;re looking for. Perhaps searching can help.', 'twentyfourteen' ); ?></p>
    28         <?php get_search_form(); ?>
     28                <?php get_search_form(); ?>
    2929
    3030        <?php endif; ?>
  • trunk/src/wp-content/themes/twentyfourteen/content-quote.php

    r43571 r44574  
    2020                        endif;
    2121
    22 if ( is_single() ) :
    23         the_title( '<h1 class="entry-title">', '</h1>' );
     22                if ( is_single() ) :
     23                        the_title( '<h1 class="entry-title">', '</h1>' );
    2424                        else :
    2525                                the_title( '<h1 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h1>' );
  • trunk/src/wp-content/themes/twentyfourteen/content-video.php

    r43571 r44574  
    2020                        endif;
    2121
    22 if ( is_single() ) :
    23         the_title( '<h1 class="entry-title">', '</h1>' );
     22                if ( is_single() ) :
     23                        the_title( '<h1 class="entry-title">', '</h1>' );
    2424                        else :
    2525                                the_title( '<h1 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h1>' );
  • trunk/src/wp-content/themes/twentyfourteen/content.php

    r43571 r44574  
    2222                        endif;
    2323
    24 if ( is_single() ) :
    25         the_title( '<h1 class="entry-title">', '</h1>' );
     24                if ( is_single() ) :
     25                        the_title( '<h1 class="entry-title">', '</h1>' );
    2626                        else :
    2727                                the_title( '<h1 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h1>' );
  • trunk/src/wp-content/themes/twentyfourteen/inc/template-tags.php

    r43571 r44574  
    198198
    199199        <a class="post-thumbnail" href="<?php the_permalink(); ?>" aria-hidden="true">
    200         <?php
    201         if ( ( ! is_active_sidebar( 'sidebar-2' ) || is_page_template( 'page-templates/full-width.php' ) ) ) {
    202                 the_post_thumbnail( 'twentyfourteen-full-width' );
    203         } else {
    204                 the_post_thumbnail( 'post-thumbnail', array( 'alt' => get_the_title() ) );
    205         }
    206         ?>
     200                        <?php
     201                        if ( ( ! is_active_sidebar( 'sidebar-2' ) || is_page_template( 'page-templates/full-width.php' ) ) ) {
     202                                the_post_thumbnail( 'twentyfourteen-full-width' );
     203                        } else {
     204                                the_post_thumbnail( 'post-thumbnail', array( 'alt' => get_the_title() ) );
     205                        }
     206                        ?>
    207207        </a>
    208208
    209         <?php
     209                        <?php
    210210        endif; // End is_singular()
    211211        }
  • trunk/src/wp-content/themes/twentyseventeen/template-parts/post/content-none.php

    r44496 r44574  
    3131
    3232                endif;
    33 ?>
     33                ?>
    3434        </div><!-- .page-content -->
    3535</section><!-- .no-results -->
  • trunk/src/wp-content/themes/twentysixteen/header.php

    r44500 r44574  
    3636                                        <?php else : ?>
    3737                                                <p class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></p>
    38                                         <?php
     38                                                <?php
    3939                                        endif;
    4040
    4141                                        $description = get_bloginfo( 'description', 'display' );
    42 if ( $description || is_customize_preview() ) :
    43         ?>
     42                                        if ( $description || is_customize_preview() ) :
     43                                                ?>
    4444                                                <p class="site-description"><?php echo $description; ?></p>
    4545                                        <?php endif; ?>
  • trunk/src/wp-content/themes/twentysixteen/inc/template-tags.php

    r43571 r44574  
    146146        </a>
    147147
    148         <?php
     148                <?php
    149149        endif; // End is_singular()
    150150        }
  • trunk/src/wp-content/themes/twentyten/loop.php

    r43571 r44574  
    134134                </div><!-- #post-## -->
    135135
    136         <?php /* How to display all other posts. */ ?>
     136                <?php /* How to display all other posts. */ ?>
    137137
    138138        <?php else : ?>
     
    144144                        </div><!-- .entry-meta -->
    145145
    146         <?php if ( is_archive() || is_search() ) : // Only display excerpts for archives and search. ?>
     146                <?php if ( is_archive() || is_search() ) : // Only display excerpts for archives and search. ?>
    147147                        <div class="entry-summary">
    148148                                <?php the_excerpt(); ?>
  • trunk/src/wp-content/themes/twentythirteen/content-none.php

    r25522 r44574  
    2121
    2222        <p><?php _e( 'Sorry, but nothing matched your search terms. Please try again with different keywords.', 'twentythirteen' ); ?></p>
    23         <?php get_search_form(); ?>
     23                <?php get_search_form(); ?>
    2424
    2525        <?php else : ?>
    2626
    2727        <p><?php _e( 'It seems we can&rsquo;t find what you&rsquo;re looking for. Perhaps searching can help.', 'twentythirteen' ); ?></p>
    28         <?php get_search_form(); ?>
     28                <?php get_search_form(); ?>
    2929
    3030        <?php endif; ?>
  • trunk/src/wp-includes/feed-atom-comments.php

    r43571 r44574  
    111111        <?php else : // post pass ?>
    112112                <content type="html" xml:base="<?php comment_link(); ?>"><![CDATA[<?php comment_text(); ?>]]></content>
    113         <?php
     113                <?php
    114114        endif; // post pass
    115115        // Return comment threading information (https://www.ietf.org/rfc/rfc4685.txt)
    116 if ( $comment->comment_parent == 0 ) : // This comment is top level
    117         ?>
     116        if ( $comment->comment_parent == 0 ) : // This comment is top level
     117                ?>
    118118        <thr:in-reply-to ref="<?php the_guid(); ?>" href="<?php the_permalink_rss(); ?>" type="<?php bloginfo_rss( 'html_type' ); ?>" />
    119         <?php
     119                <?php
    120120        else : // This comment is in reply to another comment
    121121                $parent_comment = get_comment( $comment->comment_parent );
  • trunk/src/wp-includes/feed-atom.php

    r43571 r44574  
    6767                         */
    6868                        do_action( 'atom_author' );
    69 ?>
     69                        ?>
    7070                </author>
    7171                <title type="<?php html_type_rss(); ?>"><![CDATA[<?php the_title_rss(); ?>]]></title>
  • trunk/src/wp-includes/feed-rss2-comments.php

    r43571 r44574  
    106106                <description><![CDATA[<?php comment_text_rss(); ?>]]></description>
    107107                <content:encoded><![CDATA[<?php comment_text(); ?>]]></content:encoded>
    108                 <?php
     108                        <?php
    109109                endif; // post pass
    110110                        /**
     
    117117                         */
    118118                        do_action( 'commentrss2_item', $comment->comment_ID, $comment_post->ID );
    119 ?>
     119                ?>
    120120                        </item>
    121121                        <?php
  • trunk/src/wp-includes/widgets/class-wp-widget-archives.php

    r43571 r44574  
    132132                </ul>
    133133                        <?php
    134 }
     134                }
    135135
    136136                echo $args['after_widget'];
  • trunk/src/wp-includes/widgets/class-wp-widget-text.php

    r43571 r44574  
    494494                                <input id="<?php echo $this->get_field_id( 'filter' ); ?>" name="<?php echo $this->get_field_name( 'filter' ); ?>" type="checkbox"<?php checked( ! empty( $instance['filter'] ) ); ?> />&nbsp;<label for="<?php echo $this->get_field_id( 'filter' ); ?>"><?php _e( 'Automatically add paragraphs' ); ?></label>
    495495                        </p>
    496                 <?php
     496                        <?php
    497497                endif;
    498498        }
  • trunk/src/wp-login.php

    r44545 r44574  
    11151115        <?php } else { ?>
    11161116        d = document.getElementById('user_login');
    1117         <?php if ( 'invalid_username' == $errors->get_error_code() ) { ?>
     1117                        <?php if ( 'invalid_username' == $errors->get_error_code() ) { ?>
    11181118        if( d.value != '' )
    11191119        d.value = '';
    1120                 <?php
    1121 }
    1122 }
    1123 ?>
     1120                                <?php
     1121                        }
     1122        }
     1123        ?>
    11241124        d.focus();
    11251125        d.select();
  • trunk/src/wp-signup.php

    r43595 r44574  
    140140                <p class="error"><?php echo $errmsg; ?></p>
    141141                <?php
    142 }
     142        }
    143143        echo '<input name="blog_title" type="text" id="blog_title" value="' . esc_attr( $blog_title ) . '" />';
    144 ?>
     144        ?>
    145145
    146146        <?php
Note: See TracChangeset for help on using the changeset viewer.