Make WordPress Core

Changeset 32874


Ignore:
Timestamp:
06/19/2015 10:00:33 PM (9 years ago)
Author:
wonderboymusic
Message:

Customizer et al, use elseif in PHP, not else if.
This was corrected via brute force in [31090].

See #32444.

Location:
trunk/src/wp-includes
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-customize-nav-menus.php

    r32822 r32874  
    119119                );
    120120            }
    121         } else if ( 'taxonomy' === $obj_type ) {
     121        } elseif ( 'taxonomy' === $obj_type ) {
    122122            $terms = get_terms( $taxonomy_or_post_type, array(
    123123                'child_of'     => 0,
     
    340340                'type' => WP_Customize_Nav_Menu_Setting::TYPE,
    341341            );
    342         } else if ( preg_match( WP_Customize_Nav_Menu_Item_Setting::ID_PATTERN, $setting_id ) ) {
     342        } elseif ( preg_match( WP_Customize_Nav_Menu_Item_Setting::ID_PATTERN, $setting_id ) ) {
    343343            $setting_args = array(
    344344                'type' => WP_Customize_Nav_Menu_Item_Setting::TYPE,
     
    363363        if ( ! empty( $setting_args['type'] ) && WP_Customize_Nav_Menu_Setting::TYPE === $setting_args['type'] ) {
    364364            $setting_class = 'WP_Customize_Nav_Menu_Setting';
    365         } else if ( ! empty( $setting_args['type'] ) && WP_Customize_Nav_Menu_Item_Setting::TYPE === $setting_args['type'] ) {
     365        } elseif ( ! empty( $setting_args['type'] ) && WP_Customize_Nav_Menu_Item_Setting::TYPE === $setting_args['type'] ) {
    366366            $setting_class = 'WP_Customize_Nav_Menu_Item_Setting';
    367367        }
  • trunk/src/wp-includes/class-wp-customize-setting.php

    r32806 r32874  
    859859                    if ( 'post_type' === $value['type'] ) {
    860860                        $original_title = get_the_title( $value['object_id'] );
    861                     } else if ( 'taxonomy' === $value['type'] ) {
     861                    } elseif ( 'taxonomy' === $value['type'] ) {
    862862                        $original_title = get_term_field( 'name', $value['object_id'], $value['object'], 'raw' );
    863863                        if ( is_wp_error( $original_title ) ) {
     
    17381738        if ( $auto_add && false === $i ) {
    17391739            array_push( $nav_menu_options['auto_add'], $this->term_id );
    1740         } else if ( ! $auto_add && false !== $i ) {
     1740        } elseif ( ! $auto_add && false !== $i ) {
    17411741            array_splice( $nav_menu_options['auto_add'], $i, 1 );
    17421742        }
  • trunk/src/wp-includes/class-wp-customize-widgets.php

    r32650 r32874  
    748748            $args['sanitize_callback'] = array( $this, 'sanitize_sidebar_widgets' );
    749749            $args['sanitize_js_callback'] = array( $this, 'sanitize_sidebar_widgets_js_instance' );
    750         } else if ( preg_match( $this->setting_id_patterns['widget_instance'], $id, $matches ) ) {
     750        } elseif ( preg_match( $this->setting_id_patterns['widget_instance'], $id, $matches ) ) {
    751751            $args['sanitize_callback'] = array( $this, 'sanitize_widget_instance' );
    752752            $args['sanitize_js_callback'] = array( $this, 'sanitize_widget_js_instance' );
  • trunk/src/wp-includes/comment.php

    r32769 r32874  
    973973        if ( $orderby == $this->query_vars['meta_key'] || $orderby == 'meta_value' ) {
    974974            $parsed = "$wpdb->commentmeta.meta_value";
    975         } else if ( $orderby == 'meta_value_num' ) {
     975        } elseif ( $orderby == 'meta_value_num' ) {
    976976            $parsed = "$wpdb->commentmeta.meta_value+0";
    977         } else if ( in_array( $orderby, $allowed_keys ) ) {
     977        } elseif ( in_array( $orderby, $allowed_keys ) ) {
    978978
    979979            if ( isset( $meta_query_clauses[ $orderby ] ) ) {
  • trunk/src/wp-includes/link-template.php

    r32845 r32874  
    921921    if ( $object_type ) {
    922922        $args['post_type'] = $object_type;
    923     } else if ( ! empty( $tax->object_type ) ) {
     923    } elseif ( ! empty( $tax->object_type ) ) {
    924924        $args['post_type'] = reset( $tax->object_type );
    925925    }
  • trunk/src/wp-includes/taxonomy.php

    r32837 r32874  
    27132713    if ( in_array( $orderby, array( 'term_id', 'name', 'slug', 'term_group' ) ) ) {
    27142714        $orderby = "t.$orderby";
    2715     } else if ( in_array( $orderby, array( 'count', 'parent', 'taxonomy', 'term_taxonomy_id' ) ) ) {
     2715    } elseif ( in_array( $orderby, array( 'count', 'parent', 'taxonomy', 'term_taxonomy_id' ) ) ) {
    27162716        $orderby = "tt.$orderby";
    2717     } else if ( 'term_order' === $orderby ) {
     2717    } elseif ( 'term_order' === $orderby ) {
    27182718        $orderby = 'tr.term_order';
    2719     } else if ( 'none' === $orderby ) {
     2719    } elseif ( 'none' === $orderby ) {
    27202720        $orderby = '';
    27212721        $order = '';
  • trunk/src/wp-includes/user.php

    r32838 r32874  
    722722            // Default order is by 'user_login'.
    723723            $ordersby = array( 'user_login' => $order );
    724         } else if ( is_array( $qv['orderby'] ) ) {
     724        } elseif ( is_array( $qv['orderby'] ) ) {
    725725            $ordersby = $qv['orderby'];
    726726        } else {
Note: See TracChangeset for help on using the changeset viewer.