apply_filters( 'register_taxonomy_args', array $args, string $taxonomy, string[] $object_type )

Filters the arguments for registering a taxonomy.



(array) Array of arguments for registering a taxonomy. See the register_taxonomy() function for accepted arguments.


(string) Taxonomy key.


(string[]) Array of names of object types for the taxonomy.

Top ↑


File: wp-includes/class-wp-taxonomy.php

View on Trac

Top ↑


Version Description
4.4.0 Introduced.

Top ↑

User Contributed Notes

  1. Skip to note 1 content

    Usage example:

    add_filter( 'register_taxonomy_args', 'wpdocs_my_taxonomy_args', 10, 2 );
    function wpdocs_my_taxonomy_args( $args, $taxonomy ) {
        // Target "my-taxonomy"
        if ( 'my-taxonomy' !== $taxonomy ) {
            return $args;
        // Set Hierarchical
        $args['hierarchical'] = true;
        // Return
        return $args;

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