Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Example_Post_Type_Program extends Example_Post_Type {
- public $name = 'program';
- public function create_post_type() {
- register_post_type(
- $this->name,
- [
- 'labels' => [
- 'name' => __( 'Programs', 'example' ),
- 'singular_name' => __( 'Program', 'example' ),
- 'add_new' => __( 'Add New Program', 'example' ),
- 'add_new_item' => __( 'Add New Program', 'example' ),
- 'edit_item' => __( 'Edit Program', 'example' ),
- 'new_item' => __( 'New Program', 'example' ),
- 'view_item' => __( 'View Program', 'example' ),
- 'view_items' => __( 'View Programs', 'example' ),
- 'search_items' => __( 'Search Programs', 'example' ),
- 'not_found' => __( 'No programs found', 'example' ),
- 'not_found_in_trash' => __( 'No programs found in Trash', 'example' ),
- 'parent_item_colon' => __( 'Parent Program:', 'example' ),
- 'all_items' => __( 'All Programs', 'example' ),
- 'archives' => __( 'Program Archives', 'example' ),
- 'attributes' => __( 'Program Attributes', 'example' ),
- 'insert_into_item' => __( 'Insert into program', 'example' ),
- 'uploaded_to_this_item' => __( 'Uploaded to this program', 'example' ),
- 'filter_items_list' => __( 'Filter programs list', 'example' ),
- 'items_list_navigation' => __( 'Programs list navigation', 'example' ),
- 'items_list' => __( 'Programs list', 'example' ),
- 'menu_name' => __( 'Programs', 'example' ),
- ],
- 'public' => true,
- 'show_in_rest' => true,
- 'menu_icon' => 'dashicons-images-alt',
- 'supports' => [ 'title', 'thumbnail', 'author', 'editor', 'revisions', 'excerpt' ],
- 'taxonomies' => [ 'category', 'post_tag', 'topic', 'language', 'country' ],
- 'rewrite' => [
- 'slug' => 'programs',
- ],
- ]
- );
- }
- }
- $example_post_type_program = new Example_Post_Type_Program();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement