Make WordPress Core


Ignore:
Timestamp:
07/01/2019 12:50:14 PM (6 years ago)
Author:
pento
Message:

Coding Standards: Fix the Squiz.PHP.DisallowMultipleAssignments violations in wp-admin.

See #47632.

File:
1 edited

Legend:

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

    r42877 r45583  
    5454 */
    5555function wp_create_category( $cat_name, $parent = 0 ) {
    56     if ( $id = category_exists( $cat_name, $parent ) ) {
     56    $id = category_exists( $cat_name, $parent );
     57    if ( $id ) {
    5758        return $id;
    5859    }
     
    7879    $cat_ids = array();
    7980    foreach ( $categories as $category ) {
    80         if ( $id = category_exists( $category ) ) {
     81        $id = category_exists( $category );
     82        if ( $id ) {
    8183            $cat_ids[] = $id;
    82         } elseif ( $id = wp_create_category( $category ) ) {
    83             $cat_ids[] = $id;
     84        } else {
     85            $id = wp_create_category( $category );
     86            if ( $id ) {
     87                $cat_ids[] = $id;
     88            }
    8489        }
    8590    }
     
    301306 */
    302307function wp_create_term( $tag_name, $taxonomy = 'post_tag' ) {
    303     if ( $id = term_exists( $tag_name, $taxonomy ) ) {
     308    $id = term_exists( $tag_name, $taxonomy );
     309    if ( $id ) {
    304310        return $id;
    305311    }
Note: See TracChangeset for help on using the changeset viewer.