/** * Registers all installed custom post types * * @return void * @author Jared Lang **/ function register_custom_post_types() { #Register custom post types foreach (installed_custom_post_types() as $custom_post_type) { $custom_post_type->register(); } #This ensures that the permalinks for custom posts work flush_rewrite_rules_if_necessary(); }
function register_custom_post_type_fields() { foreach (installed_custom_post_types() as $custom_post_type) { $custom_post_type->register_metaboxes(); } flush_rewrite_rules_if_necessary(); }