Make WordPress Core


Ignore:
Timestamp:
05/16/2020 06:40:52 PM (4 years 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/author-template.php

    r47550 r47808  
    350350        $link = $file . '?author=' . $auth_ID;
    351351    } else {
    352         if ( '' == $author_nicename ) {
     352        if ( '' === $author_nicename ) {
    353353            $user = get_userdata( $author_id );
    354354            if ( ! empty( $user->user_nicename ) ) {
     
    468468        }
    469469
    470         if ( 'list' == $args['style'] ) {
     470        if ( 'list' === $args['style'] ) {
    471471            $return .= '<li>';
    472472        }
     
    514514
    515515        $return .= $link;
    516         $return .= ( 'list' == $args['style'] ) ? '</li>' : ', ';
     516        $return .= ( 'list' === $args['style'] ) ? '</li>' : ', ';
    517517    }
    518518
Note: See TracChangeset for help on using the changeset viewer.