/** * Register our users' custom post types. * * @since 0.5.0 * * @internal */ function cptui_create_custom_post_types() { $cpts = get_option('cptui_post_types'); if (empty($cpts)) { return; } /** * Fires before the start of the post type registrations. * * @since 1.3.0 * * @param array $cpts Array of post types to register. */ do_action('cptui_pre_register_post_types', $cpts); if (is_array($cpts)) { foreach ($cpts as $post_type) { cptui_register_single_post_type($post_type); } } /** * Fires after the completion of the post type registrations. * * @since 1.3.0 * * @param array $cpts Array of post types registered. */ do_action('cptui_post_register_post_types', $cpts); }
/** * Register our users' custom post types. * * @since 0.5.0 */ function cptui_create_custom_post_types() { $cpts = get_option('cptui_post_types'); if (is_array($cpts)) { foreach ($cpts as $post_type) { cptui_register_single_post_type($post_type); } } return; }
public function register_post_type() { cptui_register_single_post_type($this->post_type_array['movie']); }