<?php
/**
 * Theme Name: 		Noisa - Music WordPress Theme
 * Theme Author: 	Mariusz Rek - Rascals Themes
 * Theme URI: 		http://rascalsthemes.com/noisa
 * Author URI: 		http://rascalsthemes.com
 * File:			customizer-options.php
 * =========================================================================================================================================
 *
 * @package noisa
 * @since 1.0.0
 */

// Exit if accessed directly
if ( ! defined( 'ABSPATH' ) ) {
    exit;
}

/**
 * ---------------------------------------------------- Helpers
 *
 */



/** 
* ------------- Social Media Array
*/

$social_media_a = array(

	'twitter' => esc_html__( 'Twitter', 'noisa' ),
    'facebook' => esc_html__( 'Facebook', 'noisa' ),
    'youtube' => esc_html__( 'Youtube', 'noisa' ),
    'instagram' => esc_html__( 'Instagram', 'noisa' ),
    'soundcloud' => esc_html__( 'Soundcloud', 'noisa' ),
    'mixcloud' => esc_html__( 'Mixcloud', 'noisa' ),
    'bandcamp' => esc_html__( 'Bandcamp', 'noisa' ),
    'spotify' => esc_html__( 'Spotify', 'noisa' ),
    'lastfm' => esc_html__( 'lastfm', 'noisa' ),
    'vimeo' => esc_html__( 'Vimeo', 'noisa' ),
    'vk' => esc_html__( 'VK', 'noisa' ),
    'flickr' => esc_html__( 'Flickr', 'noisa' ),
    'googleplus' => esc_html__( 'Google Plus', 'noisa' ),
    'dribbble' => esc_html__( 'Dribbble', 'noisa' ),
    'deviantart' => esc_html__( 'Deviantart', 'noisa' ),
    'github' => esc_html__( 'Github', 'noisa' ),
    'blogger' => esc_html__( 'Blogger', 'noisa' ),
    'yahoo' => esc_html__( 'Yahoo', 'noisa' ),
    'finder' => esc_html__( 'Finder', 'noisa' ),
    'skype' => esc_html__( 'Skype', 'noisa' ),
    'reddit' => esc_html__( 'Reddit', 'noisa' ),
    'linkedin' => esc_html__( 'Linkedin', 'noisa' ),
    'amazon' => esc_html__( 'Amazon', 'noisa' )
);

/**
 * ---------------------------------------------------- Panel: Personalizing
 *
 */

