WordPress.org

Make WordPress Core


Ignore:
Timestamp:
05/16/2020 06:40:52 PM (16 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-content/themes/twentyeleven/content-featured.php

    r45932 r47808  
    3333    <footer class="entry-meta">
    3434        <?php
    35             /* translators: Used between list items, there is a space after the comma. */
    36             $tag_list = get_the_tag_list( '', __( ', ', 'twentyeleven' ) );
    37         if ( '' != $tag_list ) {
     35        /* translators: Used between list items, there is a space after the comma. */
     36        $tag_list = get_the_tag_list( '', __( ', ', 'twentyeleven' ) );
     37
     38        if ( '' !== $tag_list ) {
    3839            /* translators: 1: Category list, 2: Tag list, 3: Post permalink, 4: Post title. */
    3940            $utility_text = __( 'This entry was posted in %1$s and tagged %2$s. Bookmark the <a href="%3$s" title="Permalink to %4$s" rel="bookmark">permalink</a>.', 'twentyeleven' );
     
    4243            $utility_text = __( 'This entry was posted in %1$s. Bookmark the <a href="%3$s" title="Permalink to %4$s" rel="bookmark">permalink</a>.', 'twentyeleven' );
    4344        }
    44             printf(
    45                 $utility_text,
    46                 /* translators: Used between list items, there is a space after the comma. */
    47                 get_the_category_list( __( ', ', 'twentyeleven' ) ),
    48                 $tag_list,
    49                 esc_url( get_permalink() ),
    50                 the_title_attribute( 'echo=0' )
    51             );
    52             ?>
     45
     46        printf(
     47            $utility_text,
     48            /* translators: Used between list items, there is a space after the comma. */
     49            get_the_category_list( __( ', ', 'twentyeleven' ) ),
     50            $tag_list,
     51            esc_url( get_permalink() ),
     52            the_title_attribute( 'echo=0' )
     53        );
     54        ?>
    5355
    5456        <?php edit_post_link( __( 'Edit', 'twentyeleven' ), '<span class="edit-link">', '</span>' ); ?>
Note: See TracChangeset for help on using the changeset viewer.