destos / wp-post_type-class

Class for quickly setting up custom post types within wordpress - hopefully more to come!
11 stars 3 forks source link

This class allows you to easily add new post types and taxonomies to WordPress in a oop manner. plus it does some of the heavy lifting in regards to automagically creating labels and messages, along with pluralization.

Example usage.

NewPostType::instance()->add(array( 'post_type' => 'featured', 'args' => array( 'rewrite' => array( 'slug' => 'featured' ), 'supports' => array( 'title', 'editor', 'excerpt' ), 'menu_icon' => get_bloginfo('template_directory').'/functions/classes/posttype/icons/star.png' ), 'thumbs' => array( 'front-large' => array( 700, 260, true ) ) ))->add_taxonomy( 'laland', array( 'taxonomy_single' => 'Lalalalander' ));