O'Reilly logo

WordPress 3 Plugin Development Essentials by Everett Griffiths, Brian Bondari

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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' => ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required