diff --git wp-admin/admin-ajax.php wp-admin/admin-ajax.php
index d2a8d4d..0b78deb 100644
|
|
|
function _wp_ajax_add_hierarchical_term() { |
| 260 | 260 | $category_nicename = sanitize_title($cat_name); |
| 261 | 261 | if ( '' === $category_nicename ) |
| 262 | 262 | continue; |
| 263 | | if ( !($cat_id = term_exists($cat_name, $taxonomy->name, $parent)) ) { |
| 264 | | $new_term = wp_insert_term($cat_name, $taxonomy->name, array('parent' => $parent)); |
| 265 | | $cat_id = $new_term['term_id']; |
| 266 | | } |
| | 263 | |
| | 264 | $new_term = wp_insert_term($cat_name, $taxonomy->name, array('parent' => $parent)); |
| | 265 | $cat_id = $new_term['term_id']; |
| 267 | 266 | $checked_categories[] = $cat_id; |
| 268 | 267 | if ( $parent ) // Do these all at once in a second |
| 269 | 268 | continue; |