array('description' => __('Question marked as open for discussion', 'ap'), 'slug' => 'open'), 'Closed' => array('description' => __('Question marked as closed', 'ap'), 'slug' => 'closed'), 'Solved' => array('description' => __('Question marked as solved', 'ap'), 'slug' => 'solved'), 'Duplicate' => array('description' => __('Question marked as duplicate', 'ap'), 'slug' => 'duplicate'), ); $label_c = array( 'Open' => '#70cc3f', 'Closed' => '#dd4b4b', 'Solved' => '#23a1e0', 'Duplicate' => '#f7b022', ); foreach($labels as $k => $label){ $id = wp_insert_term( $k, // the term 'question_label', // the taxonomy array( 'description'=> $label['description'], 'slug' => $label['slug'] ) ); $t_id = $id['term_id']; $tax_meta = get_option( "question_label_$t_id"); $tax_meta['color'] = $label_c[$k]; //save the option array update_option( "question_label_$t_id", $tax_meta ); } } if(!get_terms( 'rank', 'hide_empty=0')){ $ranks = array( 'Grand Master' => array('slug' => 'grand-master'), 'New Comer' => array('slug' => 'new-comer'), 'Regular' => array('slug' => 'regular'), 'Trainee' => array('slug' => 'trainee'), ); foreach($ranks as $k => $rank){ $id = wp_insert_term( $k, // the term 'rank', // the taxonomy array( 'slug' => $rank['slug'] ) ); } } ?>

  • 'base_page','post_type'=> 'page') ); ?>