Changeset 31090 for trunk/src/wp-admin/includes/ajax-actions.php
- Timestamp:
- 01/08/2015 07:04:40 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/ajax-actions.php
r31037 r31090 423 423 if ( !$cat_id = term_exists( $cat_name, $taxonomy->name, $parent ) ) 424 424 $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 ) ) { 426 426 continue; 427 else if ( is_array( $cat_id ) )427 } elseif ( is_array( $cat_id ) ) { 428 428 $cat_id = $cat_id['term_id']; 429 } 429 430 $checked_categories[] = $cat_id; 430 431 if ( $parent ) // Do these all at once in a second … … 742 743 if ( !$cat_id = term_exists( $cat_name, 'link_category' ) ) 743 744 $cat_id = wp_insert_term( $cat_name, 'link_category' ); 744 if ( is_wp_error( $cat_id ) ) 745 if ( is_wp_error( $cat_id ) ) { 745 746 continue; 746 else if ( is_array( $cat_id ) )747 } elseif ( is_array( $cat_id ) ) { 747 748 $cat_id = $cat_id['term_id']; 749 } 748 750 $cat_name = esc_html( $cat_name ); 749 751 $x->add( array( … … 1175 1177 wp_die( 0 ); 1176 1178 } 1177 } else if ( !$mid = add_meta( $pid ) ) {1179 } elseif ( ! $mid = add_meta( $pid ) ) { 1178 1180 wp_die( __( 'Please provide a custom field value.' ) ); 1179 1181 }
Note: See TracChangeset
for help on using the changeset viewer.