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-includes/class-wp-locale.php

    r47230 r47808  
    215215
    216216            /* translators: 'rtl' or 'ltr'. This sets the text direction for WordPress. */
    217         } elseif ( 'rtl' == _x( 'ltr', 'text direction' ) ) {
     217        } elseif ( 'rtl' === _x( 'ltr', 'text direction' ) ) {
    218218            $this->text_direction = 'rtl';
    219219        }
     
    347347     */
    348348    public function is_rtl() {
    349         return 'rtl' == $this->text_direction;
     349        return 'rtl' === $this->text_direction;
    350350    }
    351351
Note: See TracChangeset for help on using the changeset viewer.