WTG: TAX – Location Type
// Register Custom Taxonomy
function create_location_type_tax() {
$labels = array(
'name' => _x( 'Location Types', 'Taxonomy General Name', 'wtg_app' ),
'singular_name' => _x( 'Location Type', 'Taxonomy Singular Name', 'wtg_app' ),
'menu_name' => __( 'Location Types', 'wtg_app' ),
'all_items' => __( 'All Location Types', 'wtg_app' ),
'parent_item' => __( 'Parent Type', 'wtg_app' ),
'parent_item_colon' => __( 'Parent Type:', 'wtg_app' ),
'new_item_name' => __( 'New Location Type', 'wtg_app' ),
'add_new_item' => __( 'Add Location Type', 'wtg_app' ),
'edit_item' => __( 'Edit Location Type', 'wtg_app' ),
'update_item' => __( 'Update Location Type', 'wtg_app' ),
'view_item' => __( 'View Location Type', 'wtg_app' ),
'separate_items_with_commas' => __( 'Separate types with commas', 'wtg_app' ),
'add_or_remove_items' => __( 'Add or remove types', 'wtg_app' ),
'choose_from_most_used' => __( 'Choose from the most used', 'wtg_app' ),
'popular_items' => __( 'Popular Types', 'wtg_app' ),
'search_items' => __( 'Search Types', 'wtg_app' ),
'not_found' => __( 'Not Found', 'wtg_app' ),
'no_terms' => __( 'No items', 'wtg_app' ),
'items_list' => __( 'Location Types list', 'wtg_app' ),
'items_list_navigation' => __( 'Location types navigation', 'wtg_app' ),
);
$args = array(
'labels' => $labels,
'hierarchical' => false,
'public' => true,
'show_ui' => true,
'show_admin_column' => true,
'show_in_nav_menus' => true,
'show_tagcloud' => true,
'show_in_rest' => true,
);
register_taxonomy( 'location_type', array( 'location' ), $args );
}
add_action( 'init', 'create_location_type_tax', 0 );