Make WordPress Core


Ignore:
Timestamp:
10/03/2010 07:29:44 AM (14 years ago)
Author:
nacin
Message:

Have wp_delete_category wrap wp_delete_term. Move wp_delete_category into wp-includes scope for consistency. fixes #15008, props blepoxp.

File:
1 edited

Legend:

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

    r15688 r15690  
    14561456
    14571457    $defaults = array();
     1458   
     1459    if ( 'category' == $taxonomy ) {
     1460        $defaults['default'] = get_option( 'default_category' );
     1461        if ( $defaults['default'] == $term )
     1462            return 0; // Don't delete the default category
     1463    }
     1464   
    14581465    $args = wp_parse_args($args, $defaults);
    14591466    extract($args, EXTR_SKIP);
    14601467
    1461     if ( isset($default) ) {
     1468    if ( isset( $default ) ) {
    14621469        $default = (int) $default;
    14631470        if ( ! term_exists($default, $taxonomy) )
Note: See TracChangeset for help on using the changeset viewer.