tbkcp_register_post.php | |
Registers custom posts given an array of names. Handles all labeling and rewrites by default. | Author: Paul MacLean |
tbkcp_register_post | Registers custom posts given an array of names->args().All default args are preset (see the function register_post_custom_init to view defaults) |
Functions | |
add_custom_posts | adds the actions to register the posts |
add_custom_posts | calls the do_action for register_post_custom_init_hook |
register_post_custom_init | Sets the registered posts labels and args. |
register_post_custom_init | Shows the current custom post slugs |
Author: Paul MacLean
Usage Examples:
//If in a theme you need to access the global $included_modules set in tbkcp_client_plugin.php which stores all of the tbkcp internal class references global included_modules; if (class_exists('tbkcp_register_post')) { $tbkrp = $included_modules['tbkcp_register_post']; $custom_posts = array( 'Legal Resource' => array($args), //You can send override args to the wordpress function register_post_type here if needed 'E-Book' => array(), 'Community Resource' => array() ); //Send an array of titles and any args you wish to overwrite. The slug generation uses santize_title() $tbkrp->add_custom_posts($custom_posts); }
Registers custom posts given an array of names->args().All default args are preset (see the function register_post_custom_init to view defaults)
Functions | |
add_custom_posts | adds the actions to register the posts |
add_custom_posts | calls the do_action for register_post_custom_init_hook |
register_post_custom_init | Sets the registered posts labels and args. |
register_post_custom_init | Shows the current custom post slugs |
adds the actions to register the posts
function add_custom_posts( $custom_posts )
Sets the registered posts labels and args.
function register_post_custom_init( $custom_posts )