Gallery Years
if ( ! function_exists( 'gallery_years' ) ) {
// Register Custom Taxonomy
function gallery_years() {
$labels = array(
'name' => _x( 'Years', 'Taxonomy General Name', 'bunavestire' ),
'singular_name' => _x( 'Year', 'Taxonomy Singular Name', 'bunavestire' ),
'menu_name' => __( 'Years', 'bunavestire' ),
'all_items' => __( 'All Years', 'bunavestire' ),
'parent_item' => __( 'Parent Year', 'bunavestire' ),
'parent_item_colon' => __( 'Parent Year:', 'bunavestire' ),
'new_item_name' => __( 'New Year Name', 'bunavestire' ),
'add_new_item' => __( 'Add New Year', 'bunavestire' ),
'edit_item' => __( 'Edit Year', 'bunavestire' ),
'update_item' => __( 'Update Year', 'bunavestire' ),
'view_item' => __( 'View Year', 'bunavestire' ),
'separate_items_with_commas' => __( 'Separate Years with commas', 'bunavestire' ),
'add_or_remove_items' => __( 'Add or remove Years', 'bunavestire' ),
'choose_from_most_used' => __( 'Choose from the most used', 'bunavestire' ),
'popular_items' => __( 'Popular Years', 'bunavestire' ),
'search_items' => __( 'Search Years', 'bunavestire' ),
'not_found' => __( 'Not Found', 'bunavestire' ),
'no_terms' => __( 'No Years', 'bunavestire' ),
'items_list' => __( 'Years list', 'bunavestire' ),
'items_list_navigation' => __( 'Years list navigation', 'bunavestire' ),
);
$rewrite = array(
'slug' => 'year',
'with_front' => true,
'hierarchical' => false,
);
$args = array(
'labels' => $labels,
'hierarchical' => true,
'public' => true,
'show_ui' => true,
'show_admin_column' => true,
'show_in_nav_menus' => true,
'show_tagcloud' => true,
'rewrite' => $rewrite,
);
register_taxonomy( 'gallery_years', array( 'photogallery' ), $args );
}
add_action( 'init', 'gallery_years', 0 );
}