Summery Summery
Unregisters a taxonomy.
Syntax Syntax
Description Description
Can not be used to unregister built-in taxonomies.
Parameters Parameters
- $taxonomy
-
(Required) Taxonomy name.
Return Return
(bool|WP_Error) True on success, WP_Error on failure or if the taxonomy doesn't exist.
Source Source
File: wp-includes/taxonomy.php
} } /** * Fires after a taxonomy is registered. * * @since 3.3.0 * * @param string $taxonomy Taxonomy slug. * @param array|string $object_type Object type or array of object types. * @param array $args Array of taxonomy registration arguments. */ do_action( 'registered_taxonomy', $taxonomy, $object_type, (array) $taxonomy_object ); return $taxonomy_object; } /** * Unregisters a taxonomy. * * Can not be used to unregister built-in taxonomies. * * @since 4.5.0 * * @global WP $wp Current WordPress environment instance. * @global array $wp_taxonomies List of taxonomies. * * @param string $taxonomy Taxonomy name. * @return bool|WP_Error True on success, WP_Error on failure or if the taxonomy doesn't exist. */ function unregister_taxonomy( $taxonomy ) {
Advertisement
Changelog Changelog
Version | Description |
---|---|
4.5.0 | Introduced. |