Make WordPress Core


Ignore:
Timestamp:
02/09/2020 04:52:28 PM (4 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/post-template.php

    r47182 r47219  
    339339    }
    340340
    341     if ( false !== strpos( $_post->post_content, '<!--noteaser-->' ) && ( ! $elements['multipage'] || $elements['page'] == 1 ) ) {
     341    if ( false !== strpos( $_post->post_content, '<!--noteaser-->' ) && ( ! $elements['multipage'] || 1 == $elements['page'] ) ) {
    342342        $strip_teaser = true;
    343343    }
     
    16551655    $post = get_post();
    16561656
    1657     if ( empty( $post->post_type ) || $post->post_type != 'attachment' ) {
     1657    if ( empty( $post->post_type ) || 'attachment' !== $post->post_type ) {
    16581658        return $content;
    16591659    }
Note: See TracChangeset for help on using the changeset viewer.