WordPress.org

Make WordPress Core


Ignore:
Timestamp:
05/16/2020 06:40:52 PM (11 months 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/theme-editor.php

    r47550 r47808  
    7070}
    7171
    72 if ( $theme->errors() && 'theme_no_stylesheet' == $theme->errors()->get_error_code() ) {
     72if ( $theme->errors() && 'theme_no_stylesheet' === $theme->errors()->get_error_code() ) {
    7373    wp_die( __( 'The requested theme does not exist.' ) . ' ' . $theme->errors()->get_error_message() );
    7474}
     
    163163    $content = fread( $f, filesize( $file ) );
    164164
    165     if ( '.php' == substr( $file, strrpos( $file, '.' ) ) ) {
     165    if ( '.php' === substr( $file, strrpos( $file, '.' ) ) ) {
    166166        $functions = wp_doc_link_parse( $content );
    167167
     
    229229        <?php
    230230        foreach ( wp_get_themes( array( 'errors' => null ) ) as $a_stylesheet => $a_theme ) {
    231             if ( $a_theme->errors() && 'theme_no_stylesheet' == $a_theme->errors()->get_error_code() ) {
     231            if ( $a_theme->errors() && 'theme_no_stylesheet' === $a_theme->errors()->get_error_code() ) {
    232232                continue;
    233233            }
Note: See TracChangeset for help on using the changeset viewer.