default_category_post_types filter-hook . WP 5.5.0
Filters post types (in addition to 'post') that require a default category.
Usage
add_filter( 'default_category_post_types', 'filter_function_name_4316' ); function filter_function_name_4316( $post_types ){ // filter... return $post_types; }
- $post_types(string[])
- An array of post type names.
Default: empty array
Changelog
Since 5.5.0 | Introduced. |
Where the hook is called
default_category_post_types
wp-includes/post.php 4850
$default_category_post_types = apply_filters( 'default_category_post_types', array() );