apply_filters( “register_{$post_type}_post_type_args”, array $args, string $post_type )

In this article

Filters the arguments for registering a specific post type.

Description

The dynamic portion of the filter name, $post_type, refers to the post type key.

Possible hook names include:

  • register_post_post_type_args
  • register_page_post_type_args

Parameters

$argsarray
Array of arguments for registering a post type.
See the register_post_type() function for accepted arguments.
More Arguments from register_post_type( … $args )Post type registration arguments.
$post_typestring
Post type key.

Source

$args = apply_filters( "register_{$post_type}_post_type_args", $args, $this->name );

Changelog

VersionDescription
6.4.0Added late_route_registration, autosave_rest_controller_class and revisions_rest_controller_class arguments.
6.0.0Introduced.

User Contributed Notes

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