PluginProbe
WP Courses LMS – Online Courses Builder, eLearning Courses, Courses Solution, Education Courses / trunk
WP Courses LMS – Online Courses Builder, eLearning Courses, Courses Solution, Education Courses vtrunk
3.2.30 trunk 3.1.40 3.1.41 3.1.42 3.1.43 3.2.0 3.2.1 3.2.10 3.2.11 3.2.12 3.2.13 3.2.14 3.2.15 3.2.16 3.2.17 3.2.18 3.2.19 3.2.2 3.2.20 3.2.21 3.2.22 3.2.23 3.2.24 3.2.25 All 36 releases
wp-courses / init / taxonomies.php

taxonomies.php in WP Courses LMS – Online Courses Builder, eLearning Courses, Courses Solution, Education Courses trunk, at init/taxonomies.php

54 lines 2.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 // Register Custom Taxonomy "lesson-difficulty"
4 add_action( 'init', 'wpc_lesson_difficulty_args', 0 );
5 // Customize taxonomy
6 function wpc_lesson_difficulty_args() {
7 $labels = array(
8 'name' => _x( 'Difficulty', 'taxonomy general name' ),
9 'singular_name' => _x( 'Difficulty', 'taxonomy name' ),
10 'search_items' => __( 'Search Difficulty' ),
11 'all_items' => __( 'All Difficulty' ),
12 'parent_item' => __( 'Parent Term Category' ),
13 'parent_item_colon' => __( 'Parent Term Category:' ),
14 'edit_item' => __( 'Edit Difficulty' ),
15 'update_item' => __( 'Update Difficulty' ),
16 'add_new_item' => __( 'Add New Difficulty' ),
17 'new_item_name' => __( 'New Difficulty' ),
18 'menu_name' => __( 'Difficulty' ),
19 );
20 $args = array(
21 'labels' => $labels,
22 'hierarchical' => false,
23 'show_admin_column' => true,
24 'query_var' => true
25 );
26 register_taxonomy( 'course-difficulty', 'course', $args );
27 }
28 // Register Custom Taxonomy "category"
29 add_action( 'init', 'wpc_course_category_args', 0 );
30 // Customize taxonomy
31 function wpc_course_category_args() {
32 $labels = array(
33 'name' => _x( 'Category', 'taxonomy general name' ),
34 'singular_name' => _x( 'Category', 'taxonomy name' ),
35 'search_items' => __( 'Search Category' ),
36 'all_items' => __( 'All Categories' ),
37 'parent_item' => __( 'Parent Term Category' ),
38 'parent_item_colon' => __( 'Parent Term Category:' ),
39 'edit_item' => __( 'Edit Category' ),
40 'update_item' => __( 'Update Category' ),
41 'add_new_item' => __( 'Add New Category' ),
42 'new_item_name' => __( 'New Category' ),
43 'menu_name' => __( 'Category' ),
44 );
45 $args = array(
46 'labels' => $labels,
47 'hierarchical' => false,
48 'show_admin_column' => true,
49 'query_var' => true
50 );
51 register_taxonomy( 'course-category', 'course', $args );
52 }
53
54 ?>