Complete the code to register a custom post type in WordPress.
register_post_type('book', [1]);
To register a custom post type, you need to pass an array of arguments describing it. The array includes labels and visibility settings.
Complete the code to add support for the editor in a custom post type.
register_post_type('movie', array('supports' => array([1])));
The 'supports' array defines features the post type supports. To enable the main content editor, use 'editor'.
Fix the error in the code to properly register a custom taxonomy.
register_taxonomy('genre', 'book', [1]);
The third argument must be an array of arguments. 'labels' should be an array or string, and 'hierarchical' defines if it behaves like categories.
Fill both blanks to create a custom post type with title and editor support.
register_post_type('album', array('supports' => array([1], [2])));
The 'supports' array lists features the post type supports. 'title' adds the title field, and 'editor' adds the content editor.
Fill all three blanks to register a custom taxonomy with hierarchical support and a label.
register_taxonomy('topic', 'post', array('hierarchical' => [1], 'label' => [2], 'show_ui' => [3]));
Hierarchical should be true to behave like categories. The label is a string naming the taxonomy. 'show_ui' true shows the UI in admin.