Make WordPress Core


Ignore:
Timestamp:
01/10/2008 09:39:35 AM (17 years ago)
Author:
matt
Message:

New experimental category interface, fixes #5618. Hat tip: mdawaffe.

File:
1 edited

Legend:

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

    r6363 r6588  
    1717}
    1818
    19 function wp_create_category($cat_name) {
     19function wp_create_category( $cat_name, $parent = 0 ) {
    2020    if ( $id = category_exists($cat_name) )
    2121        return $id;
    2222
    23     return wp_insert_category( array('cat_name' => $cat_name) );
     23    return wp_insert_category( array('cat_name' => $cat_name, 'category_parent' => $parent) );
    2424}
    2525
Note: See TracChangeset for help on using the changeset viewer.