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-admin/includes/ajax-actions.php

    r31037 r31090  
    423423        if ( !$cat_id = term_exists( $cat_name, $taxonomy->name, $parent ) )
    424424            $cat_id = wp_insert_term( $cat_name, $taxonomy->name, array( 'parent' => $parent ) );
    425         if ( is_wp_error( $cat_id ) )
     425        if ( is_wp_error( $cat_id ) ) {
    426426            continue;
    427         else if ( is_array( $cat_id ) )
     427        } elseif ( is_array( $cat_id ) ) {
    428428            $cat_id = $cat_id['term_id'];
     429        }
    429430        $checked_categories[] = $cat_id;
    430431        if ( $parent ) // Do these all at once in a second
     
    742743        if ( !$cat_id = term_exists( $cat_name, 'link_category' ) )
    743744            $cat_id = wp_insert_term( $cat_name, 'link_category' );
    744         if ( is_wp_error( $cat_id ) )
     745        if ( is_wp_error( $cat_id ) ) {
    745746            continue;
    746         else if ( is_array( $cat_id ) )
     747        } elseif ( is_array( $cat_id ) ) {
    747748            $cat_id = $cat_id['term_id'];
     749        }
    748750        $cat_name = esc_html( $cat_name );
    749751        $x->add( array(
     
    11751177                wp_die( 0 );
    11761178            }
    1177         } else if ( !$mid = add_meta( $pid ) ) {
     1179        } elseif ( ! $mid = add_meta( $pid ) ) {
    11781180            wp_die( __( 'Please provide a custom field value.' ) );
    11791181        }
Note: See TracChangeset for help on using the changeset viewer.