register_taxonomy_args

Filters the arguments for registering a taxonomy.

Description

apply_filters( 'register_taxonomy_args', (array) $args, (string) $this_name, (array) $array_object_type ); 

Parameters (3)

0. $args (array)
Array of arguments for registering a taxonomy.
1. $this_name (string)
The this name.
2. $array_object_type (array) => (array) $object_type
Array of names of object types for the taxonomy.

Usage

To run the hook, copy the example below.
  1. $args = apply_filters( 'register_taxonomy_args', $args, $this_name, $array_object_type ); 
  2.  
  3. if ( !empty( $args ) ) { 
  4.  
  5. // everything has led up to this point... 
  6.  
  7.  
The following example is for adding a hook callback.
  1. // define the register_taxonomy_args callback 
  2. function filter_register_taxonomy_args( $args, $this_name, $array_object_type ) { 
  3. // make filter magic happen here... 
  4. return $args
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( 'register_taxonomy_args', 'filter_register_taxonomy_args', 10, 3 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( 'register_taxonomy_args', 'filter_register_taxonomy_args', 10, 3 ); 

Defined (1)

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

/wp-includes/class-wp-taxonomy.php  
  1. $args = apply_filters( 'register_taxonomy_args', $args, $this->name, (array) $object_type );