Kirki::add_panel( 'personalizing', array(
    'priority'    => 1,
    'title'       => esc_html__( 'Personalizing', 'noisa' ),
    'description' => esc_html__( 'This panel will provide all the options of the personalizing.', 'noisa' ),
) );

	/** 
	* ------------- Section: Colors
	*/

	Kirki::add_section( 'colors', array(
	    'title'          => esc_html__( 'Colors', 'noisa' ),
	    'description'    => false,
	    'panel'          => 'personalizing',
	    'priority'       => 1,
	    'capability'     => 'edit_theme_options',
	    'theme_supports' => '',
	) );

		/** 
		* ------------- Control: Theme Skin
		*/
		Kirki::add_field( 'noisa', array(
			'label'    => esc_html__( 'Theme Skin', 'noisa' ),
			'section'  => 'colors',
			'settings' => 'noisa_skin',
			'type'     => 'select',
			'priority' => 1,
			'multiple' => 1,
			'default'  => 'dark',
			'description' => esc_html__( 'Change the template skin. PLEASE NOTE: If you don\'t see any changes then click the "Save & Publish" button and refresh the browser window.', 'noisa' ),
			'choices'  => array(
				'light' => esc_attr__( 'Light', 'noisa' ),
				'dark' => esc_attr__( 'Dark', 'noisa' ),
			),
		) );

		/** 
		* ------------- Control: Accent Color
		*/
		Kirki::add_field( 'noisa', array(
			'label'    => esc_html__( 'Accent Color', 'noisa' ),
			'section'  => 'colors',
			'settings' => 'accent_color',
			'type'     => 'color',
			'priority' => 2,
			'default'  => '#E82561',
			'choices'  => array(
				'alpha' => false,
			),
		) );

		/** 
		* ------------- Control: Headings Color
		*/
		Kirki::add_field( 'noisa', array(
			'label'    => esc_html__( 'Headings Color', 'noisa' ),
			'section'  => 'colors',
			'settings' => 'headings_color',
			'type'     => 'color',
			'priority' => 3,
			'default'  => noisa_defaults( 'headings_color' ),
			'choices'  => array(
				'alpha' => false,
			),
		) );

		/** 
		* ------------- Control: Background Color
		*/
		Kirki::add_field( 'noisa', array(
			'label'    => esc_html__( 'Background Color', 'noisa' ),
			'section'  => 'colors',
			'settings' => 'body_bg_color',
			'type'     => 'color',
			'priority' => 4,
			'default'  => noisa_defaults( 'body_bg_color' ),
			'choices'  => array(
				'alpha' => false,
			),
		) );

		/** 
		* ------------- Control: Text Color
		*/
		Kirki::add_field( 'noisa', array(
			'label'    => esc_html__( 'Text Color', 'noisa' ),
			'section'  => 'colors',
			'settings' => 'text_color',
			'type'     => 'color',
			'priority' => 5,
			'default'  => noisa_defaults( 'text_color' ),
			'choices'  => array(
				'alpha' => false,
			),
		) );

		/** 
		* ------------- Control: Loading Layer Color
		*/
		Kirki::add_field( 'noisa', array(
			'label'    => esc_html__( 'Loading Layer Color', 'noisa' ),
			'section'  => 'colors',
			'settings' => 'noisa_loading_layer_color',
			'type'     => 'color',
			'priority' => 6,
			'default'  => noisa_defaults( 'noisa_loading_layer_color' ),
			'choices'  => array(
				'alpha' => false,
			),
		) );


/**
 * ---------------------------------------------------- Panel: Header
 *
 */

Kirki::add_panel( 'header', array(
    'priority'    => 2,
    'title'       => esc_html__( 'Header', 'noisa' ),
    'description' => esc_html__( 'This panel will provide all the options of the header.', 'noisa' ),
) );

	

	/**
	 * ------------- Section: logo
	 *
	 */

	Kirki::add_section( 'header_logo', array(
		    'title'          => esc_html__( 'Logo', 'noisa' ),
		    'description'    => false,
		    'panel'          => 'header',
		    'priority'       => 1,
		    'capability'     => 'edit_theme_options',
		    'theme_supports' => '',
		) );

			/** 
			* ------------- Control: Logo
			*/
			Kirki::add_field( 'noisa', array(
				'label'    => esc_html__( 'Logo Image (Light)', 'noisa' ),
				'section'  => 'header_logo',
				'settings' => 'noisa_logo',
				'type'     => 'image',
				'priority' => 1,
				'default'  =>  get_template_directory_uri() . '/images/logo-dark.png',
				'partial_refresh' => array(
					'noisa_logo' => array(
						'selector'        => '.header-logo',
						'render_callback' => 'noisa_header_logo',
					),
				),
			) );


			/** 
			* ------------- Control: Logo Alternative
			*/
			Kirki::add_field( 'noisa', array(
				'label'    => esc_html__( 'Logo Image (Dark)', 'noisa' ),
				'section'  => 'header_logo',
				'settings' => 'noisa_logo_dark',
				'type'     => 'image',
				'priority' => 1,
				'default'  =>  '',
				'description' => esc_html__( 'Add dark logo to the header. Please note: Logo is displayed only when "Light Skin" is selected..', 'noisa' ),
				'partial_refresh' => array(
					'noisa_logo' => array(
						'selector'        => '.header-logo',
						'render_callback' => 'noisa_header_logo',
					),
				),
				
			) );


	/**
	 * ------------- Section: Header Buttons
	 *
	 */

	Kirki::add_section( 'header_buttons', array(
	    'title'          => esc_html__( 'Cart Button', 'noisa' ),
	    'description'    => false,
	    'panel'          => 'header',
	    'priority'       => 2,
	    'capability'     => 'edit_theme_options',
	    'theme_supports' => '',
	) );


		/** 
		* ------------- Control: Cart Button
		*/
		Kirki::add_field( 'noisa', array(
			'label'    => esc_html__( 'Display Cart', 'noisa' ),
			'section'  => 'header_buttons',
			'settings' => 'noisa_cart_button',
			'type'     => 'toggle',
			'priority' => 1,
			'default'  => 1
		) );


		/** 
		* ------------- Control: Cart link
		*/
		Kirki::add_field( 'noisa', array(
			'label'    => esc_html__( 'Cart Link', 'noisa' ),
			'section'  => 'header_buttons',
			'settings' => 'noisa_cart_link',
			'type'     => 'select',
			'priority' => 2,
			'multiple' => 1,
			'default'  => 'shop',
			'choices'  => array(
				'shop' => esc_attr__( 'Shop page', 'noisa' ),
				'cart' => esc_attr__( 'Cart', 'noisa' ),
			),
		) );


	/**
	 * ------------- Section: Options
	 *
	 */

	Kirki::add_section( 'header_additional', array(
	    'title'          => esc_html__( 'Additional Options', 'noisa' ),
	    'description'    => false,
	    'panel'          => 'header',
	    'priority'       => 2,
	    'capability'     => 'edit_theme_options',
	    'theme_supports' => '',
	) );


		/** 
		* ------------- Control: Header Visible
		*/
		Kirki::add_field( 'noisa', array(
			'label'       => esc_html__( 'Always Show Header', 'noisa' ),
			'section'     => 'header_additional',
			'settings'    => 'noisa_always_show_header',
			'type'        => 'toggle',
			'priority'    => 8,
			'default'     => false,
			'description' => esc_html__( 'Always show header regardless of scroll direction.', 'noisa' ),
		) );

		

