Make WordPress Core


Ignore:
Timestamp:
02/09/2020 04:52:28 PM (5 years ago)
Author:
SergeyBiryukov
Message:

Coding Standards: Use Yoda conditions where appropriate.

See #49222.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/l10n.php

    r47198 r47219  
    6363        }
    6464
    65         if ( $ms_locale !== false ) {
     65        if ( false !== $ms_locale ) {
    6666            $locale = $ms_locale;
    6767        }
    6868    } else {
    6969        $db_locale = get_option( 'WPLANG' );
    70         if ( $db_locale !== false ) {
     70        if ( false !== $db_locale ) {
    7171            $locale = $db_locale;
    7272        }
     
    941941
    942942    // If a path was given and the handle file exists simply return it.
    943     $file_base       = $domain === 'default' ? $locale : $domain . '-' . $locale;
     943    $file_base       = 'default' === $domain ? $locale : $domain . '-' . $locale;
    944944    $handle_filename = $file_base . '-' . $handle . '.json';
    945945
     
    13361336 */
    13371337function wp_get_installed_translations( $type ) {
    1338     if ( $type !== 'themes' && $type !== 'plugins' && $type !== 'core' ) {
     1338    if ( 'themes' !== $type && 'plugins' !== $type && 'core' !== $type ) {
    13391339        return array();
    13401340    }
Note: See TracChangeset for help on using the changeset viewer.