????

Your IP : 216.73.216.121


Current Path : /home2/morganrand/www/wp-content/themes/wanderfuls-2/framework/customizer/settings/
Upload File :
Current File : /home2/morganrand/www/wp-content/themes/wanderfuls-2/framework/customizer/settings/topbar.php

<?php
/**
 * Customizer => Top Bar
 *
 * @package Wanderfuls WordPress Theme
 * @subpackage Customizer
 */

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

// Social styles
$social_styles = array(
	'' => __( 'Minimal', 'tb' ),
	'colored-icons' => __( 'Colored Image Icons (Legacy)', 'tb' ),
);
$social_styles = array_merge( tb_social_button_styles(), $social_styles );
unset( $social_styles[''] );

// General
$this->sections['tb_topbar'] = array(
	'title' => __( 'General', 'tb' ),
	'settings' => array(
		array(
			'id' => 'top_bar',
			'default' => true,
			'control' => array(
				'label' => __( 'Enable', 'tb' ),
				'type' => 'checkbox',
				'desc' => __( 'If you disable this option we recommend you go to the Customizer Manager and disable the section as well so the next time you work with the Customizer it will load faster.', 'tb' ),
			),
		),
		array(
			'id' => 'top_bar_sticky',
			'default' => false,
			'control' => array(
				'label' => __( 'Sticky', 'tb' ),
				'type' => 'checkbox',
				'active_callback' => 'tb_customizer_has_topbar',
			),
		),
		array(
			'id' => 'top_bar_style',
			'default' => 'one',
			'control' => array(
				'label' => __( 'Style', 'tb' ),
				'type' => 'select',
				'active_callback' => 'tb_customizer_has_topbar',
				'choices' => array(
					'one' => __( 'Left Content & Right Social', 'tb' ),
					'two' => __( 'Left Social & Right Content', 'tb' ),
					'three' => __( 'Centered Content & Social', 'tb' ),
				),
			),
		),
		array(
			'id' => 'top_bar_visibility',
			'default' => 'always-visible',
			'control' => array(
				'label' => __( 'Visibility', 'tb' ),
				'type' => 'select',
				'choices' => tb_visibility(),
				'active_callback' => 'tb_customizer_has_topbar',
			),
		),
		array(
			'id' => 'top_bar_content',
			'default' => '[font_awesome icon="phone" margin_right="5px" color="#000"] 1-800-987-654 [font_awesome icon="envelope" margin_right="5px" margin_left="20px" color="#000"] admin@total.com [font_awesome icon="user" margin_right="5px" margin_left="20px" color="#000"] [wp_login_url text="User Login" logout_text="Logout"]',
			'control' => array(
				'label' => __( 'Content', 'tb' ),
				'type' => 'textarea',
				'active_callback' => 'tb_customizer_has_topbar',
				'description' => __( 'If you enter the ID number of a page it will automatically display the content of such page.', 'tb' ),
			),
		),
		// main styling
		array(
			'id' => 'top_bar_bg',
			'control' => array(
				'type' => 'color',
				'label' => __( 'Background', 'tb' ),
				'active_callback' => 'tb_customizer_has_topbar',
			),
			'inline_css' => array(
				'target' => array(
					'#top-bar-wrap',
					'.tb-top-bar-sticky',
				),
				'alter' => 'background-color',
			),
		),
		array(
			'id' => 'top_bar_border',
			'control' => array(
				'type' => 'color',
				'label' => __( 'Borders', 'tb' ),
				'active_callback' => 'tb_customizer_has_topbar',
			),
			'inline_css' => array(
				'target' => '#top-bar-wrap',
				'alter' => 'border-color',
			),
		),
		array(
			'id' => 'top_bar_text',
			'control' => array(
				'type' => 'color',
				'label' => __( 'Color', 'tb' ),
				'active_callback' => 'tb_customizer_has_topbar',
			),
			'inline_css' => array(
				'target' => array(
					'#top-bar-wrap',
					'#top-bar-content strong',
				),
				'alter' => 'color',
			),
		),
		// link colors
		array(
			'id' => 'top_bar_link_color',
			'control' => array(
				'type' => 'color',
				'label' => __( 'Link Color', 'tb' ),
				'active_callback' => 'tb_customizer_has_topbar',
			),
			'inline_css' => array(
				'target' => array(
					'#top-bar-content a',
					'#top-bar-social-alt a',
				),
				'alter' => 'color',
			),
		),
		array(
			'id' => 'top_bar_link_color_hover',
			'control' => array(
				'type' => 'color',
				'label' => __( 'Link Color: Hover', 'tb' ),
				'active_callback' => 'tb_customizer_has_topbar',
			),
			'inline_css' => array(
				'target' => array(
					'#top-bar-content a:hover',
					'#top-bar-social-alt a:hover',
				),
				'alter' => 'color',
			),
		),
		/** Social **/
		array(
			'id' => 'topbar_social_heading',
			'control' => array(
				'type' => 'tb-heading',
				'label' => __( 'Enable Social Links', 'tb' ),
				'active_callback' => 'tb_customizer_has_topbar',
			),
		),
		array(
			'id' => 'top_bar_social',
			'default' => true,
			'control' => array(
				'label' => __( 'Social', 'tb' ),
				'type' => 'checkbox',
				'active_callback' => 'tb_customizer_has_topbar',
			),
		),
		array(
			'id' => 'top_bar_social_alt',
			'control' => array(
				'label' => __( 'Social Alternative', 'tb' ),
				'type' => 'textarea',
				'active_callback' => 'tb_customizer_has_topbar',
				'description' => __( 'If you enter the ID number of a page it will automatically display the content of such page.', 'tb' ),
			),
		),
		array(
			'id' => 'top_bar_social_target',
			'default' => 'blank',
			'control' => array(
				'label' => __( 'Social Link Target', 'tb' ),
				'type' => 'select',
				'choices' => array(
					'blank' => __( 'New Window', 'tb' ),
					'self' => __( 'Same Window', 'tb' ),
				),
				'active_callback' => 'tb_customizer_has_topbar_social',
			),
		),
		array(
			'id' => 'top_bar_social_style',
			'default' => 'none',
			'control' => array(
				'label' => __( 'Social Style', 'tb' ),
				'type' => 'select',
				'choices' => $social_styles,
				'active_callback' => 'tb_customizer_has_topbar_social',
			),
		),
		array(
			'id' => 'top_bar_social_color',
			'control' => array(
				'type' => 'color',
				'label' => __( 'Social Links Color', 'tb' ),
				'active_callback' => 'tb_customizer_topbar_social_style_is_none',
			),
			'inline_css' => array(
				'target' => '#top-bar-social a.tb-social-btn-no-style',
				'alter' => 'color',
			),
		),
		array(
			'id' => 'top_bar_social_hover_color',
			'control' => array(
				'type' => 'color',
				'label' => __( 'Social Links Hover Color', 'tb' ),
				'active_callback' => 'tb_customizer_topbar_social_style_is_none',
			),
			'inline_css' => array(
				'target' => '#top-bar-social a.tb-social-btn-no-style:hover',
				'alter' => 'color',
			),
		),
	),
);

// Social settings
$social_options = tb_topbar_social_options();
foreach ( $social_options as $key => $val ) {
	$this->sections['tb_topbar']['settings'][] = array(
		'id' => 'top_bar_social_profiles[' . $key .']',
		'control' => array(
			'label' => __( $val['label'], 'tb' ),
			'type' => 'text',
			'active_callback' => 'tb_customizer_has_topbar_social',
		),
	);
}