CSF Place Type
if ( ! function_exists( 'csf_place_type' ) ) {
// Register Custom Taxonomy
function csf_place_type() {
$labels = array(
'name' => _x( 'Place Types', 'Taxonomy General Name', 'csf-core' ),
'singular_name' => _x( 'Place Type', 'Taxonomy Singular Name', 'csf-core' ),
'menu_name' => __( 'Place Type', 'csf-core' ),
'all_items' => __( 'All Types', 'csf-core' ),
'parent_item' => __( 'Parent Type', 'csf-core' ),
'parent_item_colon' => __( 'Parent Type:', 'csf-core' ),
'new_item_name' => __( 'New Type Name', 'csf-core' ),
'add_new_item' => __( 'Add New Type', 'csf-core' ),
'edit_item' => __( 'Edit Type', 'csf-core' ),
'update_item' => __( 'Update Type', 'csf-core' ),
'view_item' => __( 'View Type', 'csf-core' ),
'separate_items_with_commas' => __( 'Separate types with commas', 'csf-core' ),
'add_or_remove_items' => __( 'Add or remove types', 'csf-core' ),
'choose_from_most_used' => __( 'Choose from the most used', 'csf-core' ),
'popular_items' => __( 'Popular Types', 'csf-core' ),
'search_items' => __( 'Search Types', 'csf-core' ),
'not_found' => __( 'Not Found', 'csf-core' ),
'no_terms' => __( 'No types', 'csf-core' ),
'items_list' => __( 'Types list', 'csf-core' ),
'items_list_navigation' => __( 'Types list navigation', 'csf-core' ),
);
$capabilities = array(
'manage_terms' => 'manage_csf_place_types',
'edit_terms' => 'manage_csf_place_types',
'delete_terms' => 'manage_csf_place_types',
'assign_terms' => 'edit_csf_places',
);
$args = array(
'labels' => $labels,
'hierarchical' => false,
'public' => true,
'show_ui' => true,
'show_admin_column' => true,
'show_in_nav_menus' => true,
'show_tagcloud' => false,
'capabilities' => $capabilities,
);
register_taxonomy( 'place-type', array( 'place' ), $args );
}
add_action( 'init', 'csf_place_type', 0 );
}