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/taxonomy.php

    r30197 r31090  
    6767function wp_create_categories( $categories, $post_id = '' ) {
    6868    $cat_ids = array ();
    69     foreach ($categories as $category) {
    70         if ($id = category_exists($category))
     69    foreach ( $categories as $category ) {
     70        if ( $id = category_exists( $category ) ) {
    7171            $cat_ids[] = $id;
    72         else
    73             if ($id = wp_create_category($category))
    74                 $cat_ids[] = $id;
     72        } elseif ( $id = wp_create_category( $category ) ) {
     73            $cat_ids[] = $id;
     74        }
    7575    }
    7676
Note: See TracChangeset for help on using the changeset viewer.