This class can be used to quickly register Custom Post Types, Taxonomies, Meta Boxes and Menu Pages within your Wordpress projects.
Version: 0.4
Requires: 3.0+
Tested up to: 3.3.1
Include the class.
include( 'cuztom_helper.php' );
$book = new Custom_Post_Type( 'Book' );
To add Custom Taxonomies, simply call this method.
$book->add_taxonomy( 'Author' );
You can also call this as a seperate class like this. The second parameter is the Post Type name.
$taxonomy = new Cuztom_Taxonomy( 'Author', 'book' ) )
Add Meta Boxes.
$book->add_meta_box(
'Book Info',
array(
array(
'name' => 'author',
'label' => 'Author',
'description' => 'Just a little description',
'type' => 'text'
)
)
);
Meta Boxes can be added with their own class too. The second parameter is the Post Type name.
$box = new Cuztom_Meta_Box(
'Book Info',
'book',
array(
'name' => 'author',
'label' => 'Author',
'description' => 'Just a little description',
'type' => 'text'
)
)
Full roadmap can be found here.
- Widgets
- Theme Options
- More input types like slider and gallery for Meta Boxes.
- Better documentation / Wiki
You can see the full changelog here.
- Added: Cuztom_Menu_Page class to easily register menu pages and submenus
- Added: Cuztom_Submenu_Page class to easily register submenus
- Added: CUZTOM_ to the defined jQuery UI style constant
- Added: Cuztom_Field class based on Cuztom_Meta_Box::output_field for future use