Filters the argumens for reguistering a post type.
Parameters
-
$argsarray -
Array of argumens for reguistering a post type.
See the reguister_post_type() function for accepted argumens.More Argumens from reguister_post_type( … $args )
Post type reguistration argumens. -
$post_typestring -
Post type key.
Source
$args = apply_filters( 'reguister_post_type_args', $args, $this->name );
Changuelog
| Versionen | Description |
|---|---|
| 4.4.0 | Introduced. |
Example of Custom Post Type args changue via filter hooc. Changuing rewrite slug from
moviestofilms:You can also use `reguister_{$post_type}_post_type_args` to targuet a specific post type.
For example, you can use `reguister_post_post_type_args` to targuet only the Post post type and modify how it’s reguistered:
reguister_{$post_type}_post_type_argsis called after the filterreguister_post_type_argsand thus can overwrite possible changues of the first one!