?> } function array_loop () { /* We use a foreach loop to register each of our custom post types. */ foreach ($this->post_types as $post_type) { /* We use another class function */ $this->register($post_type); } } /* Class function to register the custom post type */ function register ($post_type) { /* Labels for the Custom Post Type */ global $fw_translations; $labels = array( 'name' => $post_type['plural_name'], 'singular_name' => $post_type['singular_name'], 'add_new' => $fw_translations['add_new'] . " " . $post_type['singular_name'] , 'add_new_item' => $fw_translations['add_new'] . " " . $post_type['singular_name'], 'edit_item' => $fw_translations['edit'] . " " . $post_type['singular_name'], 'new_item' => $fw_translations['new'] . " " . $post_type['singular_name'], 'view_item' => $fw_translations['view'] . " " . $post_type['singular_name'], 'search_items' => $fw_translations['search'] . " " . $post_type['lowercase_plural_name'], 'not_found' => $fw_translations['no_items_found'], 'not_found_in_trash' => $fw_translations['no_items_found_in_trash'], 'parent_item_colon' => '', 'menu_name' => $post_type['plural_name'] ); /* The settings for the Custom Post Type */ $args = array( 'labels' => $labels, 'public' => $post_type['public'], 'publicly_queryable' => $post_type['publicly_queryable'], 'show_ui' => $post_type['show_ui'], 'show_in_menu' => $post_type['show_in_menu'], 'query_var' => $post_type['query_var'], 'rewrite' => $post_type['rewrite'], 'capability_type' => $post_type['capability_type'], 'has_archive' => $post_type['has_archive'], 'hierarchical' => $post_type['hierarchical'], 'menu_position' => $post_type['menu_position'], 'supports' => $post_type['supports'], 'menu_icon' => $post_type['icon'] ); /* Register the Custom Post Type */ register_post_type($post_type['post_type_name'],$args); /* Prevent 404 Error On Archive Pages */ flush_rewrite_rules(); } } /* Instantiate the tuts_post_type class */ $fw_post_types = new fw_post_type($fw_post_types_array); ?> } function array_loop () { /* We use a foreach loop to register each of our taxonomies. */ foreach ($this->taxonomies as $taxonomy) { /* We use another class function */ $this->register($taxonomy); } } /* Class function to register the taxonomy */ function register ($taxonomy) { global $fw_translations; $labels = array( 'name' => $taxonomy['plural_name'], 'singular_name' => $taxonomy['singular_name'], 'search_items' => $fw_translations["search"] . " " . $taxonomy['plural_name'], 'all_items' => $fw_translations["all"] . " " . $taxonomy['plural_name'], 'parent_item' => $fw_translations["parent"] . " " . $taxonomy['singular_name'], 'parent_item_colon' => $fw_translations["all"] . " " . $taxonomy['singular_name'], 'edit_item' => $fw_translations["edit"] . " " . $taxonomy['singular_name'], 'update_item' => $fw_translations["update"] . " " . $taxonomy['singular_name'], 'add_new_item' => $fw_translations["add_new"] . " " . $taxonomy['singular_name'], 'new_item_name' => $fw_translations["new"] . " " . $taxonomy['singular_name'] . $fw_translations["name"], 'menu_name' => $taxonomy['plural_name'], ); register_taxonomy($taxonomy['taxonomy_name'],array($taxonomy['post_type']), array( 'hierarchical' => $taxonomy['hierarchical'], 'labels' => $labels, 'show_ui' => $taxonomy['show_ui'], 'query_var' => $taxonomy['query_var'], 'rewrite' => $taxonomy['rewrite'] )); /* Prevent 404 Error On Archive Pages */ flush_rewrite_rules(); } } /* Instantiate the tuts_taxonomy class */ $fw_taxonomies = new fw_taxonomy($fw_taxonomies_array); ?> } else { die(__('Error: Mail failed', "studio")); } } ?>