do_action( "registered_taxonomy_{$taxonomy}", string $taxonomy, array|string $object_type, array $args )

Fires after a specific taxonomy is registered.


Description

The dynamic portion of the filter name, $taxonomy, refers to the taxonomy key.

Possible hook names include:

  • registered_taxonomy_category
  • registered_taxonomy_post_tag

Top ↑

Parameters

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

Top ↑

Source

File: wp-includes/taxonomy.php. View all references

do_action( "registered_taxonomy_{$taxonomy}", $taxonomy, $object_type, (array) $taxonomy_object );


Top ↑

Changelog

Changelog
Version Description
6.0.0 Introduced.

Top ↑

User Contributed Notes

  1. Skip to note 1 content

    /**
    * Example of registered_taxonomy_{taxonomy} usage. In this case: customtax taxonomy
    * @param string $taxonomy Taxonomy key. In this case: customtax
    * @param array|string $object_type Name of the object type for the taxonomy object.
    * @param array|string $args Optional args used in taxonomy registration.
    */
    function wporg_registered_taxonomy_customtax( $taxonomy, $object_type, $args ) {
    // Do something after customtax is registered as custom taxonomy
    }
    add_action( ‘registered_taxonomy_customtax’, ‘wporg_registered_taxonomy_customtax’, 10, 3 );

You must log in before being able to contribute a note or feedback.