Make WordPress Core


Ignore:
Timestamp:
01/08/2015 07:04:40 AM (10 years ago)
Author:
wonderboymusic
Message:

The keyword elseif should be used instead of else if so that all control keywords look like single words.

This was a mess, is now standardized across the codebase, except for a few 3rd-party libs.

See #30799.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/query.php

    r31081 r31090  
    16551655                if ( strlen($qv['m']) > 9 ) {
    16561656                    $this->is_time = true;
    1657                 } else if ( strlen($qv['m']) > 7 ) {
     1657                } elseif ( strlen( $qv['m'] ) > 7 ) {
    16581658                    $this->is_day = true;
    1659                 } else if ( strlen($qv['m']) > 5 ) {
     1659                } elseif ( strlen( $qv['m'] ) > 5 ) {
    16601660                    $this->is_month = true;
    16611661                } else {
     
    19571957                    $q['tag_slug__in'][] = $tag;
    19581958                }
    1959             } else if ( preg_match('/[+\r\n\t ]+/', $q['tag']) || !empty($q['cat']) ) {
     1959            } elseif ( preg_match('/[+\r\n\t ]+/', $q['tag'] ) || ! empty( $q['cat'] ) ) {
    19601960                $tags = preg_split('/[+\r\n\t ]+/', $q['tag']);
    19611961                foreach ( (array) $tags as $tag ) {
     
    24682468        if ( $q['posts_per_page'] < -1 )
    24692469            $q['posts_per_page'] = abs($q['posts_per_page']);
    2470         else if ( $q['posts_per_page'] == 0 )
     2470        elseif ( $q['posts_per_page'] == 0 )
    24712471            $q['posts_per_page'] = 1;
    24722472
     
    43514351        } elseif ( in_array( $page_obj->post_title, $page ) ) {
    43524352            return true;
    4353         } else if ( in_array( $page_obj->post_name, $page ) ) {
     4353        } elseif ( in_array( $page_obj->post_name, $page ) ) {
    43544354            return true;
    43554355        } else {
     
    45694569        if ( $post->ID === get_queried_object_id() && ( $this->is_page() || $this->is_single() ) ) {
    45704570            $more = 1;
    4571         } else if ( $this->is_feed() ) {
     4571        } elseif ( $this->is_feed() ) {
    45724572            $more = 1;
    45734573        } else {
Note: See TracChangeset for help on using the changeset viewer.