Action - Default Post Types
This is used for setting the default post types displayed in the admin panel when admins are setting post type when writing new posts.
Example:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Add 'memes' as a post type displayed (even if there are none) to admins | |
add_filter( 'default-post-types', function( $post_types ) { | |
$post_types[] = 'memes'; | |
return $post_types; | |
}); |