Make WordPress Core


Ignore:
Timestamp:
04/11/2022 05:09:53 AM (3 years ago)
Author:
peterwilsoncc
Message:

Posts, Post Types/Taxonomies: Add object type specific registration filters.

Add post type and taxonomy specific registration argument hooks.

Introduces the filters register_{$post_type}_post_type_args and register_{$taxonomy}_taxonomy_args. Introduces the actions registered_post_type_{$post_type} and registered_taxonomy_{$taxonomy}.

Props pbiron, dlh, davidbaumwald, hellofromTonya, milana_cap.
Fixes #53212.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/taxonomy.php

    r53058 r53126  
    529529     */
    530530    do_action( 'registered_taxonomy', $taxonomy, $object_type, (array) $taxonomy_object );
     531
     532    /**
     533     * Fires after a specific taxonomy is registered.
     534     *
     535     * The dynamic portion of the filter name, `$taxonomy`, refers to the taxonomy key.
     536     *
     537     * @since 6.0.0
     538     *
     539     * @param string       $taxonomy    Taxonomy slug.
     540     * @param array|string $object_type Object type or array of object types.
     541     * @param array        $args        Array of taxonomy registration arguments.
     542     */
     543    do_action( "registered_taxonomy_{$taxonomy}", $taxonomy, $object_type, (array) $taxonomy_object );
    531544
    532545    return $taxonomy_object;
Note: See TracChangeset for help on using the changeset viewer.