add_action( \'init\', \'unregister_taxonomy\');
function unregister_taxonomy(){
global $wp_taxonomies;
$taxonomy = \'taxonomy_to_remove\';
if ( taxonomy_exists( $taxonomy))
unset( $wp_taxonomies[$taxonomy]);
}
<php
function remove_taxonomy($taxonomy) {
if (!$taxonomy->_builtin) {
global $wp_taxonomies;
$terms = get_terms($taxonomy);
foreach ($terms as $term) {
wp_delete_term( $term->term_id, $taxonomy );
}
unset($wp_taxonomies[$taxonomy]);
}
}
function deactivate_custom_taxes() {
remove_taxonomy(\'post_tag\'); // this will fail silently
// do we need to flush the rewrite rules?
$GLOBALS[\'wp_rewrite\']->flush_rules();
}
register_deactivation_hook( __FILE__, \'deactivate_custom_taxes\' );
>
请检查一下,让我知道。。。。