registered_taxonomy_for_object_type
Action HookDescription
Fires after a taxonomy is registered for an object type.Hook Information
| File Location |
wp-includes/taxonomy.php
View on GitHub
|
| Hook Type | Action |
| Line Number | 794 |
Hook Parameters
| Type | Name | Description |
|---|---|---|
string
|
$taxonomy
|
Taxonomy name. |
string
|
$object_type
|
Name of the object type. |
Usage Examples
Basic Usage
<?php
// Hook into registered_taxonomy_for_object_type
add_action('registered_taxonomy_for_object_type', 'my_custom_function', 10, 2);
function my_custom_function($taxonomy, $object_type) {
// Your custom code here
}
Source Code Context
wp-includes/taxonomy.php:794
- How this hook is used in WordPress core
<?php
789 * @since 5.1.0
790 *
791 * @param string $taxonomy Taxonomy name.
792 * @param string $object_type Name of the object type.
793 */
794 do_action( 'registered_taxonomy_for_object_type', $taxonomy, $object_type );
795
796 return true;
797 }
798
799 /**
PHP Documentation
<?php
/**
* Fires after a taxonomy is registered for an object type.
*
* @since 5.1.0
*
* @param string $taxonomy Taxonomy name.
* @param string $object_type Name of the object type.
*/
Quick Info
- Hook Type: Action
- Parameters: 2
- File: wp-includes/taxonomy.php
Related Hooks
Related hooks will be displayed here in future updates.