<?php
/**
 * @copyright Copyright (c) 2016 AmyTheme (http://www.amytheme.com). All rights reserved.
 * @license  http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
 */

if ( ! defined( 'ABSPATH' ) ) {
	die;
}

$options      = array();

// -----------------------------------------------------------------------------------------------
// ACTOR OPTIONS
// -----------------------------------------------------------------------------------------------
$options[]    = array(
	'id'        => '_custom_amy_actor',
	'taxonomy'	=> 'amy_actor',
	'fields'    => array(
		array(
			'id'    => 'avatar',
			'type'  => 'image',
			'title' => esc_html__( 'Avatar', 'amy-movie' ),
		),

		array(
			'id'    => 'banner',
			'type'  => 'image',
			'title' => esc_html__( 'Banner', 'amy-movie' ),
			'desc'	=> esc_html__( 'Actor Banner', 'amy-movie' ),
		),

		array(
			'id'	=> 'summary',
			'type'	=> 'group',
			'title'	=> esc_html__( 'Summary', 'amy-movie' ),
			'button_title'    => esc_html__( 'Add New', 'amy-movie' ),
				'accordion_title' => esc_html__( 'Add New Summary', 'amy-movie' ),
			'fields'          => array(
				array(
					'id'	=> 'content',
					'type'	=> 'text',
					'title'	=> esc_html__( 'Content', 'amy-movie' ),
				),
			),
		),

		array(
			'id'	=> 'birth_date',
			'type'	=> 'text',
			'class'	=> 'amy-date',
			'title'	=> esc_html__( 'Birth Day', 'amy-movie' ),
		),

		array(
			'id'	=> 'birth_place',
			'type'	=> 'text',
			'title'	=> esc_html__( 'Birth Place', 'amy-movie' ),
		),

		array(
			'id'	=> 'gender',
			'type'	=> 'select',
			'title'	=> esc_html__( 'Gender', 'amy-movie' ),
			'options'	=> array(
				'Male'		=> esc_html__( 'Male', 'amy-movie' ),
				'Female'	=> esc_html__( 'Female', 'amy-movie' ),
				'Third Gender'		=> esc_html__( 'Third gender', 'amy-movie' ),
			),
		),

		array(
			'id'	=> 'national',
			'type'	=> 'text',
			'title'	=> esc_html__( 'Nationality', 'amy-movie' ),
		),
	),
);

// -----------------------------------------------------------------------------------------------
// DIRECTOR OPTIONS
// -----------------------------------------------------------------------------------------------
$options[]    = array(
	'id'        => '_custom_amy_director',
	'taxonomy'	=> 'amy_director',
	'fields'    => array(
		array(
			'id'    => 'avatar',
			'type'  => 'image',
			'title' => esc_html__( 'Avatar', 'amy-movie' ),
		),

		array(
			'id'    => 'banner',
			'type'  => 'image',
			'title' => esc_html__( 'Banner', 'amy-movie' ),
			'desc'	=> esc_html__( 'Director Banner', 'amy-movie' ),
		),

		array(
			'id'	=> 'summary',
			'type'	=> 'group',
			'title'	=> esc_html__( 'Summary', 'amy-movie' ),
			'button_title'    => esc_html__( 'Add New', 'amy-movie' ),
				'accordion_title' => esc_html__( 'Add New Summary', 'amy-movie' ),
			'fields'          => array(
				array(
					'id'	=> 'content',
					'type'	=> 'text',
					'title'	=> esc_html__( 'Content', 'amy-movie' ),
				),
			),
		),

		array(
			'id'	=> 'birth_date',
			'type'	=> 'text',
			'class'	=> 'amy-date',
			'title'	=> esc_html__( 'Birth Day', 'amy-movie' ),
		),

		array(
			'id'	=> 'birth_place',
			'type'	=> 'text',
			'title'	=> esc_html__( 'Birth Place', 'amy-movie' ),
		),

		array(
			'id'	=> 'gender',
			'type'	=> 'select',
			'title'	=> esc_html__( 'Gender', 'amy-movie' ),
			'options'	=> array(
				'Male'		=> esc_html__( 'Male', 'amy-movie' ),
				'Female'	=> esc_html__( 'Female', 'amy-movie' ),
				'Third Gender'		=> esc_html__( 'Third gender', 'amy-movie' ),
			),
		),

		array(
			'id'	=> 'national',
			'type'	=> 'text',
			'title'	=> esc_html__( 'Nationality', 'amy-movie' ),
		),
	),
);

