Changeset 39637
- Timestamp:
- 12/23/2016 03:10:36 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/ajax-actions.php
r39600 r39637 473 473 if ( '' === $category_nicename ) 474 474 continue; 475 if ( !$cat_id = term_exists( $cat_name, $taxonomy->name, $parent ) ) 476 477 if ( is_wp_error( $cat_id ) ) {475 476 $cat_id = wp_insert_term( $cat_name, $taxonomy->name, array( 'parent' => $parent ) ); 477 if ( ! $cat_id || is_wp_error( $cat_id ) ) { 478 478 continue; 479 } else if ( is_array( $cat_id ) ){479 } else { 480 480 $cat_id = $cat_id['term_id']; 481 481 } … … 807 807 if ( '' === $slug ) 808 808 continue; 809 if ( !$cat_id = term_exists( $cat_name, 'link_category' ) ) 810 811 if ( is_wp_error( $cat_id ) ) {809 810 $cat_id = wp_insert_term( $cat_name, 'link_category' ); 811 if ( ! $cat_id || is_wp_error( $cat_id ) ) { 812 812 continue; 813 } else if ( is_array( $cat_id ) ){813 } else { 814 814 $cat_id = $cat_id['term_id']; 815 815 }
Note: See TracChangeset
for help on using the changeset viewer.