Make WordPress Core


Ignore:
Timestamp:
04/10/2009 08:58:25 PM (17 years ago)
Author:
ryan
Message:

Add option to check if term exists with given parent. Update ajax add-cat check to pass parent when checking if cat exists.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/taxonomy.php

    r10810 r10905  
    1919 * @return unknown
    2020 */
    21 function category_exists($cat_name) {
    22     $id = is_term($cat_name, 'category');
     21function category_exists($cat_name, $parent = 0) {
     22    $id = is_term($cat_name, 'category', $parent);
     23    global $wpdb;
     24        error_log(var_export($wpdb->queries, true));
    2325    if ( is_array($id) )
    2426        $id = $id['term_id'];
Note: See TracChangeset for help on using the changeset viewer.