// -----------------------------------------------------------------------------------------------
// GENRE OPTIONS
// -----------------------------------------------------------------------------------------------
$options[]    = array(
	'id'        => '_genre_options',
	'taxonomy'	=> 'amy_genre',
	'fields'    => array(
			array(
			'id'				=> 'genre_sidebar',
			'type'				=> 'select',
			'title'				=> esc_html__( 'Genre Sidebar', 'amy-movie' ),
			'options'			=> array(
				'global'			=> esc_html__( 'Global', 'amy-movie' ),
				'right'				=> esc_html__( 'Right Sidebar', 'amy-movie' ),
				'left'				=> esc_html__( 'Left Sidebar', 'amy-movie' ),
				'full'				=> esc_html__( 'No Sidebar', 'amy-movie' ),
			),
			'default'			=> 'global',
		),

		array(
			'id'				=> 'genre_widget',
			'type'				=> 'select',
			'title'				=> esc_html__( 'Genre Sidebar Widget', 'amy-movie' ),
			'options'			=> amy_movie_wp_registered_sidebars(),
			'default_option'	=> esc_html__( 'Select a sidebar (default primary)', 'amy-movie' ),
			'dependency'		=> array( 'genre_sidebar', 'any', 'right,left' ),
			'default'			=> 'rightbar',
		),

		array(
			'id'		=> 'genre_layout',
			'type'		=> 'select',
			'title'		=> esc_html__( 'Genre Layout', 'amy-movie' ),
			'options'	=> array(
				'global'	=> esc_html__( 'Global', 'amy-movie' ),
				'list'		=> esc_html__( 'List', 'amy-movie' ),
				'grid'		=> esc_html__( 'Grid', 'amy-movie' ),
			),
			'default'	=> 'global',
		),

		array(
			'type' 			=> 'image_select',
			'title' 		=> esc_html__( 'Grid Layout', 'amy-movie' ),
			'id' 			=> 'grid_layout',
			'options' 		=> array(
				'layout1' 	=> get_template_directory_uri() . '/images/shortcode/grid_layout1.png',
				'layout2' 	=> get_template_directory_uri() . '/images/shortcode/grid_layout2.png',
				'layout3' 	=> get_template_directory_uri() . '/images/shortcode/grid_layout3.png',
				'layout4' 	=> get_template_directory_uri() . '/images/shortcode/grid_layout4.png',
			),
			'radio'		=> true,
			'attributes'			=> array(
				'data-depend-id'	=> 'grid_layout',
			),
			'default'		=> 'layout1',
			'dependency'	=> array( 'genre_layout', '==', 'grid' ),
		),

		array(
			'type'			=> 'select',
			'title'			=> esc_html__( 'Columns', 'amy-movie' ),
			'id'			=> 'column',
			'options'		=> array(
				'2'	=> esc_html__( '2 column', 'amy-movie' ),
				'3'	=> esc_html__( '3 column', 'amy-movie' ),
				'4'	=> esc_html__( '4 column', 'amy-movie' ),
				'5' => esc_html__( '5 column', 'amy-movie' ),
			),
			'default'			=> '4',
			'dependency'	=> array( 'genre_layout|grid_layout', '==|any', 'grid|layout1,layout3,layout4' ),
		),

		array(
			'type'		=> 'select',
			'title'		=> esc_html__( 'Columns', 'amy-movie' ),
			'id'		=> 'layout2_column',
			'options'		=> array(
				'2'	=> esc_html__( '2 column', 'amy-movie' ),
				'3'	=> esc_html__( '3 column', 'amy-movie' ),
			),
			'default'			=> '2',
			'dependency'	=> array( 'genre_layout|grid_layout', '==|==', 'grid|layout2' ),
		),
	),
);

AmyFramework_Taxonomy::instance( $options );
