WordPress.org

Make WordPress Core

Ticket #21150: delete_term.patch

File delete_term.patch, 544 bytes (added by wpsmith, 3 years ago)
  • wordpress/wp-includes/taxonomy.php

     
    17591759                if ( $defaults['default'] == $term ) 
    17601760                        return 0; // Don't delete the default category 
    17611761        } 
     1762        elseif ( apply_filters( 'wp_default_term_' . $taxonomy, false, $term ) ) 
     1763                return 0; // Don't delete the default term 
    17621764 
    17631765        $args = wp_parse_args($args, $defaults); 
    17641766        extract($args, EXTR_SKIP);