WordPress.org

Make WordPress Core


Ignore:
Timestamp:
05/16/2020 06:40:52 PM (8 weeks ago)
Author:
SergeyBiryukov
Message:

Coding Standards: Use strict comparison where static strings are involved.

This reduces the number of WordPress.PHP.StrictComparisons.LooseComparison issues in half, from 1897 to 890.

Includes minor code layout fixes for better readability.

See #49542.

File:
1 edited

Legend:

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

    r47510 r47808  
    1919
    2020if ( current_user_can( 'switch_themes' ) && isset( $_GET['action'] ) ) {
    21     if ( 'activate' == $_GET['action'] ) {
     21    if ( 'activate' === $_GET['action'] ) {
    2222        check_admin_referer( 'switch-theme_' . $_GET['stylesheet'] );
    2323        $theme = wp_get_theme( $_GET['stylesheet'] );
     
    5454        wp_redirect( admin_url( 'themes.php?resumed=true' ) );
    5555        exit;
    56     } elseif ( 'delete' == $_GET['action'] ) {
     56    } elseif ( 'delete' === $_GET['action'] ) {
    5757        check_admin_referer( 'delete-theme_' . $_GET['stylesheet'] );
    5858        $theme = wp_get_theme( $_GET['stylesheet'] );
     
    248248    foreach ( (array) $submenu['themes.php'] as $item ) {
    249249        $class = '';
    250         if ( 'themes.php' == $item[2] || 'theme-editor.php' == $item[2] || 0 === strpos( $item[2], 'customize.php' ) ) {
     250        if ( 'themes.php' === $item[2] || 'theme-editor.php' === $item[2] || 0 === strpos( $item[2], 'customize.php' ) ) {
    251251            continue;
    252252        }
Note: See TracChangeset for help on using the changeset viewer.