Changeset 45583 for trunk/src/wp-admin/includes/taxonomy.php
- Timestamp:
- 07/01/2019 12:50:14 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/taxonomy.php
r42877 r45583 54 54 */ 55 55 function 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 ) { 57 58 return $id; 58 59 } … … 78 79 $cat_ids = array(); 79 80 foreach ( $categories as $category ) { 80 if ( $id = category_exists( $category ) ) { 81 $id = category_exists( $category ); 82 if ( $id ) { 81 83 $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 } 84 89 } 85 90 } … … 301 306 */ 302 307 function 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 ) { 304 310 return $id; 305 311 }
Note: See TracChangeset
for help on using the changeset viewer.