<?php
/**
 * Tattoopress videos
 *
 * @package WordPress
 * @subpackage Tattoopress
 * @version 3.3.4
 */

defined( 'ABSPATH' ) || exit;

/**
 * Video mods
 *
 * @param array $mods Array of mods.
 * @return array
 */
function tattoopress_set_video_mods( $mods ) {

	if ( class_exists( 'Wolf_Videos' ) ) {
		$mods['wolf_videos'] = array(
			'id'      => 'wolf_videos',
			'title'   => esc_html__( 'Videos', 'tattoopress' ),
			'icon'    => 'editor-video',
			'options' => array(

				'video_layout'         => array(
					'id'          => 'video_layout',
					'label'       => esc_html__( 'Layout', 'tattoopress' ),
					'type'        => 'select',
					'choices'     => array(
						'standard'      => esc_html__( 'Standard', 'tattoopress' ),
						'fullwidth'     => esc_html__( 'Full width', 'tattoopress' ),
						'sidebar-right' => esc_html__( 'Sidebar at right', 'tattoopress' ),
						'sidebar-left'  => esc_html__( 'Sidebar at left', 'tattoopress' ),
					),
					'description' => esc_html__( 'For "Sidebar" layouts, the sidebar will be visible if it contains widgets.', 'tattoopress' ),
				),

				'video_grid_padding'   => array(
					'id'        => 'video_grid_padding',
					'label'     => esc_html__( 'Padding', 'tattoopress' ),
					'type'      => 'select',
					'choices'   => array(
						'yes' => esc_html__( 'Yes', 'tattoopress' ),
						'no'  => esc_html__( 'No', 'tattoopress' ),
					),
					'transport' => 'postMessage',
				),

				'video_display'        => array(
					'id'      => 'video_display',
					'label'   => esc_html__( 'Display', 'tattoopress' ),
					'type'    => 'select',
					'choices' => apply_filters(
						'tattoopress_video_display_options',
						array(
							'grid' => esc_html__( 'Grid', 'tattoopress' ),
						)
					),
				),

				'video_item_animation' => array(
					'label'   => esc_html__( 'Video Archive Item Animation', 'tattoopress' ),
					'id'      => 'video_item_animation',
					'type'    => 'select',
					'choices' => tattoopress_get_animations(),
				),

				'video_onclick'        => array(
					'label'   => esc_html__( 'On Click', 'tattoopress' ),
					'id'      => 'video_onclick',
					'type'    => 'select',
					'choices' => apply_filters(
						'tattoopress_video_onclick',
						array(
							'lightbox' => esc_html__( 'Open Video in Lightbox', 'tattoopress' ),
							'default'  => esc_html__( 'Go to the Video Page', 'tattoopress' ),
						)
					),
				),

				'video_pagination'     => array(
					'id'          => 'video_pagination',
					'label'       => esc_html__( 'Video Archive Pagination', 'tattoopress' ),
					'type'        => 'select',
					'choices'     => array(
						'none'                => esc_html__( 'None', 'tattoopress' ),
						'standard_pagination' => esc_html__( 'Numeric Pagination', 'tattoopress' ),
						'load_more'           => esc_html__( 'Load More Button', 'tattoopress' ),
					),
					'description' => esc_html__( 'You must set a number of posts per page below. The category filter will not be disabled.', 'tattoopress' ),
				),

				'videos_per_page'      => array(
					'label'       => esc_html__( 'Videos per Page', 'tattoopress' ),
					'id'          => 'videos_per_page',
					'type'        => 'text',
					'placeholder' => 6,
				),

				'video_single_layout'  => array(
					'id'      => 'video_single_layout',
					'label'   => esc_html__( 'Single Post Layout', 'tattoopress' ),
					'type'    => 'select',
					'choices' => array(
						'sidebar-right' => esc_html__( 'Sidebar Right', 'tattoopress' ),
						'sidebar-left'  => esc_html__( 'Sidebar Left', 'tattoopress' ),
						'no-sidebar'    => esc_html__( 'No Sidebar', 'tattoopress' ),
						'fullwidth'     => esc_html__( 'Full width', 'tattoopress' ),
					),
				),

				/*
				'video_columns' => [
					'id' => 'video_columns',
					'label' => esc_html__( 'Columns', 'tattoopress' ),
					'type' => 'select',
					'choices' => [
						3 => 3,
						2 => 2,
						4 => 4,
						5 => 5,
						6 => 6,
					),
					'transport' => 'postMessage',
				),*/
			),
		);
	}

	return $mods;
}
add_filter( 'tattoopress_customizer_mods', 'tattoopress_set_video_mods' );
