Complete the code to register a custom post type in WordPress.
register_post_type('product', array('label' => 'Products', 'public' => [1]));
Setting 'public' to true makes the custom post type visible on the site.
Complete the code to add support for the editor in a custom post type.
register_post_type('event', array('supports' => array([1])));
The 'editor' support enables the content editor for the custom post type.
Fix the error in the code to properly register a custom post type with REST API support.
register_post_type('portfolio', array('show_in_rest' => [1]));
The 'show_in_rest' argument requires a boolean true to enable REST API support.
Fill both blanks to create a custom post type that is hierarchical and has an archive page.
register_post_type('book', array('hierarchical' => [1], 'has_archive' => [2]));
Setting 'hierarchical' to true allows parent-child pages. 'has_archive' true enables archive page.
Fill all three blanks to register a custom post type with a custom menu icon, label, and public visibility.
register_post_type('movie', array('menu_icon' => [1], 'label' => [2], 'public' => [3]));
The 'menu_icon' sets the icon, 'label' names the post type, and 'public' true makes it visible.