register_taxonomy_args
Filters the arguments for registering a taxonomy.
Usage
add_filter( 'register_taxonomy_args', 'wp_kama_register_taxonomy_args_filter', 10, 3 ); /** * Function for `register_taxonomy_args` filter-hook. * * @param array $args Array of arguments for registering a taxonomy. See the register_taxonomy() function for accepted arguments. * @param string $taxonomy Taxonomy key. * @param string[] $object_type Array of names of object types for the taxonomy. * * @return array */ function wp_kama_register_taxonomy_args_filter( $args, $taxonomy, $object_type ){ // filter... return $args; }
- $args(array)
- Array of arguments for registering a taxonomy. See the register_taxonomy() function for accepted arguments.
- $taxonomy(string)
- Taxonomy key.
- $object_type(string[])
- Array of names of object types for the taxonomy.
Changelog
Since 4.4.0 | Introduced. |
Where the hook is called
register_taxonomy_args
wp-includes/class-wp-taxonomy.php 316
$args = apply_filters( 'register_taxonomy_args', $args, $this->name, (array) $object_type );