|
1 | | - register_post_type( '{{slug}}', array( |
2 | | - 'labels' => array( |
3 | | - 'name' => __( '{{label_plural_ucfirst}}', '{{textdomain}}' ), |
4 | | - 'singular_name' => __( '{{label_ucfirst}}', '{{textdomain}}' ), |
5 | | - 'all_items' => __( 'All {{label_plural_ucfirst}}', '{{textdomain}}' ), |
6 | | - 'archives' => __( '{{label_ucfirst}} Archives', '{{textdomain}}' ), |
7 | | - 'attributes' => __( '{{label_ucfirst}} Attributes', '{{textdomain}}' ), |
8 | | - 'insert_into_item' => __( 'Insert into {{label}}', '{{textdomain}}' ), |
9 | | - 'uploaded_to_this_item' => __( 'Uploaded to this {{label}}', '{{textdomain}}' ), |
10 | | - 'featured_image' => _x( 'Featured Image', '{{slug}}', '{{textdomain}}' ), |
11 | | - 'set_featured_image' => _x( 'Set featured image', '{{slug}}', '{{textdomain}}' ), |
12 | | - 'remove_featured_image' => _x( 'Remove featured image', '{{slug}}', '{{textdomain}}' ), |
13 | | - 'use_featured_image' => _x( 'Use as featured image', '{{slug}}', '{{textdomain}}' ), |
14 | | - 'filter_items_list' => __( 'Filter {{label_plural}} list', '{{textdomain}}' ), |
15 | | - 'items_list_navigation' => __( '{{label_plural_ucfirst}} list navigation', '{{textdomain}}' ), |
16 | | - 'items_list' => __( '{{label_plural_ucfirst}} list', '{{textdomain}}' ), |
17 | | - 'new_item' => __( 'New {{label_ucfirst}}', '{{textdomain}}' ), |
18 | | - 'add_new' => __( 'Add New', '{{textdomain}}' ), |
19 | | - 'add_new_item' => __( 'Add New {{label_ucfirst}}', '{{textdomain}}' ), |
20 | | - 'edit_item' => __( 'Edit {{label_ucfirst}}', '{{textdomain}}' ), |
21 | | - 'view_item' => __( 'View {{label_ucfirst}}', '{{textdomain}}' ), |
22 | | - 'view_items' => __( 'View {{label_plural_ucfirst}}', '{{textdomain}}' ), |
23 | | - 'search_items' => __( 'Search {{label_plural}}', '{{textdomain}}' ), |
24 | | - 'not_found' => __( 'No {{label_plural}} found', '{{textdomain}}' ), |
25 | | - 'not_found_in_trash' => __( 'No {{label_plural}} found in trash', '{{textdomain}}' ), |
26 | | - 'parent_item_colon' => __( 'Parent {{label_ucfirst}}:', '{{textdomain}}' ), |
27 | | - 'menu_name' => __( '{{label_plural_ucfirst}}', '{{textdomain}}' ), |
28 | | - ), |
29 | | - 'public' => true, |
30 | | - 'hierarchical' => false, |
31 | | - 'show_ui' => true, |
32 | | - 'show_in_nav_menus' => true, |
33 | | - 'supports' => array( 'title', 'editor' ), |
34 | | - 'has_archive' => true, |
35 | | - 'rewrite' => true, |
36 | | - 'query_var' => true, |
37 | | - 'menu_position' => null, |
38 | | - 'menu_icon' => 'dashicons-{{dashicon}}', |
39 | | - 'show_in_rest' => true, |
40 | | - 'rest_base' => '{{slug}}', |
41 | | - 'rest_controller_class' => 'WP_REST_Posts_Controller', |
42 | | - ) ); |
| 1 | + register_post_type( |
| 2 | + '{{slug}}', |
| 3 | + array( |
| 4 | + 'labels' => array( |
| 5 | + 'name' => __( '{{label_plural_ucfirst}}', '{{textdomain}}' ), |
| 6 | + 'singular_name' => __( '{{label_ucfirst}}', '{{textdomain}}' ), |
| 7 | + 'all_items' => __( 'All {{label_plural_ucfirst}}', '{{textdomain}}' ), |
| 8 | + 'archives' => __( '{{label_ucfirst}} Archives', '{{textdomain}}' ), |
| 9 | + 'attributes' => __( '{{label_ucfirst}} Attributes', '{{textdomain}}' ), |
| 10 | + 'insert_into_item' => __( 'Insert into {{label}}', '{{textdomain}}' ), |
| 11 | + 'uploaded_to_this_item' => __( 'Uploaded to this {{label}}', '{{textdomain}}' ), |
| 12 | + 'featured_image' => _x( 'Featured Image', '{{slug}}', '{{textdomain}}' ), |
| 13 | + 'set_featured_image' => _x( 'Set featured image', '{{slug}}', '{{textdomain}}' ), |
| 14 | + 'remove_featured_image' => _x( 'Remove featured image', '{{slug}}', '{{textdomain}}' ), |
| 15 | + 'use_featured_image' => _x( 'Use as featured image', '{{slug}}', '{{textdomain}}' ), |
| 16 | + 'filter_items_list' => __( 'Filter {{label_plural}} list', '{{textdomain}}' ), |
| 17 | + 'items_list_navigation' => __( '{{label_plural_ucfirst}} list navigation', '{{textdomain}}' ), |
| 18 | + 'items_list' => __( '{{label_plural_ucfirst}} list', '{{textdomain}}' ), |
| 19 | + 'new_item' => __( 'New {{label_ucfirst}}', '{{textdomain}}' ), |
| 20 | + 'add_new' => __( 'Add New', '{{textdomain}}' ), |
| 21 | + 'add_new_item' => __( 'Add New {{label_ucfirst}}', '{{textdomain}}' ), |
| 22 | + 'edit_item' => __( 'Edit {{label_ucfirst}}', '{{textdomain}}' ), |
| 23 | + 'view_item' => __( 'View {{label_ucfirst}}', '{{textdomain}}' ), |
| 24 | + 'view_items' => __( 'View {{label_plural_ucfirst}}', '{{textdomain}}' ), |
| 25 | + 'search_items' => __( 'Search {{label_plural}}', '{{textdomain}}' ), |
| 26 | + 'not_found' => __( 'No {{label_plural}} found', '{{textdomain}}' ), |
| 27 | + 'not_found_in_trash' => __( 'No {{label_plural}} found in trash', '{{textdomain}}' ), |
| 28 | + 'parent_item_colon' => __( 'Parent {{label_ucfirst}}:', '{{textdomain}}' ), |
| 29 | + 'menu_name' => __( '{{label_plural_ucfirst}}', '{{textdomain}}' ), |
| 30 | + ), |
| 31 | + 'public' => true, |
| 32 | + 'hierarchical' => false, |
| 33 | + 'show_ui' => true, |
| 34 | + 'show_in_nav_menus' => true, |
| 35 | + 'supports' => array( 'title', 'editor' ), |
| 36 | + 'has_archive' => true, |
| 37 | + 'rewrite' => true, |
| 38 | + 'query_var' => true, |
| 39 | + 'menu_position' => null, |
| 40 | + 'menu_icon' => 'dashicons-{{dashicon}}', |
| 41 | + 'show_in_rest' => true, |
| 42 | + 'rest_base' => '{{slug}}', |
| 43 | + 'rest_controller_class' => 'WP_REST_Posts_Controller', |
| 44 | + ) |
| 45 | + ); |
0 commit comments