Make WordPress Core

Ticket #24948: taxonomy.diff

File taxonomy.diff, 651 bytes (added by ecabuk, 12 years ago)
  • wp-includes/taxonomy.php

     
    17771777
    17781778        $defaults = array();
    17791779
    1780         if ( 'category' == $taxonomy ) {
    1781                 $defaults['default'] = get_option( 'default_category' );
    1782                 if ( $defaults['default'] == $term )
    1783                         return 0; // Don't delete the default category
    1784         }
     1780        $defaults['default'] = get_option( "default_{$taxonomy}" );
     1781        if ( $defaults['default'] == $term )
     1782                return 0; // Don't delete the default term
    17851783
    17861784        $args = wp_parse_args($args, $defaults);
    17871785        extract($args, EXTR_SKIP);