do_action( 'registered_post_type', string $post_type, WP_Post_Type $post_type_object )
- Since
- 3.3.0, 4.6.0
Fires after a post type is registered.
Compatibility
- WordPress
- since 4.6.0
- 6.7.7
- 6.8.8
- 6.9.7
- 7.0.4
- 7.1.0
Present in every tracked release (6.7.7 to 7.1.0).
Parameters
$post_typestring- Post type.
$post_type_objectWP_Post_Type- Arguments used to register the post type.
Where this hook fires · 1
wp-includes/post.php:1891register_post_type()
Source code
* @since 3.3.0 * @since 4.6.0 Converted the `$post_type` parameter to accept a WP_Post_Type object. * * @param string $post_type Post type. * @param WP_Post_Type $post_type_object Arguments used to register the post type. */ do_action( 'registered_post_type', $post_type, $post_type_object ); /** * Fires after a specific post type is registered. * * The dynamic portion of the filter name, `$post_type`, refers to the post type key. *Changelog
Introduced in 3.3.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
4.6.0
Converted the
$post_type parameter to accept a WP_Post_Type object.from the docblock3.3.0
Introduced.from the docblock
About this page
- Parsed data
- Generated from the wordpress-develop 7.1.0 tag, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
- Corrections
- Something wrong on this page? Report it and it gets fixed in the next regeneration.