Changeset 7430
- Timestamp:
- 03/20/2008 10:33:34 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/taxonomy.php
r6983 r7430 1153 1153 1154 1154 if ( ! $term_id = is_term($slug) ) { 1155 $wpdb->insert( $wpdb->terms, compact( 'name', 'slug', 'term_group' ) ); 1155 if ( false === $wpdb->insert( $wpdb->terms, compact( 'name', 'slug', 'term_group' ) ) ) 1156 return new WP_Error('db_insert_error', __('Could not insert term into the database')); 1156 1157 $term_id = (int) $wpdb->insert_id; 1157 1158 } else if ( is_taxonomy_hierarchical($taxonomy) && !empty($parent) ) { … … 1159 1160 // by incorporating parent slugs. 1160 1161 $slug = wp_unique_term_slug($slug, (object) $args); 1161 $wpdb->insert( $wpdb->terms, compact( 'name', 'slug', 'term_group' ) ); 1162 if ( false === $wpdb->insert( $wpdb->terms, compact( 'name', 'slug', 'term_group' ) ) ) 1163 return new WP_Error('db_insert_error', __('Could not insert term into the database')); 1162 1164 $term_id = (int) $wpdb->insert_id; 1163 1165 }
Note: See TracChangeset
for help on using the changeset viewer.