Support Ticket Priorities
if ( ! function_exists( 'hm_register_ctx_ticket_priority' ) ) {
// Register Custom Taxonomy
function hm_register_ctx_ticket_priority() {
$labels = array(
'name' => _x( 'Priority Levels', 'Taxonomy General Name', 'hm-portal' ),
'singular_name' => _x( 'Priority Level', 'Taxonomy Singular Name', 'hm-portal' ),
'menu_name' => __( 'Priority Levels', 'hm-portal' ),
'all_items' => __( 'All Priority Levels', 'hm-portal' ),
'parent_item' => __( 'Parent Priority Level', 'hm-portal' ),
'parent_item_colon' => __( 'Parent Priority Level:', 'hm-portal' ),
'new_item_name' => __( 'New Priority Level Name', 'hm-portal' ),
'add_new_item' => __( 'Add New Priority Level', 'hm-portal' ),
'edit_item' => __( 'Edit Priority Level', 'hm-portal' ),
'update_item' => __( 'Update Priority Level', 'hm-portal' ),
'view_item' => __( 'View Priority Level', 'hm-portal' ),
'separate_items_with_commas' => __( 'Separate Priority Levels with commas', 'hm-portal' ),
'add_or_remove_items' => __( 'Add or remove Priority Level', 'hm-portal' ),
'choose_from_most_used' => __( 'Choose from the most used', 'hm-portal' ),
'popular_items' => __( 'Popular Priority Levels', 'hm-portal' ),
'search_items' => __( 'Search Priority Levels', 'hm-portal' ),
'not_found' => __( 'Not Found', 'hm-portal' ),
'no_terms' => __( 'No Priority Levels', 'hm-portal' ),
'items_list' => __( 'Priority Levels list', 'hm-portal' ),
'items_list_navigation' => __( 'Priority Levels list navigation', 'hm-portal' ),
);
$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( 'ticket_priority', array( 'ticket' ), $args );
}
add_action( 'init', 'hm_register_ctx_ticket_priority', 0 );
}