Customizing our post type

Remember that our intent is to create reusable chunks of content, so we don't need all the bells and whistles that are available to us. Let's scale this down to something simple that meets our needs. Here is our simplified register_chunk_post_type() function:

 public static function register_chunk_post_type() { register_post_type( 'chunk', array( 'label' => 'Chunks', 'labels' => array( 'add_new' => 'Add New', 'add_new_item' => 'Add New Chunk', 'edit_item' => 'Edit Chunk', 'new_item' => 'New Chunk', 'view_item' => 'View Chunk', 'search_items' => 'Search Chunks', 'not_found' => 'No chunks Found', 'not_found_in_trash'=> 'Not Found in Trash', ), 'description' => 'Reusable chunks of content', 'public' => false, 'show_ui' => ...

Get WordPress 3 Plugin Development Essentials now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.