Filter hook 'register_taxonomy_args'

in WP Core File wp-includes/class-wp-taxonomy.php at line 316

View Source

register_taxonomy_args

Filter Hook
Description
Filters the arguments for registering a taxonomy.

Hook Information

File Location wp-includes/class-wp-taxonomy.php View on GitHub
Hook Type Filter
Line Number 316

Hook Parameters

Type Name Description
array $args Array of arguments for registering a taxonomy. See the register_taxonomy() function for accepted arguments.
string $taxonomy Taxonomy key.
string[] $object_type Array of names of object types for the taxonomy.

Usage Examples

Basic Usage
<?php
// Hook into register_taxonomy_args
add_filter('register_taxonomy_args', 'my_custom_filter', 10, 3);

function my_custom_filter($args, $taxonomy, $object_type) {
    // Your custom filtering logic here
    return $args;
}

Source Code Context

wp-includes/class-wp-taxonomy.php:316 - How this hook is used in WordPress core
<?php
 311  		 * @param array    $args        Array of arguments for registering a taxonomy.
 312  		 *                              See the register_taxonomy() function for accepted arguments.
 313  		 * @param string   $taxonomy    Taxonomy key.
 314  		 * @param string[] $object_type Array of names of object types for the taxonomy.
 315  		 */
 316  		$args = apply_filters( 'register_taxonomy_args', $args, $this->name, (array) $object_type );
 317  
 318  		$taxonomy = $this->name;
 319  
 320  		/**
 321  		 * Filters the arguments for registering a specific taxonomy.

PHP Documentation

<?php
/**
		 * Filters the arguments for registering a taxonomy.
		 *
		 * @since 4.4.0
		 *
		 * @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.
		 */
Quick Info
  • Hook Type: Filter
  • Parameters: 3
  • File: wp-includes/class-wp-taxonomy.php
Related Hooks

Related hooks will be displayed here in future updates.