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

defined( 'ABSPATH' ) || exit;

function tattoopress_set_header_settings_mods( $mods ) {

	$mods['header_settings'] = array(

		'id'      => 'header_settings',
		'title'   => esc_html__( 'Header Layout', 'tattoopress' ),
		'icon'    => 'editor-table',
		'options' => array(

			'hero_layout'            => array(
				'label'     => esc_html__( 'Page Header Layout', 'tattoopress' ),
				'id'        => 'hero_layout',
				'type'      => 'select',
				'choices'   => array(
					'standard'   => esc_html__( 'Standard', 'tattoopress' ),
					'big'        => esc_html__( 'Big', 'tattoopress' ),
					'small'      => esc_html__( 'Small', 'tattoopress' ),
					'fullheight' => esc_html__( 'Full Height', 'tattoopress' ),
					'none'       => esc_html__( 'No header', 'tattoopress' ),
				),
				'transport' => 'postMessage',
			),

			'hero_background_effect' => array(
				'id'      => 'hero_background_effect',
				'label'   => esc_html__( 'Header Image Effect', 'tattoopress' ),
				'type'    => 'select',
				'choices' => array(
					'parallax' => esc_html__( 'Parallax', 'tattoopress' ),
					'zoomin'   => esc_html__( 'Zoom', 'tattoopress' ),
					'none'     => esc_html__( 'None', 'tattoopress' ),
				),
			),

			'hero_scrolldown_arrow'  => array(
				'id'      => 'hero_scrolldown_arrow',
				'label'   => esc_html__( 'Scroll Down arrow', 'tattoopress' ),
				'type'    => 'select',
				'choices' => array(
					'yes' => esc_html__( 'Yes', 'tattoopress' ),
					''    => esc_html__( 'No', 'tattoopress' ),
				),
			),

			array(
				'label'   => esc_html__( 'Header Overlay', 'tattoopress' ),
				'id'      => 'hero_overlay',
				'type'    => 'select',
				'choices' => array(
					''       => esc_html__( 'Default', 'tattoopress' ),
					'custom' => esc_html__( 'Custom', 'tattoopress' ),
					'none'   => esc_html__( 'None', 'tattoopress' ),
				),
			),

			array(
				'label' => esc_html__( 'Overlay Color', 'tattoopress' ),
				'id'    => 'hero_overlay_color',
				'type'  => 'color',
				'value' => '#000000',
			),

			array(
				'label' => esc_html__( 'Overlay Opacity (in percent)', 'tattoopress' ),
				'id'    => 'hero_overlay_opacity',
				'desc'  => esc_html__( 'Adapt the header overlay opacity if needed', 'tattoopress' ),
				'type'  => 'text',
				'value' => 40,
			),
		),
	);

	if ( class_exists( 'Wolf_Vc_Content_Block' ) ) {
		$mods['header_settings']['options']['hero_layout']['description'] = sprintf(
			tattoopress_kses(
				__( 'The header can be overwritten by a <a href="%s" target="_blank">content block</a> on all pages or on specific pages. See the customizer "Layout" tab or the page options below your text editor.', 'tattoopress' )
			),
			'http://wlfthm.es/content-blocks'
		);
	}

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