default_category_post_types

default_category_post_types

Hook Type: filter

See hook in core

Displaying hooks found in version: wordpress-6.7.1

apply_filters('default_category_post_types') is found 1 times:

  • /wp-includes/post.php line 5638
    		 * @since 5.5.0
    		 *
    		 * @param string[] $post_types An array of post type names. Default empty array.
    		 */
    		$default_category_post_types = apply_filters( 'default_category_post_types', array() );
    
    		// Regular posts always require a default category.
    		$default_category_post_types = array_merge( $default_category_post_types, array( 'post' ) );
    
    		if ( in_array( $post_type, $default_category_post_types, true )
    			&& is_object_in_taxonomy( $post_type, 'category' )