/**
 * ---------------------------------------------------- Section: Slide Panel
 *
 */
Kirki::add_section( 'slidepanel', array(
    'title'          => esc_html__( 'Slide Panel', 'noisa' ),
    'description'    => false,
    'priority'       => 3,
    'capability'     => 'edit_theme_options',
    'theme_supports' => '',
) );

	
		/** 
		* ------------- Control: Background Image
		*/
		Kirki::add_field( 'noisa', array(
			'label'    => esc_html__( 'Background Image', 'noisa' ),
			'section'  => 'slidepanel',
			'settings' => 'noisa_slidepanel_image',
			'type'     => 'image',
			'priority' => 1,
			'default'  =>  ''
		) );


		/** 
		* ------------- Control: Search
		*/
		Kirki::add_field( 'noisa', array(
			'label'    => esc_html__( 'Display Search', 'noisa' ),
			'section'  => 'slidepanel',
			'settings' => 'noisa_slidepanel_search',
			'type'     => 'toggle',
			'priority' => 2,
			'default'  => 1,
		) );

	

/**
 * ---------------------------------------------------- Panel: Footer
 *
 */

Kirki::add_panel( 'footer', array(
    'priority'    => 4,
    'title'       => esc_html__( 'Footer', 'noisa' ),
    'description' => esc_html__( 'This panel will provide all the options of the footer.', 'noisa' ),
) );


	/**
	 * ------------- Section: Widgets
	 *
	 */

	Kirki::add_section( 'footer_widgets', array(
		    'title'          => esc_html__( 'Widgets', 'noisa' ),
		    'description'    => false,
		    'panel'          => 'footer',
		    'priority'       => 1,
		    'capability'     => 'edit_theme_options',
		    'theme_supports' => '',
		) );

			/** 
			* ------------- Control: Display footer widgets
			*/
			Kirki::add_field( 'noisa', array(
				'label'    => esc_html__( 'Display Footer Widgets', 'noisa' ),
				'section'  => 'footer_widgets',
				'settings' => 'noisa_footer_widgets',
				'type'     => 'toggle',
				'priority' => 1,
				'default'  => false,
			) );

	
	/**
	 * ------------- Section: Copyright Text
	 *
	 */

	Kirki::add_section( 'footer_copyright', array(
	    'title'          => esc_html__( 'Copyright Text', 'noisa' ),
	    'description'    => false,
	    'panel'          => 'footer',
	    'priority'       => 2,
	    'capability'     => 'edit_theme_options',
	    'theme_supports' => '',
	) );

		/** 
		* ------------- Control: Copyright
		*/
		Kirki::add_field( 'noisa', array(
			'label'    => esc_html__( 'Copyright Text', 'noisa' ),
			'section'  => 'footer_copyright',
			'settings' => 'noisa_copyright_note',
			'type'     => 'textarea',
			'priority' => 1,
			'default' => '&copy; Copyright 2017 NOISA. Powered by <a href="#" target="_blank">Rascals Themes</a>. Handcrafted in Europe.',
			'partial_refresh' => array(
					'noisa_copyright_note' => array(
						'selector'        => '.footer-note-content',
						'render_callback' => 'noisa_copyright_note',
					),
				),
			
		
		) );


