registered_taxonomy
Fires after a taxonomy is registered.
Description
do_action( 'registered_taxonomy', (string) $taxonomy, (array|string) $object_type, (array) $array_taxonomy_object );
Parameters (3)
- 0. $taxonomy (string)
- Taxonomy slug.
- 1. $object_type (array|string)
- Object type or array of object types.
- 2. $array_taxonomy_object (array) =>
(array) $taxonomy_object
- Array of taxonomy registration arguments.
Usage
- To run the hook, copy the example below.
- // run the action
- do_action( 'registered_taxonomy', $taxonomy, $object_type, $array_taxonomy_object );
- The following example is for adding a hook callback.
- // define the registered_taxonomy callback
- function action_registered_taxonomy( $taxonomy, $object_type, $array_taxonomy_object ) {
- // make action magic happen here...
- };
- // add the action
- add_action( 'registered_taxonomy', 'action_registered_taxonomy', 10, 3 );
- To remove a hook callback, use the example below.
- // remove the action
- remove_action( 'registered_taxonomy', 'action_registered_taxonomy', 10, 3 );
Defined (1)
The action is defined in the following location(s).
- /wp-includes/taxonomy.php
- do_action( 'registered_taxonomy', $taxonomy, $object_type, (array) $taxonomy_object );