Action hook 'registered_taxonomy'

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

View Source

registered_taxonomy

Action Hook
Description
Fires after a taxonomy is registered.

Hook Information

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

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
add_action('registered_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:570 - How this hook is used in WordPress core
<?php
 565  	 *
 566  	 * @param string       $taxonomy    Taxonomy slug.
 567  	 * @param array|string $object_type Object type or array of object types.
 568  	 * @param array        $args        Array of taxonomy registration arguments.
 569  	 */
 570  	do_action( 'registered_taxonomy', $taxonomy, $object_type, (array) $taxonomy_object );
 571  
 572  	/**
 573  	 * Fires after a specific taxonomy is registered.
 574  	 *
 575  	 * The dynamic portion of the filter name, `$taxonomy`, refers to the taxonomy key.

PHP Documentation

<?php
/**
	 * Fires after a taxonomy is registered.
	 *
	 * @since 3.3.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.