Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- register_post_type('headline', array(
- 'labels' => array(
- 'name' => 'Headlines',
- 'singular_name' => 'Headline',
- 'add_new' => 'Add Headline',
- 'add_new_item' => 'Add Headline',
- 'edit_item' => 'Edit Headline',
- 'new_item' => 'New Headline',
- 'all_items' => 'All Headlines',
- 'view_item' => 'View Headline',
- 'search_items' => 'Search Headlines',
- 'not_found' => 'No matching headlines found',
- 'not_found_in_trash' => 'No matching headlines found in Trash',
- 'parent_item_colon' => '',
- 'menu_name' => 'Headlines'
- ),
- 'description' => 'Headlines from around the world.',
- 'public' => true,
- 'supports' => array('title', 'editor', 'author', 'excerpt', 'thumbnail', 'trackbacks', 'comments', 'revisions'),
- 'taxonomies' => array('category', 'post_tag'),
- 'register_meta_box_cb' => 'DfePostTypesHeadline::add_meta_boxes',
- 'has_archive' => true,
- 'rewrite' => array(
- 'with_front' => false
- ),
- 'can_export' => true
- ));
- /* Giddyup */
- public function DFEPostTypes() {
- add_action( 'init', 'DFEPostTypes::register_content_types' );
- add_action( 'admin_menu', 'DFEPostTypes::admin_pages' );
- add_action( 'admin_enqueue_scripts', 'DFEPostTypes::admin_scripts' );
- add_filter( 'template_include', 'DFEPostTypes::template' );
- // Flush rewrite rules:
- register_activation_hook( __FILE__, 'DFEPostTypes::flush_rewrite' );
- register_deactivation_hook( __FILE__, 'DFEPostTypes::flush_rewrite' );
- }
Add Comment
Please, Sign In to add comment