mirror of
https://gh.wpcy.net/https://github.com/wp-cli/scaffold-command.git
synced 2026-05-23 14:04:28 +08:00
29 lines
1.5 KiB
Text
29 lines
1.5 KiB
Text
register_post_type( '{{slug}}', array(
|
|
'labels' => array(
|
|
'name' => __( '{{label_plural_ucfirst}}', '{{textdomain}}' ),
|
|
'singular_name' => __( '{{label_ucfirst}}', '{{textdomain}}' ),
|
|
'all_items' => __( 'All {{label_plural_ucfirst}}', '{{textdomain}}' ),
|
|
'new_item' => __( 'New {{label}}', '{{textdomain}}' ),
|
|
'add_new' => __( 'Add New', '{{textdomain}}' ),
|
|
'add_new_item' => __( 'Add New {{label}}', '{{textdomain}}' ),
|
|
'edit_item' => __( 'Edit {{label}}', '{{textdomain}}' ),
|
|
'view_item' => __( 'View {{label}}', '{{textdomain}}' ),
|
|
'search_items' => __( 'Search {{label_plural}}', '{{textdomain}}' ),
|
|
'not_found' => __( 'No {{label_plural}} found', '{{textdomain}}' ),
|
|
'not_found_in_trash' => __( 'No {{label_plural}} found in trash', '{{textdomain}}' ),
|
|
'parent_item_colon' => __( 'Parent {{label}}', '{{textdomain}}' ),
|
|
'menu_name' => __( '{{label_plural_ucfirst}}', '{{textdomain}}' ),
|
|
),
|
|
'public' => true,
|
|
'hierarchical' => false,
|
|
'show_ui' => true,
|
|
'show_in_nav_menus' => true,
|
|
'supports' => array( 'title', 'editor' ),
|
|
'has_archive' => true,
|
|
'rewrite' => true,
|
|
'query_var' => true,
|
|
'menu_icon' => 'dashicons-{{dashicon}}',
|
|
'show_in_rest' => true,
|
|
'rest_base' => '{{slug}}',
|
|
'rest_controller_class' => 'WP_REST_Posts_Controller',
|
|
) );
|