Make WordPress Core


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

    r47219 r47808  
    8484
    8585        if ( $parsed_args['show_updated'] ) {
    86             if ( '00' != substr( $bookmark->link_updated_f, 0, 2 ) ) {
     86            if ( '00' !== substr( $bookmark->link_updated_f, 0, 2 ) ) {
    8787                $title .= ' (';
    8888                $title .= sprintf(
     
    9999        $alt = ' alt="' . $name . ( $parsed_args['show_description'] ? ' ' . $title : '' ) . '"';
    100100
    101         if ( '' != $title ) {
     101        if ( '' !== $title ) {
    102102            $title = ' title="' . $title . '"';
    103103        }
    104104        $rel = $bookmark->link_rel;
    105         if ( '' != $rel ) {
     105        if ( '' !== $rel ) {
    106106            $rel = ' rel="' . esc_attr( $rel ) . '"';
    107107        }
    108108        $target = $bookmark->link_target;
    109         if ( '' != $target ) {
     109        if ( '' !== $target ) {
    110110            $target = ' target="' . $target . '"';
    111111        }
     
    135135        }
    136136
    137         if ( $parsed_args['show_description'] && '' != $desc ) {
     137        if ( $parsed_args['show_description'] && '' !== $desc ) {
    138138            $output .= $parsed_args['between'] . $desc;
    139139        }
Note: See TracChangeset for help on using the changeset viewer.