NUOS – Vendor Levels
if ( ! function_exists( 'level_partner_register_taxonomy' ) ) {
// Register Custom Taxonomy
function level_partner_register_taxonomy() {
$labels = array(
'name' => _x( 'Partner Levels', 'Taxonomy General Name', 'kdc-tech' ),
'singular_name' => _x( 'Partner Level', 'Taxonomy Singular Name', 'kdc-tech' ),
'menu_name' => __( 'Level', 'kdc-tech' ),
'all_items' => __( 'All Levels', 'kdc-tech' ),
'parent_item' => __( 'Parent Level', 'kdc-tech' ),
'parent_item_colon' => __( 'Parent Level:', 'kdc-tech' ),
'new_item_name' => __( 'New Level Name', 'kdc-tech' ),
'add_new_item' => __( 'Add New Level', 'kdc-tech' ),
'edit_item' => __( 'Edit Level', 'kdc-tech' ),
'update_item' => __( 'Update Level', 'kdc-tech' ),
'view_item' => __( 'View Level', 'kdc-tech' ),
'separate_items_with_commas' => __( 'Separate levels with commas', 'kdc-tech' ),
'add_or_remove_items' => __( 'Add or remove levels', 'kdc-tech' ),
'choose_from_most_used' => __( 'Choose from the most used', 'kdc-tech' ),
'popular_items' => __( 'Popular Levels', 'kdc-tech' ),
'search_items' => __( 'Search Levels', 'kdc-tech' ),
'not_found' => __( 'Not Found', 'kdc-tech' ),
'no_terms' => __( 'No levels', 'kdc-tech' ),
'items_list' => __( 'Levels list', 'kdc-tech' ),
'items_list_navigation' => __( 'Levels list navigation', 'kdc-tech' ),
);
$args = array(
'labels' => $labels,
'hierarchical' => true,
'public' => true,
'show_ui' => true,
'show_admin_column' => true,
'show_in_nav_menus' => true,
'show_tagcloud' => true,
'show_in_rest' => true,
);
register_taxonomy( 'level', array( 'partner' ), $args );
}
add_action( 'init', 'level_partner_register_taxonomy', 0 );
}