Make WordPress Core


Ignore:
Timestamp:
02/09/2020 04:52:28 PM (6 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/class-wp-rewrite.php

    r47122 r47219  
    921921        // Get the structure, minus any cruft (stuff that isn't tags) at the front.
    922922        $structure = $permalink_structure;
    923         if ( $front != '/' ) {
     923        if ( '/' !== $front ) {
    924924            $structure = str_replace( $front, '', $structure );
    925925        }
     
    19101910     */
    19111911    public function set_category_base( $category_base ) {
    1912         if ( $category_base != get_option( 'category_base' ) ) {
     1912        if ( get_option( 'category_base' ) !== $category_base ) {
    19131913            update_option( 'category_base', $category_base );
    19141914            $this->init();
     
    19281928     */
    19291929    public function set_tag_base( $tag_base ) {
    1930         if ( $tag_base != get_option( 'tag_base' ) ) {
     1930        if ( get_option( 'tag_base' ) !== $tag_base ) {
    19311931            update_option( 'tag_base', $tag_base );
    19321932            $this->init();
Note: See TracChangeset for help on using the changeset viewer.