apply_filters( 'register_post_type_args', array $args , string $post_type )
Filters the arguments for registering a post type.
Parameters
-
$args
array -
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_type
string -
Post type key.
Source
File: wp-includes/class-wp-post-type.php
.
View all references
$args = apply_filters( 'register_post_type_args', $args, $this->name );
Changelog
Version | Description |
---|---|
4.4.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.
Example of Custom Post Type args change via filter hook. Changing rewrite slug from
movies
tofilms
: