Make WordPress Core


Ignore:
Timestamp:
04/10/2009 08:58:25 PM (18 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/admin-ajax.php

    r10903 r10905  
    446446        }
    447447
    448         if ( category_exists( trim( $_POST['cat_name'] ) ) ) {
     448        if ( category_exists( trim( $_POST['cat_name'] ), $_POST['category_parent'] ) ) {
    449449                $x = new WP_Ajax_Response( array(
    450450                        'what' => 'cat',
Note: See TracChangeset for help on using the changeset viewer.