Taxonomy: Introduce unregister_taxonomy().

This new function can be used to completely unregister non built-in taxonomies.

Fixes #35227.

git-svn-id: https://develop.svn.wordpress.org/trunk@36243 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Pascal Birchler
2016-01-09 14:57:22 +00:00
parent d92ead50c8
commit eafbcb3b6e
3 changed files with 159 additions and 1 deletions

View File

@@ -334,7 +334,7 @@ function _unregister_post_type( $cpt_name ) {
}
function _unregister_taxonomy( $taxonomy_name ) {
unset( $GLOBALS['wp_taxonomies'][$taxonomy_name] );
unregister_taxonomy( $taxonomy_name );
}
/**