/**
 * ---------------------------------------------------- Panel: Sections
 *
 */

Kirki::add_panel( 'sections', array(
    'priority'    => 5,
    'title'       => esc_html__( 'Sections', 'noisa' ),
    'description' => esc_html__( 'This panel will provide all the options of the theme sections.', 'noisa' ),
) );

	/** 
	* ------------- Section: Intro
	*/

	Kirki::add_section( 'section_intro', array(
	    'title'          => esc_html__( 'Intro', 'noisa' ),
	    'description'    => false,
	    'panel'          => 'sections',
	    'priority'       => 3,
	    'capability'     => 'edit_theme_options',
	    'theme_supports' => '',
	) );


		/** 
		* ------------- Control: Page Title BG
		*/
		Kirki::add_field( 'noisa', array(
			'label'    => esc_html__( 'Page Title Image', 'noisa' ),
			'section'  => 'section_intro',
			'settings' => 'noisa_page_title_bg',
			'type'     => 'image',
			'priority' => 1,
			'default'  =>  get_template_directory_uri() . '/images/bg.png',
			'description' => esc_html__( 'Select default background for Page Title section (category, tag...).', 'noisa' )
		) );

		/** 
		* ------------- Control: Page Title Animations
		*/
		Kirki::add_field( 'noisa', array(
			'label'    => esc_html__( 'Page Title Animations', 'noisa' ),
			'section'  => 'section_intro',
			'settings' => 'noisa_page_title_animations',
			'type'     => 'toggle',
			'priority' => 2,
			'default'  => 1,
		) );

		/** 
		* ------------- Control: Quick Scroll
		*/
		Kirki::add_field( 'noisa', array(
			'label'    => esc_html__( 'Quick Scroll ', 'noisa' ),
			'section'  => 'section_intro',
			'settings' => 'noisa_quick_scroll',
			'type'     => 'toggle',
			'priority' => 3,
			'default'  => 0,
			'description' => esc_html__( 'Quick jump between header intro and content with animations.', 'noisa' )
		) );

/**
 * ---------------------------------------------------- Section: Sections
 *
 */


	/** 
	* ------------- Section: Additional JS
	*/

	Kirki::add_section( 'custom_js', array(
	    'title'          => esc_html__( 'Additional JS', 'noisa' ),
	    'description'    => false,
	    'priority'       => 150,
	    'capability'     => 'edit_theme_options',
	    'theme_supports' => '',
	    'description' => esc_html__( 'You can add your own JavaScript here. If you want to your code will be reloaded, put it in ajax_reload function:', 'noisa' ). '<pre>var ajax_reload = function() {
  /* Your Code Here */
}</pre>'
	) );

		/** 
		* ------------- Control: JS Code
		*/
		Kirki::add_field( 'noisa', array(
			'section'  => 'custom_js',
			'settings' => 'custom_js',
			'type'     => 'textarea',
			'priority' => 1,
			'default' => '',
		) );