Changeset 15220 for trunk/wp-admin/includes/taxonomy.php
- Timestamp:
- 06/11/2010 03:53:41 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/taxonomy.php
r13482 r15220 20 20 */ 21 21 function category_exists($cat_name, $parent = 0) { 22 $id = is_term($cat_name, 'category', $parent);22 $id = term_exists($cat_name, 'category', $parent); 23 23 if ( is_array($id) ) 24 24 $id = $id['term_id']; … … 241 241 */ 242 242 function tag_exists($tag_name) { 243 return is_term($tag_name, 'post_tag');243 return term_exists($tag_name, 'post_tag'); 244 244 } 245 245 … … 265 265 */ 266 266 function wp_create_term($tag_name, $taxonomy = 'post_tag') { 267 if ( $id = is_term($tag_name, $taxonomy) )267 if ( $id = term_exists($tag_name, $taxonomy) ) 268 268 return $id; 269 269
Note: See TracChangeset
for help on using the changeset viewer.