Action hook 'registered_taxonomy_{$taxonomy}'

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

View Source

registered_taxonomy_{$taxonomy}

Action Hook
Description
Fires after a specific taxonomy is registered. The dynamic portion of the filter name, `$taxonomy`, refers to the taxonomy key. Possible hook names include: - `registered_taxonomy_category` - `registered_taxonomy_post_tag`

Hook Information

File Location wp-includes/taxonomy.php View on GitHub
Hook Type Action
Line Number 588

Hook Parameters

Type Name Description
string $taxonomy Taxonomy slug.
array|string $object_type Object type or array of object types.
array $args Array of taxonomy registration arguments.

Usage Examples

Basic Usage
<?php
// Hook into registered_taxonomy_{$taxonomy}
add_action('registered_taxonomy_{$taxonomy}', 'my_custom_function', 10, 3);

function my_custom_function($taxonomy, $object_type, $args) {
    // Your custom code here
}

Source Code Context

wp-includes/taxonomy.php:588 - How this hook is used in WordPress core
<?php
 583  	 *
 584  	 * @param string       $taxonomy    Taxonomy slug.
 585  	 * @param array|string $object_type Object type or array of object types.
 586  	 * @param array        $args        Array of taxonomy registration arguments.
 587  	 */
 588  	do_action( "registered_taxonomy_{$taxonomy}", $taxonomy, $object_type, (array) $taxonomy_object );
 589  
 590  	return $taxonomy_object;
 591  }
 592  
 593  /**

PHP Documentation

<?php
/**
	 * Fires after a specific taxonomy is registered.
	 *
	 * The dynamic portion of the filter name, `$taxonomy`, refers to the taxonomy key.
	 *
	 * Possible hook names include:
	 *
	 *  - `registered_taxonomy_category`
	 *  - `registered_taxonomy_post_tag`
	 *
	 * @since 6.0.0
	 *
	 * @param string       $taxonomy    Taxonomy slug.
	 * @param array|string $object_type Object type or array of object types.
	 * @param array        $args        Array of taxonomy registration arguments.
	 */
Quick Info
  • Hook Type: Action
  • Parameters: 3
  • File: wp-includes/taxonomy.php
Related Hooks

Related hooks will be displayed here in future updates.