<?php
/**
 * Register Custom Post Types and Taxonomies
 *
 * @package loop
 */

/**
 * Custom Post Types
 */
function far_custom_posts() {
	$labels = array(
		'name' => __( 'Artist videos', 'far_loop' ),
		'singular_name' => __( 'Artist video', 'far_loop' ),
		'menu_name' => __( 'Artist videos', 'far_loop' ),
		'add_new' => __( 'New artist video', 'far_loop' ),
		'add_new_item' => __( 'New artist video', 'far_loop' ),
		'edit_item' => __( 'Edit artist video', 'far_loop' ),
	);
	$args = array(
		'labels' => $labels,
		'public' => true,
		'menu_position' => 31,
		'menu_icon' => 'dashicons-format-video',
		'has_archive'  => false,
		'supports' => array( 'title' ),
		'taxonomies' => array( 'post_tag' ),
	);
	register_post_type( 'artist-video', $args );

	$labels = array(
		'name' => __( 'Professionals', 'far_loop' ),
		'singular_name' => __( 'Professional', 'far_loop' ),
		'menu_name' => __( 'Professionals', 'far_loop' ),
		'add_new' => __( 'New profile', 'far_loop' ),
		'add_new_item' => __( 'New profile', 'far_loop' ),
		'edit_item' => __( 'Edit profile', 'far_loop' ),
	);
	$args = array(
		'labels' => $labels,
		'public' => true,
		'menu_position' => 32,
		'menu_icon' => 'dashicons-groups',
		'has_archive'  => false,
		'supports' => array( '' ),
	);
	register_post_type( 'profile', $args );

	$labels = array(
		'name' => __( 'Venues', 'far_loop' ),
		'singular_name' => __( 'Venue', 'far_loop' ),
		'menu_name' => __( 'Venues', 'far_loop' ),
		'add_new' => __( 'New venue', 'far_loop' ),
		'add_new_item' => __( 'New venue', 'far_loop' ),
		'edit_item' => __( 'Edit venue', 'far_loop' ),
	);
	$args = array(
		'labels' => $labels,
		'public' => true,
		'menu_position' => 33,
		'menu_icon' => 'dashicons-location',
		'has_archive'  => false,
		'supports' => array( 'title' ),
	);
	register_post_type( 'venue', $args );

	$labels = array(
		'name' => __( 'Galleries', 'far_loop' ),
		'singular_name' => __( 'Gallery', 'far_loop' ),
		'menu_name' => __( 'Galleries', 'far_loop' ),
		'add_new' => __( 'New gallery', 'far_loop' ),
		'add_new_item' => __( 'New gallery', 'far_loop' ),
		'edit_item' => __( 'Edit gallery', 'far_loop' ),
	);
	$args = array(
		'labels' => $labels,
		'public' => true,
		'menu_position' => 35,
		'menu_icon' => 'dashicons-images-alt2',
		'has_archive'  => false,
		'supports' => array( 'title' ),
	);
	register_post_type( 'gallery', $args );

	$labels = array(
		'name' => __( 'Activities', 'far_loop' ),
		'singular_name' => __( 'Activity', 'far_loop' ),
		'menu_name' => __( 'Activities', 'far_loop' ),
		'add_new' => __( 'New activity', 'far_loop' ),
		'add_new_item' => __( 'New activity', 'far_loop' ),
		'edit_item' => __( 'Edit activity', 'far_loop' ),
	);
	$args = array(
		'labels' => $labels,
		'public' => true,
		'menu_position' => 36,
		'menu_icon' => 'dashicons-calendar',
		'has_archive'  => false,
		'supports' => array( 'title' ),
	);
	register_post_type( 'activity', $args );

	$labels = array(
		'name' => __( 'Video conferences', 'far_loop' ),
		'singular_name' => __( 'Video conference', 'far_loop' ),
		'menu_name' => __( 'Video conferences', 'far_loop' ),
		'add_new' => __( 'New video conference', 'far_loop' ),
		'add_new_item' => __( 'New video conference', 'far_loop' ),
		'edit_item' => __( 'Edit video conference', 'far_loop' ),
	);
	$args = array(
		'labels' => $labels,
		'public' => true,
		'menu_position' => 37,
		'menu_icon' => 'dashicons-video-alt',
		'has_archive'  => false,
		'supports' => array( 'title' ),
	);
	register_post_type( 'video-conference', $args );
	

	$labels = array(
		'name' => __( 'Video programmes', 'far_loop' ),
		'singular_name' => __( 'Video programme', 'far_loop' ),
		'menu_name' => __( 'Video programmes', 'far_loop' ),
		'add_new' => __( 'New video programme', 'far_loop' ),
		'add_new_item' => __( 'New video programme', 'far_loop' ),
		'edit_item' => __( 'Edit video programmes', 'far_loop' ),
	);
	$args = array(
		'labels' => $labels,
		'public' => true,
		'menu_position' => 38,
		'menu_icon' => 'dashicons-media-video',
		'has_archive'  => true,
		'supports' => array( 'title' ),
	);
	register_post_type( 'video-programme', $args );

	$labels = array(
		'name' => __( 'Publications', 'far_loop' ),
		'singular_name' => __( 'Publication', 'far_loop' ),
		'menu_name' => __( 'Publications', 'far_loop' ),
		'add_new' => __( 'New publication', 'far_loop' ),
		'add_new_item' => __( 'New publication', 'far_loop' ),
		'edit_item' => __( 'Edit publication', 'far_loop' ),
	);
	$args = array(
		'labels' => $labels,
		'public' => true,
		'menu_position' => 39,
		'menu_icon' => 'dashicons-book',
		'has_archive'  => false,
		'supports' => array( 'title' ),
	);
	register_post_type( 'publication', $args );

	$labels = array(
		'name' => __( 'Locations', 'far_loop' ),
		'singular_name' => __( 'Location', 'far_loop' ),
		'menu_name' => __( 'Locations', 'far_loop' ),
	);
	$args = array(
		'labels' => $labels,
		'public' => true,
		'menu_position' => 40,
		'menu_icon' => 'dashicons-location-alt',
		'has_archive'  => false,
		'supports' => array( 'title', 'thumbnail' ),
	);
	register_post_type( 'location', $args );

	$labels = array(
		'name' => _x( 'Profile types', 'taxonomy general name', 'far_loop' ),
		'singular_name' => _x( 'Profile type', 'taxonomy singular name', 'far_loop' ),
		'search_items' => __( 'Search profile types', 'far_loop' ),
		'all_items' => __( 'All profile types', 'far_loop' ),
		'parent_item' => __( 'Parent profile type', 'far_loop' ),
		'parent_item_colon' => __( 'Parent profile type:', 'far_loop' ),
		'edit_item' => __( 'Edit profile type', 'far_loop' ),
		'update_item' => __( 'Update profile type', 'far_loop' ),
		'add_new_item' => __( 'Add new profile type', 'far_loop' ),
		'new_item_name' => __( 'New profile type', 'far_loop' ),
		'menu_name' => __( 'Profile types', 'far_loop' ),
	);
	$args = array(
		'hierarchical'          => true,
		'labels'                => $labels,
		'show_ui'               => true,
		'show_admin_column'     => true,
		'query_var'             => true,
	);
	register_taxonomy( 'profile-type', 'profile', $args );

	$labels = array(
		'name' => _x( 'Activity types', 'taxonomy general name', 'far_loop' ),
		'singular_name' => _x( 'Activity type', 'taxonomy singular name', 'far_loop' ),
		'menu_name' => __( 'Activity types', 'far_loop' ),
	);
	$args = array(
		'hierarchical'          => true,
		'labels'                => $labels,
		'show_ui'               => true,
		'show_admin_column'     => true,
		'query_var'             => true,
	);
	register_taxonomy( 'activity-type', 'activity', $args );

	$labels = array(
		'name' => _x( 'Editions', 'taxonomy general name', 'far_loop' ),
		'singular_name' => _x( 'Edition', 'taxonomy singular name', 'far_loop' ),
		'menu_name' => __( 'Editions', 'far_loop' ),
	);
	$args = array(
		'hierarchical'          => true,
		'labels'                => $labels,
		'show_ui'               => true,
		'show_admin_column'     => true,
		'query_var'             => true,
	);
	register_taxonomy( 'edition', array( 'artist-video', 'profile', 'venue', 'gallery', 'activity', 'publication', 'video-conference' ), $args );

	$labels = array(
		'name' => _x( 'Awards', 'taxonomy general name', 'far_loop' ),
		'singular_name' => _x( 'Award', 'taxonomy singular name', 'far_loop' ),
		'menu_name' => __( 'Awards', 'far_loop' ),
	);
	$args = array(
		'hierarchical'          => true,
		'labels'                => $labels,
		'show_ui'               => true,
		'show_admin_column'     => true,
		'query_var'             => true,
	);
	register_taxonomy( 'award', 'artist-video', $args );

}

add_action( 'init', 'far_custom_posts' );
