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.
  1. // run the action 
  2. do_action( 'registered_taxonomy', $taxonomy, $object_type, $array_taxonomy_object ); 
The following example is for adding a hook callback.
  1. // define the registered_taxonomy callback 
  2. function action_registered_taxonomy( $taxonomy, $object_type, $array_taxonomy_object ) { 
  3. // make action magic happen here... 
  4. }; 
  5.  
  6. // add the action 
  7. add_action( 'registered_taxonomy', 'action_registered_taxonomy', 10, 3 ); 
To remove a hook callback, use the example below.
  1. // remove the action 
  2. remove_action( 'registered_taxonomy', 'action_registered_taxonomy', 10, 3 ); 

Defined (1)

The action is defined in the following location(s).

/wp-includes/taxonomy.php  
  1. do_action( 'registered_taxonomy', $taxonomy, $object_type, (array) $taxonomy_object );