registered_post_type_{$post_type} WordPress Action Hook

The registered_post_type_{$post_type} hook is used to register a post type. This hook is fired when a post type is registered.

do_action( "registered_post_type_{$post_type}", string $post_type, WP_Post_Type $post_type_object ) #

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_post
  • registered_post_type_page

Top ↑

Parameters

$post_type

(string)Post type.

$post_type_object

(WP_Post_Type)Arguments used to register the post type.


Top ↑

Source

File: wp-includes/post.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
6.0.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.

Show More
Show More