do_action( "registered_post_type_{$post_type}", string $post_type, WP_Post_Type $post_type_object )
- Since
- 6.0.0
Fires after a specific post type is registered.
Description
The dynamic portion of the filter name, $post_type, refers to the post type key.
Possible hook names include:
registered_post_type_postregistered_post_type_page
Compatibility
- WordPress
- since 6.0.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:1908register_post_type()
Source code
* * @since 6.0.0 * * @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, $post_type_object ); return $post_type_object;} /** * Unregisters a post type.Changelog
Introduced in 6.0.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
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.