Guest User

Untitled

a guest
Feb 17th, 2019
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.66 KB | None | 0 0
  1. register_post_type('headline', array(
  2. 'labels' => array(
  3. 'name' => 'Headlines',
  4. 'singular_name' => 'Headline',
  5. 'add_new' => 'Add Headline',
  6. 'add_new_item' => 'Add Headline',
  7. 'edit_item' => 'Edit Headline',
  8. 'new_item' => 'New Headline',
  9. 'all_items' => 'All Headlines',
  10. 'view_item' => 'View Headline',
  11. 'search_items' => 'Search Headlines',
  12. 'not_found' => 'No matching headlines found',
  13. 'not_found_in_trash' => 'No matching headlines found in Trash',
  14. 'parent_item_colon' => '',
  15. 'menu_name' => 'Headlines'
  16. ),
  17. 'description' => 'Headlines from around the world.',
  18. 'public' => true,
  19. 'supports' => array('title', 'editor', 'author', 'excerpt', 'thumbnail', 'trackbacks', 'comments', 'revisions'),
  20. 'taxonomies' => array('category', 'post_tag'),
  21. 'register_meta_box_cb' => 'DfePostTypesHeadline::add_meta_boxes',
  22. 'has_archive' => true,
  23. 'rewrite' => array(
  24. 'with_front' => false
  25. ),
  26. 'can_export' => true
  27. ));
  28.  
  29. /* Giddyup */
  30. public function DFEPostTypes() {
  31. add_action( 'init', 'DFEPostTypes::register_content_types' );
  32. add_action( 'admin_menu', 'DFEPostTypes::admin_pages' );
  33. add_action( 'admin_enqueue_scripts', 'DFEPostTypes::admin_scripts' );
  34. add_filter( 'template_include', 'DFEPostTypes::template' );
  35. // Flush rewrite rules:
  36. register_activation_hook( __FILE__, 'DFEPostTypes::flush_rewrite' );
  37. register_deactivation_hook( __FILE__, 'DFEPostTypes::flush_rewrite' );
  38. }
Add Comment
Please, Sign In to add comment