Advertisement
Guest User

Untitled

a guest
Feb 20th, 2019
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.46 KB | None | 0 0
  1. class Example_Post_Type_Program extends Example_Post_Type {
  2.  
  3. public $name = 'program';
  4.  
  5. public function create_post_type() {
  6. register_post_type(
  7. $this->name,
  8. [
  9. 'labels' => [
  10. 'name' => __( 'Programs', 'example' ),
  11. 'singular_name' => __( 'Program', 'example' ),
  12. 'add_new' => __( 'Add New Program', 'example' ),
  13. 'add_new_item' => __( 'Add New Program', 'example' ),
  14. 'edit_item' => __( 'Edit Program', 'example' ),
  15. 'new_item' => __( 'New Program', 'example' ),
  16. 'view_item' => __( 'View Program', 'example' ),
  17. 'view_items' => __( 'View Programs', 'example' ),
  18. 'search_items' => __( 'Search Programs', 'example' ),
  19. 'not_found' => __( 'No programs found', 'example' ),
  20. 'not_found_in_trash' => __( 'No programs found in Trash', 'example' ),
  21. 'parent_item_colon' => __( 'Parent Program:', 'example' ),
  22. 'all_items' => __( 'All Programs', 'example' ),
  23. 'archives' => __( 'Program Archives', 'example' ),
  24. 'attributes' => __( 'Program Attributes', 'example' ),
  25. 'insert_into_item' => __( 'Insert into program', 'example' ),
  26. 'uploaded_to_this_item' => __( 'Uploaded to this program', 'example' ),
  27. 'filter_items_list' => __( 'Filter programs list', 'example' ),
  28. 'items_list_navigation' => __( 'Programs list navigation', 'example' ),
  29. 'items_list' => __( 'Programs list', 'example' ),
  30. 'menu_name' => __( 'Programs', 'example' ),
  31. ],
  32. 'public' => true,
  33. 'show_in_rest' => true,
  34. 'menu_icon' => 'dashicons-images-alt',
  35. 'supports' => [ 'title', 'thumbnail', 'author', 'editor', 'revisions', 'excerpt' ],
  36. 'taxonomies' => [ 'category', 'post_tag', 'topic', 'language', 'country' ],
  37. 'rewrite' => [
  38. 'slug' => 'programs',
  39. ],
  40. ]
  41. );
  42. }
  43. }
  44. $example_post_type_program = new Example_Post_Type_Program();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement