Your IP : 216.73.216.162


Current Path : /home/x/b/o/xbodynamge/namtation/wp-content/
Upload File :
Current File : /home/x/b/o/xbodynamge/namtation/wp-content/customizer.php.tar

home/xbodynamge/www/wp-content/themes/twentysixteen/inc/customizer.php000060400000075007151121525130022461 0ustar00<?php
/**
 * Twenty Sixteen Customizer functionality
 *
 * @package WordPress
 * @subpackage Twenty_Sixteen
 * @since Twenty Sixteen 1.0
 */

/**
 * Sets up the WordPress core custom header and custom background features.
 *
 * @since Twenty Sixteen 1.0
 *
 * @see twentysixteen_header_style()
 */
function twentysixteen_custom_header_and_background() {
	$color_scheme             = twentysixteen_get_color_scheme();
	$default_background_color = trim( $color_scheme[0], '#' );
	$default_text_color       = trim( $color_scheme[3], '#' );

	/**
	 * Filter the arguments used when adding 'custom-background' support in Twenty Sixteen.
	 *
	 * @since Twenty Sixteen 1.0
	 *
	 * @param array $args {
	 *     An array of custom-background support arguments.
	 *
	 *     @type string $default-color Default color of the background.
	 * }
	 */
	add_theme_support( 'custom-background', apply_filters( 'twentysixteen_custom_background_args', array(
		'default-color' => $default_background_color,
	) ) );

	/**
	 * Filter the arguments used when adding 'custom-header' support in Twenty Sixteen.
	 *
	 * @since Twenty Sixteen 1.0
	 *
	 * @param array $args {
	 *     An array of custom-header support arguments.
	 *
	 *     @type string $default-text-color Default color of the header text.
	 *     @type int      $width            Width in pixels of the custom header image. Default 1200.
	 *     @type int      $height           Height in pixels of the custom header image. Default 280.
	 *     @type bool     $flex-height      Whether to allow flexible-height header images. Default true.
	 *     @type callable $wp-head-callback Callback function used to style the header image and text
	 *                                      displayed on the blog.
	 * }
	 */
	add_theme_support( 'custom-header', apply_filters( 'twentysixteen_custom_header_args', array(
		'default-text-color'     => $default_text_color,
		'width'                  => 1200,
		'height'                 => 280,
		'flex-height'            => true,
		'wp-head-callback'       => 'twentysixteen_header_style',
	) ) );
}
add_action( 'after_setup_theme', 'twentysixteen_custom_header_and_background' );

if ( ! function_exists( 'twentysixteen_header_style' ) ) :
/**
 * Styles the header text displayed on the site.
 *
 * Create your own twentysixteen_header_style() function to override in a child theme.
 *
 * @since Twenty Sixteen 1.0
 *
 * @see twentysixteen_custom_header_and_background().
 */
function twentysixteen_header_style() {
	// If the header text option is untouched, let's bail.
	if ( display_header_text() ) {
		return;
	}

	// If the header text has been hidden.
	?>
	<style type="text/css" id="twentysixteen-header-css">
		.site-branding {
			margin: 0 auto 0 0;
		}

		.site-branding .site-title,
		.site-description {
			clip: rect(1px, 1px, 1px, 1px);
			position: absolute;
		}
	</style>
	<?php
}
endif; // twentysixteen_header_style

/**
 * Adds postMessage support for site title and description for the Customizer.
 *
 * @since Twenty Sixteen 1.0
 *
 * @param WP_Customize_Manager $wp_customize The Customizer object.
 */
function twentysixteen_customize_register( $wp_customize ) {
	$color_scheme = twentysixteen_get_color_scheme();

	$wp_customize->get_setting( 'blogname' )->transport         = 'postMessage';
	$wp_customize->get_setting( 'blogdescription' )->transport  = 'postMessage';

	if ( isset( $wp_customize->selective_refresh ) ) {
		$wp_customize->selective_refresh->add_partial( 'blogname', array(
			'selector' => '.site-title a',
			'container_inclusive' => false,
			'render_callback' => 'twentysixteen_customize_partial_blogname',
		) );
		$wp_customize->selective_refresh->add_partial( 'blogdescription', array(
			'selector' => '.site-description',
			'container_inclusive' => false,
			'render_callback' => 'twentysixteen_customize_partial_blogdescription',
		) );
	}

	// Add color scheme setting and control.
	$wp_customize->add_setting( 'color_scheme', array(
		'default'           => 'default',
		'sanitize_callback' => 'twentysixteen_sanitize_color_scheme',
		'transport'         => 'postMessage',
	) );

	$wp_customize->add_control( 'color_scheme', array(
		'label'    => __( 'Base Color Scheme', 'twentysixteen' ),
		'section'  => 'colors',
		'type'     => 'select',
		'choices'  => twentysixteen_get_color_scheme_choices(),
		'priority' => 1,
	) );

	// Add page background color setting and control.
	$wp_customize->add_setting( 'page_background_color', array(
		'default'           => $color_scheme[1],
		'sanitize_callback' => 'sanitize_hex_color',
		'transport'         => 'postMessage',
	) );

	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'page_background_color', array(
		'label'       => __( 'Page Background Color', 'twentysixteen' ),
		'section'     => 'colors',
	) ) );

	// Remove the core header textcolor control, as it shares the main text color.
	$wp_customize->remove_control( 'header_textcolor' );

	// Add link color setting and control.
	$wp_customize->add_setting( 'link_color', array(
		'default'           => $color_scheme[2],
		'sanitize_callback' => 'sanitize_hex_color',
		'transport'         => 'postMessage',
	) );

	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'link_color', array(
		'label'       => __( 'Link Color', 'twentysixteen' ),
		'section'     => 'colors',
	) ) );

	// Add main text color setting and control.
	$wp_customize->add_setting( 'main_text_color', array(
		'default'           => $color_scheme[3],
		'sanitize_callback' => 'sanitize_hex_color',
		'transport'         => 'postMessage',
	) );

	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'main_text_color', array(
		'label'       => __( 'Main Text Color', 'twentysixteen' ),
		'section'     => 'colors',
	) ) );

	// Add secondary text color setting and control.
	$wp_customize->add_setting( 'secondary_text_color', array(
		'default'           => $color_scheme[4],
		'sanitize_callback' => 'sanitize_hex_color',
		'transport'         => 'postMessage',
	) );

	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'secondary_text_color', array(
		'label'       => __( 'Secondary Text Color', 'twentysixteen' ),
		'section'     => 'colors',
	) ) );
}
add_action( 'customize_register', 'twentysixteen_customize_register', 11 );

/**
 * Render the site title for the selective refresh partial.
 *
 * @since Twenty Sixteen 1.2
 * @see twentysixteen_customize_register()
 *
 * @return void
 */
function twentysixteen_customize_partial_blogname() {
	bloginfo( 'name' );
}

/**
 * Render the site tagline for the selective refresh partial.
 *
 * @since Twenty Sixteen 1.2
 * @see twentysixteen_customize_register()
 *
 * @return void
 */
function twentysixteen_customize_partial_blogdescription() {
	bloginfo( 'description' );
}

/**
 * Registers color schemes for Twenty Sixteen.
 *
 * Can be filtered with {@see 'twentysixteen_color_schemes'}.
 *
 * The order of colors in a colors array:
 * 1. Main Background Color.
 * 2. Page Background Color.
 * 3. Link Color.
 * 4. Main Text Color.
 * 5. Secondary Text Color.
 *
 * @since Twenty Sixteen 1.0
 *
 * @return array An associative array of color scheme options.
 */
function twentysixteen_get_color_schemes() {
	/**
	 * Filter the color schemes registered for use with Twenty Sixteen.
	 *
	 * The default schemes include 'default', 'dark', 'gray', 'red', and 'yellow'.
	 *
	 * @since Twenty Sixteen 1.0
	 *
	 * @param array $schemes {
	 *     Associative array of color schemes data.
	 *
	 *     @type array $slug {
	 *         Associative array of information for setting up the color scheme.
	 *
	 *         @type string $label  Color scheme label.
	 *         @type array  $colors HEX codes for default colors prepended with a hash symbol ('#').
	 *                              Colors are defined in the following order: Main background, page
	 *                              background, link, main text, secondary text.
	 *     }
	 * }
	 */
	return apply_filters( 'twentysixteen_color_schemes', array(
		'default' => array(
			'label'  => __( 'Default', 'twentysixteen' ),
			'colors' => array(
				'#1a1a1a',
				'#ffffff',
				'#007acc',
				'#1a1a1a',
				'#686868',
			),
		),
		'dark' => array(
			'label'  => __( 'Dark', 'twentysixteen' ),
			'colors' => array(
				'#262626',
				'#1a1a1a',
				'#9adffd',
				'#e5e5e5',
				'#c1c1c1',
			),
		),
		'gray' => array(
			'label'  => __( 'Gray', 'twentysixteen' ),
			'colors' => array(
				'#616a73',
				'#4d545c',
				'#c7c7c7',
				'#f2f2f2',
				'#f2f2f2',
			),
		),
		'red' => array(
			'label'  => __( 'Red', 'twentysixteen' ),
			'colors' => array(
				'#ffffff',
				'#ff675f',
				'#640c1f',
				'#402b30',
				'#402b30',
			),
		),
		'yellow' => array(
			'label'  => __( 'Yellow', 'twentysixteen' ),
			'colors' => array(
				'#3b3721',
				'#ffef8e',
				'#774e24',
				'#3b3721',
				'#5b4d3e',
			),
		),
	) );
}

if ( ! function_exists( 'twentysixteen_get_color_scheme' ) ) :
/**
 * Retrieves the current Twenty Sixteen color scheme.
 *
 * Create your own twentysixteen_get_color_scheme() function to override in a child theme.
 *
 * @since Twenty Sixteen 1.0
 *
 * @return array An associative array of either the current or default color scheme HEX values.
 */
function twentysixteen_get_color_scheme() {
	$color_scheme_option = get_theme_mod( 'color_scheme', 'default' );
	$color_schemes       = twentysixteen_get_color_schemes();

	if ( array_key_exists( $color_scheme_option, $color_schemes ) ) {
		return $color_schemes[ $color_scheme_option ]['colors'];
	}

	return $color_schemes['default']['colors'];
}
endif; // twentysixteen_get_color_scheme

if ( ! function_exists( 'twentysixteen_get_color_scheme_choices' ) ) :
/**
 * Retrieves an array of color scheme choices registered for Twenty Sixteen.
 *
 * Create your own twentysixteen_get_color_scheme_choices() function to override
 * in a child theme.
 *
 * @since Twenty Sixteen 1.0
 *
 * @return array Array of color schemes.
 */
function twentysixteen_get_color_scheme_choices() {
	$color_schemes                = twentysixteen_get_color_schemes();
	$color_scheme_control_options = array();

	foreach ( $color_schemes as $color_scheme => $value ) {
		$color_scheme_control_options[ $color_scheme ] = $value['label'];
	}

	return $color_scheme_control_options;
}
endif; // twentysixteen_get_color_scheme_choices


if ( ! function_exists( 'twentysixteen_sanitize_color_scheme' ) ) :
/**
 * Handles sanitization for Twenty Sixteen color schemes.
 *
 * Create your own twentysixteen_sanitize_color_scheme() function to override
 * in a child theme.
 *
 * @since Twenty Sixteen 1.0
 *
 * @param string $value Color scheme name value.
 * @return string Color scheme name.
 */
function twentysixteen_sanitize_color_scheme( $value ) {
	$color_schemes = twentysixteen_get_color_scheme_choices();

	if ( ! array_key_exists( $value, $color_schemes ) ) {
		return 'default';
	}

	return $value;
}
endif; // twentysixteen_sanitize_color_scheme

/**
 * Enqueues front-end CSS for color scheme.
 *
 * @since Twenty Sixteen 1.0
 *
 * @see wp_add_inline_style()
 */
function twentysixteen_color_scheme_css() {
	$color_scheme_option = get_theme_mod( 'color_scheme', 'default' );

	// Don't do anything if the default color scheme is selected.
	if ( 'default' === $color_scheme_option ) {
		return;
	}

	$color_scheme = twentysixteen_get_color_scheme();

	// Convert main text hex color to rgba.
	$color_textcolor_rgb = twentysixteen_hex2rgb( $color_scheme[3] );

	// If the rgba values are empty return early.
	if ( empty( $color_textcolor_rgb ) ) {
		return;
	}

	// If we get this far, we have a custom color scheme.
	$colors = array(
		'background_color'      => $color_scheme[0],
		'page_background_color' => $color_scheme[1],
		'link_color'            => $color_scheme[2],
		'main_text_color'       => $color_scheme[3],
		'secondary_text_color'  => $color_scheme[4],
		'border_color'          => vsprintf( 'rgba( %1$s, %2$s, %3$s, 0.2)', $color_textcolor_rgb ),

	);

	$color_scheme_css = twentysixteen_get_color_scheme_css( $colors );

	wp_add_inline_style( 'twentysixteen-style', $color_scheme_css );
}
add_action( 'wp_enqueue_scripts', 'twentysixteen_color_scheme_css' );

/**
 * Binds the JS listener to make Customizer color_scheme control.
 *
 * Passes color scheme data as colorScheme global.
 *
 * @since Twenty Sixteen 1.0
 */
function twentysixteen_customize_control_js() {
	wp_enqueue_script( 'color-scheme-control', get_template_directory_uri() . '/js/color-scheme-control.js', array( 'customize-controls', 'iris', 'underscore', 'wp-util' ), '20160816', true );
	wp_localize_script( 'color-scheme-control', 'colorScheme', twentysixteen_get_color_schemes() );
}
add_action( 'customize_controls_enqueue_scripts', 'twentysixteen_customize_control_js' );

/**
 * Binds JS handlers to make the Customizer preview reload changes asynchronously.
 *
 * @since Twenty Sixteen 1.0
 */
function twentysixteen_customize_preview_js() {
	wp_enqueue_script( 'twentysixteen-customize-preview', get_template_directory_uri() . '/js/customize-preview.js', array( 'customize-preview' ), '20160816', true );
}
add_action( 'customize_preview_init', 'twentysixteen_customize_preview_js' );

/**
 * Returns CSS for the color schemes.
 *
 * @since Twenty Sixteen 1.0
 *
 * @param array $colors Color scheme colors.
 * @return string Color scheme CSS.
 */
function twentysixteen_get_color_scheme_css( $colors ) {
	$colors = wp_parse_args( $colors, array(
		'background_color'      => '',
		'page_background_color' => '',
		'link_color'            => '',
		'main_text_color'       => '',
		'secondary_text_color'  => '',
		'border_color'          => '',
	) );

	return <<<CSS
	/* Color Scheme */

	/* Background Color */
	body {
		background-color: {$colors['background_color']};
	}

	/* Page Background Color */
	.site {
		background-color: {$colors['page_background_color']};
	}

	mark,
	ins,
	button,
	button[disabled]:hover,
	button[disabled]:focus,
	input[type="button"],
	input[type="button"][disabled]:hover,
	input[type="button"][disabled]:focus,
	input[type="reset"],
	input[type="reset"][disabled]:hover,
	input[type="reset"][disabled]:focus,
	input[type="submit"],
	input[type="submit"][disabled]:hover,
	input[type="submit"][disabled]:focus,
	.menu-toggle.toggled-on,
	.menu-toggle.toggled-on:hover,
	.menu-toggle.toggled-on:focus,
	.pagination .prev,
	.pagination .next,
	.pagination .prev:hover,
	.pagination .prev:focus,
	.pagination .next:hover,
	.pagination .next:focus,
	.pagination .nav-links:before,
	.pagination .nav-links:after,
	.widget_calendar tbody a,
	.widget_calendar tbody a:hover,
	.widget_calendar tbody a:focus,
	.page-links a,
	.page-links a:hover,
	.page-links a:focus {
		color: {$colors['page_background_color']};
	}

	/* Link Color */
	.menu-toggle:hover,
	.menu-toggle:focus,
	a,
	.main-navigation a:hover,
	.main-navigation a:focus,
	.dropdown-toggle:hover,
	.dropdown-toggle:focus,
	.social-navigation a:hover:before,
	.social-navigation a:focus:before,
	.post-navigation a:hover .post-title,
	.post-navigation a:focus .post-title,
	.tagcloud a:hover,
	.tagcloud a:focus,
	.site-branding .site-title a:hover,
	.site-branding .site-title a:focus,
	.entry-title a:hover,
	.entry-title a:focus,
	.entry-footer a:hover,
	.entry-footer a:focus,
	.comment-metadata a:hover,
	.comment-metadata a:focus,
	.pingback .comment-edit-link:hover,
	.pingback .comment-edit-link:focus,
	.comment-reply-link,
	.comment-reply-link:hover,
	.comment-reply-link:focus,
	.required,
	.site-info a:hover,
	.site-info a:focus {
		color: {$colors['link_color']};
	}

	mark,
	ins,
	button:hover,
	button:focus,
	input[type="button"]:hover,
	input[type="button"]:focus,
	input[type="reset"]:hover,
	input[type="reset"]:focus,
	input[type="submit"]:hover,
	input[type="submit"]:focus,
	.pagination .prev:hover,
	.pagination .prev:focus,
	.pagination .next:hover,
	.pagination .next:focus,
	.widget_calendar tbody a,
	.page-links a:hover,
	.page-links a:focus {
		background-color: {$colors['link_color']};
	}

	input[type="date"]:focus,
	input[type="time"]:focus,
	input[type="datetime-local"]:focus,
	input[type="week"]:focus,
	input[type="month"]:focus,
	input[type="text"]:focus,
	input[type="email"]:focus,
	input[type="url"]:focus,
	input[type="password"]:focus,
	input[type="search"]:focus,
	input[type="tel"]:focus,
	input[type="number"]:focus,
	textarea:focus,
	.tagcloud a:hover,
	.tagcloud a:focus,
	.menu-toggle:hover,
	.menu-toggle:focus {
		border-color: {$colors['link_color']};
	}

	/* Main Text Color */
	body,
	blockquote cite,
	blockquote small,
	.main-navigation a,
	.menu-toggle,
	.dropdown-toggle,
	.social-navigation a,
	.post-navigation a,
	.pagination a:hover,
	.pagination a:focus,
	.widget-title a,
	.site-branding .site-title a,
	.entry-title a,
	.page-links > .page-links-title,
	.comment-author,
	.comment-reply-title small a:hover,
	.comment-reply-title small a:focus {
		color: {$colors['main_text_color']};
	}

	blockquote,
	.menu-toggle.toggled-on,
	.menu-toggle.toggled-on:hover,
	.menu-toggle.toggled-on:focus,
	.post-navigation,
	.post-navigation div + div,
	.pagination,
	.widget,
	.page-header,
	.page-links a,
	.comments-title,
	.comment-reply-title {
		border-color: {$colors['main_text_color']};
	}

	button,
	button[disabled]:hover,
	button[disabled]:focus,
	input[type="button"],
	input[type="button"][disabled]:hover,
	input[type="button"][disabled]:focus,
	input[type="reset"],
	input[type="reset"][disabled]:hover,
	input[type="reset"][disabled]:focus,
	input[type="submit"],
	input[type="submit"][disabled]:hover,
	input[type="submit"][disabled]:focus,
	.menu-toggle.toggled-on,
	.menu-toggle.toggled-on:hover,
	.menu-toggle.toggled-on:focus,
	.pagination:before,
	.pagination:after,
	.pagination .prev,
	.pagination .next,
	.page-links a {
		background-color: {$colors['main_text_color']};
	}

	/* Secondary Text Color */

	/**
	 * IE8 and earlier will drop any block with CSS3 selectors.
	 * Do not combine these styles with the next block.
	 */
	body:not(.search-results) .entry-summary {
		color: {$colors['secondary_text_color']};
	}

	blockquote,
	.post-password-form label,
	a:hover,
	a:focus,
	a:active,
	.post-navigation .meta-nav,
	.image-navigation,
	.comment-navigation,
	.widget_recent_entries .post-date,
	.widget_rss .rss-date,
	.widget_rss cite,
	.site-description,
	.author-bio,
	.entry-footer,
	.entry-footer a,
	.sticky-post,
	.taxonomy-description,
	.entry-caption,
	.comment-metadata,
	.pingback .edit-link,
	.comment-metadata a,
	.pingback .comment-edit-link,
	.comment-form label,
	.comment-notes,
	.comment-awaiting-moderation,
	.logged-in-as,
	.form-allowed-tags,
	.site-info,
	.site-info a,
	.wp-caption .wp-caption-text,
	.gallery-caption,
	.widecolumn label,
	.widecolumn .mu_register label {
		color: {$colors['secondary_text_color']};
	}

	.widget_calendar tbody a:hover,
	.widget_calendar tbody a:focus {
		background-color: {$colors['secondary_text_color']};
	}

	/* Border Color */
	fieldset,
	pre,
	abbr,
	acronym,
	table,
	th,
	td,
	input[type="date"],
	input[type="time"],
	input[type="datetime-local"],
	input[type="week"],
	input[type="month"],
	input[type="text"],
	input[type="email"],
	input[type="url"],
	input[type="password"],
	input[type="search"],
	input[type="tel"],
	input[type="number"],
	textarea,
	.main-navigation li,
	.main-navigation .primary-menu,
	.menu-toggle,
	.dropdown-toggle:after,
	.social-navigation a,
	.image-navigation,
	.comment-navigation,
	.tagcloud a,
	.entry-content,
	.entry-summary,
	.page-links a,
	.page-links > span,
	.comment-list article,
	.comment-list .pingback,
	.comment-list .trackback,
	.comment-reply-link,
	.no-comments,
	.widecolumn .mu_register .mu_alert {
		border-color: {$colors['main_text_color']}; /* Fallback for IE7 and IE8 */
		border-color: {$colors['border_color']};
	}

	hr,
	code {
		background-color: {$colors['main_text_color']}; /* Fallback for IE7 and IE8 */
		background-color: {$colors['border_color']};
	}

	@media screen and (min-width: 56.875em) {
		.main-navigation li:hover > a,
		.main-navigation li.focus > a {
			color: {$colors['link_color']};
		}

		.main-navigation ul ul,
		.main-navigation ul ul li {
			border-color: {$colors['border_color']};
		}

		.main-navigation ul ul:before {
			border-top-color: {$colors['border_color']};
			border-bottom-color: {$colors['border_color']};
		}

		.main-navigation ul ul li {
			background-color: {$colors['page_background_color']};
		}

		.main-navigation ul ul:after {
			border-top-color: {$colors['page_background_color']};
			border-bottom-color: {$colors['page_background_color']};
		}
	}

CSS;
}


/**
 * Outputs an Underscore template for generating CSS for the color scheme.
 *
 * The template generates the css dynamically for instant display in the
 * Customizer preview.
 *
 * @since Twenty Sixteen 1.0
 */
function twentysixteen_color_scheme_css_template() {
	$colors = array(
		'background_color'      => '{{ data.background_color }}',
		'page_background_color' => '{{ data.page_background_color }}',
		'link_color'            => '{{ data.link_color }}',
		'main_text_color'       => '{{ data.main_text_color }}',
		'secondary_text_color'  => '{{ data.secondary_text_color }}',
		'border_color'          => '{{ data.border_color }}',
	);
	?>
	<script type="text/html" id="tmpl-twentysixteen-color-scheme">
		<?php echo twentysixteen_get_color_scheme_css( $colors ); ?>
	</script>
	<?php
}
add_action( 'customize_controls_print_footer_scripts', 'twentysixteen_color_scheme_css_template' );

/**
 * Enqueues front-end CSS for the page background color.
 *
 * @since Twenty Sixteen 1.0
 *
 * @see wp_add_inline_style()
 */
function twentysixteen_page_background_color_css() {
	$color_scheme          = twentysixteen_get_color_scheme();
	$default_color         = $color_scheme[1];
	$page_background_color = get_theme_mod( 'page_background_color', $default_color );

	// Don't do anything if the current color is the default.
	if ( $page_background_color === $default_color ) {
		return;
	}

	$css = '
		/* Custom Page Background Color */
		.site {
			background-color: %1$s;
		}

		mark,
		ins,
		button,
		button[disabled]:hover,
		button[disabled]:focus,
		input[type="button"],
		input[type="button"][disabled]:hover,
		input[type="button"][disabled]:focus,
		input[type="reset"],
		input[type="reset"][disabled]:hover,
		input[type="reset"][disabled]:focus,
		input[type="submit"],
		input[type="submit"][disabled]:hover,
		input[type="submit"][disabled]:focus,
		.menu-toggle.toggled-on,
		.menu-toggle.toggled-on:hover,
		.menu-toggle.toggled-on:focus,
		.pagination .prev,
		.pagination .next,
		.pagination .prev:hover,
		.pagination .prev:focus,
		.pagination .next:hover,
		.pagination .next:focus,
		.pagination .nav-links:before,
		.pagination .nav-links:after,
		.widget_calendar tbody a,
		.widget_calendar tbody a:hover,
		.widget_calendar tbody a:focus,
		.page-links a,
		.page-links a:hover,
		.page-links a:focus {
			color: %1$s;
		}

		@media screen and (min-width: 56.875em) {
			.main-navigation ul ul li {
				background-color: %1$s;
			}

			.main-navigation ul ul:after {
				border-top-color: %1$s;
				border-bottom-color: %1$s;
			}
		}
	';

	wp_add_inline_style( 'twentysixteen-style', sprintf( $css, $page_background_color ) );
}
add_action( 'wp_enqueue_scripts', 'twentysixteen_page_background_color_css', 11 );

/**
 * Enqueues front-end CSS for the link color.
 *
 * @since Twenty Sixteen 1.0
 *
 * @see wp_add_inline_style()
 */
function twentysixteen_link_color_css() {
	$color_scheme    = twentysixteen_get_color_scheme();
	$default_color   = $color_scheme[2];
	$link_color = get_theme_mod( 'link_color', $default_color );

	// Don't do anything if the current color is the default.
	if ( $link_color === $default_color ) {
		return;
	}

	$css = '
		/* Custom Link Color */
		.menu-toggle:hover,
		.menu-toggle:focus,
		a,
		.main-navigation a:hover,
		.main-navigation a:focus,
		.dropdown-toggle:hover,
		.dropdown-toggle:focus,
		.social-navigation a:hover:before,
		.social-navigation a:focus:before,
		.post-navigation a:hover .post-title,
		.post-navigation a:focus .post-title,
		.tagcloud a:hover,
		.tagcloud a:focus,
		.site-branding .site-title a:hover,
		.site-branding .site-title a:focus,
		.entry-title a:hover,
		.entry-title a:focus,
		.entry-footer a:hover,
		.entry-footer a:focus,
		.comment-metadata a:hover,
		.comment-metadata a:focus,
		.pingback .comment-edit-link:hover,
		.pingback .comment-edit-link:focus,
		.comment-reply-link,
		.comment-reply-link:hover,
		.comment-reply-link:focus,
		.required,
		.site-info a:hover,
		.site-info a:focus {
			color: %1$s;
		}

		mark,
		ins,
		button:hover,
		button:focus,
		input[type="button"]:hover,
		input[type="button"]:focus,
		input[type="reset"]:hover,
		input[type="reset"]:focus,
		input[type="submit"]:hover,
		input[type="submit"]:focus,
		.pagination .prev:hover,
		.pagination .prev:focus,
		.pagination .next:hover,
		.pagination .next:focus,
		.widget_calendar tbody a,
		.page-links a:hover,
		.page-links a:focus {
			background-color: %1$s;
		}

		input[type="date"]:focus,
		input[type="time"]:focus,
		input[type="datetime-local"]:focus,
		input[type="week"]:focus,
		input[type="month"]:focus,
		input[type="text"]:focus,
		input[type="email"]:focus,
		input[type="url"]:focus,
		input[type="password"]:focus,
		input[type="search"]:focus,
		input[type="tel"]:focus,
		input[type="number"]:focus,
		textarea:focus,
		.tagcloud a:hover,
		.tagcloud a:focus,
		.menu-toggle:hover,
		.menu-toggle:focus {
			border-color: %1$s;
		}

		@media screen and (min-width: 56.875em) {
			.main-navigation li:hover > a,
			.main-navigation li.focus > a {
				color: %1$s;
			}
		}
	';

	wp_add_inline_style( 'twentysixteen-style', sprintf( $css, $link_color ) );
}
add_action( 'wp_enqueue_scripts', 'twentysixteen_link_color_css', 11 );

/**
 * Enqueues front-end CSS for the main text color.
 *
 * @since Twenty Sixteen 1.0
 *
 * @see wp_add_inline_style()
 */
function twentysixteen_main_text_color_css() {
	$color_scheme    = twentysixteen_get_color_scheme();
	$default_color   = $color_scheme[3];
	$main_text_color = get_theme_mod( 'main_text_color', $default_color );

	// Don't do anything if the current color is the default.
	if ( $main_text_color === $default_color ) {
		return;
	}

	// Convert main text hex color to rgba.
	$main_text_color_rgb = twentysixteen_hex2rgb( $main_text_color );

	// If the rgba values are empty return early.
	if ( empty( $main_text_color_rgb ) ) {
		return;
	}

	// If we get this far, we have a custom color scheme.
	$border_color = vsprintf( 'rgba( %1$s, %2$s, %3$s, 0.2)', $main_text_color_rgb );

	$css = '
		/* Custom Main Text Color */
		body,
		blockquote cite,
		blockquote small,
		.main-navigation a,
		.menu-toggle,
		.dropdown-toggle,
		.social-navigation a,
		.post-navigation a,
		.pagination a:hover,
		.pagination a:focus,
		.widget-title a,
		.site-branding .site-title a,
		.entry-title a,
		.page-links > .page-links-title,
		.comment-author,
		.comment-reply-title small a:hover,
		.comment-reply-title small a:focus {
			color: %1$s
		}

		blockquote,
		.menu-toggle.toggled-on,
		.menu-toggle.toggled-on:hover,
		.menu-toggle.toggled-on:focus,
		.post-navigation,
		.post-navigation div + div,
		.pagination,
		.widget,
		.page-header,
		.page-links a,
		.comments-title,
		.comment-reply-title {
			border-color: %1$s;
		}

		button,
		button[disabled]:hover,
		button[disabled]:focus,
		input[type="button"],
		input[type="button"][disabled]:hover,
		input[type="button"][disabled]:focus,
		input[type="reset"],
		input[type="reset"][disabled]:hover,
		input[type="reset"][disabled]:focus,
		input[type="submit"],
		input[type="submit"][disabled]:hover,
		input[type="submit"][disabled]:focus,
		.menu-toggle.toggled-on,
		.menu-toggle.toggled-on:hover,
		.menu-toggle.toggled-on:focus,
		.pagination:before,
		.pagination:after,
		.pagination .prev,
		.pagination .next,
		.page-links a {
			background-color: %1$s;
		}

		/* Border Color */
		fieldset,
		pre,
		abbr,
		acronym,
		table,
		th,
		td,
		input[type="date"],
		input[type="time"],
		input[type="datetime-local"],
		input[type="week"],
		input[type="month"],
		input[type="text"],
		input[type="email"],
		input[type="url"],
		input[type="password"],
		input[type="search"],
		input[type="tel"],
		input[type="number"],
		textarea,
		.main-navigation li,
		.main-navigation .primary-menu,
		.menu-toggle,
		.dropdown-toggle:after,
		.social-navigation a,
		.image-navigation,
		.comment-navigation,
		.tagcloud a,
		.entry-content,
		.entry-summary,
		.page-links a,
		.page-links > span,
		.comment-list article,
		.comment-list .pingback,
		.comment-list .trackback,
		.comment-reply-link,
		.no-comments,
		.widecolumn .mu_register .mu_alert {
			border-color: %1$s; /* Fallback for IE7 and IE8 */
			border-color: %2$s;
		}

		hr,
		code {
			background-color: %1$s; /* Fallback for IE7 and IE8 */
			background-color: %2$s;
		}

		@media screen and (min-width: 56.875em) {
			.main-navigation ul ul,
			.main-navigation ul ul li {
				border-color: %2$s;
			}

			.main-navigation ul ul:before {
				border-top-color: %2$s;
				border-bottom-color: %2$s;
			}
		}
	';

	wp_add_inline_style( 'twentysixteen-style', sprintf( $css, $main_text_color, $border_color ) );
}
add_action( 'wp_enqueue_scripts', 'twentysixteen_main_text_color_css', 11 );

/**
 * Enqueues front-end CSS for the secondary text color.
 *
 * @since Twenty Sixteen 1.0
 *
 * @see wp_add_inline_style()
 */
function twentysixteen_secondary_text_color_css() {
	$color_scheme    = twentysixteen_get_color_scheme();
	$default_color   = $color_scheme[4];
	$secondary_text_color = get_theme_mod( 'secondary_text_color', $default_color );

	// Don't do anything if the current color is the default.
	if ( $secondary_text_color === $default_color ) {
		return;
	}

	$css = '
		/* Custom Secondary Text Color */

		/**
		 * IE8 and earlier will drop any block with CSS3 selectors.
		 * Do not combine these styles with the next block.
		 */
		body:not(.search-results) .entry-summary {
			color: %1$s;
		}

		blockquote,
		.post-password-form label,
		a:hover,
		a:focus,
		a:active,
		.post-navigation .meta-nav,
		.image-navigation,
		.comment-navigation,
		.widget_recent_entries .post-date,
		.widget_rss .rss-date,
		.widget_rss cite,
		.site-description,
		.author-bio,
		.entry-footer,
		.entry-footer a,
		.sticky-post,
		.taxonomy-description,
		.entry-caption,
		.comment-metadata,
		.pingback .edit-link,
		.comment-metadata a,
		.pingback .comment-edit-link,
		.comment-form label,
		.comment-notes,
		.comment-awaiting-moderation,
		.logged-in-as,
		.form-allowed-tags,
		.site-info,
		.site-info a,
		.wp-caption .wp-caption-text,
		.gallery-caption,
		.widecolumn label,
		.widecolumn .mu_register label {
			color: %1$s;
		}

		.widget_calendar tbody a:hover,
		.widget_calendar tbody a:focus {
			background-color: %1$s;
		}
	';

	wp_add_inline_style( 'twentysixteen-style', sprintf( $css, $secondary_text_color ) );
}
add_action( 'wp_enqueue_scripts', 'twentysixteen_secondary_text_color_css', 11 );
home/xbodynamge/www/wp-content/themes/zerif-lite/inc/customizer.php000064400000230537151123033170021606 0ustar00<?php
/**
 * Zerif Theme Customizer
 *
 * @package zerif
 */

/**
 * Add postMessage support for site title and description for the Theme Customizer.
 *
 * @param WP_Customize_Manager $wp_customize Theme Customizer object.
 */
function zerif_customize_register( $wp_customize ) {

	/**
	 * Class Zerif_Customizer_Number_Control
	 */
	class Zerif_Customizer_Number_Control extends WP_Customize_Control {

		/**
		 * Type of control
		 *
		 * @var $type string Type of control
		 */
		public $type = 'number';

		/**
		 * Render the control
		 */
		public function render_content() {
			?>
			<label>
				<span class="customize-control-title"><?php echo esc_html( $this->label ); ?></span>
				<input type="number" <?php $this->link(); ?> value="<?php echo intval( $this->value() ); ?>"/>
			</label>
			<?php
		}
	}

	/* Custom panel type - used for multiple levels of panels */
	if ( class_exists( 'WP_Customize_Panel' ) ) {

		/**
		 * Class Zerif_WP_Customize_Panel
		 */
		class Zerif_WP_Customize_Panel extends WP_Customize_Panel {

			/**
			 * Panel
			 *
			 * @var $panel string Panel
			 */
			public $panel;

			/**
			 * Panel type
			 *
			 * @var $type string Panel type.
			 */
			public $type = 'zerif_panel';

			/**
			 * Form the json
			 */
			public function json() {

				$array                   = wp_array_slice_assoc(
					(array) $this, array(
						'id',
						'description',
						'priority',
						'type',
						'panel',
					)
				);
				$array['title']          = html_entity_decode( $this->title, ENT_QUOTES, get_bloginfo( 'charset' ) );
				$array['content']        = $this->get_content();
				$array['active']         = $this->active();
				$array['instanceNumber'] = $this->instance_number;

				return $array;

			}

		}

	}

	$wp_customize->register_panel_type( 'Zerif_WP_Customize_Panel' );

	/**
	 * Upsells
	 */
	require_once( trailingslashit( get_template_directory() ) . 'inc/class/class-customizer-theme-info-control/class-customizer-theme-info-control.php' );

	$wp_customize->add_section(
		'zerif_theme_info_main_section', array(
			'title'    => __( 'View PRO version', 'zerif-lite' ),
			'priority' => 1,
		)
	);
	$wp_customize->add_setting(
		'zerif_theme_info_main_control', array(
			'sanitize_callback' => 'esc_html',
		)
	);

	/*
	 * View Pro Version Section Control
	 */
	$wp_customize->add_control(
		new Zerif_Control_Upsell_Theme_Info(
			$wp_customize, 'zerif_theme_info_main_control', array(
				'section'     => 'zerif_theme_info_main_section',
				'priority'    => 100,
				'options'     => array(
					esc_html__( 'Section Reordering', 'zerif-lite' ),
					esc_html__( 'Background video', 'zerif-lite' ),
					esc_html__( 'Portfolio', 'zerif-lite' ),
					esc_html__( 'Extra colors', 'zerif-lite' ),
					esc_html__( 'Packages section', 'zerif-lite' ),
					esc_html__( 'Subscribe section', 'zerif-lite' ),
					esc_html__( 'Google map section', 'zerif-lite' ),
					esc_html__( 'Support', 'zerif-lite' ),
				),
				'button_url'  => esc_url( 'https://themeisle.com/themes/zerif-pro-one-page-wordpress-theme/upgrade/' ),
				'button_text' => esc_html__( 'View PRO version', 'zerif-lite' ),
			)
		)
	);

	/**
	 * Extra Colors Notice
	 */
	$wp_customize->add_setting(
		'zerif_theme_info_colors_section_control', array(
			'sanitize_callback' => 'esc_html',
		)
	);
	$wp_customize->add_control(
		new Zerif_Control_Upsell_Theme_Info(
			$wp_customize, 'zerif_theme_info_colors_section_control', array(
				'section'            => 'colors',
				'priority'           => 500,
				'options'            => array(
					esc_html__( 'Extra colors', 'zerif-lite' ),
				),
				'explained_features' => array(
					esc_html__( 'Get full color schemes support for your site.', 'zerif-lite' ),
				),
				'button_url'         => esc_url( 'https://themeisle.com/themes/zerif-pro-one-page-wordpress-theme/upgrade/' ),
				'button_text'        => esc_html__( 'View PRO version', 'zerif-lite' ),
			)
		)
	);

	/**
	 * Background video notice
	 */
	$wp_customize->add_setting(
		'zerif_theme_info_header_section_control', array(
			'sanitize_callback' => 'esc_html',
		)
	);
	$wp_customize->add_control(
		new Zerif_Control_Upsell_Theme_Info(
			$wp_customize, 'zerif_theme_info_header_section_control', array(
				'section'     => 'background_image',
				'priority'    => 500,
				'options'     => array(
					esc_html__( 'Background video', 'zerif-lite' ),
				),
				'button_url'  => esc_url( 'https://themeisle.com/themes/zerif-pro-one-page-wordpress-theme/upgrade/' ),
				'button_text' => esc_html__( 'View PRO version', 'zerif-lite' ),
			)
		)
	);

	$wp_customize->get_setting( 'blogname' )->transport         = 'postMessage';
	$wp_customize->get_setting( 'blogdescription' )->transport  = 'postMessage';
	$wp_customize->get_setting( 'header_textcolor' )->transport = 'postMessage';
	$wp_customize->get_setting( 'custom_logo' )->transport      = 'postMessage';

	if ( isset( $wp_customize->selective_refresh ) ) {
		$wp_customize->selective_refresh->add_partial(
			'custom_logo', array(
				'selector'        => '.navbar-brand',
				'settings'        => 'custom_logo',
				'render_callback' => 'zerif_custom_logo_callback',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'zerif_bigtitle_title_2', array(
				'selector'        => '.home-header-wrap .intro-text',
				'settings'        => 'zerif_bigtitle_title_2',
				'render_callback' => 'zerif_bigtitle_title_2_render_callback',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'zerif_bigtitle_redbutton_label_2', array(
				'selector'        => '.buttons a.red-btn',
				'settings'        => 'zerif_bigtitle_redbutton_label_2',
				'render_callback' => 'zerif_bigtitle_redbutton_label_2_render_callback',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'zerif_bigtitle_greenbutton_label', array(
				'selector'        => '.buttons a.green-btn',
				'settings'        => 'zerif_bigtitle_greenbutton_label',
				'render_callback' => 'zerif_bigtitle_greenbutton_label_render_callback',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'zerif_ourfocus_title_2', array(
				'selector'        => '#focus .section-header h2',
				'settings'        => 'zerif_ourfocus_title_2',
				'render_callback' => 'zerif_ourfocus_title_2_render_callback',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'zerif_ourfocus_subtitle', array(
				'selector'        => '#focus .section-header div.section-legend',
				'settings'        => 'zerif_ourfocus_subtitle',
				'render_callback' => 'zerif_ourfocus_subtitle_render_callback',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'zerif_ourteam_title', array(
				'selector'        => '#team .section-header h2',
				'settings'        => 'zerif_ourteam_title',
				'render_callback' => 'zerif_ourteam_title_render_callback',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'zerif_ourteam_subtitle', array(
				'selector'        => '#team .section-header div.section-legend',
				'settings'        => 'zerif_ourteam_subtitle',
				'render_callback' => 'zerif_ourteam_subtitle_render_callback',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'zerif_aboutus_title', array(
				'selector'        => '#aboutus .section-header h2',
				'settings'        => 'zerif_aboutus_title',
				'render_callback' => 'zerif_aboutus_title_render_callback',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'zerif_aboutus_subtitle', array(
				'selector'        => '#aboutus .section-header div.section-legend',
				'settings'        => 'zerif_aboutus_subtitle',
				'render_callback' => 'zerif_aboutus_subtitle_render_callback',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'zerif_aboutus_biglefttitle', array(
				'selector'        => '#aboutus .big-intro',
				'settings'        => 'zerif_aboutus_biglefttitle',
				'render_callback' => 'zerif_aboutus_biglefttitle_render_callback',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'zerif_aboutus_text', array(
				'selector'        => '#aboutus .text_and_skills p',
				'settings'        => 'zerif_aboutus_text',
				'render_callback' => 'zerif_aboutus_text_render_callback',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'zerif_aboutus_feature1_title', array(
				'selector'        => '#aboutus .skill_1 label',
				'settings'        => 'zerif_aboutus_feature1_title',
				'render_callback' => 'zerif_aboutus_feature1_title_render_callback',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'zerif_aboutus_feature2_title', array(
				'selector'        => '#aboutus .skill_2 label',
				'settings'        => 'zerif_aboutus_feature2_title',
				'render_callback' => 'zerif_aboutus_feature2_title_render_callback',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'zerif_aboutus_feature3_title', array(
				'selector'        => '#aboutus .skill_3 label',
				'settings'        => 'zerif_aboutus_feature3_title',
				'render_callback' => 'zerif_aboutus_feature3_title_render_callback',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'zerif_aboutus_feature4_title', array(
				'selector'        => '#aboutus .skill_4 label',
				'settings'        => 'zerif_aboutus_feature4_title',
				'render_callback' => 'zerif_aboutus_feature4_title_render_callback',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'zerif_testimonials_title', array(
				'selector'        => '#testimonials .section-header h2',
				'settings'        => 'zerif_testimonials_title',
				'render_callback' => 'zerif_testimonials_title_render_callback',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'zerif_contactus_title', array(
				'selector'        => '#contact .section-header h2',
				'render_callback' => 'zerif_contactus_title_render_callback',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'zerif_contactus_subtitle', array(
				'selector'        => '#contact .section-legend',
				'render_callback' => 'zerif_contactus_subtitle_render_callback',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'zerif_contactus_button_label', array(
				'selector'        => '#contact .pirate_forms .contact_submit_wrap',
				'render_callback' => 'zerif_contactus_button_label_render_callback',
			)
		);

		$wp_customize->selective_refresh->add_partial(
			'zerif_socials_facebook', array(
				'selector'        => '#footer .social #facebook',
				'settings'        => 'zerif_socials_facebook',
				'render_callback' => 'zerif_socials_facebook_render_callback',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'zerif_socials_twitter', array(
				'selector'        => '#footer .social #twitter',
				'settings'        => 'zerif_socials_twitter',
				'render_callback' => 'zerif_socials_twitter_render_callback',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'zerif_socials_linkedin', array(
				'selector'        => '#footer .social #linkedin',
				'settings'        => 'zerif_socials_linkedin',
				'render_callback' => 'zerif_socials_linkedin_render_callback',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'zerif_socials_behance', array(
				'selector'        => '#footer .social #behance',
				'settings'        => 'zerif_socials_behance',
				'render_callback' => 'zerif_socials_behance_render_callback',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'zerif_socials_dribbble', array(
				'selector'        => '#footer .social #dribbble',
				'settings'        => 'zerif_socials_dribbble',
				'render_callback' => 'zerif_socials_dribbble_render_callback',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'zerif_socials_instagram', array(
				'selector'        => '#footer .social #instagram',
				'settings'        => 'zerif_socials_instagram',
				'render_callback' => 'zerif_socials_instagram_render_callback',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'zerif_address', array(
				'selector'        => '.zerif-footer-address',
				'settings'        => 'zerif_address',
				'render_callback' => 'zerif_address_render_callback',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'zerif_email', array(
				'selector'        => '.zerif-footer-email',
				'settings'        => 'zerif_email',
				'render_callback' => 'zerif_email_render_callback',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'zerif_phone', array(
				'selector'        => '.zerif-footer-phone',
				'settings'        => 'zerif_phone',
				'render_callback' => 'zerif_phone_render_callback',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'zerif_address_icon', array(
				'selector'        => '.company-details .icon-top.red-text',
				'settings'        => 'zerif_address_icon',
				'render_callback' => 'zerif_address_icon_render_callback',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'zerif_email_icon', array(
				'selector'        => '.company-details .icon-top.green-text',
				'settings'        => 'zerif_email_icon',
				'render_callback' => 'zerif_email_icon_render_callback',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'zerif_phone_icon', array(
				'selector'        => '.company-details .icon-top.blue-text',
				'settings'        => 'zerif_phone_icon',
				'render_callback' => 'zerif_phone_icon_render_callback',
			)
		);
	}

	/**
	 * Render callback for zerif_bigtitle_title_2
	 *
	 * @return mixed
	 */
	function zerif_bigtitle_title_2_render_callback() {
		return wp_kses_post( get_theme_mod( 'zerif_bigtitle_title_2' ) );
	}

	/**
	 * Render callback for zerif_bigtitle_redbutton_label_2
	 *
	 * @return mixed
	 */
	function zerif_bigtitle_redbutton_label_2_render_callback() {
		return wp_kses_post( get_theme_mod( 'zerif_bigtitle_redbutton_label_2' ) );
	}

	/**
	 * Render callback for zerif_bigtitle_greenbutton_label
	 *
	 * @return mixed
	 */
	function zerif_bigtitle_greenbutton_label_render_callback() {
		return wp_kses_post( get_theme_mod( 'zerif_bigtitle_greenbutton_label' ) );
	}

	/**
	 * Render callback for zerif_ourfocus_title_2
	 *
	 * @return mixed
	 */
	function zerif_ourfocus_title_2_render_callback() {
		return wp_kses_post( get_theme_mod( 'zerif_ourfocus_title_2' ) );
	}

	/**
	 * Render callback for zerif_ourfocus_subtitle
	 *
	 * @return mixed
	 */
	function zerif_ourfocus_subtitle_render_callback() {
		return wp_kses_post( get_theme_mod( 'zerif_ourfocus_subtitle' ) );
	}

	/**
	 * Render callback for zerif_ourteam_title
	 *
	 * @return mixed
	 */
	function zerif_ourteam_title_render_callback() {
		return wp_kses_post( get_theme_mod( 'zerif_ourteam_title' ) );
	}

	/**
	 * Render callback for zerif_ourteam_subtitle
	 *
	 * @return mixed
	 */
	function zerif_ourteam_subtitle_render_callback() {
		return wp_kses_post( get_theme_mod( 'zerif_ourteam_subtitle' ) );
	}

	/**
	 * Render callback for zerif_aboutus_title
	 *
	 * @return mixed
	 */
	function zerif_aboutus_title_render_callback() {
		return wp_kses_post( get_theme_mod( 'zerif_aboutus_title' ) );
	}

	/**
	 * Render callback for zerif_aboutus_subtitle
	 *
	 * @return mixed
	 */
	function zerif_aboutus_subtitle_render_callback() {
		return wp_kses_post( get_theme_mod( 'zerif_aboutus_subtitle' ) );
	}

	/**
	 * Render callback for zerif_aboutus_biglefttitle
	 *
	 * @return mixed
	 */
	function zerif_aboutus_biglefttitle_render_callback() {
		return wp_kses_post( get_theme_mod( 'zerif_aboutus_biglefttitle' ) );
	}

	/**
	 * Render callback for zerif_aboutus_text
	 *
	 * @return mixed
	 */
	function zerif_aboutus_text_render_callback() {
		return wp_kses_post( get_theme_mod( 'zerif_aboutus_text' ) );
	}

	/**
	 * Render callback for zerif_aboutus_feature1_title
	 *
	 * @return mixed
	 */
	function zerif_aboutus_feature1_title_render_callback() {
		return wp_kses_post( get_theme_mod( 'zerif_aboutus_feature1_title' ) );
	}

	/**
	 * Render callback for zerif_aboutus_feature2_title
	 *
	 * @return mixed
	 */
	function zerif_aboutus_feature2_title_render_callback() {
		return wp_kses_post( get_theme_mod( 'zerif_aboutus_feature2_title' ) );
	}

	/**
	 * Render callback for zerif_aboutus_feature3_title
	 *
	 * @return mixed
	 */
	function zerif_aboutus_feature3_title_render_callback() {
		return wp_kses_post( get_theme_mod( 'zerif_aboutus_feature3_title' ) );
	}

	/**
	 * Render callback for zerif_aboutus_feature4_title
	 *
	 * @return mixed
	 */
	function zerif_aboutus_feature4_title_render_callback() {
		return wp_kses_post( get_theme_mod( 'zerif_aboutus_feature4_title' ) );
	}

	/**
	 * Render callback for zerif_testimonials_title
	 *
	 * @return mixed
	 */
	function zerif_testimonials_title_render_callback() {
		return wp_kses_post( get_theme_mod( 'zerif_testimonials_title' ) );
	}

	/**
	 * Render callback for zerif_contactus_title
	 *
	 * @return mixed
	 */
	function zerif_contactus_title_render_callback() {
		return wp_kses_post( get_theme_mod( 'zerif_contactus_title' ) );
	}

	/**
	 * Render callback for zerif_contactus_button_label
	 */
	function zerif_contactus_button_label_render_callback() {
	?>
		<button id="pirate-forms-contact-submit" name="pirate-forms-contact-submit" class="pirate-forms-submit-button" type="submit">
			<?php echo wp_kses_post( get_theme_mod( 'zerif_contactus_button_label' ) ); ?>
		</button>
		<?php
	}

	/**
	 * Render callback for erif_contactus_subtitle
	 *
	 * @return string
	 */
	function zerif_contactus_subtitle_render_callback() {
		return wp_kses_post( get_theme_mod( 'zerif_contactus_subtitle' ) );
	}

	/**
	 * Render callback for zerif_socials_facebook
	 *
	 * @return mixed
	 */
	function zerif_socials_facebook_render_callback() {
		return '<a href="' . esc_url( get_theme_mod( 'zerif_socials_facebook' ) ) . '"><span class="sr-only">' . __( 'Facebook link', 'zerif-lite' ) . '</span> <i class="fa fa-facebook"></i></a>';
	}

	/**
	 * Render callback for zerif_socials_twitter
	 *
	 * @return mixed
	 */
	function zerif_socials_twitter_render_callback() {
		return '<a href="' . esc_url( get_theme_mod( 'zerif_socials_twitter' ) ) . '"><span class="sr-only">' . __( 'Twitter link', 'zerif-lite' ) . '</span> <i class="fa fa-twitter"></i></a>';
	}

	/**
	 * Render callback for zerif_socials_linkedin
	 *
	 * @return mixed
	 */
	function zerif_socials_linkedin_render_callback() {
		return '<a href="' . esc_url( get_theme_mod( 'zerif_socials_linkedin' ) ) . '"><span class="sr-only">' . __( 'Linkedin link', 'zerif-lite' ) . '</span> <i class="fa fa-linkedin"></i></a>';
	}

	/**
	 * Render callback for zerif_socials_behance
	 *
	 * @return mixed
	 */
	function zerif_socials_behance_render_callback() {
		return '<a href="' . esc_url( get_theme_mod( 'zerif_socials_behance' ) ) . '"><span class="sr-only">' . __( 'Behance link', 'zerif-lite' ) . '</span> <i class="fa fa-behance"></i></a>';
	}

	/**
	 * Render callback for zerif_socials_dribbble
	 *
	 * @return mixed
	 */
	function zerif_socials_dribbble_render_callback() {
		return '<a href="' . esc_url( get_theme_mod( 'zerif_socials_dribbble' ) ) . '"><span class="sr-only">' . __( 'Dribble link', 'zerif-lite' ) . '</span> <i class="fa fa-dribbble"></i></a>';
	}

	/**
	 * Render callback for zerif_socials_instagram
	 *
	 * @return mixed
	 */
	function zerif_socials_instagram_render_callback() {
		return '<a href="' . esc_url( get_theme_mod( 'zerif_socials_instagram' ) ) . '"><span class="sr-only">' . __( 'Instagram link', 'zerif-lite' ) . '</span> <i class="fa fa-instagram"></i></a>';
	}

	/**
	 * Render callback for zerif_address
	 *
	 * @return mixed
	 */
	function zerif_address_render_callback() {
		return wp_kses_post( get_theme_mod( 'zerif_address' ) );
	}

	/**
	 * Render callback for zerif_email
	 *
	 * @return mixed
	 */
	function zerif_email_render_callback() {
		return wp_kses_post( get_theme_mod( 'zerif_email' ) );
	}

	/**
	 * Render callback for zerif_phone
	 *
	 * @return mixed
	 */
	function zerif_phone_render_callback() {
		return wp_kses_post( get_theme_mod( 'zerif_phone' ) );
	}

	/**
	 * Render callback for zerif_address_icon
	 *
	 * @return mixed
	 */
	function zerif_address_icon_render_callback() {
		return '<img src="' . esc_url( get_theme_mod( 'zerif_address_icon' ) ) . '">';
	}

	/**
	 * Render callback for zerif_email_icon
	 *
	 * @return mixed
	 */
	function zerif_email_icon_render_callback() {
		return '<img src="' . esc_url( get_theme_mod( 'zerif_email_icon' ) ) . '">';
	}

	/**
	 * Render callback for zerif_phone_icon
	 *
	 * @return mixed
	 */
	function zerif_phone_icon_render_callback() {
		return '<img src="' . esc_url( get_theme_mod( 'zerif_phone_icon' ) ) . '">';
	}

	/**
	 * ADVANCED OPTIONS
	 */

	$wp_customize->add_panel(
		'zerif_advanced_options_panel', array(
			'title'    => esc_html__( 'Advanced options', 'zerif-lite' ),
			'priority' => 150,
		)
	);

	$wp_customize->add_section(
		'zerif_general_section', array(
			'title'    => __( 'General options', 'zerif-lite' ),
			'priority' => 1,
			'panel'    => 'zerif_advanced_options_panel',
		)
	);

	$wp_customize->add_setting(
		'zerif_use_safe_font', array(
			'sanitize_callback' => 'zerif_sanitize_checkbox',
		)
	);

	$wp_customize->add_control(
		'zerif_use_safe_font', array(
			'type'     => 'checkbox',
			'label'    => 'Use safe font?',
			'section'  => 'zerif_general_section',
			'priority' => 1,
		)
	);

	/* Disable preloader */
	$wp_customize->add_setting(
		'zerif_disable_preloader', array(
			'sanitize_callback' => 'zerif_sanitize_checkbox',
		)
	);

	$wp_customize->add_control(
		'zerif_disable_preloader', array(
			'type'     => 'checkbox',
			'label'    => __( 'Disable preloader?', 'zerif-lite' ),
			'section'  => 'zerif_general_section',
			'priority' => 2,
		)
	);

	/* Disable smooth scroll */
	$wp_customize->add_setting(
		'zerif_disable_smooth_scroll', array(
			'sanitize_callback' => 'zerif_sanitize_checkbox',
		)
	);

	$wp_customize->add_control(
		'zerif_disable_smooth_scroll', array(
			'type'     => 'checkbox',
			'label'    => __( 'Disable smooth scroll?', 'zerif-lite' ),
			'section'  => 'zerif_general_section',
			'priority' => 3,
		)
	);

	/* Enable accessibility */
	$wp_customize->add_setting(
		'zerif_accessibility', array(
			'sanitize_callback' => 'zerif_sanitize_checkbox',
		)
	);

	$wp_customize->add_control(
		'zerif_accessibility', array(
			'type'     => 'checkbox',
			'label'    => __( 'Enable accessibility?', 'zerif-lite' ),
			'section'  => 'zerif_general_section',
			'priority' => 4,
		)
	);

	/* Change the template to full width for page.php */
	$wp_customize->add_setting(
		'zerif_change_to_full_width', array(
			'sanitize_callback' => 'zerif_sanitize_checkbox',
		)
	);

	$wp_customize->add_control(
		'zerif_change_to_full_width', array(
			'type'     => 'checkbox',
			'label'    => 'Change the template to Full width for all the pages?',
			'section'  => 'zerif_general_section',
			'priority' => 6,
		)
	);

	/**
	 * Option to get the frontpage settings to the old default template if a static frontpage is selected
	 * Only for new users
	 */
	if ( ! zerif_check_if_old_version_of_theme() ) {
		$wp_customize->add_setting(
			'zerif_keep_old_fp_template', array(
				'sanitize_callback' => 'zerif_sanitize_checkbox',
			)
		);
		$wp_customize->add_control(
			'zerif_keep_old_fp_template', array(
				'type'     => 'checkbox',
				'label'    => esc_html__( 'Keep the old static frontpage template?', 'zerif-lite' ),
				'section'  => 'zerif_general_section',
				'priority' => 7,
			)
		);
	}

	$wp_customize->get_section( 'colors' )->panel           = 'zerif_advanced_options_panel';
	$wp_customize->get_section( 'background_image' )->panel = 'zerif_advanced_options_panel';

	if ( ! zerif_check_if_old_version_of_theme() ) {
		$wp_customize->add_section(
			'zerif_blog_header_section', array(
				'title' => __( 'Blog Header Options', 'zerif-lite' ),
				'panel' => 'zerif_advanced_options_panel',
			)
		);

		/* Blog Header Title */
		$wp_customize->add_setting(
			'zerif_blog_header_title', array(
				'default'           => esc_html__( 'Blog', 'zerif-lite' ),
				'transport'         => 'postMessage',
				'sanitize_callback' => 'esc_html',
			)
		);

		$wp_customize->add_control(
			'zerif_blog_header_title', array(
				'label'    => __( 'Title', 'zerif-lite' ),
				'section'  => 'zerif_blog_header_section',
				'priority' => 1,
			)
		);

		/* Blog Header Subtitle */
		$wp_customize->add_setting(
			'zerif_blog_header_subtitle', array(
				'default'           => esc_html__( 'Zerif supports a custom frontpage', 'zerif-lite' ),
				'transport'         => 'postMessage',
				'sanitize_callback' => 'esc_html',
			)
		);

		$wp_customize->add_control(
			'zerif_blog_header_subtitle', array(
				'label'    => __( 'Subtitle', 'zerif-lite' ),
				'section'  => 'zerif_blog_header_section',
				'priority' => 2,
			)
		);

		$wp_customize->selective_refresh->add_partial(
			'zerif_blog_header_title_subtitle', array(
				'selector'        => '.blog-header-wrap',
				'settings'        => array( 'zerif_blog_header_title', 'zerif_blog_header_subtitle' ),
				'render_callback' => 'zerif_blog_header_title_subtitle_callback',
			)
		);

		/**
		 * Callback for changing the title and subtitle on the blog
		 */
		function zerif_blog_header_title_subtitle_callback() {
			$title    = get_theme_mod( 'zerif_blog_header_title' );
			$subtitle = get_theme_mod( 'zerif_blog_header_subtitle' );
			$output   = '';
			if ( ! empty( $title ) || ! empty( $subtitle ) ) {
				$output .= '<div class="blog-header-content-wrap">';

				if ( ! empty( $title ) ) {
					$output .= '<h1 class="intro-text">' . esc_html( $title ) . '</h1>';
				}

				if ( ! empty( $subtitle ) ) {
					$output .= '<p class="blog-header-subtitle">' . esc_html( $subtitle ) . '</p>';
				}

				$output .= '</div>';
			}

			return $output;
		}
	}

	/**
	 * FRONTPAGE SECTIONS PANEL
	 */

	if ( zerif_check_if_wp_greater_than_4_7() ) {

		$zerif_frontpage_sections_panel = new Zerif_WP_Customize_Panel(
			$wp_customize, 'zerif_frontpage_sections_panel', array(
				'title'    => esc_html__( 'Frontpage sections', 'zerif-lite' ),
				'priority' => 29,
			)
		);

		$wp_customize->add_panel( $zerif_frontpage_sections_panel );
	}

	/**
	 * BIG TITLE SECTION
	 */

	if ( zerif_check_if_wp_greater_than_4_7() ) {

		$panel_big_title = new Zerif_WP_Customize_Panel(
			$wp_customize, 'panel_big_title', array(
				'title'    => esc_html__( 'Big title section', 'zerif-lite' ),
				'priority' => 30,
				'panel'    => 'zerif_frontpage_sections_panel',
			)
		);

		$wp_customize->add_panel( $panel_big_title );

	} else {

		$wp_customize->add_panel(
			'panel_big_title', array(
				'title'    => esc_html__( 'Big title section', 'zerif-lite' ),
				'priority' => 30,
			)
		);

	}

	$wp_customize->add_section(
		'zerif_bigtitle_section', array(
			'title'    => __( 'Main content', 'zerif-lite' ),
			'priority' => 1,
			'panel'    => 'panel_big_title',
		)
	);

	/* show/hide */
	$wp_customize->add_setting(
		'zerif_bigtitle_show', array(
			'sanitize_callback' => 'zerif_sanitize_checkbox',
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		'zerif_bigtitle_show', array(
			'type'     => 'checkbox',
			'label'    => __( 'Hide big title section?', 'zerif-lite' ),
			'section'  => 'zerif_bigtitle_section',
			'priority' => 1,
		)
	);

	/*
	 * Title
	 *
	 * define a new option with _2 to be used to differentiate between the old users and new ones
	 *
	 * get the old option's value and put it as default for the new _2 option
	 */

	$zerif_bigtitle_title_default = get_theme_mod( 'zerif_bigtitle_title' );

	if ( current_user_can( 'edit_theme_options' ) ) {
		$wp_customize->add_setting(
			'zerif_bigtitle_title_2', array(
				'sanitize_callback' => 'zerif_sanitize_input',
				/* translators: Big title section */
				'default'           => ! empty( $zerif_bigtitle_title_default ) ? $zerif_bigtitle_title_default : sprintf( __( 'This piece of text can be changed in %s', 'zerif-lite' ), __( 'Big title section', 'zerif-lite' ) ),
				'transport'         => 'postMessage',
			)
		);
	} else {
		$wp_customize->add_setting(
			'zerif_bigtitle_title_2', array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'transport'         => 'postMessage',
			)
		);
	}

	$wp_customize->add_control(
		'zerif_bigtitle_title_2', array(
			'label'    => __( 'Title', 'zerif-lite' ),
			'section'  => 'zerif_bigtitle_section',
			'priority' => 2,
		)
	);

	/*
	 * red button
	 *
	 * define a new option with _2 to be used to differentiate between the old users and new ones
	 *
	 * get the old option's value and put it as default for the new _2 option
	 */
	$zerif_bigtitle_redbutton_label_default = get_theme_mod( 'zerif_bigtitle_redbutton_label' );

	if ( current_user_can( 'edit_theme_options' ) ) {
		$wp_customize->add_setting(
			'zerif_bigtitle_redbutton_label_2', array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'default'           => ! empty( $zerif_bigtitle_redbutton_label_default ) ? $zerif_bigtitle_redbutton_label_default : __( 'Customize this button', 'zerif-lite' ),
				'transport'         => 'postMessage',
			)
		);
	} else {
		$wp_customize->add_setting(
			'zerif_bigtitle_redbutton_label_2', array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'transport'         => 'postMessage',
			)
		);
	}

	$wp_customize->add_control(
		'zerif_bigtitle_redbutton_label_2', array(
			'label'    => __( 'Red button label', 'zerif-lite' ),
			'section'  => 'zerif_bigtitle_section',
			'priority' => 3,
		)
	);

	$wp_customize->add_setting(
		'zerif_bigtitle_redbutton_url', array(
			'sanitize_callback' => 'esc_url_raw',
			'default'           => esc_url( home_url( '/' ) ) . '#focus',
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		'zerif_bigtitle_redbutton_url', array(
			'label'    => __( 'Red button link', 'zerif-lite' ),
			'section'  => 'zerif_bigtitle_section',
			'priority' => 4,
		)
	);

	/**
	 * Green button
	 */

	if ( current_user_can( 'edit_theme_options' ) ) {
		$wp_customize->add_setting(
			'zerif_bigtitle_greenbutton_label', array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'default'           => __( 'Customize this button', 'zerif-lite' ),
				'transport'         => 'postMessage',
			)
		);
	} else {
		$wp_customize->add_setting(
			'zerif_bigtitle_greenbutton_label', array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'transport'         => 'postMessage',
			)
		);
	}

	$wp_customize->add_control(
		'zerif_bigtitle_greenbutton_label', array(
			'label'    => __( 'Green button label', 'zerif-lite' ),
			'section'  => 'zerif_bigtitle_section',
			'priority' => 5,
		)
	);

	$wp_customize->add_setting(
		'zerif_bigtitle_greenbutton_url', array(
			'sanitize_callback' => 'esc_url_raw',
			'default'           => esc_url( home_url( '/' ) ) . '#focus',
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		'zerif_bigtitle_greenbutton_url', array(
			'label'    => __( 'Green button link', 'zerif-lite' ),
			'section'  => 'zerif_bigtitle_section',
			'priority' => 6,
		)
	);

	/**
	 * Slider shortcode
	 */

	$wp_customize->add_setting(
		'zerif_bigtitle_slider_shortcode', array(
			'sanitize_callback' => 'zerif_sanitize_input',
		)
	);

	$wp_customize->add_control(
		'zerif_bigtitle_slider_shortcode', array(
			'label'       => __( 'Slider shortcode', 'zerif-lite' ),
			'description' => __( 'You can replace the homepage slider with any plugin you like, just copy the shortcode generated and paste it here.', 'zerif-lite' ),
			'section'     => 'zerif_bigtitle_section',
			'priority'    => 7,
		)
	);

	/**
	 * PARALLAX IMAGES
	 */

	$wp_customize->add_section(
		'zerif_parallax_section', array(
			'title'    => __( 'Parallax effect', 'zerif-lite' ),
			'priority' => 2,
			'panel'    => 'panel_big_title',
		)
	);

	/* show/hide */
	$wp_customize->add_setting(
		'zerif_parallax_show', array(
			'sanitize_callback' => 'zerif_sanitize_checkbox',
		)
	);

	$wp_customize->add_control(
		'zerif_parallax_show', array(
			'type'     => 'checkbox',
			'label'    => __( 'Use parallax effect?', 'zerif-lite' ),
			'section'  => 'zerif_parallax_section',
			'priority' => 1,
		)
	);

	/* IMAGE 1*/
	$wp_customize->add_setting(
		'zerif_parallax_img1', array(
			'sanitize_callback' => 'esc_url_raw',
			'default'           => get_template_directory_uri() . '/images/background1.jpg',
		)
	);

	$wp_customize->add_control(
		new WP_Customize_Image_Control(
			$wp_customize, 'themeslug_parallax_img1', array(
				'label'    => __( 'Image 1', 'zerif-lite' ),
				'section'  => 'zerif_parallax_section',
				'settings' => 'zerif_parallax_img1',
				'priority' => 1,
			)
		)
	);

	/* IMAGE 2 */
	$wp_customize->add_setting(
		'zerif_parallax_img2', array(
			'sanitize_callback' => 'esc_url_raw',
			'default'           => get_template_directory_uri() . '/images/background2.png',
		)
	);

	$wp_customize->add_control(
		new WP_Customize_Image_Control(
			$wp_customize, 'themeslug_parallax_img2', array(
				'label'    => __( 'Image 2', 'zerif-lite' ),
				'section'  => 'zerif_parallax_section',
				'settings' => 'zerif_parallax_img2',
				'priority' => 2,
			)
		)
	);

	/**
	 * OUR FOCUS SECTION
	 */

	$wp_customize->add_section(
		'zerif_ourfocus_section', array(
			'title'    => __( 'Our focus section', 'zerif-lite' ),
			'priority' => 31,
		)
	);

	if ( zerif_check_if_wp_greater_than_4_7() ) {
		$wp_customize->get_section( 'zerif_ourfocus_section' )->panel = 'zerif_frontpage_sections_panel';
	}

	/* show/hide */
	$wp_customize->add_setting(
		'zerif_ourfocus_show', array(
			'sanitize_callback' => 'zerif_sanitize_checkbox',
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		'zerif_ourfocus_show', array(
			'type'     => 'checkbox',
			'label'    => __( 'Hide our focus section?', 'zerif-lite' ),
			'section'  => 'zerif_ourfocus_section',
			'priority' => - 3,
		)
	);

	/*
	 * our focus title
	 *
	 * define a new option with _2 to be used to differentiate between the old users and new ones
	 *
	 * get the old option's value and put it as default for the new _2 option
	 *
	 */

	$zerif_ourfocus_title_default = get_theme_mod( 'zerif_ourfocus_title' );

	if ( current_user_can( 'edit_theme_options' ) ) {
		$wp_customize->add_setting(
			'zerif_ourfocus_title_2', array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'default'           => ! empty( $zerif_ourfocus_title_default ) ? $zerif_ourfocus_title_default : __( 'FEATURES', 'zerif-lite' ),
				'transport'         => 'postMessage',
			)
		);
	} else {
		$wp_customize->add_setting(
			'zerif_ourfocus_title_2', array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'transport'         => 'postMessage',
			)
		);
	}
	$wp_customize->add_control(
		'zerif_ourfocus_title_2', array(
			'label'    => __( 'Title', 'zerif-lite' ),
			'section'  => 'zerif_ourfocus_section',
			'priority' => - 2,
		)
	);

	/* Our focus subtitle */
	if ( current_user_can( 'edit_theme_options' ) ) {
		$wp_customize->add_setting(
			'zerif_ourfocus_subtitle', array(
				'sanitize_callback' => 'zerif_sanitize_input',
				/* translators: Our focus section */
				'default'           => sprintf( __( 'Change this subtitle in %s', 'zerif-lite' ), __( 'Our focus section', 'zerif-lite' ) ),
				'transport'         => 'postMessage',
			)
		);
	} else {
		$wp_customize->add_setting(
			'zerif_ourfocus_subtitle', array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'transport'         => 'postMessage',
			)
		);
	}

	$wp_customize->add_control(
		'zerif_ourfocus_subtitle', array(
			'label'    => __( 'Our focus subtitle', 'zerif-lite' ),
			'section'  => 'zerif_ourfocus_section',
			'priority' => - 1,
		)
	);

	$our_focus_section = $wp_customize->get_section( 'sidebar-widgets-sidebar-ourfocus' );
	if ( ! empty( $our_focus_section ) ) {
		if ( zerif_check_if_wp_greater_than_4_7() ) {
			$our_focus_section->panel = 'zerif_frontpage_sections_panel';
		} else {
			$our_focus_section->panel = '';
		}
		$our_focus_section->title                                        = __( 'Our focus section', 'zerif-lite' );
		$our_focus_section->priority                                     = 31;
		$wp_customize->get_control( 'zerif_ourfocus_show' )->section     = 'sidebar-widgets-sidebar-ourfocus';
		$wp_customize->get_control( 'zerif_ourfocus_title_2' )->section  = 'sidebar-widgets-sidebar-ourfocus';
		$wp_customize->get_control( 'zerif_ourfocus_subtitle' )->section = 'sidebar-widgets-sidebar-ourfocus';
	}

	/**
	 * ABOUT US SECTION
	 */

	if ( zerif_check_if_wp_greater_than_4_7() ) {

		$panel_about = new Zerif_WP_Customize_Panel(
			$wp_customize, 'panel_about', array(
				'priority' => 32,
				'title'    => __( 'About us section', 'zerif-lite' ),
				'panel'    => 'zerif_frontpage_sections_panel',
			)
		);

		$wp_customize->add_panel( $panel_about );

	} else {

		$wp_customize->add_panel(
			'panel_about', array(
				'priority' => 32,
				'title'    => __( 'About us section', 'zerif-lite' ),
			)
		);

	}

	$wp_customize->add_section(
		'zerif_aboutus_main_section', array(
			'title'    => __( 'Main content', 'zerif-lite' ),
			'priority' => 2,
			'panel'    => 'panel_about',
		)
	);

	/* About us show/hide */
	$wp_customize->add_setting(
		'zerif_aboutus_show', array(
			'sanitize_callback' => 'zerif_sanitize_checkbox',
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		'zerif_aboutus_show', array(
			'type'     => 'checkbox',
			'label'    => __( 'Hide about us section?', 'zerif-lite' ),
			'section'  => 'zerif_aboutus_main_section',
			'priority' => 1,
		)
	);

	/* Title */
	if ( current_user_can( 'edit_theme_options' ) ) {
		$wp_customize->add_setting(
			'zerif_aboutus_title', array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'default'           => __( 'About', 'zerif-lite' ),
				'transport'         => 'postMessage',
			)
		);
	} else {
		$wp_customize->add_setting(
			'zerif_aboutus_title', array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'transport'         => 'postMessage',
			)
		);
	}

	$wp_customize->add_control(
		'zerif_aboutus_title', array(
			'label'    => __( 'Title', 'zerif-lite' ),
			'section'  => 'zerif_aboutus_main_section',
			'priority' => 2,
		)
	);

	/* Subtitle */
	if ( current_user_can( 'edit_theme_options' ) ) {
		$wp_customize->add_setting(
			'zerif_aboutus_subtitle', array(
				'sanitize_callback' => 'zerif_sanitize_input',
				/* translators: About us section */
				'default'           => sprintf( __( 'Change this subtitle in %s', 'zerif-lite' ), __( 'About us section', 'zerif-lite' ) ),
				'transport'         => 'postMessage',
			)
		);
	} else {
		$wp_customize->add_setting(
			'zerif_aboutus_subtitle', array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'transport'         => 'postMessage',
			)
		);
	}

	$wp_customize->add_control(
		'zerif_aboutus_subtitle', array(
			'label'    => __( 'Subtitle', 'zerif-lite' ),
			'section'  => 'zerif_aboutus_main_section',
			'priority' => 3,
		)
	);

	/* Big left title */
	$zerif_aboutus_biglefttitle_default = '';
	if ( defined( 'THEMEISLE_COMPANION_VERSION' ) ) {
		$zerif_aboutus_biglefttitle_default = 'Everything you see here is responsive and mobile-friendly.';
	}

	if ( current_user_can( 'edit_theme_options' ) ) {
		$wp_customize->add_setting(
			'zerif_aboutus_biglefttitle', array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'default'           => $zerif_aboutus_biglefttitle_default,
				'transport'         => 'postMessage',
			)
		);
	} else {
		$wp_customize->add_setting(
			'zerif_aboutus_biglefttitle', array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'transport'         => 'postMessage',
			)
		);
	}

	$wp_customize->add_control(
		'zerif_aboutus_biglefttitle', array(
			'label'    => __( 'Big left side title', 'zerif-lite' ),
			'section'  => 'zerif_aboutus_main_section',
			'priority' => 4,
		)
	);

	/* Text */

	/* translators: About us section */
	$zerif_aboutus_text_default = sprintf( __( 'Change this text in %s', 'zerif-lite' ), __( 'About us section', 'zerif-lite' ) );
	if ( defined( 'THEMEISLE_COMPANION_VERSION' ) ) {
		$zerif_aboutus_text_default = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla nec massa enim. Aliquam viverra at est ullamcorper sollicitudin. Proin a leo sit amet nunc malesuada imperdiet pharetra ut eros.<br><br> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla nec massa enim. Aliquam viverra at est ullamcorper sollicitudin. Proin a leo sit amet nunc malesuada imperdiet pharetra ut eros. <br><br>Mauris vel nunc at ipsum fermentum pellentesque quis ut massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Maecenas non adipiscing massa. Sed ut fringilla sapien. Cras sollicitudin, lectus sed tincidunt cursus, magna lectus vehicula augue, a lobortis dui orci et est.';
	}

	if ( current_user_can( 'edit_theme_options' ) ) {
		$wp_customize->add_setting(
			'zerif_aboutus_text', array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'default'           => $zerif_aboutus_text_default,
				'transport'         => 'postMessage',
			)
		);
	} else {
		$wp_customize->add_setting(
			'zerif_aboutus_text', array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'transport'         => 'postMessage',
			)
		);
	}

	$wp_customize->add_control(
		'zerif_aboutus_text', array(
			'type'     => 'textarea',
			'label'    => __( 'Text', 'zerif-lite' ),
			'section'  => 'zerif_aboutus_main_section',
			'priority' => 5,
		)
	);

	$wp_customize->add_section(
		'zerif_aboutus_feat1_section', array(
			'title'    => __( 'Feature no#1', 'zerif-lite' ),
			'priority' => 3,
			'panel'    => 'panel_about',
		)
	);

	/* Feature no#1 */
	if ( current_user_can( 'edit_theme_options' ) ) {
		$wp_customize->add_setting(
			'zerif_aboutus_feature1_title', array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'default'           => __( 'Edit skill', 'zerif-lite' ),
				'transport'         => 'postMessage',
			)
		);
	} else {
		$wp_customize->add_setting(
			'zerif_aboutus_feature1_title', array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'transport'         => 'postMessage',
			)
		);
	}

	$wp_customize->add_control(
		'zerif_aboutus_feature1_title', array(
			'label'    => __( 'Feature no1 title', 'zerif-lite' ),
			'section'  => 'zerif_aboutus_feat1_section',
			'priority' => 6,
		)
	);

	$wp_customize->add_setting(
		'zerif_aboutus_feature1_text', array(
			'sanitize_callback' => 'zerif_sanitize_input',
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		'zerif_aboutus_feature1_text', array(
			'label'    => __( 'Feature no1 text', 'zerif-lite' ),
			'section'  => 'zerif_aboutus_feat1_section',
			'priority' => 7,
		)
	);

	$wp_customize->add_setting(
		'zerif_aboutus_feature1_nr', array(
			'sanitize_callback' => 'absint',
			'default'           => '80',
		)
	);

	$wp_customize->add_control(
		new Zerif_Customizer_Number_Control(
			$wp_customize, 'zerif_aboutus_feature1_nr', array(
				'type'     => 'number',
				'label'    => __( 'Feature no1 percentage', 'zerif-lite' ),
				'section'  => 'zerif_aboutus_feat1_section',
				'priority' => 8,
			)
		)
	);

	$wp_customize->add_section(
		'zerif_aboutus_feat2_section', array(
			'title'    => __( 'Feature no#2', 'zerif-lite' ),
			'priority' => 4,
			'panel'    => 'panel_about',
		)
	);

	/* Feature no#2 */
	if ( current_user_can( 'edit_theme_options' ) ) {
		$wp_customize->add_setting(
			'zerif_aboutus_feature2_title', array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'default'           => __( 'Edit skill', 'zerif-lite' ),
				'transport'         => 'postMessage',
			)
		);
	} else {
		$wp_customize->add_setting(
			'zerif_aboutus_feature2_title', array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'transport'         => 'postMessage',
			)
		);
	}

	$wp_customize->add_control(
		'zerif_aboutus_feature2_title', array(
			'label'    => __( 'Feature no2 title', 'zerif-lite' ),
			'section'  => 'zerif_aboutus_feat2_section',
			'priority' => 9,
		)
	);

	$wp_customize->add_setting(
		'zerif_aboutus_feature2_text', array(
			'sanitize_callback' => 'zerif_sanitize_input',
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		'zerif_aboutus_feature2_text', array(
			'label'    => __( 'Feature no2 text', 'zerif-lite' ),
			'section'  => 'zerif_aboutus_feat2_section',
			'priority' => 10,
		)
	);

	$wp_customize->add_setting(
		'zerif_aboutus_feature2_nr', array(
			'sanitize_callback' => 'absint',
			'default'           => '91',
		)
	);

	$wp_customize->add_control(
		new Zerif_Customizer_Number_Control(
			$wp_customize, 'zerif_aboutus_feature2_nr', array(
				'type'     => 'number',
				'label'    => __( 'Feature no2 percentage', 'zerif-lite' ),
				'section'  => 'zerif_aboutus_feat2_section',
				'priority' => 11,
			)
		)
	);

	$wp_customize->add_section(
		'zerif_aboutus_feat3_section', array(
			'title'    => __( 'Feature no#3', 'zerif-lite' ),
			'priority' => 5,
			'panel'    => 'panel_about',
		)
	);

	/* Feature no#3 */
	if ( current_user_can( 'edit_theme_options' ) ) {
		$wp_customize->add_setting(
			'zerif_aboutus_feature3_title', array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'default'           => __( 'Edit skill', 'zerif-lite' ),
				'transport'         => 'postMessage',
			)
		);
	} else {
		$wp_customize->add_setting(
			'zerif_aboutus_feature3_title', array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'transport'         => 'postMessage',
			)
		);
	}

	$wp_customize->add_control(
		'zerif_aboutus_feature3_title', array(
			'label'    => __( 'Feature no3 title', 'zerif-lite' ),
			'section'  => 'zerif_aboutus_feat3_section',
			'priority' => 12,
		)
	);

	$wp_customize->add_setting(
		'zerif_aboutus_feature3_text', array(
			'sanitize_callback' => 'zerif_sanitize_input',
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		'zerif_aboutus_feature3_text', array(
			'label'    => __( 'Feature no3 text', 'zerif-lite' ),
			'section'  => 'zerif_aboutus_feat3_section',
			'priority' => 13,
		)
	);

	$wp_customize->add_setting(
		'zerif_aboutus_feature3_nr', array(
			'sanitize_callback' => 'absint',
			'default'           => '88',
		)
	);

	$wp_customize->add_control(
		new Zerif_Customizer_Number_Control(
			$wp_customize, 'zerif_aboutus_feature3_nr', array(
				'type'     => 'number',
				'label'    => __( 'Feature no3 percentage', 'zerif-lite' ),
				'section'  => 'zerif_aboutus_feat3_section',
				'priority' => 14,
			)
		)
	);

	$wp_customize->add_section(
		'zerif_aboutus_feat4_section', array(
			'title'    => __( 'Feature no#4', 'zerif-lite' ),
			'priority' => 6,
			'panel'    => 'panel_about',
		)
	);

	/* Feature no#4 */
	if ( current_user_can( 'edit_theme_options' ) ) {
		$wp_customize->add_setting(
			'zerif_aboutus_feature4_title', array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'default'           => __( 'Edit skill', 'zerif-lite' ),
				'transport'         => 'postMessage',
			)
		);
	} else {
		$wp_customize->add_setting(
			'zerif_aboutus_feature4_title', array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'transport'         => 'postMessage',
			)
		);
	}
	$wp_customize->add_control(
		'zerif_aboutus_feature4_title', array(
			'label'    => __( 'Feature no4 title', 'zerif-lite' ),
			'section'  => 'zerif_aboutus_feat4_section',
			'priority' => 15,
		)
	);

	$wp_customize->add_setting(
		'zerif_aboutus_feature4_text', array(
			'sanitize_callback' => 'zerif_sanitize_input',
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		'zerif_aboutus_feature4_text', array(
			'label'    => __( 'Feature no4 text', 'zerif-lite' ),
			'section'  => 'zerif_aboutus_feat4_section',
			'priority' => 16,
		)
	);

	$wp_customize->add_setting(
		'zerif_aboutus_feature4_nr', array(
			'sanitize_callback' => 'absint',
			'default'           => '95',
		)
	);

	$wp_customize->add_control(
		new Zerif_Customizer_Number_Control(
			$wp_customize, 'zerif_aboutus_feature4_nr', array(
				'type'     => 'number',
				'label'    => __( 'Feature no4 percentage', 'zerif-lite' ),
				'section'  => 'zerif_aboutus_feat4_section',
				'priority' => 17,
			)
		)
	);

	/* ABOUT US CLIENTS TITLE */

	$wp_customize->add_section(
		'zerif_aboutus_clients_title_section', array(
			'title'    => __( 'Clients area title', 'zerif-lite' ),
			'priority' => 7,
			'panel'    => 'panel_about',
		)
	);

	$wp_customize->add_setting(
		'zerif_aboutus_clients_title_text', array(
			'sanitize_callback' => 'zerif_sanitize_input',
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		'zerif_aboutus_clients_title_text', array(
			'label'    => __( 'Title', 'zerif-lite' ),
			'section'  => 'zerif_aboutus_clients_title_section',
			'priority' => -1,
		)
	);

	$aboutus_section = $wp_customize->get_section( 'sidebar-widgets-sidebar-aboutus' );
	if ( ! empty( $aboutus_section ) ) {
		if ( zerif_check_if_wp_greater_than_4_7() ) {
			$aboutus_section->panel = 'zerif_frontpage_sections_panel';
		} else {
			$aboutus_section->panel = 'panel_about';
		}
		$aboutus_section->title    = __( 'Clients area', 'zerif-lite' );
		$aboutus_section->priority = 10;
		$wp_customize->get_control( 'zerif_aboutus_clients_title_text' )->section = 'sidebar-widgets-sidebar-aboutus';

	}

	/**
	 * OUR TEAM SECTION
	 */

	$wp_customize->add_section(
		'zerif_ourteam_section', array(
			'title'    => __( 'Content', 'zerif-lite' ),
			'priority' => 33,
		)
	);

	if ( zerif_check_if_wp_greater_than_4_7() ) {

		$wp_customize->get_section( 'zerif_ourteam_section' )->panel = 'zerif_frontpage_sections_panel';

	}

	/* Our team show/hide */
	$wp_customize->add_setting(
		'zerif_ourteam_show', array(
			'sanitize_callback' => 'zerif_sanitize_checkbox',
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		'zerif_ourteam_show', array(
			'type'     => 'checkbox',
			'label'    => __( 'Hide our team section?', 'zerif-lite' ),
			'section'  => 'zerif_ourteam_section',
			'priority' => -3,
		)
	);

	/* Our team title */
	if ( current_user_can( 'edit_theme_options' ) ) {
		$wp_customize->add_setting(
			'zerif_ourteam_title', array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'default'           => __( 'YOUR TEAM', 'zerif-lite' ),
				'transport'         => 'postMessage',
			)
		);
	} else {
		$wp_customize->add_setting(
			'zerif_ourteam_title', array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'transport'         => 'postMessage',
			)
		);
	}

	$wp_customize->add_control(
		'zerif_ourteam_title', array(
			'label'    => __( 'Title', 'zerif-lite' ),
			'section'  => 'zerif_ourteam_section',
			'priority' => -2,
		)
	);

	/* Our team subtitle */
	if ( current_user_can( 'edit_theme_options' ) ) {
		$wp_customize->add_setting(
			'zerif_ourteam_subtitle', array(
				'sanitize_callback' => 'zerif_sanitize_input',
				/* translators: Our team section */
				'default'           => sprintf( __( 'Change this subtitle in %s', 'zerif-lite' ), __( 'Our team section', 'zerif-lite' ) ),
				'transport'         => 'postMessage',
			)
		);
	} else {
		$wp_customize->add_setting(
			'zerif_ourteam_subtitle', array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'transport'         => 'postMessage',
			)
		);
	}

	$wp_customize->add_control(
		'zerif_ourteam_subtitle', array(
			'label'    => __( 'Our team subtitle', 'zerif-lite' ),
			'section'  => 'zerif_ourteam_section',
			'priority' => -1,
		)
	);

	$our_team_section = $wp_customize->get_section( 'sidebar-widgets-sidebar-ourteam' );
	if ( ! empty( $our_team_section ) ) {

		if ( zerif_check_if_wp_greater_than_4_7() ) {
			$our_team_section->panel = 'zerif_frontpage_sections_panel';
		} else {
			$our_team_section->panel = '';
		}
		$our_team_section->title                                        = __( 'Our team section', 'zerif-lite' );
		$our_team_section->priority                                     = 33;
		$wp_customize->get_control( 'zerif_ourteam_show' )->section     = 'sidebar-widgets-sidebar-ourteam';
		$wp_customize->get_control( 'zerif_ourteam_title' )->section    = 'sidebar-widgets-sidebar-ourteam';
		$wp_customize->get_control( 'zerif_ourteam_subtitle' )->section = 'sidebar-widgets-sidebar-ourteam';
	}

	/**
	 * TESTIMONIALS SECTION
	 */

	$wp_customize->add_section(
		'zerif_testimonials_section', array(
			'title'    => __( 'Testimonials section', 'zerif-lite' ),
			'priority' => 34,
		)
	);

	if ( zerif_check_if_wp_greater_than_4_7() ) {
		$wp_customize->add_section( 'zerif_testimonials_section' )->panel = 'zerif_frontpage_sections_panel';
	}

	/* testimonials show/hide */
	$wp_customize->add_setting(
		'zerif_testimonials_show', array(
			'sanitize_callback' => 'zerif_sanitize_checkbox',
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		'zerif_testimonials_show', array(
			'type'     => 'checkbox',
			'label'    => __( 'Hide testimonials section?', 'zerif-lite' ),
			'section'  => 'zerif_testimonials_section',
			'priority' => -4,
		)
	);

	/* Testimonial pinterest layout */
	$wp_customize->add_setting(
		'zerif_testimonials_pinterest_style', array(
			'sanitize_callback' => 'zerif_sanitize_checkbox',
		)
	);

	$wp_customize->add_control(
		'zerif_testimonials_pinterest_style', array(
			'type'     => 'checkbox',
			'label'    => __( 'Use pinterest layout?', 'zerif-lite' ),
			'section'  => 'zerif_testimonials_section',
			'priority' => -3,
		)
	);

	/* Testimonials title */
	if ( current_user_can( 'edit_theme_options' ) ) {
		$wp_customize->add_setting(
			'zerif_testimonials_title', array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'default'           => __( 'Testimonials', 'zerif-lite' ),
				'transport'         => 'postMessage',
			)
		);
	} else {
		$wp_customize->add_setting(
			'zerif_testimonials_title', array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'transport'         => 'postMessage',
			)
		);
	}

	$wp_customize->add_control(
		'zerif_testimonials_title', array(
			'label'    => __( 'Title', 'zerif-lite' ),
			'section'  => 'zerif_testimonials_section',
			'priority' => -2,
		)
	);

	/* Testimonials subtitle */
	$wp_customize->add_setting(
		'zerif_testimonials_subtitle', array(
			'sanitize_callback' => 'zerif_sanitize_input',
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		'zerif_testimonials_subtitle', array(
			'label'    => __( 'Testimonials subtitle', 'zerif-lite' ),
			'section'  => 'zerif_testimonials_section',
			'priority' => -1,
		)
	);

	$testimonials_section = $wp_customize->get_section( 'sidebar-widgets-sidebar-testimonials' );
	if ( ! empty( $our_team_section ) ) {

		if ( zerif_check_if_wp_greater_than_4_7() ) {
			$testimonials_section->panel = 'zerif_frontpage_sections_panel';
		} else {
			$testimonials_section->panel = '';
		}
		$testimonials_section->title                                     = __( 'Testimonials section', 'zerif-lite' );
		$testimonials_section->priority                                  = 34;
		$wp_customize->get_control( 'zerif_testimonials_show' )->section = 'sidebar-widgets-sidebar-testimonials';
		$wp_customize->get_control( 'zerif_testimonials_pinterest_style' )->section = 'sidebar-widgets-sidebar-testimonials';
		$wp_customize->get_control( 'zerif_testimonials_title' )->section           = 'sidebar-widgets-sidebar-testimonials';
		$wp_customize->get_control( 'zerif_testimonials_subtitle' )->section        = 'sidebar-widgets-sidebar-testimonials';
	}

	/**
	 * RIBBONS
	 */

	if ( zerif_check_if_wp_greater_than_4_7() ) {

		$panel_ribbons = new Zerif_WP_Customize_Panel(
			$wp_customize, 'panel_ribbons', array(
				'priority' => 37,
				'title'    => __( 'Ribbon sections', 'zerif-lite' ),
				'panel'    => 'zerif_frontpage_sections_panel',
			)
		);

		$wp_customize->add_panel( $panel_ribbons );

	} else {

		$wp_customize->add_panel(
			'panel_ribbons', array(
				'priority' => 37,
				'title'    => __( 'Ribbon sections', 'zerif-lite' ),
			)
		);

	}

	$wp_customize->add_section(
		'zerif_bottomribbon_section', array(
			'title'    => __( 'BottomButton Ribbon', 'zerif-lite' ),
			'priority' => 1,
			'panel'    => 'panel_ribbons',
		)
	);

	/* RIBBON SECTION WITH BOTTOM BUTTON */

	$zerif_bottomribbon_text_default        = '';
	$zerif_bottomribbon_buttonlabel_default = '';
	$zerif_bottomribbon_buttonlink_default  = '';

	/* For new users, add default values for the Ribbon section controls */
	if ( ! zerif_check_if_old_version_of_theme() && current_user_can( 'edit_theme_options' ) ) {
		$zerif_bottomribbon_text_default        = __( 'Change this text in BottomButton Ribbon', 'zerif-lite' );
		$zerif_bottomribbon_buttonlabel_default = __( 'Get in touch', 'zerif-lite' );
		$zerif_bottomribbon_buttonlink_default  = esc_url( admin_url( 'customize.php?autofocus&#91;control&#93;=zerif_bottomribbon_buttonlink' ) );
	}

	/* Text */
	$wp_customize->add_setting(
		'zerif_bottomribbon_text', array(
			'sanitize_callback' => 'zerif_sanitize_input',
			'default'           => $zerif_bottomribbon_text_default,
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		'zerif_bottomribbon_text', array(
			'type'     => 'textarea',
			'label'    => __( 'Text', 'zerif-lite' ),
			'section'  => 'zerif_bottomribbon_section',
			'priority' => 1,
		)
	);

	/* Button label */
	$wp_customize->add_setting(
		'zerif_bottomribbon_buttonlabel', array(
			'sanitize_callback' => 'zerif_sanitize_input',
			'default'           => $zerif_bottomribbon_buttonlabel_default,
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		'zerif_bottomribbon_buttonlabel', array(
			'label'    => __( 'Button label', 'zerif-lite' ),
			'section'  => 'zerif_bottomribbon_section',
			'priority' => 2,
		)
	);

	/* Button link */
	$wp_customize->add_setting(
		'zerif_bottomribbon_buttonlink', array(
			'sanitize_callback' => 'esc_url_raw',
			'default'           => $zerif_bottomribbon_buttonlink_default,
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		'zerif_bottomribbon_buttonlink', array(
			'label'    => __( 'Button link', 'zerif-lite' ),
			'section'  => 'zerif_bottomribbon_section',
			'priority' => 3,
		)
	);

	/* RIBBON SECTION WITH BUTTON IN THE RIGHT SIDE */

	$zerif_ribbonright_text_default        = '';
	$zerif_ribbonright_buttonlabel_default = '';
	$zerif_ribbonright_buttonlink_default  = '';

	/* For new users, add default values for the Ribbon section controls */
	if ( ! zerif_check_if_old_version_of_theme() && current_user_can( 'edit_theme_options' ) ) {
		$zerif_ribbonright_text_default        = __( 'Change this text in RightButton Ribbon', 'zerif-lite' );
		$zerif_ribbonright_buttonlabel_default = __( 'Get in touch', 'zerif-lite' );
		$zerif_ribbonright_buttonlink_default  = esc_url( admin_url( 'customize.php?autofocus&#91;control&#93;=zerif_ribbonright_buttonlink' ) );
	}

	$wp_customize->add_section(
		'zerif_rightribbon_section', array(
			'title'    => __( 'RightButton Ribbon', 'zerif-lite' ),
			'priority' => 2,
			'panel'    => 'panel_ribbons',
		)
	);

	/* Text */
	$wp_customize->add_setting(
		'zerif_ribbonright_text', array(
			'sanitize_callback' => 'zerif_sanitize_input',
			'default'           => $zerif_ribbonright_text_default,
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		'zerif_ribbonright_text', array(
			'type'     => 'textarea',
			'label'    => __( 'Text', 'zerif-lite' ),
			'section'  => 'zerif_rightribbon_section',
			'priority' => 4,
		)
	);

	/* Button label */
	$wp_customize->add_setting(
		'zerif_ribbonright_buttonlabel', array(
			'sanitize_callback' => 'zerif_sanitize_input',
			'default'           => $zerif_ribbonright_buttonlabel_default,
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		'zerif_ribbonright_buttonlabel', array(
			'label'    => __( 'Button label', 'zerif-lite' ),
			'section'  => 'zerif_rightribbon_section',
			'priority' => 5,
		)
	);

	/* Button link */
	$wp_customize->add_setting(
		'zerif_ribbonright_buttonlink', array(
			'sanitize_callback' => 'esc_url_raw',
			'default'           => $zerif_ribbonright_buttonlink_default,
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		'zerif_ribbonright_buttonlink', array(
			'label'    => __( 'Button link', 'zerif-lite' ),
			'section'  => 'zerif_rightribbon_section',
			'priority' => 6,
		)
	);

	/**
	 * LATEST NEWS SECTION
	 */

	$wp_customize->add_section(
		'zerif_latestnews_section', array(
			'title'    => __( 'Latest News section', 'zerif-lite' ),
			'priority' => 35,
		)
	);

	if ( zerif_check_if_wp_greater_than_4_7() ) {
		$wp_customize->get_section( 'zerif_latestnews_section' )->panel = 'zerif_frontpage_sections_panel';
	}

	/* Latest news show/hide */
	$wp_customize->add_setting(
		'zerif_latestnews_show', array(
			'sanitize_callback' => 'zerif_sanitize_checkbox',
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		'zerif_latestnews_show', array(
			'type'     => 'checkbox',
			'label'    => __( 'Hide latest news section?', 'zerif-lite' ),
			'section'  => 'zerif_latestnews_section',
			'priority' => 1,
		)
	);

	/* Latest news title */
	$wp_customize->add_setting(
		'zerif_latestnews_title', array(
			'sanitize_callback' => 'zerif_sanitize_input',
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		'zerif_latestnews_title', array(
			'label'    => __( 'Latest News title', 'zerif-lite' ),
			'section'  => 'zerif_latestnews_section',
			'priority' => 2,
		)
	);

	/* Latest news subtitle */
	$wp_customize->add_setting(
		'zerif_latestnews_subtitle', array(
			'sanitize_callback' => 'zerif_sanitize_input',
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		'zerif_latestnews_subtitle', array(
			'label'    => __( 'Latest News subtitle', 'zerif-lite' ),
			'section'  => 'zerif_latestnews_section',
			'priority' => 3,
		)
	);

	/**
	 *  CONTACT US SECTION
	 */

	$zerif_contact_us_section_description = '';

	/* If Pirate Forms is installed */
	if ( defined( 'PIRATE_FORMS_VERSION' ) ) :
		$zerif_contact_us_section_description = __( 'For more advanced settings please go to Settings -> Pirate Forms', 'zerif-lite' );
	endif;

	$wp_customize->add_section(
		'zerif_contactus_section', array(
			'title'       => __( 'Contact us section', 'zerif-lite' ),
			'description' => $zerif_contact_us_section_description,
			'priority'    => 36,
		)
	);

	if ( zerif_check_if_wp_greater_than_4_7() ) {
		$wp_customize->get_section( 'zerif_contactus_section' )->panel = 'zerif_frontpage_sections_panel';
	}

	/* Contact us show/hide */
	$wp_customize->add_setting(
		'zerif_contactus_show', array(
			'sanitize_callback' => 'zerif_sanitize_checkbox',
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		'zerif_contactus_show', array(
			'type'     => 'checkbox',
			'label'    => __( 'Hide contact us section?', 'zerif-lite' ),
			'section'  => 'zerif_contactus_section',
			'priority' => 1,
		)
	);

	/* Contactus title */
	$default = current_user_can( 'edit_theme_options' ) ? __( 'Get in touch', 'zerif-lite' ) : '';
	$wp_customize->add_setting(
		'zerif_contactus_title', array(
			'sanitize_callback' => 'zerif_sanitize_input',
			'transport'         => 'postMessage',
			'default'           => $default,
		)
	);
	$wp_customize->add_control(
		'zerif_contactus_title', array(
			'label'    => __( 'Contact us section title', 'zerif-lite' ),
			'section'  => 'zerif_contactus_section',
			'priority' => 2,
		)
	);

	/* Contactus subtitle */

	/* translators: Pirate Forms plugin */
	$default = ! defined( 'PIRATE_FORMS_VERSION' ) ? sprintf( __( 'You need to install %s to create a contact form.', 'zerif-lite' ), 'Pirate Forms' ) : '';
	$wp_customize->add_setting(
		'zerif_contactus_subtitle', array(
			'sanitize_callback' => 'zerif_sanitize_input',
			'default'           => $default,
			'transport'         => 'postMessage',
		)
	);
	$wp_customize->add_control(
		'zerif_contactus_subtitle', array(
			'label'    => __( 'Contact us section subtitle', 'zerif-lite' ),
			'section'  => 'zerif_contactus_section',
			'priority' => 3,
		)
	);

	/* Use the contact options from the theme, only if Pirate Forms is not installed */
	if ( ! defined( 'PIRATE_FORMS_VERSION' ) ) {
		/* Contactus email */
		$wp_customize->add_setting(
			'zerif_contactus_email', array(
				'sanitize_callback' => 'sanitize_email',
			)
		);
		$wp_customize->add_control(
			'zerif_contactus_email', array(
				'label'    => __( 'Email address', 'zerif-lite' ),
				'section'  => 'zerif_contactus_section',
				'priority' => 4,
			)
		);
		/* Contactus button label */
		$wp_customize->add_setting(
			'zerif_contactus_button_label', array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'default'           => __( 'Send Message', 'zerif-lite' ),
				'transport'         => 'postMessage',
			)
		);

		$wp_customize->add_control(
			'zerif_contactus_button_label', array(
				'label'    => __( 'Button label', 'zerif-lite' ),
				'section'  => 'zerif_contactus_section',
				'priority' => 5,
			)
		);

		/* Recaptcha */
		$wp_customize->add_setting(
			'zerif_contactus_recaptcha_show', array(
				'sanitize_callback' => 'zerif_sanitize_checkbox',
			)
		);

		$wp_customize->add_control(
			'zerif_contactus_recaptcha_show', array(
				'type'     => 'checkbox',
				'label'    => __( 'Hide reCaptcha?', 'zerif-lite' ),
				'section'  => 'zerif_contactus_section',
				'priority' => 6,
			)
		);

		/* Site key */
		$attribut_new_tab = ( isset( $zerif_accessibility ) && ( $zerif_accessibility != 1 ) ? ' target="_blank"' : '' );
		$wp_customize->add_setting(
			'zerif_contactus_sitekey', array(
				'sanitize_callback' => 'sanitize_text_field',
			)
		);

		$wp_customize->add_control(
			'zerif_contactus_sitekey', array(
				'label'       => __( 'Site key', 'zerif-lite' ),
				'description' => '<a' . $attribut_new_tab . ' href="https://www.google.com/recaptcha/admin#list">' . __( 'Create an account here', 'zerif-lite' ) . '</a> to get the Site key and the Secret key for the reCaptcha.',
				'section'     => 'zerif_contactus_section',
				'priority'    => 7,
			)
		);

		/* Secret key */
		$wp_customize->add_setting(
			'zerif_contactus_secretkey', array(
				'sanitize_callback' => 'sanitize_text_field',
			)
		);

		$wp_customize->add_control(
			'zerif_contactus_secretkey', array(
				'label'    => __( 'Secret key', 'zerif-lite' ),
				'section'  => 'zerif_contactus_section',
				'priority' => 8,
			)
		);

	}

	/**
	 * FOOTER OPTIONS
	 */

	$wp_customize->add_panel(
		'panel_footer', array(
			'priority'   => 90,
			'capability' => 'edit_theme_options',
			'title'      => __( 'Footer options', 'zerif-lite' ),
		)
	);

	$wp_customize->add_section(
		'zerif_general_socials_section', array(
			'title'    => __( 'Footer Social Icons', 'zerif-lite' ),
			'priority' => 31,
			'panel'    => 'panel_footer',
		)
	);

	/* Facebook */
	$wp_customize->add_setting(
		'zerif_socials_facebook', array(
			'sanitize_callback' => 'esc_url_raw',
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		'zerif_socials_facebook', array(
			'label'    => __( 'Facebook link', 'zerif-lite' ),
			'section'  => 'zerif_general_socials_section',
			'priority' => 4,
		)
	);

	/* Twitter */
	$wp_customize->add_setting(
		'zerif_socials_twitter', array(
			'sanitize_callback' => 'esc_url_raw',
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		'zerif_socials_twitter', array(
			'label'    => __( 'Twitter link', 'zerif-lite' ),
			'section'  => 'zerif_general_socials_section',
			'priority' => 5,
		)
	);

	/* Linkedin */
	$wp_customize->add_setting(
		'zerif_socials_linkedin', array(
			'sanitize_callback' => 'esc_url_raw',
			'transport'         => 'postMessage',
		)
	);
	$wp_customize->add_control(
		'zerif_socials_linkedin', array(
			'label'    => __( 'Linkedin link', 'zerif-lite' ),
			'section'  => 'zerif_general_socials_section',
			'priority' => 6,
		)
	);

	/* Behance */
	$wp_customize->add_setting(
		'zerif_socials_behance', array(
			'sanitize_callback' => 'esc_url_raw',
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		'zerif_socials_behance', array(
			'label'    => __( 'Behance link', 'zerif-lite' ),
			'section'  => 'zerif_general_socials_section',
			'priority' => 7,
		)
	);

	/* Dribbble */
	$wp_customize->add_setting(
		'zerif_socials_dribbble', array(
			'sanitize_callback' => 'esc_url_raw',
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		'zerif_socials_dribbble', array(
			'label'    => __( 'Dribbble link', 'zerif-lite' ),
			'section'  => 'zerif_general_socials_section',
			'priority' => 8,
		)
	);

	/* Instagram */
	$wp_customize->add_setting(
		'zerif_socials_instagram', array(
			'sanitize_callback' => 'esc_url_raw',
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		'zerif_socials_instagram', array(
			'label'    => __( 'Instagram link', 'zerif-lite' ),
			'section'  => 'zerif_general_socials_section',
			'priority' => 9,
		)
	);

	$wp_customize->add_section(
		'zerif_general_footer_section', array(
			'title'    => __( 'Footer Content', 'zerif-lite' ),
			'priority' => 32,
			'panel'    => 'panel_footer',
		)
	);

	/* COPYRIGHT */
	$wp_customize->add_setting(
		'zerif_copyright', array(
			'sanitize_callback' => 'zerif_sanitize_input',
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		'zerif_copyright', array(
			'label'    => __( 'Footer Copyright', 'zerif-lite' ),
			'section'  => 'zerif_general_footer_section',
			'priority' => 5,
		)
	);

	/* Address - ICON */
	if ( current_user_can( 'edit_theme_options' ) ) {
		$wp_customize->add_setting(
			'zerif_address_icon', array(
				'sanitize_callback' => 'esc_url_raw',
				'default'           => get_template_directory_uri() . '/images/map25-redish.png',
				'transport'         => 'postMessage',
			)
		);
	} else {
		$wp_customize->add_setting(
			'zerif_address_icon', array(
				'sanitize_callback' => 'esc_url_raw',
				'transport'         => 'postMessage',
			)
		);
	}

	$wp_customize->add_control(
		new WP_Customize_Image_Control(
			$wp_customize, 'zerif_address_icon', array(
				'label'    => __( 'Address section - icon', 'zerif-lite' ),
				'section'  => 'zerif_general_footer_section',
				'priority' => 9,
			)
		)
	);

	/* Address */
	if ( current_user_can( 'edit_theme_options' ) ) {
		$wp_customize->add_setting(
			'zerif_address', array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'default'           => __( 'Company address', 'zerif-lite' ),
				'transport'         => 'postMessage',
			)
		);
	} else {
		$wp_customize->add_setting(
			'zerif_address', array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'transport'         => 'postMessage',
			)
		);
	}

	$wp_customize->add_control(
		'zerif_address', array(
			'label'    => __( 'Address', 'zerif-lite' ),
			'type'     => 'textarea',
			'section'  => 'zerif_general_footer_section',
			'priority' => 10,
		)
	);

	/* Email - ICON */
	if ( current_user_can( 'edit_theme_options' ) ) {
		$wp_customize->add_setting(
			'zerif_email_icon', array(
				'sanitize_callback' => 'esc_url_raw',
				'default'           => get_template_directory_uri() . '/images/envelope4-green.png',
				'transport'         => 'postMessage',
			)
		);
	} else {
		$wp_customize->add_setting(
			'zerif_email_icon', array(
				'sanitize_callback' => 'esc_url_raw',
				'transport'         => 'postMessage',
			)
		);
	}

	$wp_customize->add_control(
		new WP_Customize_Image_Control(
			$wp_customize, 'zerif_email_icon', array(
				'label'    => __( 'Email section - icon', 'zerif-lite' ),
				'section'  => 'zerif_general_footer_section',
				'priority' => 11,
			)
		)
	);

	/* Email */
	if ( current_user_can( 'edit_theme_options' ) ) {
		$wp_customize->add_setting(
			'zerif_email', array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'default'           => __( 'youremail@site.com', 'zerif-lite' ),
				'transport'         => 'postMessage',
			)
		);
	} else {
		$wp_customize->add_setting(
			'zerif_email', array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'transport'         => 'postMessage',
			)
		);
	}

	$wp_customize->add_control(
		'zerif_email', array(
			'label'    => __( 'Email', 'zerif-lite' ),
			'type'     => 'textarea',
			'section'  => 'zerif_general_footer_section',
			'priority' => 12,
		)
	);

	/* Phone number - ICON */
	if ( current_user_can( 'edit_theme_options' ) ) {
		$wp_customize->add_setting(
			'zerif_phone_icon', array(
				'sanitize_callback' => 'esc_url_raw',
				'default'           => get_template_directory_uri() . '/images/telephone65-blue.png',
				'transport'         => 'postMessage',
			)
		);
	} else {
		$wp_customize->add_setting(
			'zerif_phone_icon', array(
				'sanitize_callback' => 'esc_url_raw',
				'transport'         => 'postMessage',
			)
		);
	}

	$wp_customize->add_control(
		new WP_Customize_Image_Control(
			$wp_customize, 'zerif_phone_icon', array(
				'label'    => __( 'Phone number section - icon', 'zerif-lite' ),
				'section'  => 'zerif_general_footer_section',
				'priority' => 13,
			)
		)
	);

	/* Phone number */
	if ( current_user_can( 'edit_theme_options' ) ) {
		$wp_customize->add_setting(
			'zerif_phone', array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'default'           => __( '0 332 548 954', 'zerif-lite' ),
				'transport'         => 'postMessage',
			)
		);
	} else {
		$wp_customize->add_setting(
			'zerif_phone', array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'transport'         => 'postMessage',
			)
		);
	}

	$wp_customize->add_control(
		'zerif_phone', array(
			'label'    => __( 'Phone number', 'zerif-lite' ),
			'type'     => 'textarea',
			'section'  => 'zerif_general_footer_section',
			'priority' => 14,
		)
	);

}
add_action( 'customize_register', 'zerif_customize_register' );

/**
 * Binds JS handlers to make Theme Customizer preview reload changes asynchronously.
 */
function zerif_customize_preview_js() {
	wp_enqueue_script( 'zerif_customizer', get_template_directory_uri() . '/js/customizer.js', array( 'customize-preview' ), '20130508', true );
}
add_action( 'customize_preview_init', 'zerif_customize_preview_js' );

/**
 * Function to sanitize inputs
 */
function zerif_sanitize_input( $input ) {
	return wp_kses_post( force_balance_tags( $input ) );
}

/**
 * Function to sanitize checkboxes
 */
function zerif_sanitize_checkbox( $input ) {
	return ( isset( $input ) && true == $input ? true : false );
}

/**
 * Enqueue scripts for customizer
 */
function zerif_late_registers() {

	wp_enqueue_script( 'zerif_customizer_script', get_template_directory_uri() . '/js/zerif_customizer.js', array( 'jquery' ), '1.0.8', true );

	wp_localize_script(
		'zerif_customizer_script', 'zerifLiteCustomizerObject', array(

			'tooltip_safefont'      => sprintf( '%1$s <br><br> %2$s', __( 'Zerif Lite main font is Montserrat, which only supports the Latin script.', 'zerif-lite' ), __( 'If you are using other scripts like Cyrillic or Greek , you need to check this box to enable the safe fonts for better compatibility.', 'zerif-lite' ) ),
			'tooltip_accessibility' => sprintf( '%1$s <br><br> %2$s', __( 'Web accessibility means that people with disabilities can use the Web. More specifically, Web accessibility means that people with disabilities can perceive, understand, navigate, and interact with the Web, and that they can contribute to the Web.', 'zerif-lite' ), __( 'Web accessibility also benefits others, including older people with changing abilities due to aging.', 'zerif-lite' ) ),
			'tooltip_smoothscroll'  => sprintf( '%1$s <br><br> %2$s', __( 'Smooth scrolling can be very useful if you read a lot of long pages. Normally, when you press Page Down, the view jumps directly down one page.', 'zerif-lite' ), __( 'With smooth scrolling, it slides down smoothly, so you can see how much it scrolls. This makes it easier to resume reading from where you were before.', 'zerif-lite' ) ),
			'tooltip_preloader'     => sprintf( '%1$s <br><br> %2$s', __( 'The preloader is the circular progress element that first appears on the site. When the loader finishes its progress animation, the whole page elements are revealed.', 'zerif-lite' ), __( 'The preloader is used as a creative way to make waiting a bit less boring for the visitor.', 'zerif-lite' ) ),
		)
	);

	wp_enqueue_script( 'zerif_multiple_panels_script', get_template_directory_uri() . '/js/zerif_multiple_panels.js', array( 'zerif_customizer_script' ), '1.0.8', true );
}
add_action( 'customize_controls_enqueue_scripts', 'zerif_late_registers', 99 );

/**
 * Custom logo callback function.
 *
 * @return string
 */
function zerif_custom_logo_callback() {
	$logo              = '';
	$zerif_custom_logo = get_theme_mod( 'custom_logo' );

	if ( ! empty( $zerif_custom_logo ) ) {
		$custom_logo = wp_get_attachment_image_url( get_theme_mod( 'custom_logo' ), 'full' );
		$logo        = '<a href="' . esc_url( home_url( '/' ) ) . '"><img src="' . esc_url( $custom_logo ) . '"></a>';
	} else {
		$logo = '<div class="site-title-tagline-wrapper"><h1 class="site-title"><a href="' . esc_url( home_url( '/' ) ) . '">' . get_bloginfo( 'name' ) . '</a></h1><p class="site-description">' . get_bloginfo( 'description' ) . '</p></div>';
	}

	return $logo;
}

/**
 * Function to check if WordPress is greater or equal to 4.7
 */
function zerif_check_if_wp_greater_than_4_7() {

	$wp_version_nr = get_bloginfo( 'version' );

	if ( function_exists( 'version_compare' ) ) {
		if ( version_compare( $wp_version_nr, '4.7', '>=' ) ) {
			return true;
		}
	}

	return false;

}
home/xbodynamge/dev/wp-content/themes/twentyseventeen/inc/customizer.php000060400000015015151126373420022731 0ustar00<?php
/**
 * Twenty Seventeen: Customizer
 *
 * @package WordPress
 * @subpackage Twenty_Seventeen
 * @since 1.0
 */

/**
 * Add postMessage support for site title and description for the Theme Customizer.
 *
 * @param WP_Customize_Manager $wp_customize Theme Customizer object.
 */
function twentyseventeen_customize_register( $wp_customize ) {
	$wp_customize->get_setting( 'blogname' )->transport          = 'postMessage';
	$wp_customize->get_setting( 'blogdescription' )->transport   = 'postMessage';
	$wp_customize->get_setting( 'header_textcolor' )->transport  = 'postMessage';

	$wp_customize->selective_refresh->add_partial( 'blogname', array(
		'selector' => '.site-title a',
		'render_callback' => 'twentyseventeen_customize_partial_blogname',
	) );
	$wp_customize->selective_refresh->add_partial( 'blogdescription', array(
		'selector' => '.site-description',
		'render_callback' => 'twentyseventeen_customize_partial_blogdescription',
	) );

	/**
	 * Custom colors.
	 */
	$wp_customize->add_setting( 'colorscheme', array(
		'default'           => 'light',
		'transport'         => 'postMessage',
		'sanitize_callback' => 'twentyseventeen_sanitize_colorscheme',
	) );

	$wp_customize->add_setting( 'colorscheme_hue', array(
		'default'           => 250,
		'transport'         => 'postMessage',
		'sanitize_callback' => 'absint', // The hue is stored as a positive integer.
	) );

	$wp_customize->add_control( 'colorscheme', array(
		'type'    => 'radio',
		'label'    => __( 'Color Scheme', 'twentyseventeen' ),
		'choices'  => array(
			'light'  => __( 'Light', 'twentyseventeen' ),
			'dark'   => __( 'Dark', 'twentyseventeen' ),
			'custom' => __( 'Custom', 'twentyseventeen' ),
		),
		'section'  => 'colors',
		'priority' => 5,
	) );

	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'colorscheme_hue', array(
		'mode' => 'hue',
		'section'  => 'colors',
		'priority' => 6,
	) ) );

	/**
	 * Theme options.
	 */
	$wp_customize->add_section( 'theme_options', array(
		'title'    => __( 'Theme Options', 'twentyseventeen' ),
		'priority' => 130, // Before Additional CSS.
	) );

	$wp_customize->add_setting( 'page_layout', array(
		'default'           => 'two-column',
		'sanitize_callback' => 'twentyseventeen_sanitize_page_layout',
		'transport'         => 'postMessage',
	) );

	$wp_customize->add_control( 'page_layout', array(
		'label'       => __( 'Page Layout', 'twentyseventeen' ),
		'section'     => 'theme_options',
		'type'        => 'radio',
		'description' => __( 'When the two-column layout is assigned, the page title is in one column and content is in the other.', 'twentyseventeen' ),
		'choices'     => array(
			'one-column' => __( 'One Column', 'twentyseventeen' ),
			'two-column' => __( 'Two Column', 'twentyseventeen' ),
		),
		'active_callback' => 'twentyseventeen_is_view_with_layout_option',
	) );

	/**
	 * Filter number of front page sections in Twenty Seventeen.
	 *
	 * @since Twenty Seventeen 1.0
	 *
	 * @param int $num_sections Number of front page sections.
	 */
	$num_sections = apply_filters( 'twentyseventeen_front_page_sections', 4 );

	// Create a setting and control for each of the sections available in the theme.
	for ( $i = 1; $i < ( 1 + $num_sections ); $i++ ) {
		$wp_customize->add_setting( 'panel_' . $i, array(
			'default'           => false,
			'sanitize_callback' => 'absint',
			'transport'         => 'postMessage',
		) );

		$wp_customize->add_control( 'panel_' . $i, array(
			/* translators: %d is the front page section number */
			'label'          => sprintf( __( 'Front Page Section %d Content', 'twentyseventeen' ), $i ),
			'description'    => ( 1 !== $i ? '' : __( 'Select pages to feature in each area from the dropdowns. Add an image to a section by setting a featured image in the page editor. Empty sections will not be displayed.', 'twentyseventeen' ) ),
			'section'        => 'theme_options',
			'type'           => 'dropdown-pages',
			'allow_addition' => true,
			'active_callback' => 'twentyseventeen_is_static_front_page',
		) );

		$wp_customize->selective_refresh->add_partial( 'panel_' . $i, array(
			'selector'            => '#panel' . $i,
			'render_callback'     => 'twentyseventeen_front_page_section',
			'container_inclusive' => true,
		) );
	}
}
add_action( 'customize_register', 'twentyseventeen_customize_register' );

/**
 * Sanitize the page layout options.
 *
 * @param string $input Page layout.
 */
function twentyseventeen_sanitize_page_layout( $input ) {
	$valid = array(
		'one-column' => __( 'One Column', 'twentyseventeen' ),
		'two-column' => __( 'Two Column', 'twentyseventeen' ),
	);

	if ( array_key_exists( $input, $valid ) ) {
		return $input;
	}

	return '';
}

/**
 * Sanitize the colorscheme.
 *
 * @param string $input Color scheme.
 */
function twentyseventeen_sanitize_colorscheme( $input ) {
	$valid = array( 'light', 'dark', 'custom' );

	if ( in_array( $input, $valid, true ) ) {
		return $input;
	}

	return 'light';
}

/**
 * Render the site title for the selective refresh partial.
 *
 * @since Twenty Seventeen 1.0
 * @see twentyseventeen_customize_register()
 *
 * @return void
 */
function twentyseventeen_customize_partial_blogname() {
	bloginfo( 'name' );
}

/**
 * Render the site tagline for the selective refresh partial.
 *
 * @since Twenty Seventeen 1.0
 * @see twentyseventeen_customize_register()
 *
 * @return void
 */
function twentyseventeen_customize_partial_blogdescription() {
	bloginfo( 'description' );
}

/**
 * Return whether we're previewing the front page and it's a static page.
 */
function twentyseventeen_is_static_front_page() {
	return ( is_front_page() && ! is_home() );
}

/**
 * Return whether we're on a view that supports a one or two column layout.
 */
function twentyseventeen_is_view_with_layout_option() {
	// This option is available on all pages. It's also available on archives when there isn't a sidebar.
	return ( is_page() || ( is_archive() && ! is_active_sidebar( 'sidebar-1' ) ) );
}

/**
 * Bind JS handlers to instantly live-preview changes.
 */
function twentyseventeen_customize_preview_js() {
	wp_enqueue_script( 'twentyseventeen-customize-preview', get_theme_file_uri( '/assets/js/customize-preview.js' ), array( 'customize-preview' ), '1.0', true );
}
add_action( 'customize_preview_init', 'twentyseventeen_customize_preview_js' );

/**
 * Load dynamic logic for the customizer controls area.
 */
function twentyseventeen_panels_js() {
	wp_enqueue_script( 'twentyseventeen-customize-controls', get_theme_file_uri( '/assets/js/customize-controls.js' ), array(), '1.0', true );
}
add_action( 'customize_controls_enqueue_scripts', 'twentyseventeen_panels_js' );
home/xbodynamge/namtation/wp-content/themes/twentyseventeen/inc/customizer.php000060400000015305151127764340024155 0ustar00<?php
/**
 * Twenty Seventeen: Customizer
 *
 * @package WordPress
 * @subpackage Twenty_Seventeen
 * @since 1.0
 */

/**
 * Add postMessage support for site title and description for the Theme Customizer.
 *
 * @param WP_Customize_Manager $wp_customize Theme Customizer object.
 */
function twentyseventeen_customize_register( $wp_customize ) {
	$wp_customize->get_setting( 'blogname' )->transport         = 'postMessage';
	$wp_customize->get_setting( 'blogdescription' )->transport  = 'postMessage';
	$wp_customize->get_setting( 'header_textcolor' )->transport = 'postMessage';

	$wp_customize->selective_refresh->add_partial(
		'blogname',
		array(
			'selector'        => '.site-title a',
			'render_callback' => 'twentyseventeen_customize_partial_blogname',
		)
	);
	$wp_customize->selective_refresh->add_partial(
		'blogdescription',
		array(
			'selector'        => '.site-description',
			'render_callback' => 'twentyseventeen_customize_partial_blogdescription',
		)
	);

	/**
	 * Custom colors.
	 */
	$wp_customize->add_setting(
		'colorscheme',
		array(
			'default'           => 'light',
			'transport'         => 'postMessage',
			'sanitize_callback' => 'twentyseventeen_sanitize_colorscheme',
		)
	);

	$wp_customize->add_setting(
		'colorscheme_hue',
		array(
			'default'           => 250,
			'transport'         => 'postMessage',
			'sanitize_callback' => 'absint', // The hue is stored as a positive integer.
		)
	);

	$wp_customize->add_control(
		'colorscheme',
		array(
			'type'     => 'radio',
			'label'    => __( 'Color Scheme', 'twentyseventeen' ),
			'choices'  => array(
				'light'  => __( 'Light', 'twentyseventeen' ),
				'dark'   => __( 'Dark', 'twentyseventeen' ),
				'custom' => __( 'Custom', 'twentyseventeen' ),
			),
			'section'  => 'colors',
			'priority' => 5,
		)
	);

	$wp_customize->add_control(
		new WP_Customize_Color_Control(
			$wp_customize,
			'colorscheme_hue',
			array(
				'mode'     => 'hue',
				'section'  => 'colors',
				'priority' => 6,
			)
		)
	);

	/**
	 * Theme options.
	 */
	$wp_customize->add_section(
		'theme_options',
		array(
			'title'    => __( 'Theme Options', 'twentyseventeen' ),
			'priority' => 130, // Before Additional CSS.
		)
	);

	$wp_customize->add_setting(
		'page_layout',
		array(
			'default'           => 'two-column',
			'sanitize_callback' => 'twentyseventeen_sanitize_page_layout',
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		'page_layout',
		array(
			'label'           => __( 'Page Layout', 'twentyseventeen' ),
			'section'         => 'theme_options',
			'type'            => 'radio',
			'description'     => __( 'When the two-column layout is assigned, the page title is in one column and content is in the other.', 'twentyseventeen' ),
			'choices'         => array(
				'one-column' => __( 'One Column', 'twentyseventeen' ),
				'two-column' => __( 'Two Column', 'twentyseventeen' ),
			),
			'active_callback' => 'twentyseventeen_is_view_with_layout_option',
		)
	);

	/**
	 * Filter number of front page sections in Twenty Seventeen.
	 *
	 * @since Twenty Seventeen 1.0
	 *
	 * @param int $num_sections Number of front page sections.
	 */
	$num_sections = apply_filters( 'twentyseventeen_front_page_sections', 4 );

	// Create a setting and control for each of the sections available in the theme.
	for ( $i = 1; $i < ( 1 + $num_sections ); $i++ ) {
		$wp_customize->add_setting(
			'panel_' . $i,
			array(
				'default'           => false,
				'sanitize_callback' => 'absint',
				'transport'         => 'postMessage',
			)
		);

		$wp_customize->add_control(
			'panel_' . $i,
			array(
				/* translators: %d is the front page section number */
				'label'           => sprintf( __( 'Front Page Section %d Content', 'twentyseventeen' ), $i ),
				'description'     => ( 1 !== $i ? '' : __( 'Select pages to feature in each area from the dropdowns. Add an image to a section by setting a featured image in the page editor. Empty sections will not be displayed.', 'twentyseventeen' ) ),
				'section'         => 'theme_options',
				'type'            => 'dropdown-pages',
				'allow_addition'  => true,
				'active_callback' => 'twentyseventeen_is_static_front_page',
			)
		);

		$wp_customize->selective_refresh->add_partial(
			'panel_' . $i,
			array(
				'selector'            => '#panel' . $i,
				'render_callback'     => 'twentyseventeen_front_page_section',
				'container_inclusive' => true,
			)
		);
	}
}
add_action( 'customize_register', 'twentyseventeen_customize_register' );

/**
 * Sanitize the page layout options.
 *
 * @param string $input Page layout.
 */
function twentyseventeen_sanitize_page_layout( $input ) {
	$valid = array(
		'one-column' => __( 'One Column', 'twentyseventeen' ),
		'two-column' => __( 'Two Column', 'twentyseventeen' ),
	);

	if ( array_key_exists( $input, $valid ) ) {
		return $input;
	}

	return '';
}

/**
 * Sanitize the colorscheme.
 *
 * @param string $input Color scheme.
 */
function twentyseventeen_sanitize_colorscheme( $input ) {
	$valid = array( 'light', 'dark', 'custom' );

	if ( in_array( $input, $valid, true ) ) {
		return $input;
	}

	return 'light';
}

/**
 * Render the site title for the selective refresh partial.
 *
 * @since Twenty Seventeen 1.0
 * @see twentyseventeen_customize_register()
 *
 * @return void
 */
function twentyseventeen_customize_partial_blogname() {
	bloginfo( 'name' );
}

/**
 * Render the site tagline for the selective refresh partial.
 *
 * @since Twenty Seventeen 1.0
 * @see twentyseventeen_customize_register()
 *
 * @return void
 */
function twentyseventeen_customize_partial_blogdescription() {
	bloginfo( 'description' );
}

/**
 * Return whether we're previewing the front page and it's a static page.
 */
function twentyseventeen_is_static_front_page() {
	return ( is_front_page() && ! is_home() );
}

/**
 * Return whether we're on a view that supports a one or two column layout.
 */
function twentyseventeen_is_view_with_layout_option() {
	// This option is available on all pages. It's also available on archives when there isn't a sidebar.
	return ( is_page() || ( is_archive() && ! is_active_sidebar( 'sidebar-1' ) ) );
}

/**
 * Bind JS handlers to instantly live-preview changes.
 */
function twentyseventeen_customize_preview_js() {
	wp_enqueue_script( 'twentyseventeen-customize-preview', get_theme_file_uri( '/assets/js/customize-preview.js' ), array( 'customize-preview' ), '1.0', true );
}
add_action( 'customize_preview_init', 'twentyseventeen_customize_preview_js' );

/**
 * Load dynamic logic for the customizer controls area.
 */
function twentyseventeen_panels_js() {
	wp_enqueue_script( 'twentyseventeen-customize-controls', get_theme_file_uri( '/assets/js/customize-controls.js' ), array(), '1.0', true );
}
add_action( 'customize_controls_enqueue_scripts', 'twentyseventeen_panels_js' );
home/xbodynamge/crosstraining/wp-content/themes/twentyseventeen/inc/customizer.php000060400000015015151130441460025033 0ustar00<?php
/**
 * Twenty Seventeen: Customizer
 *
 * @package WordPress
 * @subpackage Twenty_Seventeen
 * @since 1.0
 */

/**
 * Add postMessage support for site title and description for the Theme Customizer.
 *
 * @param WP_Customize_Manager $wp_customize Theme Customizer object.
 */
function twentyseventeen_customize_register( $wp_customize ) {
	$wp_customize->get_setting( 'blogname' )->transport          = 'postMessage';
	$wp_customize->get_setting( 'blogdescription' )->transport   = 'postMessage';
	$wp_customize->get_setting( 'header_textcolor' )->transport  = 'postMessage';

	$wp_customize->selective_refresh->add_partial( 'blogname', array(
		'selector' => '.site-title a',
		'render_callback' => 'twentyseventeen_customize_partial_blogname',
	) );
	$wp_customize->selective_refresh->add_partial( 'blogdescription', array(
		'selector' => '.site-description',
		'render_callback' => 'twentyseventeen_customize_partial_blogdescription',
	) );

	/**
	 * Custom colors.
	 */
	$wp_customize->add_setting( 'colorscheme', array(
		'default'           => 'light',
		'transport'         => 'postMessage',
		'sanitize_callback' => 'twentyseventeen_sanitize_colorscheme',
	) );

	$wp_customize->add_setting( 'colorscheme_hue', array(
		'default'           => 250,
		'transport'         => 'postMessage',
		'sanitize_callback' => 'absint', // The hue is stored as a positive integer.
	) );

	$wp_customize->add_control( 'colorscheme', array(
		'type'    => 'radio',
		'label'    => __( 'Color Scheme', 'twentyseventeen' ),
		'choices'  => array(
			'light'  => __( 'Light', 'twentyseventeen' ),
			'dark'   => __( 'Dark', 'twentyseventeen' ),
			'custom' => __( 'Custom', 'twentyseventeen' ),
		),
		'section'  => 'colors',
		'priority' => 5,
	) );

	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'colorscheme_hue', array(
		'mode' => 'hue',
		'section'  => 'colors',
		'priority' => 6,
	) ) );

	/**
	 * Theme options.
	 */
	$wp_customize->add_section( 'theme_options', array(
		'title'    => __( 'Theme Options', 'twentyseventeen' ),
		'priority' => 130, // Before Additional CSS.
	) );

	$wp_customize->add_setting( 'page_layout', array(
		'default'           => 'two-column',
		'sanitize_callback' => 'twentyseventeen_sanitize_page_layout',
		'transport'         => 'postMessage',
	) );

	$wp_customize->add_control( 'page_layout', array(
		'label'       => __( 'Page Layout', 'twentyseventeen' ),
		'section'     => 'theme_options',
		'type'        => 'radio',
		'description' => __( 'When the two-column layout is assigned, the page title is in one column and content is in the other.', 'twentyseventeen' ),
		'choices'     => array(
			'one-column' => __( 'One Column', 'twentyseventeen' ),
			'two-column' => __( 'Two Column', 'twentyseventeen' ),
		),
		'active_callback' => 'twentyseventeen_is_view_with_layout_option',
	) );

	/**
	 * Filter number of front page sections in Twenty Seventeen.
	 *
	 * @since Twenty Seventeen 1.0
	 *
	 * @param int $num_sections Number of front page sections.
	 */
	$num_sections = apply_filters( 'twentyseventeen_front_page_sections', 4 );

	// Create a setting and control for each of the sections available in the theme.
	for ( $i = 1; $i < ( 1 + $num_sections ); $i++ ) {
		$wp_customize->add_setting( 'panel_' . $i, array(
			'default'           => false,
			'sanitize_callback' => 'absint',
			'transport'         => 'postMessage',
		) );

		$wp_customize->add_control( 'panel_' . $i, array(
			/* translators: %d is the front page section number */
			'label'          => sprintf( __( 'Front Page Section %d Content', 'twentyseventeen' ), $i ),
			'description'    => ( 1 !== $i ? '' : __( 'Select pages to feature in each area from the dropdowns. Add an image to a section by setting a featured image in the page editor. Empty sections will not be displayed.', 'twentyseventeen' ) ),
			'section'        => 'theme_options',
			'type'           => 'dropdown-pages',
			'allow_addition' => true,
			'active_callback' => 'twentyseventeen_is_static_front_page',
		) );

		$wp_customize->selective_refresh->add_partial( 'panel_' . $i, array(
			'selector'            => '#panel' . $i,
			'render_callback'     => 'twentyseventeen_front_page_section',
			'container_inclusive' => true,
		) );
	}
}
add_action( 'customize_register', 'twentyseventeen_customize_register' );

/**
 * Sanitize the page layout options.
 *
 * @param string $input Page layout.
 */
function twentyseventeen_sanitize_page_layout( $input ) {
	$valid = array(
		'one-column' => __( 'One Column', 'twentyseventeen' ),
		'two-column' => __( 'Two Column', 'twentyseventeen' ),
	);

	if ( array_key_exists( $input, $valid ) ) {
		return $input;
	}

	return '';
}

/**
 * Sanitize the colorscheme.
 *
 * @param string $input Color scheme.
 */
function twentyseventeen_sanitize_colorscheme( $input ) {
	$valid = array( 'light', 'dark', 'custom' );

	if ( in_array( $input, $valid, true ) ) {
		return $input;
	}

	return 'light';
}

/**
 * Render the site title for the selective refresh partial.
 *
 * @since Twenty Seventeen 1.0
 * @see twentyseventeen_customize_register()
 *
 * @return void
 */
function twentyseventeen_customize_partial_blogname() {
	bloginfo( 'name' );
}

/**
 * Render the site tagline for the selective refresh partial.
 *
 * @since Twenty Seventeen 1.0
 * @see twentyseventeen_customize_register()
 *
 * @return void
 */
function twentyseventeen_customize_partial_blogdescription() {
	bloginfo( 'description' );
}

/**
 * Return whether we're previewing the front page and it's a static page.
 */
function twentyseventeen_is_static_front_page() {
	return ( is_front_page() && ! is_home() );
}

/**
 * Return whether we're on a view that supports a one or two column layout.
 */
function twentyseventeen_is_view_with_layout_option() {
	// This option is available on all pages. It's also available on archives when there isn't a sidebar.
	return ( is_page() || ( is_archive() && ! is_active_sidebar( 'sidebar-1' ) ) );
}

/**
 * Bind JS handlers to instantly live-preview changes.
 */
function twentyseventeen_customize_preview_js() {
	wp_enqueue_script( 'twentyseventeen-customize-preview', get_theme_file_uri( '/assets/js/customize-preview.js' ), array( 'customize-preview' ), '1.0', true );
}
add_action( 'customize_preview_init', 'twentyseventeen_customize_preview_js' );

/**
 * Load dynamic logic for the customizer controls area.
 */
function twentyseventeen_panels_js() {
	wp_enqueue_script( 'twentyseventeen-customize-controls', get_theme_file_uri( '/assets/js/customize-controls.js' ), array(), '1.0', true );
}
add_action( 'customize_controls_enqueue_scripts', 'twentyseventeen_panels_js' );
home/xbodynamge/lebauwcentre/wp-content/themes/twentyseventeen/inc/customizer.php000060400000015305151131724130024627 0ustar00<?php
/**
 * Twenty Seventeen: Customizer
 *
 * @package WordPress
 * @subpackage Twenty_Seventeen
 * @since 1.0
 */

/**
 * Add postMessage support for site title and description for the Theme Customizer.
 *
 * @param WP_Customize_Manager $wp_customize Theme Customizer object.
 */
function twentyseventeen_customize_register( $wp_customize ) {
	$wp_customize->get_setting( 'blogname' )->transport         = 'postMessage';
	$wp_customize->get_setting( 'blogdescription' )->transport  = 'postMessage';
	$wp_customize->get_setting( 'header_textcolor' )->transport = 'postMessage';

	$wp_customize->selective_refresh->add_partial(
		'blogname',
		array(
			'selector'        => '.site-title a',
			'render_callback' => 'twentyseventeen_customize_partial_blogname',
		)
	);
	$wp_customize->selective_refresh->add_partial(
		'blogdescription',
		array(
			'selector'        => '.site-description',
			'render_callback' => 'twentyseventeen_customize_partial_blogdescription',
		)
	);

	/**
	 * Custom colors.
	 */
	$wp_customize->add_setting(
		'colorscheme',
		array(
			'default'           => 'light',
			'transport'         => 'postMessage',
			'sanitize_callback' => 'twentyseventeen_sanitize_colorscheme',
		)
	);

	$wp_customize->add_setting(
		'colorscheme_hue',
		array(
			'default'           => 250,
			'transport'         => 'postMessage',
			'sanitize_callback' => 'absint', // The hue is stored as a positive integer.
		)
	);

	$wp_customize->add_control(
		'colorscheme',
		array(
			'type'     => 'radio',
			'label'    => __( 'Color Scheme', 'twentyseventeen' ),
			'choices'  => array(
				'light'  => __( 'Light', 'twentyseventeen' ),
				'dark'   => __( 'Dark', 'twentyseventeen' ),
				'custom' => __( 'Custom', 'twentyseventeen' ),
			),
			'section'  => 'colors',
			'priority' => 5,
		)
	);

	$wp_customize->add_control(
		new WP_Customize_Color_Control(
			$wp_customize,
			'colorscheme_hue',
			array(
				'mode'     => 'hue',
				'section'  => 'colors',
				'priority' => 6,
			)
		)
	);

	/**
	 * Theme options.
	 */
	$wp_customize->add_section(
		'theme_options',
		array(
			'title'    => __( 'Theme Options', 'twentyseventeen' ),
			'priority' => 130, // Before Additional CSS.
		)
	);

	$wp_customize->add_setting(
		'page_layout',
		array(
			'default'           => 'two-column',
			'sanitize_callback' => 'twentyseventeen_sanitize_page_layout',
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		'page_layout',
		array(
			'label'           => __( 'Page Layout', 'twentyseventeen' ),
			'section'         => 'theme_options',
			'type'            => 'radio',
			'description'     => __( 'When the two-column layout is assigned, the page title is in one column and content is in the other.', 'twentyseventeen' ),
			'choices'         => array(
				'one-column' => __( 'One Column', 'twentyseventeen' ),
				'two-column' => __( 'Two Column', 'twentyseventeen' ),
			),
			'active_callback' => 'twentyseventeen_is_view_with_layout_option',
		)
	);

	/**
	 * Filter number of front page sections in Twenty Seventeen.
	 *
	 * @since Twenty Seventeen 1.0
	 *
	 * @param int $num_sections Number of front page sections.
	 */
	$num_sections = apply_filters( 'twentyseventeen_front_page_sections', 4 );

	// Create a setting and control for each of the sections available in the theme.
	for ( $i = 1; $i < ( 1 + $num_sections ); $i++ ) {
		$wp_customize->add_setting(
			'panel_' . $i,
			array(
				'default'           => false,
				'sanitize_callback' => 'absint',
				'transport'         => 'postMessage',
			)
		);

		$wp_customize->add_control(
			'panel_' . $i,
			array(
				/* translators: %d is the front page section number */
				'label'           => sprintf( __( 'Front Page Section %d Content', 'twentyseventeen' ), $i ),
				'description'     => ( 1 !== $i ? '' : __( 'Select pages to feature in each area from the dropdowns. Add an image to a section by setting a featured image in the page editor. Empty sections will not be displayed.', 'twentyseventeen' ) ),
				'section'         => 'theme_options',
				'type'            => 'dropdown-pages',
				'allow_addition'  => true,
				'active_callback' => 'twentyseventeen_is_static_front_page',
			)
		);

		$wp_customize->selective_refresh->add_partial(
			'panel_' . $i,
			array(
				'selector'            => '#panel' . $i,
				'render_callback'     => 'twentyseventeen_front_page_section',
				'container_inclusive' => true,
			)
		);
	}
}
add_action( 'customize_register', 'twentyseventeen_customize_register' );

/**
 * Sanitize the page layout options.
 *
 * @param string $input Page layout.
 */
function twentyseventeen_sanitize_page_layout( $input ) {
	$valid = array(
		'one-column' => __( 'One Column', 'twentyseventeen' ),
		'two-column' => __( 'Two Column', 'twentyseventeen' ),
	);

	if ( array_key_exists( $input, $valid ) ) {
		return $input;
	}

	return '';
}

/**
 * Sanitize the colorscheme.
 *
 * @param string $input Color scheme.
 */
function twentyseventeen_sanitize_colorscheme( $input ) {
	$valid = array( 'light', 'dark', 'custom' );

	if ( in_array( $input, $valid, true ) ) {
		return $input;
	}

	return 'light';
}

/**
 * Render the site title for the selective refresh partial.
 *
 * @since Twenty Seventeen 1.0
 * @see twentyseventeen_customize_register()
 *
 * @return void
 */
function twentyseventeen_customize_partial_blogname() {
	bloginfo( 'name' );
}

/**
 * Render the site tagline for the selective refresh partial.
 *
 * @since Twenty Seventeen 1.0
 * @see twentyseventeen_customize_register()
 *
 * @return void
 */
function twentyseventeen_customize_partial_blogdescription() {
	bloginfo( 'description' );
}

/**
 * Return whether we're previewing the front page and it's a static page.
 */
function twentyseventeen_is_static_front_page() {
	return ( is_front_page() && ! is_home() );
}

/**
 * Return whether we're on a view that supports a one or two column layout.
 */
function twentyseventeen_is_view_with_layout_option() {
	// This option is available on all pages. It's also available on archives when there isn't a sidebar.
	return ( is_page() || ( is_archive() && ! is_active_sidebar( 'sidebar-1' ) ) );
}

/**
 * Bind JS handlers to instantly live-preview changes.
 */
function twentyseventeen_customize_preview_js() {
	wp_enqueue_script( 'twentyseventeen-customize-preview', get_theme_file_uri( '/assets/js/customize-preview.js' ), array( 'customize-preview' ), '1.0', true );
}
add_action( 'customize_preview_init', 'twentyseventeen_customize_preview_js' );

/**
 * Load dynamic logic for the customizer controls area.
 */
function twentyseventeen_panels_js() {
	wp_enqueue_script( 'twentyseventeen-customize-controls', get_theme_file_uri( '/assets/js/customize-controls.js' ), array(), '1.0', true );
}
add_action( 'customize_controls_enqueue_scripts', 'twentyseventeen_panels_js' );
home/xbodynamge/www/wp-content/themes/twentyfifteen/inc/customizer.php000060400000051725151132120270022421 0ustar00<?php
/**
 * Twenty Fifteen Customizer functionality
 *
 * @package WordPress
 * @subpackage Twenty_Fifteen
 * @since Twenty Fifteen 1.0
 */

/**
 * Add postMessage support for site title and description for the Customizer.
 *
 * @since Twenty Fifteen 1.0
 *
 * @param WP_Customize_Manager $wp_customize Customizer object.
 */
function twentyfifteen_customize_register( $wp_customize ) {
	$color_scheme = twentyfifteen_get_color_scheme();

	$wp_customize->get_setting( 'blogname' )->transport        = 'postMessage';
	$wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage';

	if ( isset( $wp_customize->selective_refresh ) ) {
		$wp_customize->selective_refresh->add_partial( 'blogname', array(
			'selector' => '.site-title a',
			'container_inclusive' => false,
			'render_callback' => 'twentyfifteen_customize_partial_blogname',
		) );
		$wp_customize->selective_refresh->add_partial( 'blogdescription', array(
			'selector' => '.site-description',
			'container_inclusive' => false,
			'render_callback' => 'twentyfifteen_customize_partial_blogdescription',
		) );
	}

	// Add color scheme setting and control.
	$wp_customize->add_setting( 'color_scheme', array(
		'default'           => 'default',
		'sanitize_callback' => 'twentyfifteen_sanitize_color_scheme',
		'transport'         => 'postMessage',
	) );

	$wp_customize->add_control( 'color_scheme', array(
		'label'    => __( 'Base Color Scheme', 'twentyfifteen' ),
		'section'  => 'colors',
		'type'     => 'select',
		'choices'  => twentyfifteen_get_color_scheme_choices(),
		'priority' => 1,
	) );

	// Add custom header and sidebar text color setting and control.
	$wp_customize->add_setting( 'sidebar_textcolor', array(
		'default'           => $color_scheme[4],
		'sanitize_callback' => 'sanitize_hex_color',
		'transport'         => 'postMessage',
	) );

	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'sidebar_textcolor', array(
		'label'       => __( 'Header and Sidebar Text Color', 'twentyfifteen' ),
		'description' => __( 'Applied to the header on small screens and the sidebar on wide screens.', 'twentyfifteen' ),
		'section'     => 'colors',
	) ) );

	// Remove the core header textcolor control, as it shares the sidebar text color.
	$wp_customize->remove_control( 'header_textcolor' );

	// Add custom header and sidebar background color setting and control.
	$wp_customize->add_setting( 'header_background_color', array(
		'default'           => $color_scheme[1],
		'sanitize_callback' => 'sanitize_hex_color',
		'transport'         => 'postMessage',
	) );

	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'header_background_color', array(
		'label'       => __( 'Header and Sidebar Background Color', 'twentyfifteen' ),
		'description' => __( 'Applied to the header on small screens and the sidebar on wide screens.', 'twentyfifteen' ),
		'section'     => 'colors',
	) ) );

	// Add an additional description to the header image section.
	$wp_customize->get_section( 'header_image' )->description = __( 'Applied to the header on small screens and the sidebar on wide screens.', 'twentyfifteen' );
}
add_action( 'customize_register', 'twentyfifteen_customize_register', 11 );

/**
 * Render the site title for the selective refresh partial.
 *
 * @since Twenty Fifteen 1.5
 * @see twentyfifteen_customize_register()
 *
 * @return void
 */
function twentyfifteen_customize_partial_blogname() {
	bloginfo( 'name' );
}

/**
 * Render the site tagline for the selective refresh partial.
 *
 * @since Twenty Fifteen 1.5
 * @see twentyfifteen_customize_register()
 *
 * @return void
 */
function twentyfifteen_customize_partial_blogdescription() {
	bloginfo( 'description' );
}

/**
 * Register color schemes for Twenty Fifteen.
 *
 * Can be filtered with {@see 'twentyfifteen_color_schemes'}.
 *
 * The order of colors in a colors array:
 * 1. Main Background Color.
 * 2. Sidebar Background Color.
 * 3. Box Background Color.
 * 4. Main Text and Link Color.
 * 5. Sidebar Text and Link Color.
 * 6. Meta Box Background Color.
 *
 * @since Twenty Fifteen 1.0
 *
 * @return array An associative array of color scheme options.
 */
function twentyfifteen_get_color_schemes() {
	/**
	 * Filter the color schemes registered for use with Twenty Fifteen.
	 *
	 * The default schemes include 'default', 'dark', 'yellow', 'pink', 'purple', and 'blue'.
	 *
	 * @since Twenty Fifteen 1.0
	 *
	 * @param array $schemes {
	 *     Associative array of color schemes data.
	 *
	 *     @type array $slug {
	 *         Associative array of information for setting up the color scheme.
	 *
	 *         @type string $label  Color scheme label.
	 *         @type array  $colors HEX codes for default colors prepended with a hash symbol ('#').
	 *                              Colors are defined in the following order: Main background, sidebar
	 *                              background, box background, main text and link, sidebar text and link,
	 *                              meta box background.
	 *     }
	 * }
	 */
	return apply_filters( 'twentyfifteen_color_schemes', array(
		'default' => array(
			'label'  => __( 'Default', 'twentyfifteen' ),
			'colors' => array(
				'#f1f1f1',
				'#ffffff',
				'#ffffff',
				'#333333',
				'#333333',
				'#f7f7f7',
			),
		),
		'dark'    => array(
			'label'  => __( 'Dark', 'twentyfifteen' ),
			'colors' => array(
				'#111111',
				'#202020',
				'#202020',
				'#bebebe',
				'#bebebe',
				'#1b1b1b',
			),
		),
		'yellow'  => array(
			'label'  => __( 'Yellow', 'twentyfifteen' ),
			'colors' => array(
				'#f4ca16',
				'#ffdf00',
				'#ffffff',
				'#111111',
				'#111111',
				'#f1f1f1',
			),
		),
		'pink'    => array(
			'label'  => __( 'Pink', 'twentyfifteen' ),
			'colors' => array(
				'#ffe5d1',
				'#e53b51',
				'#ffffff',
				'#352712',
				'#ffffff',
				'#f1f1f1',
			),
		),
		'purple'  => array(
			'label'  => __( 'Purple', 'twentyfifteen' ),
			'colors' => array(
				'#674970',
				'#2e2256',
				'#ffffff',
				'#2e2256',
				'#ffffff',
				'#f1f1f1',
			),
		),
		'blue'   => array(
			'label'  => __( 'Blue', 'twentyfifteen' ),
			'colors' => array(
				'#e9f2f9',
				'#55c3dc',
				'#ffffff',
				'#22313f',
				'#ffffff',
				'#f1f1f1',
			),
		),
	) );
}

if ( ! function_exists( 'twentyfifteen_get_color_scheme' ) ) :
/**
 * Get the current Twenty Fifteen color scheme.
 *
 * @since Twenty Fifteen 1.0
 *
 * @return array An associative array of either the current or default color scheme hex values.
 */
function twentyfifteen_get_color_scheme() {
	$color_scheme_option = get_theme_mod( 'color_scheme', 'default' );
	$color_schemes       = twentyfifteen_get_color_schemes();

	if ( array_key_exists( $color_scheme_option, $color_schemes ) ) {
		return $color_schemes[ $color_scheme_option ]['colors'];
	}

	return $color_schemes['default']['colors'];
}
endif; // twentyfifteen_get_color_scheme

if ( ! function_exists( 'twentyfifteen_get_color_scheme_choices' ) ) :
/**
 * Returns an array of color scheme choices registered for Twenty Fifteen.
 *
 * @since Twenty Fifteen 1.0
 *
 * @return array Array of color schemes.
 */
function twentyfifteen_get_color_scheme_choices() {
	$color_schemes                = twentyfifteen_get_color_schemes();
	$color_scheme_control_options = array();

	foreach ( $color_schemes as $color_scheme => $value ) {
		$color_scheme_control_options[ $color_scheme ] = $value['label'];
	}

	return $color_scheme_control_options;
}
endif; // twentyfifteen_get_color_scheme_choices

if ( ! function_exists( 'twentyfifteen_sanitize_color_scheme' ) ) :
/**
 * Sanitization callback for color schemes.
 *
 * @since Twenty Fifteen 1.0
 *
 * @param string $value Color scheme name value.
 * @return string Color scheme name.
 */
function twentyfifteen_sanitize_color_scheme( $value ) {
	$color_schemes = twentyfifteen_get_color_scheme_choices();

	if ( ! array_key_exists( $value, $color_schemes ) ) {
		$value = 'default';
	}

	return $value;
}
endif; // twentyfifteen_sanitize_color_scheme

/**
 * Enqueues front-end CSS for color scheme.
 *
 * @since Twenty Fifteen 1.0
 *
 * @see wp_add_inline_style()
 */
function twentyfifteen_color_scheme_css() {
	$color_scheme_option = get_theme_mod( 'color_scheme', 'default' );

	// Don't do anything if the default color scheme is selected.
	if ( 'default' === $color_scheme_option ) {
		return;
	}

	$color_scheme = twentyfifteen_get_color_scheme();

	// Convert main and sidebar text hex color to rgba.
	$color_textcolor_rgb         = twentyfifteen_hex2rgb( $color_scheme[3] );
	$color_sidebar_textcolor_rgb = twentyfifteen_hex2rgb( $color_scheme[4] );
	$colors = array(
		'background_color'            => $color_scheme[0],
		'header_background_color'     => $color_scheme[1],
		'box_background_color'        => $color_scheme[2],
		'textcolor'                   => $color_scheme[3],
		'secondary_textcolor'         => vsprintf( 'rgba( %1$s, %2$s, %3$s, 0.7)', $color_textcolor_rgb ),
		'border_color'                => vsprintf( 'rgba( %1$s, %2$s, %3$s, 0.1)', $color_textcolor_rgb ),
		'border_focus_color'          => vsprintf( 'rgba( %1$s, %2$s, %3$s, 0.3)', $color_textcolor_rgb ),
		'sidebar_textcolor'           => $color_scheme[4],
		'sidebar_border_color'        => vsprintf( 'rgba( %1$s, %2$s, %3$s, 0.1)', $color_sidebar_textcolor_rgb ),
		'sidebar_border_focus_color'  => vsprintf( 'rgba( %1$s, %2$s, %3$s, 0.3)', $color_sidebar_textcolor_rgb ),
		'secondary_sidebar_textcolor' => vsprintf( 'rgba( %1$s, %2$s, %3$s, 0.7)', $color_sidebar_textcolor_rgb ),
		'meta_box_background_color'   => $color_scheme[5],
	);

	$color_scheme_css = twentyfifteen_get_color_scheme_css( $colors );

	wp_add_inline_style( 'twentyfifteen-style', $color_scheme_css );
}
add_action( 'wp_enqueue_scripts', 'twentyfifteen_color_scheme_css' );

/**
 * Binds JS listener to make Customizer color_scheme control.
 *
 * Passes color scheme data as colorScheme global.
 *
 * @since Twenty Fifteen 1.0
 */
function twentyfifteen_customize_control_js() {
	wp_enqueue_script( 'color-scheme-control', get_template_directory_uri() . '/js/color-scheme-control.js', array( 'customize-controls', 'iris', 'underscore', 'wp-util' ), '20141216', true );
	wp_localize_script( 'color-scheme-control', 'colorScheme', twentyfifteen_get_color_schemes() );
}
add_action( 'customize_controls_enqueue_scripts', 'twentyfifteen_customize_control_js' );

/**
 * Binds JS handlers to make the Customizer preview reload changes asynchronously.
 *
 * @since Twenty Fifteen 1.0
 */
function twentyfifteen_customize_preview_js() {
	wp_enqueue_script( 'twentyfifteen-customize-preview', get_template_directory_uri() . '/js/customize-preview.js', array( 'customize-preview' ), '20141216', true );
}
add_action( 'customize_preview_init', 'twentyfifteen_customize_preview_js' );

/**
 * Returns CSS for the color schemes.
 *
 * @since Twenty Fifteen 1.0
 *
 * @param array $colors Color scheme colors.
 * @return string Color scheme CSS.
 */
function twentyfifteen_get_color_scheme_css( $colors ) {
	$colors = wp_parse_args( $colors, array(
		'background_color'            => '',
		'header_background_color'     => '',
		'box_background_color'        => '',
		'textcolor'                   => '',
		'secondary_textcolor'         => '',
		'border_color'                => '',
		'border_focus_color'          => '',
		'sidebar_textcolor'           => '',
		'sidebar_border_color'        => '',
		'sidebar_border_focus_color'  => '',
		'secondary_sidebar_textcolor' => '',
		'meta_box_background_color'   => '',
	) );

	$css = <<<CSS
	/* Color Scheme */

	/* Background Color */
	body {
		background-color: {$colors['background_color']};
	}

	/* Sidebar Background Color */
	body:before,
	.site-header {
		background-color: {$colors['header_background_color']};
	}

	/* Box Background Color */
	.post-navigation,
	.pagination,
	.secondary,
	.site-footer,
	.hentry,
	.page-header,
	.page-content,
	.comments-area,
	.widecolumn {
		background-color: {$colors['box_background_color']};
	}

	/* Box Background Color */
	button,
	input[type="button"],
	input[type="reset"],
	input[type="submit"],
	.pagination .prev,
	.pagination .next,
	.widget_calendar tbody a,
	.widget_calendar tbody a:hover,
	.widget_calendar tbody a:focus,
	.page-links a,
	.page-links a:hover,
	.page-links a:focus,
	.sticky-post {
		color: {$colors['box_background_color']};
	}

	/* Main Text Color */
	button,
	input[type="button"],
	input[type="reset"],
	input[type="submit"],
	.pagination .prev,
	.pagination .next,
	.widget_calendar tbody a,
	.page-links a,
	.sticky-post {
		background-color: {$colors['textcolor']};
	}

	/* Main Text Color */
	body,
	blockquote cite,
	blockquote small,
	a,
	.dropdown-toggle:after,
	.image-navigation a:hover,
	.image-navigation a:focus,
	.comment-navigation a:hover,
	.comment-navigation a:focus,
	.widget-title,
	.entry-footer a:hover,
	.entry-footer a:focus,
	.comment-metadata a:hover,
	.comment-metadata a:focus,
	.pingback .edit-link a:hover,
	.pingback .edit-link a:focus,
	.comment-list .reply a:hover,
	.comment-list .reply a:focus,
	.site-info a:hover,
	.site-info a:focus {
		color: {$colors['textcolor']};
	}

	/* Main Text Color */
	.entry-content a,
	.entry-summary a,
	.page-content a,
	.comment-content a,
	.pingback .comment-body > a,
	.author-description a,
	.taxonomy-description a,
	.textwidget a,
	.entry-footer a:hover,
	.comment-metadata a:hover,
	.pingback .edit-link a:hover,
	.comment-list .reply a:hover,
	.site-info a:hover {
		border-color: {$colors['textcolor']};
	}

	/* Secondary Text Color */
	button:hover,
	button:focus,
	input[type="button"]:hover,
	input[type="button"]:focus,
	input[type="reset"]:hover,
	input[type="reset"]:focus,
	input[type="submit"]:hover,
	input[type="submit"]:focus,
	.pagination .prev:hover,
	.pagination .prev:focus,
	.pagination .next:hover,
	.pagination .next:focus,
	.widget_calendar tbody a:hover,
	.widget_calendar tbody a:focus,
	.page-links a:hover,
	.page-links a:focus {
		background-color: {$colors['textcolor']}; /* Fallback for IE7 and IE8 */
		background-color: {$colors['secondary_textcolor']};
	}

	/* Secondary Text Color */
	blockquote,
	a:hover,
	a:focus,
	.main-navigation .menu-item-description,
	.post-navigation .meta-nav,
	.post-navigation a:hover .post-title,
	.post-navigation a:focus .post-title,
	.image-navigation,
	.image-navigation a,
	.comment-navigation,
	.comment-navigation a,
	.widget,
	.author-heading,
	.entry-footer,
	.entry-footer a,
	.taxonomy-description,
	.page-links > .page-links-title,
	.entry-caption,
	.comment-author,
	.comment-metadata,
	.comment-metadata a,
	.pingback .edit-link,
	.pingback .edit-link a,
	.post-password-form label,
	.comment-form label,
	.comment-notes,
	.comment-awaiting-moderation,
	.logged-in-as,
	.form-allowed-tags,
	.no-comments,
	.site-info,
	.site-info a,
	.wp-caption-text,
	.gallery-caption,
	.comment-list .reply a,
	.widecolumn label,
	.widecolumn .mu_register label {
		color: {$colors['textcolor']}; /* Fallback for IE7 and IE8 */
		color: {$colors['secondary_textcolor']};
	}

	/* Secondary Text Color */
	blockquote,
	.logged-in-as a:hover,
	.comment-author a:hover {
		border-color: {$colors['textcolor']}; /* Fallback for IE7 and IE8 */
		border-color: {$colors['secondary_textcolor']};
	}

	/* Border Color */
	hr,
	.dropdown-toggle:hover,
	.dropdown-toggle:focus {
		background-color: {$colors['textcolor']}; /* Fallback for IE7 and IE8 */
		background-color: {$colors['border_color']};
	}

	/* Border Color */
	pre,
	abbr[title],
	table,
	th,
	td,
	input,
	textarea,
	.main-navigation ul,
	.main-navigation li,
	.post-navigation,
	.post-navigation div + div,
	.pagination,
	.comment-navigation,
	.widget li,
	.widget_categories .children,
	.widget_nav_menu .sub-menu,
	.widget_pages .children,
	.site-header,
	.site-footer,
	.hentry + .hentry,
	.author-info,
	.entry-content .page-links a,
	.page-links > span,
	.page-header,
	.comments-area,
	.comment-list + .comment-respond,
	.comment-list article,
	.comment-list .pingback,
	.comment-list .trackback,
	.comment-list .reply a,
	.no-comments {
		border-color: {$colors['textcolor']}; /* Fallback for IE7 and IE8 */
		border-color: {$colors['border_color']};
	}

	/* Border Focus Color */
	a:focus,
	button:focus,
	input:focus {
		outline-color: {$colors['textcolor']}; /* Fallback for IE7 and IE8 */
		outline-color: {$colors['border_focus_color']};
	}

	input:focus,
	textarea:focus {
		border-color: {$colors['textcolor']}; /* Fallback for IE7 and IE8 */
		border-color: {$colors['border_focus_color']};
	}

	/* Sidebar Link Color */
	.secondary-toggle:before {
		color: {$colors['sidebar_textcolor']};
	}

	.site-title a,
	.site-description {
		color: {$colors['sidebar_textcolor']};
	}

	/* Sidebar Text Color */
	.site-title a:hover,
	.site-title a:focus {
		color: {$colors['secondary_sidebar_textcolor']};
	}

	/* Sidebar Border Color */
	.secondary-toggle {
		border-color: {$colors['sidebar_textcolor']}; /* Fallback for IE7 and IE8 */
		border-color: {$colors['sidebar_border_color']};
	}

	/* Sidebar Border Focus Color */
	.secondary-toggle:hover,
	.secondary-toggle:focus {
		border-color: {$colors['sidebar_textcolor']}; /* Fallback for IE7 and IE8 */
		border-color: {$colors['sidebar_border_focus_color']};
	}

	.site-title a {
		outline-color: {$colors['sidebar_textcolor']}; /* Fallback for IE7 and IE8 */
		outline-color: {$colors['sidebar_border_focus_color']};
	}

	/* Meta Background Color */
	.entry-footer {
		background-color: {$colors['meta_box_background_color']};
	}

	@media screen and (min-width: 38.75em) {
		/* Main Text Color */
		.page-header {
			border-color: {$colors['textcolor']};
		}
	}

	@media screen and (min-width: 59.6875em) {
		/* Make sure its transparent on desktop */
		.site-header,
		.secondary {
			background-color: transparent;
		}

		/* Sidebar Background Color */
		.widget button,
		.widget input[type="button"],
		.widget input[type="reset"],
		.widget input[type="submit"],
		.widget_calendar tbody a,
		.widget_calendar tbody a:hover,
		.widget_calendar tbody a:focus {
			color: {$colors['header_background_color']};
		}

		/* Sidebar Link Color */
		.secondary a,
		.dropdown-toggle:after,
		.widget-title,
		.widget blockquote cite,
		.widget blockquote small {
			color: {$colors['sidebar_textcolor']};
		}

		.widget button,
		.widget input[type="button"],
		.widget input[type="reset"],
		.widget input[type="submit"],
		.widget_calendar tbody a {
			background-color: {$colors['sidebar_textcolor']};
		}

		.textwidget a {
			border-color: {$colors['sidebar_textcolor']};
		}

		/* Sidebar Text Color */
		.secondary a:hover,
		.secondary a:focus,
		.main-navigation .menu-item-description,
		.widget,
		.widget blockquote,
		.widget .wp-caption-text,
		.widget .gallery-caption {
			color: {$colors['secondary_sidebar_textcolor']};
		}

		.widget button:hover,
		.widget button:focus,
		.widget input[type="button"]:hover,
		.widget input[type="button"]:focus,
		.widget input[type="reset"]:hover,
		.widget input[type="reset"]:focus,
		.widget input[type="submit"]:hover,
		.widget input[type="submit"]:focus,
		.widget_calendar tbody a:hover,
		.widget_calendar tbody a:focus {
			background-color: {$colors['secondary_sidebar_textcolor']};
		}

		.widget blockquote {
			border-color: {$colors['secondary_sidebar_textcolor']};
		}

		/* Sidebar Border Color */
		.main-navigation ul,
		.main-navigation li,
		.widget input,
		.widget textarea,
		.widget table,
		.widget th,
		.widget td,
		.widget pre,
		.widget li,
		.widget_categories .children,
		.widget_nav_menu .sub-menu,
		.widget_pages .children,
		.widget abbr[title] {
			border-color: {$colors['sidebar_border_color']};
		}

		.dropdown-toggle:hover,
		.dropdown-toggle:focus,
		.widget hr {
			background-color: {$colors['sidebar_border_color']};
		}

		.widget input:focus,
		.widget textarea:focus {
			border-color: {$colors['sidebar_border_focus_color']};
		}

		.sidebar a:focus,
		.dropdown-toggle:focus {
			outline-color: {$colors['sidebar_border_focus_color']};
		}
	}
CSS;

	return $css;
}

/**
 * Output an Underscore template for generating CSS for the color scheme.
 *
 * The template generates the css dynamically for instant display in the Customizer
 * preview.
 *
 * @since Twenty Fifteen 1.0
 */
function twentyfifteen_color_scheme_css_template() {
	$colors = array(
		'background_color'            => '{{ data.background_color }}',
		'header_background_color'     => '{{ data.header_background_color }}',
		'box_background_color'        => '{{ data.box_background_color }}',
		'textcolor'                   => '{{ data.textcolor }}',
		'secondary_textcolor'         => '{{ data.secondary_textcolor }}',
		'border_color'                => '{{ data.border_color }}',
		'border_focus_color'          => '{{ data.border_focus_color }}',
		'sidebar_textcolor'           => '{{ data.sidebar_textcolor }}',
		'sidebar_border_color'        => '{{ data.sidebar_border_color }}',
		'sidebar_border_focus_color'  => '{{ data.sidebar_border_focus_color }}',
		'secondary_sidebar_textcolor' => '{{ data.secondary_sidebar_textcolor }}',
		'meta_box_background_color'   => '{{ data.meta_box_background_color }}',
	);
	?>
	<script type="text/html" id="tmpl-twentyfifteen-color-scheme">
		<?php echo twentyfifteen_get_color_scheme_css( $colors ); ?>
	</script>
	<?php
}
add_action( 'customize_controls_print_footer_scripts', 'twentyfifteen_color_scheme_css_template' );
home/xbodynamge/crosstraining/wp-content/themes/twentynineteen/inc/customizer.php000060400000007660151133721750024661 0ustar00<?php
/**
 * Twenty Nineteen: Customizer
 *
 * @package WordPress
 * @subpackage Twenty_Nineteen
 * @since 1.0.0
 */

/**
 * Add postMessage support for site title and description for the Theme Customizer.
 *
 * @param WP_Customize_Manager $wp_customize Theme Customizer object.
 */
function twentynineteen_customize_register( $wp_customize ) {
	$wp_customize->get_setting( 'blogname' )->transport         = 'postMessage';
	$wp_customize->get_setting( 'blogdescription' )->transport  = 'postMessage';
	$wp_customize->get_setting( 'header_textcolor' )->transport = 'postMessage';

	if ( isset( $wp_customize->selective_refresh ) ) {
		$wp_customize->selective_refresh->add_partial(
			'blogname',
			array(
				'selector'        => '.site-title a',
				'render_callback' => 'twentynineteen_customize_partial_blogname',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'blogdescription',
			array(
				'selector'        => '.site-description',
				'render_callback' => 'twentynineteen_customize_partial_blogdescription',
			)
		);
	}

	/**
	 * Primary color.
	 */
	$wp_customize->add_setting(
		'primary_color',
		array(
			'default'           => 'default',
			'transport'         => 'postMessage',
			'sanitize_callback' => 'twentynineteen_sanitize_color_option',
		)
	);

	$wp_customize->add_control(
		'primary_color',
		array(
			'type'     => 'radio',
			'label'    => __( 'Primary Color', 'twentynineteen' ),
			'choices'  => array(
				'default'  => _x( 'Default', 'primary color', 'twentynineteen' ),
				'custom' => _x( 'Custom', 'primary color', 'twentynineteen' ),
			),
			'section'  => 'colors',
			'priority' => 5,
		)
	);

	// Add primary color hue setting and control.
	$wp_customize->add_setting(
		'primary_color_hue',
		array(
			'default'           => 199,
			'transport'         => 'postMessage',
			'sanitize_callback' => 'absint',
		)
	);

	$wp_customize->add_control(
		new WP_Customize_Color_Control(
			$wp_customize,
			'primary_color_hue',
			array(
				'description' => __( 'Apply a custom color for buttons, links, featured images, etc.', 'twentynineteen' ),
				'section'     => 'colors',
				'mode'        => 'hue',
			)
		)
	);

	// Add image filter setting and control.
	$wp_customize->add_setting(
		'image_filter',
		array(
			'default'           => 1,
			'sanitize_callback' => 'absint',
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		'image_filter',
		array(
			'label'   => __( 'Apply a filter to featured images using the primary color', 'twentynineteen' ),
			'section' => 'colors',
			'type'    => 'checkbox',
		)
	);
}
add_action( 'customize_register', 'twentynineteen_customize_register' );

/**
 * Render the site title for the selective refresh partial.
 *
 * @return void
 */
function twentynineteen_customize_partial_blogname() {
	bloginfo( 'name' );
}

/**
 * Render the site tagline for the selective refresh partial.
 *
 * @return void
 */
function twentynineteen_customize_partial_blogdescription() {
	bloginfo( 'description' );
}

/**
 * Bind JS handlers to instantly live-preview changes.
 */
function twentynineteen_customize_preview_js() {
	wp_enqueue_script( 'twentynineteen-customize-preview', get_theme_file_uri( '/js/customize-preview.js' ), array( 'customize-preview' ), '20181108', true );
}
add_action( 'customize_preview_init', 'twentynineteen_customize_preview_js' );

/**
 * Load dynamic logic for the customizer controls area.
 */
function twentynineteen_panels_js() {
	wp_enqueue_script( 'twentynineteen-customize-controls', get_theme_file_uri( '/js/customize-controls.js' ), array(), '20181031', true );
}
add_action( 'customize_controls_enqueue_scripts', 'twentynineteen_panels_js' );

/**
 * Sanitize custom color choice.
 *
 * @param string $choice Whether image filter is active.
 *
 * @return string
 */
function twentynineteen_sanitize_color_option( $choice ) {
	$valid = array(
		'default',
		'custom',
	);

	if ( in_array( $choice, $valid, true ) ) {
		return $choice;
	}

	return 'default';
}
home/xbodynamge/www/wp-content/themes/twentyseventeen/inc/customizer.php000064400000015246151133750130023004 0ustar00<?php
/**
 * Twenty Seventeen: Customizer
 *
 * @package WordPress
 * @subpackage Twenty_Seventeen
 * @since 1.0
 */

/**
 * Add postMessage support for site title and description for the Theme Customizer.
 *
 * @param WP_Customize_Manager $wp_customize Theme Customizer object.
 */
function twentyseventeen_customize_register( $wp_customize ) {
	$wp_customize->get_setting( 'blogname' )->transport         = 'postMessage';
	$wp_customize->get_setting( 'blogdescription' )->transport  = 'postMessage';
	$wp_customize->get_setting( 'header_textcolor' )->transport = 'postMessage';

	$wp_customize->selective_refresh->add_partial(
		'blogname', array(
			'selector'        => '.site-title a',
			'render_callback' => 'twentyseventeen_customize_partial_blogname',
		)
	);
	$wp_customize->selective_refresh->add_partial(
		'blogdescription', array(
			'selector'        => '.site-description',
			'render_callback' => 'twentyseventeen_customize_partial_blogdescription',
		)
	);

	/**
	 * Custom colors.
	 */
	$wp_customize->add_setting(
		'colorscheme', array(
			'default'           => 'light',
			'transport'         => 'postMessage',
			'sanitize_callback' => 'twentyseventeen_sanitize_colorscheme',
		)
	);

	$wp_customize->add_setting(
		'colorscheme_hue', array(
			'default'           => 250,
			'transport'         => 'postMessage',
			'sanitize_callback' => 'absint', // The hue is stored as a positive integer.
		)
	);

	$wp_customize->add_control(
		'colorscheme', array(
			'type'     => 'radio',
			'label'    => __( 'Color Scheme', 'twentyseventeen' ),
			'choices'  => array(
				'light'  => __( 'Light', 'twentyseventeen' ),
				'dark'   => __( 'Dark', 'twentyseventeen' ),
				'custom' => __( 'Custom', 'twentyseventeen' ),
			),
			'section'  => 'colors',
			'priority' => 5,
		)
	);

	$wp_customize->add_control(
		new WP_Customize_Color_Control(
			$wp_customize, 'colorscheme_hue', array(
				'mode'     => 'hue',
				'section'  => 'colors',
				'priority' => 6,
			)
		)
	);

	/**
	 * Theme options.
	 */
	$wp_customize->add_section(
		'theme_options', array(
			'title'    => __( 'Theme Options', 'twentyseventeen' ),
			'priority' => 130, // Before Additional CSS.
		)
	);

	$wp_customize->add_setting(
		'page_layout', array(
			'default'           => 'two-column',
			'sanitize_callback' => 'twentyseventeen_sanitize_page_layout',
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		'page_layout', array(
			'label'           => __( 'Page Layout', 'twentyseventeen' ),
			'section'         => 'theme_options',
			'type'            => 'radio',
			'description'     => __( 'When the two-column layout is assigned, the page title is in one column and content is in the other.', 'twentyseventeen' ),
			'choices'         => array(
				'one-column' => __( 'One Column', 'twentyseventeen' ),
				'two-column' => __( 'Two Column', 'twentyseventeen' ),
			),
			'active_callback' => 'twentyseventeen_is_view_with_layout_option',
		)
	);

	/**
	 * Filter number of front page sections in Twenty Seventeen.
	 *
	 * @since Twenty Seventeen 1.0
	 *
	 * @param int $num_sections Number of front page sections.
	 */
	$num_sections = apply_filters( 'twentyseventeen_front_page_sections', 4 );

	// Create a setting and control for each of the sections available in the theme.
	for ( $i = 1; $i < ( 1 + $num_sections ); $i++ ) {
		$wp_customize->add_setting(
			'panel_' . $i, array(
				'default'           => false,
				'sanitize_callback' => 'absint',
				'transport'         => 'postMessage',
			)
		);

		$wp_customize->add_control(
			'panel_' . $i, array(
				/* translators: %d is the front page section number */
				'label'           => sprintf( __( 'Front Page Section %d Content', 'twentyseventeen' ), $i ),
				'description'     => ( 1 !== $i ? '' : __( 'Select pages to feature in each area from the dropdowns. Add an image to a section by setting a featured image in the page editor. Empty sections will not be displayed.', 'twentyseventeen' ) ),
				'section'         => 'theme_options',
				'type'            => 'dropdown-pages',
				'allow_addition'  => true,
				'active_callback' => 'twentyseventeen_is_static_front_page',
			)
		);

		$wp_customize->selective_refresh->add_partial(
			'panel_' . $i, array(
				'selector'            => '#panel' . $i,
				'render_callback'     => 'twentyseventeen_front_page_section',
				'container_inclusive' => true,
			)
		);
	}
}
add_action( 'customize_register', 'twentyseventeen_customize_register' );

/**
 * Sanitize the page layout options.
 *
 * @param string $input Page layout.
 */
function twentyseventeen_sanitize_page_layout( $input ) {
	$valid = array(
		'one-column' => __( 'One Column', 'twentyseventeen' ),
		'two-column' => __( 'Two Column', 'twentyseventeen' ),
	);

	if ( array_key_exists( $input, $valid ) ) {
		return $input;
	}

	return '';
}

/**
 * Sanitize the colorscheme.
 *
 * @param string $input Color scheme.
 */
function twentyseventeen_sanitize_colorscheme( $input ) {
	$valid = array( 'light', 'dark', 'custom' );

	if ( in_array( $input, $valid, true ) ) {
		return $input;
	}

	return 'light';
}

/**
 * Render the site title for the selective refresh partial.
 *
 * @since Twenty Seventeen 1.0
 * @see twentyseventeen_customize_register()
 *
 * @return void
 */
function twentyseventeen_customize_partial_blogname() {
	bloginfo( 'name' );
}

/**
 * Render the site tagline for the selective refresh partial.
 *
 * @since Twenty Seventeen 1.0
 * @see twentyseventeen_customize_register()
 *
 * @return void
 */
function twentyseventeen_customize_partial_blogdescription() {
	bloginfo( 'description' );
}

/**
 * Return whether we're previewing the front page and it's a static page.
 */
function twentyseventeen_is_static_front_page() {
	return ( is_front_page() && ! is_home() );
}

/**
 * Return whether we're on a view that supports a one or two column layout.
 */
function twentyseventeen_is_view_with_layout_option() {
	// This option is available on all pages. It's also available on archives when there isn't a sidebar.
	return ( is_page() || ( is_archive() && ! is_active_sidebar( 'sidebar-1' ) ) );
}

/**
 * Bind JS handlers to instantly live-preview changes.
 */
function twentyseventeen_customize_preview_js() {
	wp_enqueue_script( 'twentyseventeen-customize-preview', get_theme_file_uri( '/assets/js/customize-preview.js' ), array( 'customize-preview' ), '1.0', true );
}
add_action( 'customize_preview_init', 'twentyseventeen_customize_preview_js' );

/**
 * Load dynamic logic for the customizer controls area.
 */
function twentyseventeen_panels_js() {
	wp_enqueue_script( 'twentyseventeen-customize-controls', get_theme_file_uri( '/assets/js/customize-controls.js' ), array(), '1.0', true );
}
add_action( 'customize_controls_enqueue_scripts', 'twentyseventeen_panels_js' );
home/xbodynamge/crosstraining/wp-content/themes/zerif-lite/inc/customizer.php000060400000232666151133760350023660 0ustar00<?php
/**
 * Zerif Theme Customizer
 *
 * @package zerif
 */

/**
 * Add postMessage support for site title and description for the Theme Customizer.
 *
 * @param WP_Customize_Manager $wp_customize Theme Customizer object.
 */
function zerif_customize_register( $wp_customize ) {

	/**
	 * Class Zerif_Customizer_Number_Control
	 */
	class Zerif_Customizer_Number_Control extends WP_Customize_Control {

		/**
		 * Type of control
		 *
		 * @var $type string Type of control
		 */
		public $type = 'number';

		/**
		 * Render the control
		 */
		public function render_content() {
			?>
			<label>
				<span class="customize-control-title"><?php echo esc_html( $this->label ); ?></span>
				<input type="number" <?php $this->link(); ?> value="<?php echo intval( $this->value() ); ?>"/>
			</label>
			<?php
		}
	}

	/* Custom panel type - used for multiple levels of panels */
	if ( class_exists( 'WP_Customize_Panel' ) ) {

		/**
		 * Class Zerif_WP_Customize_Panel
		 */
		class Zerif_WP_Customize_Panel extends WP_Customize_Panel {

			/**
			 * Panel
			 *
			 * @var $panel string Panel
			 */
			public $panel;

			/**
			 * Panel type
			 *
			 * @var $type string Panel type.
			 */
			public $type = 'zerif_panel';

			/**
			 * Form the json
			 */
			public function json() {

				$array                   = wp_array_slice_assoc(
					(array) $this,
					array(
						'id',
						'description',
						'priority',
						'type',
						'panel',
					)
				);
				$array['title']          = html_entity_decode( $this->title, ENT_QUOTES, get_bloginfo( 'charset' ) );
				$array['content']        = $this->get_content();
				$array['active']         = $this->active();
				$array['instanceNumber'] = $this->instance_number;

				return $array;

			}

		}

	}

	$wp_customize->register_panel_type( 'Zerif_WP_Customize_Panel' );

	/**
	 * Upsells
	 */
	require_once( trailingslashit( get_template_directory() ) . 'inc/class/class-customizer-theme-info-control/class-customizer-theme-info-control.php' );

	$wp_customize->add_section(
		'zerif_theme_info_main_section',
		array(
			'title'    => __( 'View PRO version', 'zerif-lite' ),
			'priority' => 1,
		)
	);
	$wp_customize->add_setting(
		'zerif_theme_info_main_control',
		array(
			'sanitize_callback' => 'esc_html',
		)
	);

	/*
	 * View Pro Version Section Control
	 */
	$wp_customize->add_control(
		new Zerif_Control_Upsell_Theme_Info(
			$wp_customize,
			'zerif_theme_info_main_control',
			array(
				'section'     => 'zerif_theme_info_main_section',
				'priority'    => 100,
				'options'     => array(
					esc_html__( 'Section Reordering', 'zerif-lite' ),
					esc_html__( 'Background video', 'zerif-lite' ),
					esc_html__( 'Portfolio', 'zerif-lite' ),
					esc_html__( 'Extra colors', 'zerif-lite' ),
					esc_html__( 'Packages section', 'zerif-lite' ),
					esc_html__( 'Subscribe section', 'zerif-lite' ),
					esc_html__( 'Google map section', 'zerif-lite' ),
					esc_html__( 'Support', 'zerif-lite' ),
				),
				'button_url'  => esc_url( 'https://themeisle.com/themes/zerif-pro-one-page-wordpress-theme/upgrade/' ),
				'button_text' => esc_html__( 'View PRO version', 'zerif-lite' ),
			)
		)
	);

	/**
	 * Extra Colors Notice
	 */
	$wp_customize->add_setting(
		'zerif_theme_info_colors_section_control',
		array(
			'sanitize_callback' => 'esc_html',
		)
	);
	$wp_customize->add_control(
		new Zerif_Control_Upsell_Theme_Info(
			$wp_customize,
			'zerif_theme_info_colors_section_control',
			array(
				'section'            => 'colors',
				'priority'           => 500,
				'options'            => array(
					esc_html__( 'Extra colors', 'zerif-lite' ),
				),
				'explained_features' => array(
					esc_html__( 'Get full color schemes support for your site.', 'zerif-lite' ),
				),
				'button_url'         => esc_url( 'https://themeisle.com/themes/zerif-pro-one-page-wordpress-theme/upgrade/' ),
				'button_text'        => esc_html__( 'View PRO version', 'zerif-lite' ),
			)
		)
	);

	/**
	 * Background video notice
	 */
	$wp_customize->add_setting(
		'zerif_theme_info_header_section_control',
		array(
			'sanitize_callback' => 'esc_html',
		)
	);
	$wp_customize->add_control(
		new Zerif_Control_Upsell_Theme_Info(
			$wp_customize,
			'zerif_theme_info_header_section_control',
			array(
				'section'     => 'background_image',
				'priority'    => 500,
				'options'     => array(
					esc_html__( 'Background video', 'zerif-lite' ),
				),
				'button_url'  => esc_url( 'https://themeisle.com/themes/zerif-pro-one-page-wordpress-theme/upgrade/' ),
				'button_text' => esc_html__( 'View PRO version', 'zerif-lite' ),
			)
		)
	);

	$wp_customize->get_setting( 'blogname' )->transport         = 'postMessage';
	$wp_customize->get_setting( 'blogdescription' )->transport  = 'postMessage';
	$wp_customize->get_setting( 'header_textcolor' )->transport = 'postMessage';
	$wp_customize->get_setting( 'custom_logo' )->transport      = 'postMessage';

	if ( isset( $wp_customize->selective_refresh ) ) {
		$wp_customize->selective_refresh->add_partial(
			'custom_logo',
			array(
				'selector'        => '.navbar-brand',
				'settings'        => 'custom_logo',
				'render_callback' => 'zerif_custom_logo_callback',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'zerif_bigtitle_title_2',
			array(
				'selector'        => '.home-header-wrap .intro-text',
				'settings'        => 'zerif_bigtitle_title_2',
				'render_callback' => 'zerif_bigtitle_title_2_render_callback',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'zerif_bigtitle_redbutton_label_2',
			array(
				'selector'        => '.buttons a.red-btn',
				'settings'        => 'zerif_bigtitle_redbutton_label_2',
				'render_callback' => 'zerif_bigtitle_redbutton_label_2_render_callback',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'zerif_bigtitle_greenbutton_label',
			array(
				'selector'        => '.buttons a.green-btn',
				'settings'        => 'zerif_bigtitle_greenbutton_label',
				'render_callback' => 'zerif_bigtitle_greenbutton_label_render_callback',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'zerif_ourfocus_title_2',
			array(
				'selector'        => '#focus .section-header h2',
				'settings'        => 'zerif_ourfocus_title_2',
				'render_callback' => 'zerif_ourfocus_title_2_render_callback',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'zerif_ourfocus_subtitle',
			array(
				'selector'        => '#focus .section-header div.section-legend',
				'settings'        => 'zerif_ourfocus_subtitle',
				'render_callback' => 'zerif_ourfocus_subtitle_render_callback',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'zerif_ourteam_title',
			array(
				'selector'        => '#team .section-header h2',
				'settings'        => 'zerif_ourteam_title',
				'render_callback' => 'zerif_ourteam_title_render_callback',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'zerif_ourteam_subtitle',
			array(
				'selector'        => '#team .section-header div.section-legend',
				'settings'        => 'zerif_ourteam_subtitle',
				'render_callback' => 'zerif_ourteam_subtitle_render_callback',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'zerif_aboutus_title',
			array(
				'selector'        => '#aboutus .section-header h2',
				'settings'        => 'zerif_aboutus_title',
				'render_callback' => 'zerif_aboutus_title_render_callback',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'zerif_aboutus_subtitle',
			array(
				'selector'        => '#aboutus .section-header div.section-legend',
				'settings'        => 'zerif_aboutus_subtitle',
				'render_callback' => 'zerif_aboutus_subtitle_render_callback',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'zerif_aboutus_biglefttitle',
			array(
				'selector'        => '#aboutus .big-intro',
				'settings'        => 'zerif_aboutus_biglefttitle',
				'render_callback' => 'zerif_aboutus_biglefttitle_render_callback',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'zerif_aboutus_text',
			array(
				'selector'        => '#aboutus .text_and_skills p',
				'settings'        => 'zerif_aboutus_text',
				'render_callback' => 'zerif_aboutus_text_render_callback',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'zerif_aboutus_feature1_title',
			array(
				'selector'        => '#aboutus .skill_1 label',
				'settings'        => 'zerif_aboutus_feature1_title',
				'render_callback' => 'zerif_aboutus_feature1_title_render_callback',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'zerif_aboutus_feature2_title',
			array(
				'selector'        => '#aboutus .skill_2 label',
				'settings'        => 'zerif_aboutus_feature2_title',
				'render_callback' => 'zerif_aboutus_feature2_title_render_callback',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'zerif_aboutus_feature3_title',
			array(
				'selector'        => '#aboutus .skill_3 label',
				'settings'        => 'zerif_aboutus_feature3_title',
				'render_callback' => 'zerif_aboutus_feature3_title_render_callback',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'zerif_aboutus_feature4_title',
			array(
				'selector'        => '#aboutus .skill_4 label',
				'settings'        => 'zerif_aboutus_feature4_title',
				'render_callback' => 'zerif_aboutus_feature4_title_render_callback',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'zerif_testimonials_title',
			array(
				'selector'        => '#testimonials .section-header h2',
				'settings'        => 'zerif_testimonials_title',
				'render_callback' => 'zerif_testimonials_title_render_callback',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'zerif_contactus_title',
			array(
				'selector'        => '#contact .section-header h2',
				'render_callback' => 'zerif_contactus_title_render_callback',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'zerif_contactus_subtitle',
			array(
				'selector'        => '#contact .section-legend',
				'render_callback' => 'zerif_contactus_subtitle_render_callback',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'zerif_contactus_button_label',
			array(
				'selector'        => '#contact .pirate_forms .contact_submit_wrap',
				'render_callback' => 'zerif_contactus_button_label_render_callback',
			)
		);

		$wp_customize->selective_refresh->add_partial(
			'zerif_socials_facebook',
			array(
				'selector'        => '#footer .social #facebook',
				'settings'        => 'zerif_socials_facebook',
				'render_callback' => 'zerif_socials_facebook_render_callback',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'zerif_socials_twitter',
			array(
				'selector'        => '#footer .social #twitter',
				'settings'        => 'zerif_socials_twitter',
				'render_callback' => 'zerif_socials_twitter_render_callback',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'zerif_socials_linkedin',
			array(
				'selector'        => '#footer .social #linkedin',
				'settings'        => 'zerif_socials_linkedin',
				'render_callback' => 'zerif_socials_linkedin_render_callback',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'zerif_socials_behance',
			array(
				'selector'        => '#footer .social #behance',
				'settings'        => 'zerif_socials_behance',
				'render_callback' => 'zerif_socials_behance_render_callback',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'zerif_socials_dribbble',
			array(
				'selector'        => '#footer .social #dribbble',
				'settings'        => 'zerif_socials_dribbble',
				'render_callback' => 'zerif_socials_dribbble_render_callback',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'zerif_socials_instagram',
			array(
				'selector'        => '#footer .social #instagram',
				'settings'        => 'zerif_socials_instagram',
				'render_callback' => 'zerif_socials_instagram_render_callback',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'zerif_address',
			array(
				'selector'        => '.zerif-footer-address',
				'settings'        => 'zerif_address',
				'render_callback' => 'zerif_address_render_callback',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'zerif_email',
			array(
				'selector'        => '.zerif-footer-email',
				'settings'        => 'zerif_email',
				'render_callback' => 'zerif_email_render_callback',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'zerif_phone',
			array(
				'selector'        => '.zerif-footer-phone',
				'settings'        => 'zerif_phone',
				'render_callback' => 'zerif_phone_render_callback',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'zerif_address_icon',
			array(
				'selector'        => '.company-details .icon-top.red-text',
				'settings'        => 'zerif_address_icon',
				'render_callback' => 'zerif_address_icon_render_callback',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'zerif_email_icon',
			array(
				'selector'        => '.company-details .icon-top.green-text',
				'settings'        => 'zerif_email_icon',
				'render_callback' => 'zerif_email_icon_render_callback',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'zerif_phone_icon',
			array(
				'selector'        => '.company-details .icon-top.blue-text',
				'settings'        => 'zerif_phone_icon',
				'render_callback' => 'zerif_phone_icon_render_callback',
			)
		);
	}

	/**
	 * Render callback for zerif_bigtitle_title_2
	 *
	 * @return mixed
	 */
	function zerif_bigtitle_title_2_render_callback() {
		return wp_kses_post( get_theme_mod( 'zerif_bigtitle_title_2' ) );
	}

	/**
	 * Render callback for zerif_bigtitle_redbutton_label_2
	 *
	 * @return mixed
	 */
	function zerif_bigtitle_redbutton_label_2_render_callback() {
		return wp_kses_post( get_theme_mod( 'zerif_bigtitle_redbutton_label_2' ) );
	}

	/**
	 * Render callback for zerif_bigtitle_greenbutton_label
	 *
	 * @return mixed
	 */
	function zerif_bigtitle_greenbutton_label_render_callback() {
		return wp_kses_post( get_theme_mod( 'zerif_bigtitle_greenbutton_label' ) );
	}

	/**
	 * Render callback for zerif_ourfocus_title_2
	 *
	 * @return mixed
	 */
	function zerif_ourfocus_title_2_render_callback() {
		return wp_kses_post( get_theme_mod( 'zerif_ourfocus_title_2' ) );
	}

	/**
	 * Render callback for zerif_ourfocus_subtitle
	 *
	 * @return mixed
	 */
	function zerif_ourfocus_subtitle_render_callback() {
		return wp_kses_post( get_theme_mod( 'zerif_ourfocus_subtitle' ) );
	}

	/**
	 * Render callback for zerif_ourteam_title
	 *
	 * @return mixed
	 */
	function zerif_ourteam_title_render_callback() {
		return wp_kses_post( get_theme_mod( 'zerif_ourteam_title' ) );
	}

	/**
	 * Render callback for zerif_ourteam_subtitle
	 *
	 * @return mixed
	 */
	function zerif_ourteam_subtitle_render_callback() {
		return wp_kses_post( get_theme_mod( 'zerif_ourteam_subtitle' ) );
	}

	/**
	 * Render callback for zerif_aboutus_title
	 *
	 * @return mixed
	 */
	function zerif_aboutus_title_render_callback() {
		return wp_kses_post( get_theme_mod( 'zerif_aboutus_title' ) );
	}

	/**
	 * Render callback for zerif_aboutus_subtitle
	 *
	 * @return mixed
	 */
	function zerif_aboutus_subtitle_render_callback() {
		return wp_kses_post( get_theme_mod( 'zerif_aboutus_subtitle' ) );
	}

	/**
	 * Render callback for zerif_aboutus_biglefttitle
	 *
	 * @return mixed
	 */
	function zerif_aboutus_biglefttitle_render_callback() {
		return wp_kses_post( get_theme_mod( 'zerif_aboutus_biglefttitle' ) );
	}

	/**
	 * Render callback for zerif_aboutus_text
	 *
	 * @return mixed
	 */
	function zerif_aboutus_text_render_callback() {
		return wp_kses_post( get_theme_mod( 'zerif_aboutus_text' ) );
	}

	/**
	 * Render callback for zerif_aboutus_feature1_title
	 *
	 * @return mixed
	 */
	function zerif_aboutus_feature1_title_render_callback() {
		return wp_kses_post( get_theme_mod( 'zerif_aboutus_feature1_title' ) );
	}

	/**
	 * Render callback for zerif_aboutus_feature2_title
	 *
	 * @return mixed
	 */
	function zerif_aboutus_feature2_title_render_callback() {
		return wp_kses_post( get_theme_mod( 'zerif_aboutus_feature2_title' ) );
	}

	/**
	 * Render callback for zerif_aboutus_feature3_title
	 *
	 * @return mixed
	 */
	function zerif_aboutus_feature3_title_render_callback() {
		return wp_kses_post( get_theme_mod( 'zerif_aboutus_feature3_title' ) );
	}

	/**
	 * Render callback for zerif_aboutus_feature4_title
	 *
	 * @return mixed
	 */
	function zerif_aboutus_feature4_title_render_callback() {
		return wp_kses_post( get_theme_mod( 'zerif_aboutus_feature4_title' ) );
	}

	/**
	 * Render callback for zerif_testimonials_title
	 *
	 * @return mixed
	 */
	function zerif_testimonials_title_render_callback() {
		return wp_kses_post( get_theme_mod( 'zerif_testimonials_title' ) );
	}

	/**
	 * Render callback for zerif_contactus_title
	 *
	 * @return mixed
	 */
	function zerif_contactus_title_render_callback() {
		return wp_kses_post( get_theme_mod( 'zerif_contactus_title' ) );
	}

	/**
	 * Render callback for zerif_contactus_button_label
	 */
	function zerif_contactus_button_label_render_callback() {
		?>
		<button id="pirate-forms-contact-submit" name="pirate-forms-contact-submit" class="pirate-forms-submit-button" type="submit">
			<?php echo wp_kses_post( get_theme_mod( 'zerif_contactus_button_label' ) ); ?>
		</button>
		<?php
	}

	/**
	 * Render callback for erif_contactus_subtitle
	 *
	 * @return string
	 */
	function zerif_contactus_subtitle_render_callback() {
		return wp_kses_post( get_theme_mod( 'zerif_contactus_subtitle' ) );
	}

	/**
	 * Render callback for zerif_socials_facebook
	 *
	 * @return mixed
	 */
	function zerif_socials_facebook_render_callback() {
		return '<a href="' . esc_url( get_theme_mod( 'zerif_socials_facebook' ) ) . '"><span class="sr-only">' . __( 'Facebook link', 'zerif-lite' ) . '</span> <i class="fa fa-facebook"></i></a>';
	}

	/**
	 * Render callback for zerif_socials_twitter
	 *
	 * @return mixed
	 */
	function zerif_socials_twitter_render_callback() {
		return '<a href="' . esc_url( get_theme_mod( 'zerif_socials_twitter' ) ) . '"><span class="sr-only">' . __( 'Twitter link', 'zerif-lite' ) . '</span> <i class="fa fa-twitter"></i></a>';
	}

	/**
	 * Render callback for zerif_socials_linkedin
	 *
	 * @return mixed
	 */
	function zerif_socials_linkedin_render_callback() {
		return '<a href="' . esc_url( get_theme_mod( 'zerif_socials_linkedin' ) ) . '"><span class="sr-only">' . __( 'Linkedin link', 'zerif-lite' ) . '</span> <i class="fa fa-linkedin"></i></a>';
	}

	/**
	 * Render callback for zerif_socials_behance
	 *
	 * @return mixed
	 */
	function zerif_socials_behance_render_callback() {
		return '<a href="' . esc_url( get_theme_mod( 'zerif_socials_behance' ) ) . '"><span class="sr-only">' . __( 'Behance link', 'zerif-lite' ) . '</span> <i class="fa fa-behance"></i></a>';
	}

	/**
	 * Render callback for zerif_socials_dribbble
	 *
	 * @return mixed
	 */
	function zerif_socials_dribbble_render_callback() {
		return '<a href="' . esc_url( get_theme_mod( 'zerif_socials_dribbble' ) ) . '"><span class="sr-only">' . __( 'Dribble link', 'zerif-lite' ) . '</span> <i class="fa fa-dribbble"></i></a>';
	}

	/**
	 * Render callback for zerif_socials_instagram
	 *
	 * @return mixed
	 */
	function zerif_socials_instagram_render_callback() {
		return '<a href="' . esc_url( get_theme_mod( 'zerif_socials_instagram' ) ) . '"><span class="sr-only">' . __( 'Instagram link', 'zerif-lite' ) . '</span> <i class="fa fa-instagram"></i></a>';
	}

	/**
	 * Render callback for zerif_address
	 *
	 * @return mixed
	 */
	function zerif_address_render_callback() {
		return wp_kses_post( get_theme_mod( 'zerif_address' ) );
	}

	/**
	 * Render callback for zerif_email
	 *
	 * @return mixed
	 */
	function zerif_email_render_callback() {
		return wp_kses_post( get_theme_mod( 'zerif_email' ) );
	}

	/**
	 * Render callback for zerif_phone
	 *
	 * @return mixed
	 */
	function zerif_phone_render_callback() {
		return wp_kses_post( get_theme_mod( 'zerif_phone' ) );
	}

	/**
	 * Render callback for zerif_address_icon
	 *
	 * @return mixed
	 */
	function zerif_address_icon_render_callback() {
		return '<img src="' . esc_url( get_theme_mod( 'zerif_address_icon' ) ) . '">';
	}

	/**
	 * Render callback for zerif_email_icon
	 *
	 * @return mixed
	 */
	function zerif_email_icon_render_callback() {
		return '<img src="' . esc_url( get_theme_mod( 'zerif_email_icon' ) ) . '">';
	}

	/**
	 * Render callback for zerif_phone_icon
	 *
	 * @return mixed
	 */
	function zerif_phone_icon_render_callback() {
		return '<img src="' . esc_url( get_theme_mod( 'zerif_phone_icon' ) ) . '">';
	}

	/**
	 * ADVANCED OPTIONS
	 */

	$wp_customize->add_panel(
		'zerif_advanced_options_panel',
		array(
			'title'    => esc_html__( 'Advanced options', 'zerif-lite' ),
			'priority' => 150,
		)
	);

	$wp_customize->add_section(
		'zerif_general_section',
		array(
			'title'    => __( 'General options', 'zerif-lite' ),
			'priority' => 1,
			'panel'    => 'zerif_advanced_options_panel',
		)
	);

	$wp_customize->add_setting(
		'zerif_use_safe_font',
		array(
			'sanitize_callback' => 'zerif_sanitize_checkbox',
		)
	);

	$wp_customize->add_control(
		'zerif_use_safe_font',
		array(
			'type'     => 'checkbox',
			'label'    => 'Use safe font?',
			'section'  => 'zerif_general_section',
			'priority' => 1,
		)
	);

	/* Disable preloader */
	$wp_customize->add_setting(
		'zerif_disable_preloader',
		array(
			'sanitize_callback' => 'zerif_sanitize_checkbox',
		)
	);

	$wp_customize->add_control(
		'zerif_disable_preloader',
		array(
			'type'     => 'checkbox',
			'label'    => __( 'Disable preloader?', 'zerif-lite' ),
			'section'  => 'zerif_general_section',
			'priority' => 2,
		)
	);

	/* Disable smooth scroll */
	$wp_customize->add_setting(
		'zerif_disable_smooth_scroll',
		array(
			'sanitize_callback' => 'zerif_sanitize_checkbox',
		)
	);

	$wp_customize->add_control(
		'zerif_disable_smooth_scroll',
		array(
			'type'     => 'checkbox',
			'label'    => __( 'Disable smooth scroll?', 'zerif-lite' ),
			'section'  => 'zerif_general_section',
			'priority' => 3,
		)
	);

	/* Enable accessibility */
	$wp_customize->add_setting(
		'zerif_accessibility',
		array(
			'sanitize_callback' => 'zerif_sanitize_checkbox',
		)
	);

	$wp_customize->add_control(
		'zerif_accessibility',
		array(
			'type'     => 'checkbox',
			'label'    => __( 'Enable accessibility?', 'zerif-lite' ),
			'section'  => 'zerif_general_section',
			'priority' => 4,
		)
	);

	/* Change the template to full width for page.php */
	$wp_customize->add_setting(
		'zerif_change_to_full_width',
		array(
			'sanitize_callback' => 'zerif_sanitize_checkbox',
		)
	);

	$wp_customize->add_control(
		'zerif_change_to_full_width',
		array(
			'type'     => 'checkbox',
			'label'    => 'Change the template to Full width for all the pages?',
			'section'  => 'zerif_general_section',
			'priority' => 6,
		)
	);

	/**
	 * Option to get the frontpage settings to the old default template if a static frontpage is selected
	 * Only for new users
	 */
	if ( ! zerif_check_if_old_version_of_theme() ) {
		$wp_customize->add_setting(
			'zerif_keep_old_fp_template',
			array(
				'sanitize_callback' => 'zerif_sanitize_checkbox',
			)
		);
		$wp_customize->add_control(
			'zerif_keep_old_fp_template',
			array(
				'type'     => 'checkbox',
				'label'    => esc_html__( 'Keep the old static frontpage template?', 'zerif-lite' ),
				'section'  => 'zerif_general_section',
				'priority' => 7,
			)
		);
	}

	$wp_customize->get_section( 'colors' )->panel           = 'zerif_advanced_options_panel';
	$wp_customize->get_section( 'background_image' )->panel = 'zerif_advanced_options_panel';

	if ( ! zerif_check_if_old_version_of_theme() ) {
		$wp_customize->add_section(
			'zerif_blog_header_section',
			array(
				'title' => __( 'Blog Header Options', 'zerif-lite' ),
				'panel' => 'zerif_advanced_options_panel',
			)
		);

		/* Blog Header Title */
		$wp_customize->add_setting(
			'zerif_blog_header_title',
			array(
				'default'           => esc_html__( 'Blog', 'zerif-lite' ),
				'transport'         => 'postMessage',
				'sanitize_callback' => 'esc_html',
			)
		);

		$wp_customize->add_control(
			'zerif_blog_header_title',
			array(
				'label'    => __( 'Title', 'zerif-lite' ),
				'section'  => 'zerif_blog_header_section',
				'priority' => 1,
			)
		);

		/* Blog Header Subtitle */
		$wp_customize->add_setting(
			'zerif_blog_header_subtitle',
			array(
				'default'           => esc_html__( 'Zerif supports a custom frontpage', 'zerif-lite' ),
				'transport'         => 'postMessage',
				'sanitize_callback' => 'esc_html',
			)
		);

		$wp_customize->add_control(
			'zerif_blog_header_subtitle',
			array(
				'label'    => __( 'Subtitle', 'zerif-lite' ),
				'section'  => 'zerif_blog_header_section',
				'priority' => 2,
			)
		);

		$wp_customize->selective_refresh->add_partial(
			'zerif_blog_header_title_subtitle',
			array(
				'selector'        => '.blog-header-wrap',
				'settings'        => array( 'zerif_blog_header_title', 'zerif_blog_header_subtitle' ),
				'render_callback' => 'zerif_blog_header_title_subtitle_callback',
			)
		);

		/**
		 * Callback for changing the title and subtitle on the blog
		 */
		function zerif_blog_header_title_subtitle_callback() {
			$title    = get_theme_mod( 'zerif_blog_header_title' );
			$subtitle = get_theme_mod( 'zerif_blog_header_subtitle' );
			$output   = '';
			if ( ! empty( $title ) || ! empty( $subtitle ) ) {
				$output .= '<div class="blog-header-content-wrap">';

				if ( ! empty( $title ) ) {
					$output .= '<h1 class="intro-text">' . esc_html( $title ) . '</h1>';
				}

				if ( ! empty( $subtitle ) ) {
					$output .= '<p class="blog-header-subtitle">' . esc_html( $subtitle ) . '</p>';
				}

				$output .= '</div>';
			}

			return $output;
		}
	}

	/**
	 * FRONTPAGE SECTIONS PANEL
	 */

	if ( zerif_check_if_wp_greater_than_4_7() ) {

		$zerif_frontpage_sections_panel = new Zerif_WP_Customize_Panel(
			$wp_customize,
			'zerif_frontpage_sections_panel',
			array(
				'title'    => esc_html__( 'Frontpage sections', 'zerif-lite' ),
				'priority' => 29,
			)
		);

		$wp_customize->add_panel( $zerif_frontpage_sections_panel );
	}

	/**
	 * BIG TITLE SECTION
	 */

	if ( zerif_check_if_wp_greater_than_4_7() ) {

		$panel_big_title = new Zerif_WP_Customize_Panel(
			$wp_customize,
			'panel_big_title',
			array(
				'title'    => esc_html__( 'Big title section', 'zerif-lite' ),
				'priority' => 30,
				'panel'    => 'zerif_frontpage_sections_panel',
			)
		);

		$wp_customize->add_panel( $panel_big_title );

	} else {

		$wp_customize->add_panel(
			'panel_big_title',
			array(
				'title'    => esc_html__( 'Big title section', 'zerif-lite' ),
				'priority' => 30,
			)
		);

	}

	$wp_customize->add_section(
		'zerif_bigtitle_section',
		array(
			'title'    => __( 'Main content', 'zerif-lite' ),
			'priority' => 1,
			'panel'    => 'panel_big_title',
		)
	);

	/* show/hide */
	$wp_customize->add_setting(
		'zerif_bigtitle_show',
		array(
			'sanitize_callback' => 'zerif_sanitize_checkbox',
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		'zerif_bigtitle_show',
		array(
			'type'     => 'checkbox',
			'label'    => __( 'Hide big title section?', 'zerif-lite' ),
			'section'  => 'zerif_bigtitle_section',
			'priority' => 1,
		)
	);

	/*
	 * Title
	 *
	 * define a new option with _2 to be used to differentiate between the old users and new ones
	 *
	 * get the old option's value and put it as default for the new _2 option
	 */

	$zerif_bigtitle_title_default = get_theme_mod( 'zerif_bigtitle_title' );

	if ( current_user_can( 'edit_theme_options' ) ) {
		$wp_customize->add_setting(
			'zerif_bigtitle_title_2',
			array(
				'sanitize_callback' => 'zerif_sanitize_input',
				/* translators: Big title section */
				'default'           => ! empty( $zerif_bigtitle_title_default ) ? $zerif_bigtitle_title_default : sprintf( __( 'This piece of text can be changed in %s', 'zerif-lite' ), __( 'Big title section', 'zerif-lite' ) ),
				'transport'         => 'postMessage',
			)
		);
	} else {
		$wp_customize->add_setting(
			'zerif_bigtitle_title_2',
			array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'transport'         => 'postMessage',
			)
		);
	}

	$wp_customize->add_control(
		'zerif_bigtitle_title_2',
		array(
			'label'    => __( 'Title', 'zerif-lite' ),
			'section'  => 'zerif_bigtitle_section',
			'priority' => 2,
		)
	);

	/*
	 * red button
	 *
	 * define a new option with _2 to be used to differentiate between the old users and new ones
	 *
	 * get the old option's value and put it as default for the new _2 option
	 */
	$zerif_bigtitle_redbutton_label_default = get_theme_mod( 'zerif_bigtitle_redbutton_label' );

	if ( current_user_can( 'edit_theme_options' ) ) {
		$wp_customize->add_setting(
			'zerif_bigtitle_redbutton_label_2',
			array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'default'           => ! empty( $zerif_bigtitle_redbutton_label_default ) ? $zerif_bigtitle_redbutton_label_default : __( 'Customize this button', 'zerif-lite' ),
				'transport'         => 'postMessage',
			)
		);
	} else {
		$wp_customize->add_setting(
			'zerif_bigtitle_redbutton_label_2',
			array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'transport'         => 'postMessage',
			)
		);
	}

	$wp_customize->add_control(
		'zerif_bigtitle_redbutton_label_2',
		array(
			'label'    => __( 'Red button label', 'zerif-lite' ),
			'section'  => 'zerif_bigtitle_section',
			'priority' => 3,
		)
	);

	$wp_customize->add_setting(
		'zerif_bigtitle_redbutton_url',
		array(
			'sanitize_callback' => 'esc_url_raw',
			'default'           => esc_url( home_url( '/' ) ) . '#focus',
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		'zerif_bigtitle_redbutton_url',
		array(
			'label'    => __( 'Red button link', 'zerif-lite' ),
			'section'  => 'zerif_bigtitle_section',
			'priority' => 4,
		)
	);

	/**
	 * Green button
	 */

	if ( current_user_can( 'edit_theme_options' ) ) {
		$wp_customize->add_setting(
			'zerif_bigtitle_greenbutton_label',
			array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'default'           => __( 'Customize this button', 'zerif-lite' ),
				'transport'         => 'postMessage',
			)
		);
	} else {
		$wp_customize->add_setting(
			'zerif_bigtitle_greenbutton_label',
			array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'transport'         => 'postMessage',
			)
		);
	}

	$wp_customize->add_control(
		'zerif_bigtitle_greenbutton_label',
		array(
			'label'    => __( 'Green button label', 'zerif-lite' ),
			'section'  => 'zerif_bigtitle_section',
			'priority' => 5,
		)
	);

	$wp_customize->add_setting(
		'zerif_bigtitle_greenbutton_url',
		array(
			'sanitize_callback' => 'esc_url_raw',
			'default'           => esc_url( home_url( '/' ) ) . '#focus',
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		'zerif_bigtitle_greenbutton_url',
		array(
			'label'    => __( 'Green button link', 'zerif-lite' ),
			'section'  => 'zerif_bigtitle_section',
			'priority' => 6,
		)
	);

	/**
	 * Slider shortcode
	 */

	$wp_customize->add_setting(
		'zerif_bigtitle_slider_shortcode',
		array(
			'sanitize_callback' => 'zerif_sanitize_input',
		)
	);

	$wp_customize->add_control(
		'zerif_bigtitle_slider_shortcode',
		array(
			'label'       => __( 'Slider shortcode', 'zerif-lite' ),
			'description' => __( 'You can replace the homepage slider with any plugin you like, just copy the shortcode generated and paste it here.', 'zerif-lite' ),
			'section'     => 'zerif_bigtitle_section',
			'priority'    => 7,
		)
	);

	/**
	 * PARALLAX IMAGES
	 */

	$wp_customize->add_section(
		'zerif_parallax_section',
		array(
			'title'    => __( 'Parallax effect', 'zerif-lite' ),
			'priority' => 2,
			'panel'    => 'panel_big_title',
		)
	);

	/* show/hide */
	$wp_customize->add_setting(
		'zerif_parallax_show',
		array(
			'sanitize_callback' => 'zerif_sanitize_checkbox',
		)
	);

	$wp_customize->add_control(
		'zerif_parallax_show',
		array(
			'type'     => 'checkbox',
			'label'    => __( 'Use parallax effect?', 'zerif-lite' ),
			'section'  => 'zerif_parallax_section',
			'priority' => 1,
		)
	);

	/* IMAGE 1*/
	$wp_customize->add_setting(
		'zerif_parallax_img1',
		array(
			'sanitize_callback' => 'esc_url_raw',
			'default'           => get_template_directory_uri() . '/images/background1.jpg',
		)
	);

	$wp_customize->add_control(
		new WP_Customize_Image_Control(
			$wp_customize,
			'themeslug_parallax_img1',
			array(
				'label'    => __( 'Image 1', 'zerif-lite' ),
				'section'  => 'zerif_parallax_section',
				'settings' => 'zerif_parallax_img1',
				'priority' => 1,
			)
		)
	);

	/* IMAGE 2 */
	$wp_customize->add_setting(
		'zerif_parallax_img2',
		array(
			'sanitize_callback' => 'esc_url_raw',
			'default'           => get_template_directory_uri() . '/images/background2.png',
		)
	);

	$wp_customize->add_control(
		new WP_Customize_Image_Control(
			$wp_customize,
			'themeslug_parallax_img2',
			array(
				'label'    => __( 'Image 2', 'zerif-lite' ),
				'section'  => 'zerif_parallax_section',
				'settings' => 'zerif_parallax_img2',
				'priority' => 2,
			)
		)
	);

	/**
	 * OUR FOCUS SECTION
	 */

	$wp_customize->add_section(
		'zerif_ourfocus_section',
		array(
			'title'    => __( 'Our focus section', 'zerif-lite' ),
			'priority' => 31,
		)
	);

	if ( zerif_check_if_wp_greater_than_4_7() ) {
		$wp_customize->get_section( 'zerif_ourfocus_section' )->panel = 'zerif_frontpage_sections_panel';
	}

	/* show/hide */
	$wp_customize->add_setting(
		'zerif_ourfocus_show',
		array(
			'sanitize_callback' => 'zerif_sanitize_checkbox',
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		'zerif_ourfocus_show',
		array(
			'type'     => 'checkbox',
			'label'    => __( 'Hide our focus section?', 'zerif-lite' ),
			'section'  => 'zerif_ourfocus_section',
			'priority' => - 3,
		)
	);

	/*
	 * our focus title
	 *
	 * define a new option with _2 to be used to differentiate between the old users and new ones
	 *
	 * get the old option's value and put it as default for the new _2 option
	 *
	 */

	$zerif_ourfocus_title_default = get_theme_mod( 'zerif_ourfocus_title' );

	if ( current_user_can( 'edit_theme_options' ) ) {
		$wp_customize->add_setting(
			'zerif_ourfocus_title_2',
			array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'default'           => ! empty( $zerif_ourfocus_title_default ) ? $zerif_ourfocus_title_default : __( 'FEATURES', 'zerif-lite' ),
				'transport'         => 'postMessage',
			)
		);
	} else {
		$wp_customize->add_setting(
			'zerif_ourfocus_title_2',
			array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'transport'         => 'postMessage',
			)
		);
	}
	$wp_customize->add_control(
		'zerif_ourfocus_title_2',
		array(
			'label'    => __( 'Title', 'zerif-lite' ),
			'section'  => 'zerif_ourfocus_section',
			'priority' => - 2,
		)
	);

	/* Our focus subtitle */
	if ( current_user_can( 'edit_theme_options' ) ) {
		$wp_customize->add_setting(
			'zerif_ourfocus_subtitle',
			array(
				'sanitize_callback' => 'zerif_sanitize_input',
				/* translators: Our focus section */
				'default'           => sprintf( __( 'Change this subtitle in %s', 'zerif-lite' ), __( 'Our focus section', 'zerif-lite' ) ),
				'transport'         => 'postMessage',
			)
		);
	} else {
		$wp_customize->add_setting(
			'zerif_ourfocus_subtitle',
			array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'transport'         => 'postMessage',
			)
		);
	}

	$wp_customize->add_control(
		'zerif_ourfocus_subtitle',
		array(
			'label'    => __( 'Our focus subtitle', 'zerif-lite' ),
			'section'  => 'zerif_ourfocus_section',
			'priority' => - 1,
		)
	);

	$our_focus_section = $wp_customize->get_section( 'sidebar-widgets-sidebar-ourfocus' );
	if ( ! empty( $our_focus_section ) ) {
		if ( zerif_check_if_wp_greater_than_4_7() ) {
			$our_focus_section->panel = 'zerif_frontpage_sections_panel';
		} else {
			$our_focus_section->panel = '';
		}
		$our_focus_section->title                                        = __( 'Our focus section', 'zerif-lite' );
		$our_focus_section->priority                                     = 31;
		$wp_customize->get_control( 'zerif_ourfocus_show' )->section     = 'sidebar-widgets-sidebar-ourfocus';
		$wp_customize->get_control( 'zerif_ourfocus_title_2' )->section  = 'sidebar-widgets-sidebar-ourfocus';
		$wp_customize->get_control( 'zerif_ourfocus_subtitle' )->section = 'sidebar-widgets-sidebar-ourfocus';
	}

	/**
	 * ABOUT US SECTION
	 */

	if ( zerif_check_if_wp_greater_than_4_7() ) {

		$panel_about = new Zerif_WP_Customize_Panel(
			$wp_customize,
			'panel_about',
			array(
				'priority' => 32,
				'title'    => __( 'About us section', 'zerif-lite' ),
				'panel'    => 'zerif_frontpage_sections_panel',
			)
		);

		$wp_customize->add_panel( $panel_about );

	} else {

		$wp_customize->add_panel(
			'panel_about',
			array(
				'priority' => 32,
				'title'    => __( 'About us section', 'zerif-lite' ),
			)
		);

	}

	$wp_customize->add_section(
		'zerif_aboutus_main_section',
		array(
			'title'    => __( 'Main content', 'zerif-lite' ),
			'priority' => 2,
			'panel'    => 'panel_about',
		)
	);

	/* About us show/hide */
	$wp_customize->add_setting(
		'zerif_aboutus_show',
		array(
			'sanitize_callback' => 'zerif_sanitize_checkbox',
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		'zerif_aboutus_show',
		array(
			'type'     => 'checkbox',
			'label'    => __( 'Hide about us section?', 'zerif-lite' ),
			'section'  => 'zerif_aboutus_main_section',
			'priority' => 1,
		)
	);

	/* Title */
	if ( current_user_can( 'edit_theme_options' ) ) {
		$wp_customize->add_setting(
			'zerif_aboutus_title',
			array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'default'           => __( 'About', 'zerif-lite' ),
				'transport'         => 'postMessage',
			)
		);
	} else {
		$wp_customize->add_setting(
			'zerif_aboutus_title',
			array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'transport'         => 'postMessage',
			)
		);
	}

	$wp_customize->add_control(
		'zerif_aboutus_title',
		array(
			'label'    => __( 'Title', 'zerif-lite' ),
			'section'  => 'zerif_aboutus_main_section',
			'priority' => 2,
		)
	);

	/* Subtitle */
	if ( current_user_can( 'edit_theme_options' ) ) {
		$wp_customize->add_setting(
			'zerif_aboutus_subtitle',
			array(
				'sanitize_callback' => 'zerif_sanitize_input',
				/* translators: About us section */
				'default'           => sprintf( __( 'Change this subtitle in %s', 'zerif-lite' ), __( 'About us section', 'zerif-lite' ) ),
				'transport'         => 'postMessage',
			)
		);
	} else {
		$wp_customize->add_setting(
			'zerif_aboutus_subtitle',
			array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'transport'         => 'postMessage',
			)
		);
	}

	$wp_customize->add_control(
		'zerif_aboutus_subtitle',
		array(
			'label'    => __( 'Subtitle', 'zerif-lite' ),
			'section'  => 'zerif_aboutus_main_section',
			'priority' => 3,
		)
	);

	/* Big left title */
	$zerif_aboutus_biglefttitle_default = '';
	if ( defined( 'THEMEISLE_COMPANION_VERSION' ) ) {
		$zerif_aboutus_biglefttitle_default = 'Everything you see here is responsive and mobile-friendly.';
	}

	if ( current_user_can( 'edit_theme_options' ) ) {
		$wp_customize->add_setting(
			'zerif_aboutus_biglefttitle',
			array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'default'           => $zerif_aboutus_biglefttitle_default,
				'transport'         => 'postMessage',
			)
		);
	} else {
		$wp_customize->add_setting(
			'zerif_aboutus_biglefttitle',
			array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'transport'         => 'postMessage',
			)
		);
	}

	$wp_customize->add_control(
		'zerif_aboutus_biglefttitle',
		array(
			'label'    => __( 'Big left side title', 'zerif-lite' ),
			'section'  => 'zerif_aboutus_main_section',
			'priority' => 4,
		)
	);

	/* Text */

	/* translators: About us section */
	$zerif_aboutus_text_default = sprintf( __( 'Change this text in %s', 'zerif-lite' ), __( 'About us section', 'zerif-lite' ) );
	if ( defined( 'THEMEISLE_COMPANION_VERSION' ) ) {
		$zerif_aboutus_text_default = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla nec massa enim. Aliquam viverra at est ullamcorper sollicitudin. Proin a leo sit amet nunc malesuada imperdiet pharetra ut eros.<br><br> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla nec massa enim. Aliquam viverra at est ullamcorper sollicitudin. Proin a leo sit amet nunc malesuada imperdiet pharetra ut eros. <br><br>Mauris vel nunc at ipsum fermentum pellentesque quis ut massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Maecenas non adipiscing massa. Sed ut fringilla sapien. Cras sollicitudin, lectus sed tincidunt cursus, magna lectus vehicula augue, a lobortis dui orci et est.';
	}

	if ( current_user_can( 'edit_theme_options' ) ) {
		$wp_customize->add_setting(
			'zerif_aboutus_text',
			array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'default'           => $zerif_aboutus_text_default,
				'transport'         => 'postMessage',
			)
		);
	} else {
		$wp_customize->add_setting(
			'zerif_aboutus_text',
			array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'transport'         => 'postMessage',
			)
		);
	}

	$wp_customize->add_control(
		'zerif_aboutus_text',
		array(
			'type'     => 'textarea',
			'label'    => __( 'Text', 'zerif-lite' ),
			'section'  => 'zerif_aboutus_main_section',
			'priority' => 5,
		)
	);

	$wp_customize->add_section(
		'zerif_aboutus_feat1_section',
		array(
			'title'    => __( 'Feature no#1', 'zerif-lite' ),
			'priority' => 3,
			'panel'    => 'panel_about',
		)
	);

	/* Feature no#1 */
	if ( current_user_can( 'edit_theme_options' ) ) {
		$wp_customize->add_setting(
			'zerif_aboutus_feature1_title',
			array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'default'           => __( 'Edit skill', 'zerif-lite' ),
				'transport'         => 'postMessage',
			)
		);
	} else {
		$wp_customize->add_setting(
			'zerif_aboutus_feature1_title',
			array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'transport'         => 'postMessage',
			)
		);
	}

	$wp_customize->add_control(
		'zerif_aboutus_feature1_title',
		array(
			'label'    => __( 'Feature no1 title', 'zerif-lite' ),
			'section'  => 'zerif_aboutus_feat1_section',
			'priority' => 6,
		)
	);

	$wp_customize->add_setting(
		'zerif_aboutus_feature1_text',
		array(
			'sanitize_callback' => 'zerif_sanitize_input',
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		'zerif_aboutus_feature1_text',
		array(
			'label'    => __( 'Feature no1 text', 'zerif-lite' ),
			'section'  => 'zerif_aboutus_feat1_section',
			'priority' => 7,
		)
	);

	$wp_customize->add_setting(
		'zerif_aboutus_feature1_nr',
		array(
			'sanitize_callback' => 'absint',
			'default'           => '80',
		)
	);

	$wp_customize->add_control(
		new Zerif_Customizer_Number_Control(
			$wp_customize,
			'zerif_aboutus_feature1_nr',
			array(
				'type'     => 'number',
				'label'    => __( 'Feature no1 percentage', 'zerif-lite' ),
				'section'  => 'zerif_aboutus_feat1_section',
				'priority' => 8,
			)
		)
	);

	$wp_customize->add_section(
		'zerif_aboutus_feat2_section',
		array(
			'title'    => __( 'Feature no#2', 'zerif-lite' ),
			'priority' => 4,
			'panel'    => 'panel_about',
		)
	);

	/* Feature no#2 */
	if ( current_user_can( 'edit_theme_options' ) ) {
		$wp_customize->add_setting(
			'zerif_aboutus_feature2_title',
			array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'default'           => __( 'Edit skill', 'zerif-lite' ),
				'transport'         => 'postMessage',
			)
		);
	} else {
		$wp_customize->add_setting(
			'zerif_aboutus_feature2_title',
			array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'transport'         => 'postMessage',
			)
		);
	}

	$wp_customize->add_control(
		'zerif_aboutus_feature2_title',
		array(
			'label'    => __( 'Feature no2 title', 'zerif-lite' ),
			'section'  => 'zerif_aboutus_feat2_section',
			'priority' => 9,
		)
	);

	$wp_customize->add_setting(
		'zerif_aboutus_feature2_text',
		array(
			'sanitize_callback' => 'zerif_sanitize_input',
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		'zerif_aboutus_feature2_text',
		array(
			'label'    => __( 'Feature no2 text', 'zerif-lite' ),
			'section'  => 'zerif_aboutus_feat2_section',
			'priority' => 10,
		)
	);

	$wp_customize->add_setting(
		'zerif_aboutus_feature2_nr',
		array(
			'sanitize_callback' => 'absint',
			'default'           => '91',
		)
	);

	$wp_customize->add_control(
		new Zerif_Customizer_Number_Control(
			$wp_customize,
			'zerif_aboutus_feature2_nr',
			array(
				'type'     => 'number',
				'label'    => __( 'Feature no2 percentage', 'zerif-lite' ),
				'section'  => 'zerif_aboutus_feat2_section',
				'priority' => 11,
			)
		)
	);

	$wp_customize->add_section(
		'zerif_aboutus_feat3_section',
		array(
			'title'    => __( 'Feature no#3', 'zerif-lite' ),
			'priority' => 5,
			'panel'    => 'panel_about',
		)
	);

	/* Feature no#3 */
	if ( current_user_can( 'edit_theme_options' ) ) {
		$wp_customize->add_setting(
			'zerif_aboutus_feature3_title',
			array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'default'           => __( 'Edit skill', 'zerif-lite' ),
				'transport'         => 'postMessage',
			)
		);
	} else {
		$wp_customize->add_setting(
			'zerif_aboutus_feature3_title',
			array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'transport'         => 'postMessage',
			)
		);
	}

	$wp_customize->add_control(
		'zerif_aboutus_feature3_title',
		array(
			'label'    => __( 'Feature no3 title', 'zerif-lite' ),
			'section'  => 'zerif_aboutus_feat3_section',
			'priority' => 12,
		)
	);

	$wp_customize->add_setting(
		'zerif_aboutus_feature3_text',
		array(
			'sanitize_callback' => 'zerif_sanitize_input',
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		'zerif_aboutus_feature3_text',
		array(
			'label'    => __( 'Feature no3 text', 'zerif-lite' ),
			'section'  => 'zerif_aboutus_feat3_section',
			'priority' => 13,
		)
	);

	$wp_customize->add_setting(
		'zerif_aboutus_feature3_nr',
		array(
			'sanitize_callback' => 'absint',
			'default'           => '88',
		)
	);

	$wp_customize->add_control(
		new Zerif_Customizer_Number_Control(
			$wp_customize,
			'zerif_aboutus_feature3_nr',
			array(
				'type'     => 'number',
				'label'    => __( 'Feature no3 percentage', 'zerif-lite' ),
				'section'  => 'zerif_aboutus_feat3_section',
				'priority' => 14,
			)
		)
	);

	$wp_customize->add_section(
		'zerif_aboutus_feat4_section',
		array(
			'title'    => __( 'Feature no#4', 'zerif-lite' ),
			'priority' => 6,
			'panel'    => 'panel_about',
		)
	);

	/* Feature no#4 */
	if ( current_user_can( 'edit_theme_options' ) ) {
		$wp_customize->add_setting(
			'zerif_aboutus_feature4_title',
			array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'default'           => __( 'Edit skill', 'zerif-lite' ),
				'transport'         => 'postMessage',
			)
		);
	} else {
		$wp_customize->add_setting(
			'zerif_aboutus_feature4_title',
			array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'transport'         => 'postMessage',
			)
		);
	}
	$wp_customize->add_control(
		'zerif_aboutus_feature4_title',
		array(
			'label'    => __( 'Feature no4 title', 'zerif-lite' ),
			'section'  => 'zerif_aboutus_feat4_section',
			'priority' => 15,
		)
	);

	$wp_customize->add_setting(
		'zerif_aboutus_feature4_text',
		array(
			'sanitize_callback' => 'zerif_sanitize_input',
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		'zerif_aboutus_feature4_text',
		array(
			'label'    => __( 'Feature no4 text', 'zerif-lite' ),
			'section'  => 'zerif_aboutus_feat4_section',
			'priority' => 16,
		)
	);

	$wp_customize->add_setting(
		'zerif_aboutus_feature4_nr',
		array(
			'sanitize_callback' => 'absint',
			'default'           => '95',
		)
	);

	$wp_customize->add_control(
		new Zerif_Customizer_Number_Control(
			$wp_customize,
			'zerif_aboutus_feature4_nr',
			array(
				'type'     => 'number',
				'label'    => __( 'Feature no4 percentage', 'zerif-lite' ),
				'section'  => 'zerif_aboutus_feat4_section',
				'priority' => 17,
			)
		)
	);

	/* ABOUT US CLIENTS TITLE */

	$wp_customize->add_section(
		'zerif_aboutus_clients_title_section',
		array(
			'title'    => __( 'Clients area title', 'zerif-lite' ),
			'priority' => 7,
			'panel'    => 'panel_about',
		)
	);

	$wp_customize->add_setting(
		'zerif_aboutus_clients_title_text',
		array(
			'sanitize_callback' => 'zerif_sanitize_input',
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		'zerif_aboutus_clients_title_text',
		array(
			'label'    => __( 'Title', 'zerif-lite' ),
			'section'  => 'zerif_aboutus_clients_title_section',
			'priority' => -1,
		)
	);

	$aboutus_section = $wp_customize->get_section( 'sidebar-widgets-sidebar-aboutus' );
	if ( ! empty( $aboutus_section ) ) {
		if ( zerif_check_if_wp_greater_than_4_7() ) {
			$aboutus_section->panel = 'zerif_frontpage_sections_panel';
		} else {
			$aboutus_section->panel = 'panel_about';
		}
		$aboutus_section->title    = __( 'Clients area', 'zerif-lite' );
		$aboutus_section->priority = 10;
		$wp_customize->get_control( 'zerif_aboutus_clients_title_text' )->section = 'sidebar-widgets-sidebar-aboutus';

	}

	/**
	 * OUR TEAM SECTION
	 */

	$wp_customize->add_section(
		'zerif_ourteam_section',
		array(
			'title'    => __( 'Content', 'zerif-lite' ),
			'priority' => 33,
		)
	);

	if ( zerif_check_if_wp_greater_than_4_7() ) {

		$wp_customize->get_section( 'zerif_ourteam_section' )->panel = 'zerif_frontpage_sections_panel';

	}

	/* Our team show/hide */
	$wp_customize->add_setting(
		'zerif_ourteam_show',
		array(
			'sanitize_callback' => 'zerif_sanitize_checkbox',
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		'zerif_ourteam_show',
		array(
			'type'     => 'checkbox',
			'label'    => __( 'Hide our team section?', 'zerif-lite' ),
			'section'  => 'zerif_ourteam_section',
			'priority' => -3,
		)
	);

	/* Our team title */
	if ( current_user_can( 'edit_theme_options' ) ) {
		$wp_customize->add_setting(
			'zerif_ourteam_title',
			array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'default'           => __( 'YOUR TEAM', 'zerif-lite' ),
				'transport'         => 'postMessage',
			)
		);
	} else {
		$wp_customize->add_setting(
			'zerif_ourteam_title',
			array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'transport'         => 'postMessage',
			)
		);
	}

	$wp_customize->add_control(
		'zerif_ourteam_title',
		array(
			'label'    => __( 'Title', 'zerif-lite' ),
			'section'  => 'zerif_ourteam_section',
			'priority' => -2,
		)
	);

	/* Our team subtitle */
	if ( current_user_can( 'edit_theme_options' ) ) {
		$wp_customize->add_setting(
			'zerif_ourteam_subtitle',
			array(
				'sanitize_callback' => 'zerif_sanitize_input',
				/* translators: Our team section */
				'default'           => sprintf( __( 'Change this subtitle in %s', 'zerif-lite' ), __( 'Our team section', 'zerif-lite' ) ),
				'transport'         => 'postMessage',
			)
		);
	} else {
		$wp_customize->add_setting(
			'zerif_ourteam_subtitle',
			array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'transport'         => 'postMessage',
			)
		);
	}

	$wp_customize->add_control(
		'zerif_ourteam_subtitle',
		array(
			'label'    => __( 'Our team subtitle', 'zerif-lite' ),
			'section'  => 'zerif_ourteam_section',
			'priority' => -1,
		)
	);

	$our_team_section = $wp_customize->get_section( 'sidebar-widgets-sidebar-ourteam' );
	if ( ! empty( $our_team_section ) ) {

		if ( zerif_check_if_wp_greater_than_4_7() ) {
			$our_team_section->panel = 'zerif_frontpage_sections_panel';
		} else {
			$our_team_section->panel = '';
		}
		$our_team_section->title                                        = __( 'Our team section', 'zerif-lite' );
		$our_team_section->priority                                     = 33;
		$wp_customize->get_control( 'zerif_ourteam_show' )->section     = 'sidebar-widgets-sidebar-ourteam';
		$wp_customize->get_control( 'zerif_ourteam_title' )->section    = 'sidebar-widgets-sidebar-ourteam';
		$wp_customize->get_control( 'zerif_ourteam_subtitle' )->section = 'sidebar-widgets-sidebar-ourteam';
	}

	/**
	 * TESTIMONIALS SECTION
	 */

	$wp_customize->add_section(
		'zerif_testimonials_section',
		array(
			'title'    => __( 'Testimonials section', 'zerif-lite' ),
			'priority' => 34,
		)
	);

	if ( zerif_check_if_wp_greater_than_4_7() ) {
		$wp_customize->add_section( 'zerif_testimonials_section' )->panel = 'zerif_frontpage_sections_panel';
	}

	/* testimonials show/hide */
	$wp_customize->add_setting(
		'zerif_testimonials_show',
		array(
			'sanitize_callback' => 'zerif_sanitize_checkbox',
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		'zerif_testimonials_show',
		array(
			'type'     => 'checkbox',
			'label'    => __( 'Hide testimonials section?', 'zerif-lite' ),
			'section'  => 'zerif_testimonials_section',
			'priority' => -4,
		)
	);

	/* Testimonial pinterest layout */
	$wp_customize->add_setting(
		'zerif_testimonials_pinterest_style',
		array(
			'sanitize_callback' => 'zerif_sanitize_checkbox',
		)
	);

	$wp_customize->add_control(
		'zerif_testimonials_pinterest_style',
		array(
			'type'     => 'checkbox',
			'label'    => __( 'Use pinterest layout?', 'zerif-lite' ),
			'section'  => 'zerif_testimonials_section',
			'priority' => -3,
		)
	);

	/* Testimonials title */
	if ( current_user_can( 'edit_theme_options' ) ) {
		$wp_customize->add_setting(
			'zerif_testimonials_title',
			array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'default'           => __( 'Testimonials', 'zerif-lite' ),
				'transport'         => 'postMessage',
			)
		);
	} else {
		$wp_customize->add_setting(
			'zerif_testimonials_title',
			array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'transport'         => 'postMessage',
			)
		);
	}

	$wp_customize->add_control(
		'zerif_testimonials_title',
		array(
			'label'    => __( 'Title', 'zerif-lite' ),
			'section'  => 'zerif_testimonials_section',
			'priority' => -2,
		)
	);

	/* Testimonials subtitle */
	$wp_customize->add_setting(
		'zerif_testimonials_subtitle',
		array(
			'sanitize_callback' => 'zerif_sanitize_input',
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		'zerif_testimonials_subtitle',
		array(
			'label'    => __( 'Testimonials subtitle', 'zerif-lite' ),
			'section'  => 'zerif_testimonials_section',
			'priority' => -1,
		)
	);

	$testimonials_section = $wp_customize->get_section( 'sidebar-widgets-sidebar-testimonials' );
	if ( ! empty( $our_team_section ) ) {

		if ( zerif_check_if_wp_greater_than_4_7() ) {
			$testimonials_section->panel = 'zerif_frontpage_sections_panel';
		} else {
			$testimonials_section->panel = '';
		}
		$testimonials_section->title                                     = __( 'Testimonials section', 'zerif-lite' );
		$testimonials_section->priority                                  = 34;
		$wp_customize->get_control( 'zerif_testimonials_show' )->section = 'sidebar-widgets-sidebar-testimonials';
		$wp_customize->get_control( 'zerif_testimonials_pinterest_style' )->section = 'sidebar-widgets-sidebar-testimonials';
		$wp_customize->get_control( 'zerif_testimonials_title' )->section           = 'sidebar-widgets-sidebar-testimonials';
		$wp_customize->get_control( 'zerif_testimonials_subtitle' )->section        = 'sidebar-widgets-sidebar-testimonials';
	}

	/**
	 * RIBBONS
	 */

	if ( zerif_check_if_wp_greater_than_4_7() ) {

		$panel_ribbons = new Zerif_WP_Customize_Panel(
			$wp_customize,
			'panel_ribbons',
			array(
				'priority' => 37,
				'title'    => __( 'Ribbon sections', 'zerif-lite' ),
				'panel'    => 'zerif_frontpage_sections_panel',
			)
		);

		$wp_customize->add_panel( $panel_ribbons );

	} else {

		$wp_customize->add_panel(
			'panel_ribbons',
			array(
				'priority' => 37,
				'title'    => __( 'Ribbon sections', 'zerif-lite' ),
			)
		);

	}

	$wp_customize->add_section(
		'zerif_bottomribbon_section',
		array(
			'title'    => __( 'BottomButton Ribbon', 'zerif-lite' ),
			'priority' => 1,
			'panel'    => 'panel_ribbons',
		)
	);

	/* RIBBON SECTION WITH BOTTOM BUTTON */

	$zerif_bottomribbon_text_default        = '';
	$zerif_bottomribbon_buttonlabel_default = '';
	$zerif_bottomribbon_buttonlink_default  = '';

	/* For new users, add default values for the Ribbon section controls */
	if ( ! zerif_check_if_old_version_of_theme() && current_user_can( 'edit_theme_options' ) ) {
		$zerif_bottomribbon_text_default        = __( 'Change this text in BottomButton Ribbon', 'zerif-lite' );
		$zerif_bottomribbon_buttonlabel_default = __( 'Get in touch', 'zerif-lite' );
		$zerif_bottomribbon_buttonlink_default  = esc_url( admin_url( 'customize.php?autofocus&#91;control&#93;=zerif_bottomribbon_buttonlink' ) );
	}

	/* Text */
	$wp_customize->add_setting(
		'zerif_bottomribbon_text',
		array(
			'sanitize_callback' => 'zerif_sanitize_input',
			'default'           => $zerif_bottomribbon_text_default,
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		'zerif_bottomribbon_text',
		array(
			'type'     => 'textarea',
			'label'    => __( 'Text', 'zerif-lite' ),
			'section'  => 'zerif_bottomribbon_section',
			'priority' => 1,
		)
	);

	/* Button label */
	$wp_customize->add_setting(
		'zerif_bottomribbon_buttonlabel',
		array(
			'sanitize_callback' => 'zerif_sanitize_input',
			'default'           => $zerif_bottomribbon_buttonlabel_default,
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		'zerif_bottomribbon_buttonlabel',
		array(
			'label'    => __( 'Button label', 'zerif-lite' ),
			'section'  => 'zerif_bottomribbon_section',
			'priority' => 2,
		)
	);

	/* Button link */
	$wp_customize->add_setting(
		'zerif_bottomribbon_buttonlink',
		array(
			'sanitize_callback' => 'esc_url_raw',
			'default'           => $zerif_bottomribbon_buttonlink_default,
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		'zerif_bottomribbon_buttonlink',
		array(
			'label'    => __( 'Button link', 'zerif-lite' ),
			'section'  => 'zerif_bottomribbon_section',
			'priority' => 3,
		)
	);

	/* RIBBON SECTION WITH BUTTON IN THE RIGHT SIDE */

	$zerif_ribbonright_text_default        = '';
	$zerif_ribbonright_buttonlabel_default = '';
	$zerif_ribbonright_buttonlink_default  = '';

	/* For new users, add default values for the Ribbon section controls */
	if ( ! zerif_check_if_old_version_of_theme() && current_user_can( 'edit_theme_options' ) ) {
		$zerif_ribbonright_text_default        = __( 'Change this text in RightButton Ribbon', 'zerif-lite' );
		$zerif_ribbonright_buttonlabel_default = __( 'Get in touch', 'zerif-lite' );
		$zerif_ribbonright_buttonlink_default  = esc_url( admin_url( 'customize.php?autofocus&#91;control&#93;=zerif_ribbonright_buttonlink' ) );
	}

	$wp_customize->add_section(
		'zerif_rightribbon_section',
		array(
			'title'    => __( 'RightButton Ribbon', 'zerif-lite' ),
			'priority' => 2,
			'panel'    => 'panel_ribbons',
		)
	);

	/* Text */
	$wp_customize->add_setting(
		'zerif_ribbonright_text',
		array(
			'sanitize_callback' => 'zerif_sanitize_input',
			'default'           => $zerif_ribbonright_text_default,
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		'zerif_ribbonright_text',
		array(
			'type'     => 'textarea',
			'label'    => __( 'Text', 'zerif-lite' ),
			'section'  => 'zerif_rightribbon_section',
			'priority' => 4,
		)
	);

	/* Button label */
	$wp_customize->add_setting(
		'zerif_ribbonright_buttonlabel',
		array(
			'sanitize_callback' => 'zerif_sanitize_input',
			'default'           => $zerif_ribbonright_buttonlabel_default,
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		'zerif_ribbonright_buttonlabel',
		array(
			'label'    => __( 'Button label', 'zerif-lite' ),
			'section'  => 'zerif_rightribbon_section',
			'priority' => 5,
		)
	);

	/* Button link */
	$wp_customize->add_setting(
		'zerif_ribbonright_buttonlink',
		array(
			'sanitize_callback' => 'esc_url_raw',
			'default'           => $zerif_ribbonright_buttonlink_default,
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		'zerif_ribbonright_buttonlink',
		array(
			'label'    => __( 'Button link', 'zerif-lite' ),
			'section'  => 'zerif_rightribbon_section',
			'priority' => 6,
		)
	);

	/**
	 * LATEST NEWS SECTION
	 */

	$wp_customize->add_section(
		'zerif_latestnews_section',
		array(
			'title'    => __( 'Latest News section', 'zerif-lite' ),
			'priority' => 35,
		)
	);

	if ( zerif_check_if_wp_greater_than_4_7() ) {
		$wp_customize->get_section( 'zerif_latestnews_section' )->panel = 'zerif_frontpage_sections_panel';
	}

	/* Latest news show/hide */
	$wp_customize->add_setting(
		'zerif_latestnews_show',
		array(
			'sanitize_callback' => 'zerif_sanitize_checkbox',
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		'zerif_latestnews_show',
		array(
			'type'     => 'checkbox',
			'label'    => __( 'Hide latest news section?', 'zerif-lite' ),
			'section'  => 'zerif_latestnews_section',
			'priority' => 1,
		)
	);

	/* Latest news title */
	$wp_customize->add_setting(
		'zerif_latestnews_title',
		array(
			'sanitize_callback' => 'zerif_sanitize_input',
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		'zerif_latestnews_title',
		array(
			'label'    => __( 'Latest News title', 'zerif-lite' ),
			'section'  => 'zerif_latestnews_section',
			'priority' => 2,
		)
	);

	/* Latest news subtitle */
	$wp_customize->add_setting(
		'zerif_latestnews_subtitle',
		array(
			'sanitize_callback' => 'zerif_sanitize_input',
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		'zerif_latestnews_subtitle',
		array(
			'label'    => __( 'Latest News subtitle', 'zerif-lite' ),
			'section'  => 'zerif_latestnews_section',
			'priority' => 3,
		)
	);

	/**
	 *  CONTACT US SECTION
	 */

	$zerif_contact_us_section_description = '';

	/* If Pirate Forms is installed */
	if ( defined( 'PIRATE_FORMS_VERSION' ) ) :
		$zerif_contact_us_section_description = __( 'For more advanced settings please go to Settings -> Pirate Forms', 'zerif-lite' );
	endif;

	$wp_customize->add_section(
		'zerif_contactus_section',
		array(
			'title'       => __( 'Contact us section', 'zerif-lite' ),
			'description' => $zerif_contact_us_section_description,
			'priority'    => 36,
		)
	);

	if ( zerif_check_if_wp_greater_than_4_7() ) {
		$wp_customize->get_section( 'zerif_contactus_section' )->panel = 'zerif_frontpage_sections_panel';
	}

	/* Contact us show/hide */
	$wp_customize->add_setting(
		'zerif_contactus_show',
		array(
			'sanitize_callback' => 'zerif_sanitize_checkbox',
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		'zerif_contactus_show',
		array(
			'type'     => 'checkbox',
			'label'    => __( 'Hide contact us section?', 'zerif-lite' ),
			'section'  => 'zerif_contactus_section',
			'priority' => 1,
		)
	);

	/* Contactus title */
	$default = current_user_can( 'edit_theme_options' ) ? __( 'Get in touch', 'zerif-lite' ) : '';
	$wp_customize->add_setting(
		'zerif_contactus_title',
		array(
			'sanitize_callback' => 'zerif_sanitize_input',
			'transport'         => 'postMessage',
			'default'           => $default,
		)
	);
	$wp_customize->add_control(
		'zerif_contactus_title',
		array(
			'label'    => __( 'Contact us section title', 'zerif-lite' ),
			'section'  => 'zerif_contactus_section',
			'priority' => 2,
		)
	);

	/* Contactus subtitle */

	/* translators: PirateForms plugin */
	$default = ! defined( 'PIRATE_FORMS_VERSION' ) ? sprintf( __( 'You need to install %s to create a contact form.', 'zerif-lite' ), 'Pirate Forms' ) : '';
	$wp_customize->add_setting(
		'zerif_contactus_subtitle',
		array(
			'sanitize_callback' => 'zerif_sanitize_input',
			'default'           => $default,
			'transport'         => 'postMessage',
		)
	);
	$wp_customize->add_control(
		'zerif_contactus_subtitle',
		array(
			'label'    => __( 'Contact us section subtitle', 'zerif-lite' ),
			'section'  => 'zerif_contactus_section',
			'priority' => 3,
		)
	);

	/* zerif_contact_shortcode */
	$wp_customize->add_setting(
		'zerif_contactus_shortcode',
		array(
			'sanitize_callback' => 'zerif_sanitize_input',
		)
	);
	$wp_customize->add_control(
		'zerif_contactus_shortcode',
		array(
			'label'       => __( 'Contact Form Shortcode', 'zerif-lite' ),
			'description' => __( 'Or add the shortcode of your choice here.', 'zerif-lite' ),
			'section'     => 'zerif_contactus_section',
			'priority'    => 2,
		)
	);

	/* Use the contact options from the theme, only if Pirate Forms is not installed */
	if ( ! defined( 'PIRATE_FORMS_VERSION' ) ) {
		/* Contactus email */
		$wp_customize->add_setting(
			'zerif_contactus_email',
			array(
				'sanitize_callback' => 'sanitize_email',
			)
		);
		$wp_customize->add_control(
			'zerif_contactus_email',
			array(
				'label'    => __( 'Email address', 'zerif-lite' ),
				'section'  => 'zerif_contactus_section',
				'priority' => 4,
			)
		);
		/* Contactus button label */
		$wp_customize->add_setting(
			'zerif_contactus_button_label',
			array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'default'           => __( 'Send Message', 'zerif-lite' ),
				'transport'         => 'postMessage',
			)
		);

		$wp_customize->add_control(
			'zerif_contactus_button_label',
			array(
				'label'    => __( 'Button label', 'zerif-lite' ),
				'section'  => 'zerif_contactus_section',
				'priority' => 5,
			)
		);

		/* Recaptcha */
		$wp_customize->add_setting(
			'zerif_contactus_recaptcha_show',
			array(
				'sanitize_callback' => 'zerif_sanitize_checkbox',
			)
		);

		$wp_customize->add_control(
			'zerif_contactus_recaptcha_show',
			array(
				'type'     => 'checkbox',
				'label'    => __( 'Hide reCaptcha?', 'zerif-lite' ),
				'section'  => 'zerif_contactus_section',
				'priority' => 6,
			)
		);

		/* Site key */
		$attribut_new_tab = ( isset( $zerif_accessibility ) && ( $zerif_accessibility != 1 ) ? ' target="_blank"' : '' );
		$wp_customize->add_setting(
			'zerif_contactus_sitekey',
			array(
				'sanitize_callback' => 'sanitize_text_field',
			)
		);

		$wp_customize->add_control(
			'zerif_contactus_sitekey',
			array(
				'label'       => __( 'Site key', 'zerif-lite' ),
				'description' => '<a' . $attribut_new_tab . ' href="https://www.google.com/recaptcha/admin#list">' . __( 'Create an account here', 'zerif-lite' ) . '</a> to get the Site key and the Secret key for the reCaptcha.',
				'section'     => 'zerif_contactus_section',
				'priority'    => 7,
			)
		);

		/* Secret key */
		$wp_customize->add_setting(
			'zerif_contactus_secretkey',
			array(
				'sanitize_callback' => 'sanitize_text_field',
			)
		);

		$wp_customize->add_control(
			'zerif_contactus_secretkey',
			array(
				'label'    => __( 'Secret key', 'zerif-lite' ),
				'section'  => 'zerif_contactus_section',
				'priority' => 8,
			)
		);

	}

	/**
	 * FOOTER OPTIONS
	 */

	$wp_customize->add_panel(
		'panel_footer',
		array(
			'priority'   => 90,
			'capability' => 'edit_theme_options',
			'title'      => __( 'Footer options', 'zerif-lite' ),
		)
	);

	$wp_customize->add_section(
		'zerif_general_socials_section',
		array(
			'title'    => __( 'Footer Social Icons', 'zerif-lite' ),
			'priority' => 31,
			'panel'    => 'panel_footer',
		)
	);

	/* Facebook */
	$wp_customize->add_setting(
		'zerif_socials_facebook',
		array(
			'sanitize_callback' => 'esc_url_raw',
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		'zerif_socials_facebook',
		array(
			'label'    => __( 'Facebook link', 'zerif-lite' ),
			'section'  => 'zerif_general_socials_section',
			'priority' => 4,
		)
	);

	/* Twitter */
	$wp_customize->add_setting(
		'zerif_socials_twitter',
		array(
			'sanitize_callback' => 'esc_url_raw',
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		'zerif_socials_twitter',
		array(
			'label'    => __( 'Twitter link', 'zerif-lite' ),
			'section'  => 'zerif_general_socials_section',
			'priority' => 5,
		)
	);

	/* Linkedin */
	$wp_customize->add_setting(
		'zerif_socials_linkedin',
		array(
			'sanitize_callback' => 'esc_url_raw',
			'transport'         => 'postMessage',
		)
	);
	$wp_customize->add_control(
		'zerif_socials_linkedin',
		array(
			'label'    => __( 'Linkedin link', 'zerif-lite' ),
			'section'  => 'zerif_general_socials_section',
			'priority' => 6,
		)
	);

	/* Behance */
	$wp_customize->add_setting(
		'zerif_socials_behance',
		array(
			'sanitize_callback' => 'esc_url_raw',
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		'zerif_socials_behance',
		array(
			'label'    => __( 'Behance link', 'zerif-lite' ),
			'section'  => 'zerif_general_socials_section',
			'priority' => 7,
		)
	);

	/* Dribbble */
	$wp_customize->add_setting(
		'zerif_socials_dribbble',
		array(
			'sanitize_callback' => 'esc_url_raw',
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		'zerif_socials_dribbble',
		array(
			'label'    => __( 'Dribbble link', 'zerif-lite' ),
			'section'  => 'zerif_general_socials_section',
			'priority' => 8,
		)
	);

	/* Instagram */
	$wp_customize->add_setting(
		'zerif_socials_instagram',
		array(
			'sanitize_callback' => 'esc_url_raw',
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		'zerif_socials_instagram',
		array(
			'label'    => __( 'Instagram link', 'zerif-lite' ),
			'section'  => 'zerif_general_socials_section',
			'priority' => 9,
		)
	);

	$wp_customize->add_section(
		'zerif_general_footer_section',
		array(
			'title'    => __( 'Footer Content', 'zerif-lite' ),
			'priority' => 32,
			'panel'    => 'panel_footer',
		)
	);

	/* COPYRIGHT */
	$wp_customize->add_setting(
		'zerif_copyright',
		array(
			'sanitize_callback' => 'zerif_sanitize_input',
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		'zerif_copyright',
		array(
			'label'    => __( 'Footer Copyright', 'zerif-lite' ),
			'section'  => 'zerif_general_footer_section',
			'priority' => 5,
		)
	);

	/* Address - ICON */
	if ( current_user_can( 'edit_theme_options' ) ) {
		$wp_customize->add_setting(
			'zerif_address_icon',
			array(
				'sanitize_callback' => 'esc_url_raw',
				'default'           => get_template_directory_uri() . '/images/map25-redish.png',
				'transport'         => 'postMessage',
			)
		);
	} else {
		$wp_customize->add_setting(
			'zerif_address_icon',
			array(
				'sanitize_callback' => 'esc_url_raw',
				'transport'         => 'postMessage',
			)
		);
	}

	$wp_customize->add_control(
		new WP_Customize_Image_Control(
			$wp_customize,
			'zerif_address_icon',
			array(
				'label'    => __( 'Address section - icon', 'zerif-lite' ),
				'section'  => 'zerif_general_footer_section',
				'priority' => 9,
			)
		)
	);

	/* Address */
	if ( current_user_can( 'edit_theme_options' ) ) {
		$wp_customize->add_setting(
			'zerif_address',
			array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'default'           => __( 'Company address', 'zerif-lite' ),
				'transport'         => 'postMessage',
			)
		);
	} else {
		$wp_customize->add_setting(
			'zerif_address',
			array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'transport'         => 'postMessage',
			)
		);
	}

	$wp_customize->add_control(
		'zerif_address',
		array(
			'label'    => __( 'Address', 'zerif-lite' ),
			'type'     => 'textarea',
			'section'  => 'zerif_general_footer_section',
			'priority' => 10,
		)
	);

	/* Email - ICON */
	if ( current_user_can( 'edit_theme_options' ) ) {
		$wp_customize->add_setting(
			'zerif_email_icon',
			array(
				'sanitize_callback' => 'esc_url_raw',
				'default'           => get_template_directory_uri() . '/images/envelope4-green.png',
				'transport'         => 'postMessage',
			)
		);
	} else {
		$wp_customize->add_setting(
			'zerif_email_icon',
			array(
				'sanitize_callback' => 'esc_url_raw',
				'transport'         => 'postMessage',
			)
		);
	}

	$wp_customize->add_control(
		new WP_Customize_Image_Control(
			$wp_customize,
			'zerif_email_icon',
			array(
				'label'    => __( 'Email section - icon', 'zerif-lite' ),
				'section'  => 'zerif_general_footer_section',
				'priority' => 11,
			)
		)
	);

	/* Email */
	if ( current_user_can( 'edit_theme_options' ) ) {
		$wp_customize->add_setting(
			'zerif_email',
			array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'default'           => __( 'youremail@site.com', 'zerif-lite' ),
				'transport'         => 'postMessage',
			)
		);
	} else {
		$wp_customize->add_setting(
			'zerif_email',
			array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'transport'         => 'postMessage',
			)
		);
	}

	$wp_customize->add_control(
		'zerif_email',
		array(
			'label'    => __( 'Email', 'zerif-lite' ),
			'type'     => 'textarea',
			'section'  => 'zerif_general_footer_section',
			'priority' => 12,
		)
	);

	/* Phone number - ICON */
	if ( current_user_can( 'edit_theme_options' ) ) {
		$wp_customize->add_setting(
			'zerif_phone_icon',
			array(
				'sanitize_callback' => 'esc_url_raw',
				'default'           => get_template_directory_uri() . '/images/telephone65-blue.png',
				'transport'         => 'postMessage',
			)
		);
	} else {
		$wp_customize->add_setting(
			'zerif_phone_icon',
			array(
				'sanitize_callback' => 'esc_url_raw',
				'transport'         => 'postMessage',
			)
		);
	}

	$wp_customize->add_control(
		new WP_Customize_Image_Control(
			$wp_customize,
			'zerif_phone_icon',
			array(
				'label'    => __( 'Phone number section - icon', 'zerif-lite' ),
				'section'  => 'zerif_general_footer_section',
				'priority' => 13,
			)
		)
	);

	/* Phone number */
	if ( current_user_can( 'edit_theme_options' ) ) {
		$wp_customize->add_setting(
			'zerif_phone',
			array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'default'           => __( '0 332 548 954', 'zerif-lite' ),
				'transport'         => 'postMessage',
			)
		);
	} else {
		$wp_customize->add_setting(
			'zerif_phone',
			array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'transport'         => 'postMessage',
			)
		);
	}

	$wp_customize->add_control(
		'zerif_phone',
		array(
			'label'    => __( 'Phone number', 'zerif-lite' ),
			'type'     => 'textarea',
			'section'  => 'zerif_general_footer_section',
			'priority' => 14,
		)
	);

}
add_action( 'customize_register', 'zerif_customize_register' );

/**
 * Binds JS handlers to make Theme Customizer preview reload changes asynchronously.
 */
function zerif_customize_preview_js() {
	wp_enqueue_script( 'zerif_customizer', get_template_directory_uri() . '/js/customizer.js', array( 'customize-preview' ), '20130508', true );
}
add_action( 'customize_preview_init', 'zerif_customize_preview_js' );

/**
 * Function to sanitize inputs
 */
function zerif_sanitize_input( $input ) {
	return wp_kses_post( force_balance_tags( $input ) );
}

/**
 * Function to sanitize checkboxes
 */
function zerif_sanitize_checkbox( $input ) {
	return ( isset( $input ) && true == $input ? true : false );
}

/**
 * Enqueue scripts for customizer
 */
function zerif_late_registers() {

	wp_enqueue_script( 'zerif_customizer_script', get_template_directory_uri() . '/js/zerif_customizer.js', array( 'jquery' ), '1.0.8', true );

	wp_localize_script(
		'zerif_customizer_script',
		'zerifLiteCustomizerObject',
		array(

			'tooltip_safefont'      => sprintf( '%1$s <br><br> %2$s', __( 'Zerif Lite main font is Montserrat, which only supports the Latin script.', 'zerif-lite' ), __( 'If you are using other scripts like Cyrillic or Greek , you need to check this box to enable the safe fonts for better compatibility.', 'zerif-lite' ) ),
			'tooltip_accessibility' => sprintf( '%1$s <br><br> %2$s', __( 'Web accessibility means that people with disabilities can use the Web. More specifically, Web accessibility means that people with disabilities can perceive, understand, navigate, and interact with the Web, and that they can contribute to the Web.', 'zerif-lite' ), __( 'Web accessibility also benefits others, including older people with changing abilities due to aging.', 'zerif-lite' ) ),
			'tooltip_smoothscroll'  => sprintf( '%1$s <br><br> %2$s', __( 'Smooth scrolling can be very useful if you read a lot of long pages. Normally, when you press Page Down, the view jumps directly down one page.', 'zerif-lite' ), __( 'With smooth scrolling, it slides down smoothly, so you can see how much it scrolls. This makes it easier to resume reading from where you were before.', 'zerif-lite' ) ),
			'tooltip_preloader'     => sprintf( '%1$s <br><br> %2$s', __( 'The preloader is the circular progress element that first appears on the site. When the loader finishes its progress animation, the whole page elements are revealed.', 'zerif-lite' ), __( 'The preloader is used as a creative way to make waiting a bit less boring for the visitor.', 'zerif-lite' ) ),
		)
	);

	wp_enqueue_script( 'zerif_multiple_panels_script', get_template_directory_uri() . '/js/zerif_multiple_panels.js', array( 'zerif_customizer_script' ), '1.0.8', true );
}
add_action( 'customize_controls_enqueue_scripts', 'zerif_late_registers', 99 );

/**
 * Custom logo callback function.
 *
 * @return string
 */
function zerif_custom_logo_callback() {
	$logo              = '';
	$zerif_custom_logo = get_theme_mod( 'custom_logo' );

	if ( ! empty( $zerif_custom_logo ) ) {
		$custom_logo = wp_get_attachment_image_url( get_theme_mod( 'custom_logo' ), 'full' );
		$logo        = '<a href="' . esc_url( home_url( '/' ) ) . '"><img src="' . esc_url( $custom_logo ) . '"></a>';
	} else {
		$logo = '<div class="site-title-tagline-wrapper"><h1 class="site-title"><a href="' . esc_url( home_url( '/' ) ) . '">' . get_bloginfo( 'name' ) . '</a></h1><p class="site-description">' . get_bloginfo( 'description' ) . '</p></div>';
	}

	return $logo;
}

/**
 * Function to check if WordPress is greater or equal to 4.7
 */
function zerif_check_if_wp_greater_than_4_7() {

	$wp_version_nr = get_bloginfo( 'version' );

	if ( function_exists( 'version_compare' ) ) {
		if ( version_compare( $wp_version_nr, '4.7', '>=' ) ) {
			return true;
		}
	}

	return false;

}
home/xbodynamge/dev/wp-content/themes/twentysixteen/inc/customizer.php000060400000075007151134026410022414 0ustar00<?php
/**
 * Twenty Sixteen Customizer functionality
 *
 * @package WordPress
 * @subpackage Twenty_Sixteen
 * @since Twenty Sixteen 1.0
 */

/**
 * Sets up the WordPress core custom header and custom background features.
 *
 * @since Twenty Sixteen 1.0
 *
 * @see twentysixteen_header_style()
 */
function twentysixteen_custom_header_and_background() {
	$color_scheme             = twentysixteen_get_color_scheme();
	$default_background_color = trim( $color_scheme[0], '#' );
	$default_text_color       = trim( $color_scheme[3], '#' );

	/**
	 * Filter the arguments used when adding 'custom-background' support in Twenty Sixteen.
	 *
	 * @since Twenty Sixteen 1.0
	 *
	 * @param array $args {
	 *     An array of custom-background support arguments.
	 *
	 *     @type string $default-color Default color of the background.
	 * }
	 */
	add_theme_support( 'custom-background', apply_filters( 'twentysixteen_custom_background_args', array(
		'default-color' => $default_background_color,
	) ) );

	/**
	 * Filter the arguments used when adding 'custom-header' support in Twenty Sixteen.
	 *
	 * @since Twenty Sixteen 1.0
	 *
	 * @param array $args {
	 *     An array of custom-header support arguments.
	 *
	 *     @type string $default-text-color Default color of the header text.
	 *     @type int      $width            Width in pixels of the custom header image. Default 1200.
	 *     @type int      $height           Height in pixels of the custom header image. Default 280.
	 *     @type bool     $flex-height      Whether to allow flexible-height header images. Default true.
	 *     @type callable $wp-head-callback Callback function used to style the header image and text
	 *                                      displayed on the blog.
	 * }
	 */
	add_theme_support( 'custom-header', apply_filters( 'twentysixteen_custom_header_args', array(
		'default-text-color'     => $default_text_color,
		'width'                  => 1200,
		'height'                 => 280,
		'flex-height'            => true,
		'wp-head-callback'       => 'twentysixteen_header_style',
	) ) );
}
add_action( 'after_setup_theme', 'twentysixteen_custom_header_and_background' );

if ( ! function_exists( 'twentysixteen_header_style' ) ) :
/**
 * Styles the header text displayed on the site.
 *
 * Create your own twentysixteen_header_style() function to override in a child theme.
 *
 * @since Twenty Sixteen 1.0
 *
 * @see twentysixteen_custom_header_and_background().
 */
function twentysixteen_header_style() {
	// If the header text option is untouched, let's bail.
	if ( display_header_text() ) {
		return;
	}

	// If the header text has been hidden.
	?>
	<style type="text/css" id="twentysixteen-header-css">
		.site-branding {
			margin: 0 auto 0 0;
		}

		.site-branding .site-title,
		.site-description {
			clip: rect(1px, 1px, 1px, 1px);
			position: absolute;
		}
	</style>
	<?php
}
endif; // twentysixteen_header_style

/**
 * Adds postMessage support for site title and description for the Customizer.
 *
 * @since Twenty Sixteen 1.0
 *
 * @param WP_Customize_Manager $wp_customize The Customizer object.
 */
function twentysixteen_customize_register( $wp_customize ) {
	$color_scheme = twentysixteen_get_color_scheme();

	$wp_customize->get_setting( 'blogname' )->transport         = 'postMessage';
	$wp_customize->get_setting( 'blogdescription' )->transport  = 'postMessage';

	if ( isset( $wp_customize->selective_refresh ) ) {
		$wp_customize->selective_refresh->add_partial( 'blogname', array(
			'selector' => '.site-title a',
			'container_inclusive' => false,
			'render_callback' => 'twentysixteen_customize_partial_blogname',
		) );
		$wp_customize->selective_refresh->add_partial( 'blogdescription', array(
			'selector' => '.site-description',
			'container_inclusive' => false,
			'render_callback' => 'twentysixteen_customize_partial_blogdescription',
		) );
	}

	// Add color scheme setting and control.
	$wp_customize->add_setting( 'color_scheme', array(
		'default'           => 'default',
		'sanitize_callback' => 'twentysixteen_sanitize_color_scheme',
		'transport'         => 'postMessage',
	) );

	$wp_customize->add_control( 'color_scheme', array(
		'label'    => __( 'Base Color Scheme', 'twentysixteen' ),
		'section'  => 'colors',
		'type'     => 'select',
		'choices'  => twentysixteen_get_color_scheme_choices(),
		'priority' => 1,
	) );

	// Add page background color setting and control.
	$wp_customize->add_setting( 'page_background_color', array(
		'default'           => $color_scheme[1],
		'sanitize_callback' => 'sanitize_hex_color',
		'transport'         => 'postMessage',
	) );

	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'page_background_color', array(
		'label'       => __( 'Page Background Color', 'twentysixteen' ),
		'section'     => 'colors',
	) ) );

	// Remove the core header textcolor control, as it shares the main text color.
	$wp_customize->remove_control( 'header_textcolor' );

	// Add link color setting and control.
	$wp_customize->add_setting( 'link_color', array(
		'default'           => $color_scheme[2],
		'sanitize_callback' => 'sanitize_hex_color',
		'transport'         => 'postMessage',
	) );

	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'link_color', array(
		'label'       => __( 'Link Color', 'twentysixteen' ),
		'section'     => 'colors',
	) ) );

	// Add main text color setting and control.
	$wp_customize->add_setting( 'main_text_color', array(
		'default'           => $color_scheme[3],
		'sanitize_callback' => 'sanitize_hex_color',
		'transport'         => 'postMessage',
	) );

	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'main_text_color', array(
		'label'       => __( 'Main Text Color', 'twentysixteen' ),
		'section'     => 'colors',
	) ) );

	// Add secondary text color setting and control.
	$wp_customize->add_setting( 'secondary_text_color', array(
		'default'           => $color_scheme[4],
		'sanitize_callback' => 'sanitize_hex_color',
		'transport'         => 'postMessage',
	) );

	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'secondary_text_color', array(
		'label'       => __( 'Secondary Text Color', 'twentysixteen' ),
		'section'     => 'colors',
	) ) );
}
add_action( 'customize_register', 'twentysixteen_customize_register', 11 );

/**
 * Render the site title for the selective refresh partial.
 *
 * @since Twenty Sixteen 1.2
 * @see twentysixteen_customize_register()
 *
 * @return void
 */
function twentysixteen_customize_partial_blogname() {
	bloginfo( 'name' );
}

/**
 * Render the site tagline for the selective refresh partial.
 *
 * @since Twenty Sixteen 1.2
 * @see twentysixteen_customize_register()
 *
 * @return void
 */
function twentysixteen_customize_partial_blogdescription() {
	bloginfo( 'description' );
}

/**
 * Registers color schemes for Twenty Sixteen.
 *
 * Can be filtered with {@see 'twentysixteen_color_schemes'}.
 *
 * The order of colors in a colors array:
 * 1. Main Background Color.
 * 2. Page Background Color.
 * 3. Link Color.
 * 4. Main Text Color.
 * 5. Secondary Text Color.
 *
 * @since Twenty Sixteen 1.0
 *
 * @return array An associative array of color scheme options.
 */
function twentysixteen_get_color_schemes() {
	/**
	 * Filter the color schemes registered for use with Twenty Sixteen.
	 *
	 * The default schemes include 'default', 'dark', 'gray', 'red', and 'yellow'.
	 *
	 * @since Twenty Sixteen 1.0
	 *
	 * @param array $schemes {
	 *     Associative array of color schemes data.
	 *
	 *     @type array $slug {
	 *         Associative array of information for setting up the color scheme.
	 *
	 *         @type string $label  Color scheme label.
	 *         @type array  $colors HEX codes for default colors prepended with a hash symbol ('#').
	 *                              Colors are defined in the following order: Main background, page
	 *                              background, link, main text, secondary text.
	 *     }
	 * }
	 */
	return apply_filters( 'twentysixteen_color_schemes', array(
		'default' => array(
			'label'  => __( 'Default', 'twentysixteen' ),
			'colors' => array(
				'#1a1a1a',
				'#ffffff',
				'#007acc',
				'#1a1a1a',
				'#686868',
			),
		),
		'dark' => array(
			'label'  => __( 'Dark', 'twentysixteen' ),
			'colors' => array(
				'#262626',
				'#1a1a1a',
				'#9adffd',
				'#e5e5e5',
				'#c1c1c1',
			),
		),
		'gray' => array(
			'label'  => __( 'Gray', 'twentysixteen' ),
			'colors' => array(
				'#616a73',
				'#4d545c',
				'#c7c7c7',
				'#f2f2f2',
				'#f2f2f2',
			),
		),
		'red' => array(
			'label'  => __( 'Red', 'twentysixteen' ),
			'colors' => array(
				'#ffffff',
				'#ff675f',
				'#640c1f',
				'#402b30',
				'#402b30',
			),
		),
		'yellow' => array(
			'label'  => __( 'Yellow', 'twentysixteen' ),
			'colors' => array(
				'#3b3721',
				'#ffef8e',
				'#774e24',
				'#3b3721',
				'#5b4d3e',
			),
		),
	) );
}

if ( ! function_exists( 'twentysixteen_get_color_scheme' ) ) :
/**
 * Retrieves the current Twenty Sixteen color scheme.
 *
 * Create your own twentysixteen_get_color_scheme() function to override in a child theme.
 *
 * @since Twenty Sixteen 1.0
 *
 * @return array An associative array of either the current or default color scheme HEX values.
 */
function twentysixteen_get_color_scheme() {
	$color_scheme_option = get_theme_mod( 'color_scheme', 'default' );
	$color_schemes       = twentysixteen_get_color_schemes();

	if ( array_key_exists( $color_scheme_option, $color_schemes ) ) {
		return $color_schemes[ $color_scheme_option ]['colors'];
	}

	return $color_schemes['default']['colors'];
}
endif; // twentysixteen_get_color_scheme

if ( ! function_exists( 'twentysixteen_get_color_scheme_choices' ) ) :
/**
 * Retrieves an array of color scheme choices registered for Twenty Sixteen.
 *
 * Create your own twentysixteen_get_color_scheme_choices() function to override
 * in a child theme.
 *
 * @since Twenty Sixteen 1.0
 *
 * @return array Array of color schemes.
 */
function twentysixteen_get_color_scheme_choices() {
	$color_schemes                = twentysixteen_get_color_schemes();
	$color_scheme_control_options = array();

	foreach ( $color_schemes as $color_scheme => $value ) {
		$color_scheme_control_options[ $color_scheme ] = $value['label'];
	}

	return $color_scheme_control_options;
}
endif; // twentysixteen_get_color_scheme_choices


if ( ! function_exists( 'twentysixteen_sanitize_color_scheme' ) ) :
/**
 * Handles sanitization for Twenty Sixteen color schemes.
 *
 * Create your own twentysixteen_sanitize_color_scheme() function to override
 * in a child theme.
 *
 * @since Twenty Sixteen 1.0
 *
 * @param string $value Color scheme name value.
 * @return string Color scheme name.
 */
function twentysixteen_sanitize_color_scheme( $value ) {
	$color_schemes = twentysixteen_get_color_scheme_choices();

	if ( ! array_key_exists( $value, $color_schemes ) ) {
		return 'default';
	}

	return $value;
}
endif; // twentysixteen_sanitize_color_scheme

/**
 * Enqueues front-end CSS for color scheme.
 *
 * @since Twenty Sixteen 1.0
 *
 * @see wp_add_inline_style()
 */
function twentysixteen_color_scheme_css() {
	$color_scheme_option = get_theme_mod( 'color_scheme', 'default' );

	// Don't do anything if the default color scheme is selected.
	if ( 'default' === $color_scheme_option ) {
		return;
	}

	$color_scheme = twentysixteen_get_color_scheme();

	// Convert main text hex color to rgba.
	$color_textcolor_rgb = twentysixteen_hex2rgb( $color_scheme[3] );

	// If the rgba values are empty return early.
	if ( empty( $color_textcolor_rgb ) ) {
		return;
	}

	// If we get this far, we have a custom color scheme.
	$colors = array(
		'background_color'      => $color_scheme[0],
		'page_background_color' => $color_scheme[1],
		'link_color'            => $color_scheme[2],
		'main_text_color'       => $color_scheme[3],
		'secondary_text_color'  => $color_scheme[4],
		'border_color'          => vsprintf( 'rgba( %1$s, %2$s, %3$s, 0.2)', $color_textcolor_rgb ),

	);

	$color_scheme_css = twentysixteen_get_color_scheme_css( $colors );

	wp_add_inline_style( 'twentysixteen-style', $color_scheme_css );
}
add_action( 'wp_enqueue_scripts', 'twentysixteen_color_scheme_css' );

/**
 * Binds the JS listener to make Customizer color_scheme control.
 *
 * Passes color scheme data as colorScheme global.
 *
 * @since Twenty Sixteen 1.0
 */
function twentysixteen_customize_control_js() {
	wp_enqueue_script( 'color-scheme-control', get_template_directory_uri() . '/js/color-scheme-control.js', array( 'customize-controls', 'iris', 'underscore', 'wp-util' ), '20160816', true );
	wp_localize_script( 'color-scheme-control', 'colorScheme', twentysixteen_get_color_schemes() );
}
add_action( 'customize_controls_enqueue_scripts', 'twentysixteen_customize_control_js' );

/**
 * Binds JS handlers to make the Customizer preview reload changes asynchronously.
 *
 * @since Twenty Sixteen 1.0
 */
function twentysixteen_customize_preview_js() {
	wp_enqueue_script( 'twentysixteen-customize-preview', get_template_directory_uri() . '/js/customize-preview.js', array( 'customize-preview' ), '20160816', true );
}
add_action( 'customize_preview_init', 'twentysixteen_customize_preview_js' );

/**
 * Returns CSS for the color schemes.
 *
 * @since Twenty Sixteen 1.0
 *
 * @param array $colors Color scheme colors.
 * @return string Color scheme CSS.
 */
function twentysixteen_get_color_scheme_css( $colors ) {
	$colors = wp_parse_args( $colors, array(
		'background_color'      => '',
		'page_background_color' => '',
		'link_color'            => '',
		'main_text_color'       => '',
		'secondary_text_color'  => '',
		'border_color'          => '',
	) );

	return <<<CSS
	/* Color Scheme */

	/* Background Color */
	body {
		background-color: {$colors['background_color']};
	}

	/* Page Background Color */
	.site {
		background-color: {$colors['page_background_color']};
	}

	mark,
	ins,
	button,
	button[disabled]:hover,
	button[disabled]:focus,
	input[type="button"],
	input[type="button"][disabled]:hover,
	input[type="button"][disabled]:focus,
	input[type="reset"],
	input[type="reset"][disabled]:hover,
	input[type="reset"][disabled]:focus,
	input[type="submit"],
	input[type="submit"][disabled]:hover,
	input[type="submit"][disabled]:focus,
	.menu-toggle.toggled-on,
	.menu-toggle.toggled-on:hover,
	.menu-toggle.toggled-on:focus,
	.pagination .prev,
	.pagination .next,
	.pagination .prev:hover,
	.pagination .prev:focus,
	.pagination .next:hover,
	.pagination .next:focus,
	.pagination .nav-links:before,
	.pagination .nav-links:after,
	.widget_calendar tbody a,
	.widget_calendar tbody a:hover,
	.widget_calendar tbody a:focus,
	.page-links a,
	.page-links a:hover,
	.page-links a:focus {
		color: {$colors['page_background_color']};
	}

	/* Link Color */
	.menu-toggle:hover,
	.menu-toggle:focus,
	a,
	.main-navigation a:hover,
	.main-navigation a:focus,
	.dropdown-toggle:hover,
	.dropdown-toggle:focus,
	.social-navigation a:hover:before,
	.social-navigation a:focus:before,
	.post-navigation a:hover .post-title,
	.post-navigation a:focus .post-title,
	.tagcloud a:hover,
	.tagcloud a:focus,
	.site-branding .site-title a:hover,
	.site-branding .site-title a:focus,
	.entry-title a:hover,
	.entry-title a:focus,
	.entry-footer a:hover,
	.entry-footer a:focus,
	.comment-metadata a:hover,
	.comment-metadata a:focus,
	.pingback .comment-edit-link:hover,
	.pingback .comment-edit-link:focus,
	.comment-reply-link,
	.comment-reply-link:hover,
	.comment-reply-link:focus,
	.required,
	.site-info a:hover,
	.site-info a:focus {
		color: {$colors['link_color']};
	}

	mark,
	ins,
	button:hover,
	button:focus,
	input[type="button"]:hover,
	input[type="button"]:focus,
	input[type="reset"]:hover,
	input[type="reset"]:focus,
	input[type="submit"]:hover,
	input[type="submit"]:focus,
	.pagination .prev:hover,
	.pagination .prev:focus,
	.pagination .next:hover,
	.pagination .next:focus,
	.widget_calendar tbody a,
	.page-links a:hover,
	.page-links a:focus {
		background-color: {$colors['link_color']};
	}

	input[type="date"]:focus,
	input[type="time"]:focus,
	input[type="datetime-local"]:focus,
	input[type="week"]:focus,
	input[type="month"]:focus,
	input[type="text"]:focus,
	input[type="email"]:focus,
	input[type="url"]:focus,
	input[type="password"]:focus,
	input[type="search"]:focus,
	input[type="tel"]:focus,
	input[type="number"]:focus,
	textarea:focus,
	.tagcloud a:hover,
	.tagcloud a:focus,
	.menu-toggle:hover,
	.menu-toggle:focus {
		border-color: {$colors['link_color']};
	}

	/* Main Text Color */
	body,
	blockquote cite,
	blockquote small,
	.main-navigation a,
	.menu-toggle,
	.dropdown-toggle,
	.social-navigation a,
	.post-navigation a,
	.pagination a:hover,
	.pagination a:focus,
	.widget-title a,
	.site-branding .site-title a,
	.entry-title a,
	.page-links > .page-links-title,
	.comment-author,
	.comment-reply-title small a:hover,
	.comment-reply-title small a:focus {
		color: {$colors['main_text_color']};
	}

	blockquote,
	.menu-toggle.toggled-on,
	.menu-toggle.toggled-on:hover,
	.menu-toggle.toggled-on:focus,
	.post-navigation,
	.post-navigation div + div,
	.pagination,
	.widget,
	.page-header,
	.page-links a,
	.comments-title,
	.comment-reply-title {
		border-color: {$colors['main_text_color']};
	}

	button,
	button[disabled]:hover,
	button[disabled]:focus,
	input[type="button"],
	input[type="button"][disabled]:hover,
	input[type="button"][disabled]:focus,
	input[type="reset"],
	input[type="reset"][disabled]:hover,
	input[type="reset"][disabled]:focus,
	input[type="submit"],
	input[type="submit"][disabled]:hover,
	input[type="submit"][disabled]:focus,
	.menu-toggle.toggled-on,
	.menu-toggle.toggled-on:hover,
	.menu-toggle.toggled-on:focus,
	.pagination:before,
	.pagination:after,
	.pagination .prev,
	.pagination .next,
	.page-links a {
		background-color: {$colors['main_text_color']};
	}

	/* Secondary Text Color */

	/**
	 * IE8 and earlier will drop any block with CSS3 selectors.
	 * Do not combine these styles with the next block.
	 */
	body:not(.search-results) .entry-summary {
		color: {$colors['secondary_text_color']};
	}

	blockquote,
	.post-password-form label,
	a:hover,
	a:focus,
	a:active,
	.post-navigation .meta-nav,
	.image-navigation,
	.comment-navigation,
	.widget_recent_entries .post-date,
	.widget_rss .rss-date,
	.widget_rss cite,
	.site-description,
	.author-bio,
	.entry-footer,
	.entry-footer a,
	.sticky-post,
	.taxonomy-description,
	.entry-caption,
	.comment-metadata,
	.pingback .edit-link,
	.comment-metadata a,
	.pingback .comment-edit-link,
	.comment-form label,
	.comment-notes,
	.comment-awaiting-moderation,
	.logged-in-as,
	.form-allowed-tags,
	.site-info,
	.site-info a,
	.wp-caption .wp-caption-text,
	.gallery-caption,
	.widecolumn label,
	.widecolumn .mu_register label {
		color: {$colors['secondary_text_color']};
	}

	.widget_calendar tbody a:hover,
	.widget_calendar tbody a:focus {
		background-color: {$colors['secondary_text_color']};
	}

	/* Border Color */
	fieldset,
	pre,
	abbr,
	acronym,
	table,
	th,
	td,
	input[type="date"],
	input[type="time"],
	input[type="datetime-local"],
	input[type="week"],
	input[type="month"],
	input[type="text"],
	input[type="email"],
	input[type="url"],
	input[type="password"],
	input[type="search"],
	input[type="tel"],
	input[type="number"],
	textarea,
	.main-navigation li,
	.main-navigation .primary-menu,
	.menu-toggle,
	.dropdown-toggle:after,
	.social-navigation a,
	.image-navigation,
	.comment-navigation,
	.tagcloud a,
	.entry-content,
	.entry-summary,
	.page-links a,
	.page-links > span,
	.comment-list article,
	.comment-list .pingback,
	.comment-list .trackback,
	.comment-reply-link,
	.no-comments,
	.widecolumn .mu_register .mu_alert {
		border-color: {$colors['main_text_color']}; /* Fallback for IE7 and IE8 */
		border-color: {$colors['border_color']};
	}

	hr,
	code {
		background-color: {$colors['main_text_color']}; /* Fallback for IE7 and IE8 */
		background-color: {$colors['border_color']};
	}

	@media screen and (min-width: 56.875em) {
		.main-navigation li:hover > a,
		.main-navigation li.focus > a {
			color: {$colors['link_color']};
		}

		.main-navigation ul ul,
		.main-navigation ul ul li {
			border-color: {$colors['border_color']};
		}

		.main-navigation ul ul:before {
			border-top-color: {$colors['border_color']};
			border-bottom-color: {$colors['border_color']};
		}

		.main-navigation ul ul li {
			background-color: {$colors['page_background_color']};
		}

		.main-navigation ul ul:after {
			border-top-color: {$colors['page_background_color']};
			border-bottom-color: {$colors['page_background_color']};
		}
	}

CSS;
}


/**
 * Outputs an Underscore template for generating CSS for the color scheme.
 *
 * The template generates the css dynamically for instant display in the
 * Customizer preview.
 *
 * @since Twenty Sixteen 1.0
 */
function twentysixteen_color_scheme_css_template() {
	$colors = array(
		'background_color'      => '{{ data.background_color }}',
		'page_background_color' => '{{ data.page_background_color }}',
		'link_color'            => '{{ data.link_color }}',
		'main_text_color'       => '{{ data.main_text_color }}',
		'secondary_text_color'  => '{{ data.secondary_text_color }}',
		'border_color'          => '{{ data.border_color }}',
	);
	?>
	<script type="text/html" id="tmpl-twentysixteen-color-scheme">
		<?php echo twentysixteen_get_color_scheme_css( $colors ); ?>
	</script>
	<?php
}
add_action( 'customize_controls_print_footer_scripts', 'twentysixteen_color_scheme_css_template' );

/**
 * Enqueues front-end CSS for the page background color.
 *
 * @since Twenty Sixteen 1.0
 *
 * @see wp_add_inline_style()
 */
function twentysixteen_page_background_color_css() {
	$color_scheme          = twentysixteen_get_color_scheme();
	$default_color         = $color_scheme[1];
	$page_background_color = get_theme_mod( 'page_background_color', $default_color );

	// Don't do anything if the current color is the default.
	if ( $page_background_color === $default_color ) {
		return;
	}

	$css = '
		/* Custom Page Background Color */
		.site {
			background-color: %1$s;
		}

		mark,
		ins,
		button,
		button[disabled]:hover,
		button[disabled]:focus,
		input[type="button"],
		input[type="button"][disabled]:hover,
		input[type="button"][disabled]:focus,
		input[type="reset"],
		input[type="reset"][disabled]:hover,
		input[type="reset"][disabled]:focus,
		input[type="submit"],
		input[type="submit"][disabled]:hover,
		input[type="submit"][disabled]:focus,
		.menu-toggle.toggled-on,
		.menu-toggle.toggled-on:hover,
		.menu-toggle.toggled-on:focus,
		.pagination .prev,
		.pagination .next,
		.pagination .prev:hover,
		.pagination .prev:focus,
		.pagination .next:hover,
		.pagination .next:focus,
		.pagination .nav-links:before,
		.pagination .nav-links:after,
		.widget_calendar tbody a,
		.widget_calendar tbody a:hover,
		.widget_calendar tbody a:focus,
		.page-links a,
		.page-links a:hover,
		.page-links a:focus {
			color: %1$s;
		}

		@media screen and (min-width: 56.875em) {
			.main-navigation ul ul li {
				background-color: %1$s;
			}

			.main-navigation ul ul:after {
				border-top-color: %1$s;
				border-bottom-color: %1$s;
			}
		}
	';

	wp_add_inline_style( 'twentysixteen-style', sprintf( $css, $page_background_color ) );
}
add_action( 'wp_enqueue_scripts', 'twentysixteen_page_background_color_css', 11 );

/**
 * Enqueues front-end CSS for the link color.
 *
 * @since Twenty Sixteen 1.0
 *
 * @see wp_add_inline_style()
 */
function twentysixteen_link_color_css() {
	$color_scheme    = twentysixteen_get_color_scheme();
	$default_color   = $color_scheme[2];
	$link_color = get_theme_mod( 'link_color', $default_color );

	// Don't do anything if the current color is the default.
	if ( $link_color === $default_color ) {
		return;
	}

	$css = '
		/* Custom Link Color */
		.menu-toggle:hover,
		.menu-toggle:focus,
		a,
		.main-navigation a:hover,
		.main-navigation a:focus,
		.dropdown-toggle:hover,
		.dropdown-toggle:focus,
		.social-navigation a:hover:before,
		.social-navigation a:focus:before,
		.post-navigation a:hover .post-title,
		.post-navigation a:focus .post-title,
		.tagcloud a:hover,
		.tagcloud a:focus,
		.site-branding .site-title a:hover,
		.site-branding .site-title a:focus,
		.entry-title a:hover,
		.entry-title a:focus,
		.entry-footer a:hover,
		.entry-footer a:focus,
		.comment-metadata a:hover,
		.comment-metadata a:focus,
		.pingback .comment-edit-link:hover,
		.pingback .comment-edit-link:focus,
		.comment-reply-link,
		.comment-reply-link:hover,
		.comment-reply-link:focus,
		.required,
		.site-info a:hover,
		.site-info a:focus {
			color: %1$s;
		}

		mark,
		ins,
		button:hover,
		button:focus,
		input[type="button"]:hover,
		input[type="button"]:focus,
		input[type="reset"]:hover,
		input[type="reset"]:focus,
		input[type="submit"]:hover,
		input[type="submit"]:focus,
		.pagination .prev:hover,
		.pagination .prev:focus,
		.pagination .next:hover,
		.pagination .next:focus,
		.widget_calendar tbody a,
		.page-links a:hover,
		.page-links a:focus {
			background-color: %1$s;
		}

		input[type="date"]:focus,
		input[type="time"]:focus,
		input[type="datetime-local"]:focus,
		input[type="week"]:focus,
		input[type="month"]:focus,
		input[type="text"]:focus,
		input[type="email"]:focus,
		input[type="url"]:focus,
		input[type="password"]:focus,
		input[type="search"]:focus,
		input[type="tel"]:focus,
		input[type="number"]:focus,
		textarea:focus,
		.tagcloud a:hover,
		.tagcloud a:focus,
		.menu-toggle:hover,
		.menu-toggle:focus {
			border-color: %1$s;
		}

		@media screen and (min-width: 56.875em) {
			.main-navigation li:hover > a,
			.main-navigation li.focus > a {
				color: %1$s;
			}
		}
	';

	wp_add_inline_style( 'twentysixteen-style', sprintf( $css, $link_color ) );
}
add_action( 'wp_enqueue_scripts', 'twentysixteen_link_color_css', 11 );

/**
 * Enqueues front-end CSS for the main text color.
 *
 * @since Twenty Sixteen 1.0
 *
 * @see wp_add_inline_style()
 */
function twentysixteen_main_text_color_css() {
	$color_scheme    = twentysixteen_get_color_scheme();
	$default_color   = $color_scheme[3];
	$main_text_color = get_theme_mod( 'main_text_color', $default_color );

	// Don't do anything if the current color is the default.
	if ( $main_text_color === $default_color ) {
		return;
	}

	// Convert main text hex color to rgba.
	$main_text_color_rgb = twentysixteen_hex2rgb( $main_text_color );

	// If the rgba values are empty return early.
	if ( empty( $main_text_color_rgb ) ) {
		return;
	}

	// If we get this far, we have a custom color scheme.
	$border_color = vsprintf( 'rgba( %1$s, %2$s, %3$s, 0.2)', $main_text_color_rgb );

	$css = '
		/* Custom Main Text Color */
		body,
		blockquote cite,
		blockquote small,
		.main-navigation a,
		.menu-toggle,
		.dropdown-toggle,
		.social-navigation a,
		.post-navigation a,
		.pagination a:hover,
		.pagination a:focus,
		.widget-title a,
		.site-branding .site-title a,
		.entry-title a,
		.page-links > .page-links-title,
		.comment-author,
		.comment-reply-title small a:hover,
		.comment-reply-title small a:focus {
			color: %1$s
		}

		blockquote,
		.menu-toggle.toggled-on,
		.menu-toggle.toggled-on:hover,
		.menu-toggle.toggled-on:focus,
		.post-navigation,
		.post-navigation div + div,
		.pagination,
		.widget,
		.page-header,
		.page-links a,
		.comments-title,
		.comment-reply-title {
			border-color: %1$s;
		}

		button,
		button[disabled]:hover,
		button[disabled]:focus,
		input[type="button"],
		input[type="button"][disabled]:hover,
		input[type="button"][disabled]:focus,
		input[type="reset"],
		input[type="reset"][disabled]:hover,
		input[type="reset"][disabled]:focus,
		input[type="submit"],
		input[type="submit"][disabled]:hover,
		input[type="submit"][disabled]:focus,
		.menu-toggle.toggled-on,
		.menu-toggle.toggled-on:hover,
		.menu-toggle.toggled-on:focus,
		.pagination:before,
		.pagination:after,
		.pagination .prev,
		.pagination .next,
		.page-links a {
			background-color: %1$s;
		}

		/* Border Color */
		fieldset,
		pre,
		abbr,
		acronym,
		table,
		th,
		td,
		input[type="date"],
		input[type="time"],
		input[type="datetime-local"],
		input[type="week"],
		input[type="month"],
		input[type="text"],
		input[type="email"],
		input[type="url"],
		input[type="password"],
		input[type="search"],
		input[type="tel"],
		input[type="number"],
		textarea,
		.main-navigation li,
		.main-navigation .primary-menu,
		.menu-toggle,
		.dropdown-toggle:after,
		.social-navigation a,
		.image-navigation,
		.comment-navigation,
		.tagcloud a,
		.entry-content,
		.entry-summary,
		.page-links a,
		.page-links > span,
		.comment-list article,
		.comment-list .pingback,
		.comment-list .trackback,
		.comment-reply-link,
		.no-comments,
		.widecolumn .mu_register .mu_alert {
			border-color: %1$s; /* Fallback for IE7 and IE8 */
			border-color: %2$s;
		}

		hr,
		code {
			background-color: %1$s; /* Fallback for IE7 and IE8 */
			background-color: %2$s;
		}

		@media screen and (min-width: 56.875em) {
			.main-navigation ul ul,
			.main-navigation ul ul li {
				border-color: %2$s;
			}

			.main-navigation ul ul:before {
				border-top-color: %2$s;
				border-bottom-color: %2$s;
			}
		}
	';

	wp_add_inline_style( 'twentysixteen-style', sprintf( $css, $main_text_color, $border_color ) );
}
add_action( 'wp_enqueue_scripts', 'twentysixteen_main_text_color_css', 11 );

/**
 * Enqueues front-end CSS for the secondary text color.
 *
 * @since Twenty Sixteen 1.0
 *
 * @see wp_add_inline_style()
 */
function twentysixteen_secondary_text_color_css() {
	$color_scheme    = twentysixteen_get_color_scheme();
	$default_color   = $color_scheme[4];
	$secondary_text_color = get_theme_mod( 'secondary_text_color', $default_color );

	// Don't do anything if the current color is the default.
	if ( $secondary_text_color === $default_color ) {
		return;
	}

	$css = '
		/* Custom Secondary Text Color */

		/**
		 * IE8 and earlier will drop any block with CSS3 selectors.
		 * Do not combine these styles with the next block.
		 */
		body:not(.search-results) .entry-summary {
			color: %1$s;
		}

		blockquote,
		.post-password-form label,
		a:hover,
		a:focus,
		a:active,
		.post-navigation .meta-nav,
		.image-navigation,
		.comment-navigation,
		.widget_recent_entries .post-date,
		.widget_rss .rss-date,
		.widget_rss cite,
		.site-description,
		.author-bio,
		.entry-footer,
		.entry-footer a,
		.sticky-post,
		.taxonomy-description,
		.entry-caption,
		.comment-metadata,
		.pingback .edit-link,
		.comment-metadata a,
		.pingback .comment-edit-link,
		.comment-form label,
		.comment-notes,
		.comment-awaiting-moderation,
		.logged-in-as,
		.form-allowed-tags,
		.site-info,
		.site-info a,
		.wp-caption .wp-caption-text,
		.gallery-caption,
		.widecolumn label,
		.widecolumn .mu_register label {
			color: %1$s;
		}

		.widget_calendar tbody a:hover,
		.widget_calendar tbody a:focus {
			background-color: %1$s;
		}
	';

	wp_add_inline_style( 'twentysixteen-style', sprintf( $css, $secondary_text_color ) );
}
add_action( 'wp_enqueue_scripts', 'twentysixteen_secondary_text_color_css', 11 );
home/xbodynamge/dev/wp-content/themes/twentynineteen/inc/customizer.php000060400000007660151134033610022542 0ustar00<?php
/**
 * Twenty Nineteen: Customizer
 *
 * @package WordPress
 * @subpackage Twenty_Nineteen
 * @since 1.0.0
 */

/**
 * Add postMessage support for site title and description for the Theme Customizer.
 *
 * @param WP_Customize_Manager $wp_customize Theme Customizer object.
 */
function twentynineteen_customize_register( $wp_customize ) {
	$wp_customize->get_setting( 'blogname' )->transport         = 'postMessage';
	$wp_customize->get_setting( 'blogdescription' )->transport  = 'postMessage';
	$wp_customize->get_setting( 'header_textcolor' )->transport = 'postMessage';

	if ( isset( $wp_customize->selective_refresh ) ) {
		$wp_customize->selective_refresh->add_partial(
			'blogname',
			array(
				'selector'        => '.site-title a',
				'render_callback' => 'twentynineteen_customize_partial_blogname',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'blogdescription',
			array(
				'selector'        => '.site-description',
				'render_callback' => 'twentynineteen_customize_partial_blogdescription',
			)
		);
	}

	/**
	 * Primary color.
	 */
	$wp_customize->add_setting(
		'primary_color',
		array(
			'default'           => 'default',
			'transport'         => 'postMessage',
			'sanitize_callback' => 'twentynineteen_sanitize_color_option',
		)
	);

	$wp_customize->add_control(
		'primary_color',
		array(
			'type'     => 'radio',
			'label'    => __( 'Primary Color', 'twentynineteen' ),
			'choices'  => array(
				'default'  => _x( 'Default', 'primary color', 'twentynineteen' ),
				'custom' => _x( 'Custom', 'primary color', 'twentynineteen' ),
			),
			'section'  => 'colors',
			'priority' => 5,
		)
	);

	// Add primary color hue setting and control.
	$wp_customize->add_setting(
		'primary_color_hue',
		array(
			'default'           => 199,
			'transport'         => 'postMessage',
			'sanitize_callback' => 'absint',
		)
	);

	$wp_customize->add_control(
		new WP_Customize_Color_Control(
			$wp_customize,
			'primary_color_hue',
			array(
				'description' => __( 'Apply a custom color for buttons, links, featured images, etc.', 'twentynineteen' ),
				'section'     => 'colors',
				'mode'        => 'hue',
			)
		)
	);

	// Add image filter setting and control.
	$wp_customize->add_setting(
		'image_filter',
		array(
			'default'           => 1,
			'sanitize_callback' => 'absint',
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		'image_filter',
		array(
			'label'   => __( 'Apply a filter to featured images using the primary color', 'twentynineteen' ),
			'section' => 'colors',
			'type'    => 'checkbox',
		)
	);
}
add_action( 'customize_register', 'twentynineteen_customize_register' );

/**
 * Render the site title for the selective refresh partial.
 *
 * @return void
 */
function twentynineteen_customize_partial_blogname() {
	bloginfo( 'name' );
}

/**
 * Render the site tagline for the selective refresh partial.
 *
 * @return void
 */
function twentynineteen_customize_partial_blogdescription() {
	bloginfo( 'description' );
}

/**
 * Bind JS handlers to instantly live-preview changes.
 */
function twentynineteen_customize_preview_js() {
	wp_enqueue_script( 'twentynineteen-customize-preview', get_theme_file_uri( '/js/customize-preview.js' ), array( 'customize-preview' ), '20181108', true );
}
add_action( 'customize_preview_init', 'twentynineteen_customize_preview_js' );

/**
 * Load dynamic logic for the customizer controls area.
 */
function twentynineteen_panels_js() {
	wp_enqueue_script( 'twentynineteen-customize-controls', get_theme_file_uri( '/js/customize-controls.js' ), array(), '20181031', true );
}
add_action( 'customize_controls_enqueue_scripts', 'twentynineteen_panels_js' );

/**
 * Sanitize custom color choice.
 *
 * @param string $choice Whether image filter is active.
 *
 * @return string
 */
function twentynineteen_sanitize_color_option( $choice ) {
	$valid = array(
		'default',
		'custom',
	);

	if ( in_array( $choice, $valid, true ) ) {
		return $choice;
	}

	return 'default';
}
home/xbodynamge/lebauwcentre/wp-content/themes/zerif-lite/inc/customizer.php000064400000232666151134035760023460 0ustar00<?php
/**
 * Zerif Theme Customizer
 *
 * @package zerif
 */

/**
 * Add postMessage support for site title and description for the Theme Customizer.
 *
 * @param WP_Customize_Manager $wp_customize Theme Customizer object.
 */
function zerif_customize_register( $wp_customize ) {

	/**
	 * Class Zerif_Customizer_Number_Control
	 */
	class Zerif_Customizer_Number_Control extends WP_Customize_Control {

		/**
		 * Type of control
		 *
		 * @var $type string Type of control
		 */
		public $type = 'number';

		/**
		 * Render the control
		 */
		public function render_content() {
			?>
			<label>
				<span class="customize-control-title"><?php echo esc_html( $this->label ); ?></span>
				<input type="number" <?php $this->link(); ?> value="<?php echo intval( $this->value() ); ?>"/>
			</label>
			<?php
		}
	}

	/* Custom panel type - used for multiple levels of panels */
	if ( class_exists( 'WP_Customize_Panel' ) ) {

		/**
		 * Class Zerif_WP_Customize_Panel
		 */
		class Zerif_WP_Customize_Panel extends WP_Customize_Panel {

			/**
			 * Panel
			 *
			 * @var $panel string Panel
			 */
			public $panel;

			/**
			 * Panel type
			 *
			 * @var $type string Panel type.
			 */
			public $type = 'zerif_panel';

			/**
			 * Form the json
			 */
			public function json() {

				$array                   = wp_array_slice_assoc(
					(array) $this,
					array(
						'id',
						'description',
						'priority',
						'type',
						'panel',
					)
				);
				$array['title']          = html_entity_decode( $this->title, ENT_QUOTES, get_bloginfo( 'charset' ) );
				$array['content']        = $this->get_content();
				$array['active']         = $this->active();
				$array['instanceNumber'] = $this->instance_number;

				return $array;

			}

		}

	}

	$wp_customize->register_panel_type( 'Zerif_WP_Customize_Panel' );

	/**
	 * Upsells
	 */
	require_once( trailingslashit( get_template_directory() ) . 'inc/class/class-customizer-theme-info-control/class-customizer-theme-info-control.php' );

	$wp_customize->add_section(
		'zerif_theme_info_main_section',
		array(
			'title'    => __( 'View PRO version', 'zerif-lite' ),
			'priority' => 1,
		)
	);
	$wp_customize->add_setting(
		'zerif_theme_info_main_control',
		array(
			'sanitize_callback' => 'esc_html',
		)
	);

	/*
	 * View Pro Version Section Control
	 */
	$wp_customize->add_control(
		new Zerif_Control_Upsell_Theme_Info(
			$wp_customize,
			'zerif_theme_info_main_control',
			array(
				'section'     => 'zerif_theme_info_main_section',
				'priority'    => 100,
				'options'     => array(
					esc_html__( 'Section Reordering', 'zerif-lite' ),
					esc_html__( 'Background video', 'zerif-lite' ),
					esc_html__( 'Portfolio', 'zerif-lite' ),
					esc_html__( 'Extra colors', 'zerif-lite' ),
					esc_html__( 'Packages section', 'zerif-lite' ),
					esc_html__( 'Subscribe section', 'zerif-lite' ),
					esc_html__( 'Google map section', 'zerif-lite' ),
					esc_html__( 'Support', 'zerif-lite' ),
				),
				'button_url'  => esc_url( 'https://themeisle.com/themes/zerif-pro-one-page-wordpress-theme/upgrade/' ),
				'button_text' => esc_html__( 'View PRO version', 'zerif-lite' ),
			)
		)
	);

	/**
	 * Extra Colors Notice
	 */
	$wp_customize->add_setting(
		'zerif_theme_info_colors_section_control',
		array(
			'sanitize_callback' => 'esc_html',
		)
	);
	$wp_customize->add_control(
		new Zerif_Control_Upsell_Theme_Info(
			$wp_customize,
			'zerif_theme_info_colors_section_control',
			array(
				'section'            => 'colors',
				'priority'           => 500,
				'options'            => array(
					esc_html__( 'Extra colors', 'zerif-lite' ),
				),
				'explained_features' => array(
					esc_html__( 'Get full color schemes support for your site.', 'zerif-lite' ),
				),
				'button_url'         => esc_url( 'https://themeisle.com/themes/zerif-pro-one-page-wordpress-theme/upgrade/' ),
				'button_text'        => esc_html__( 'View PRO version', 'zerif-lite' ),
			)
		)
	);

	/**
	 * Background video notice
	 */
	$wp_customize->add_setting(
		'zerif_theme_info_header_section_control',
		array(
			'sanitize_callback' => 'esc_html',
		)
	);
	$wp_customize->add_control(
		new Zerif_Control_Upsell_Theme_Info(
			$wp_customize,
			'zerif_theme_info_header_section_control',
			array(
				'section'     => 'background_image',
				'priority'    => 500,
				'options'     => array(
					esc_html__( 'Background video', 'zerif-lite' ),
				),
				'button_url'  => esc_url( 'https://themeisle.com/themes/zerif-pro-one-page-wordpress-theme/upgrade/' ),
				'button_text' => esc_html__( 'View PRO version', 'zerif-lite' ),
			)
		)
	);

	$wp_customize->get_setting( 'blogname' )->transport         = 'postMessage';
	$wp_customize->get_setting( 'blogdescription' )->transport  = 'postMessage';
	$wp_customize->get_setting( 'header_textcolor' )->transport = 'postMessage';
	$wp_customize->get_setting( 'custom_logo' )->transport      = 'postMessage';

	if ( isset( $wp_customize->selective_refresh ) ) {
		$wp_customize->selective_refresh->add_partial(
			'custom_logo',
			array(
				'selector'        => '.navbar-brand',
				'settings'        => 'custom_logo',
				'render_callback' => 'zerif_custom_logo_callback',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'zerif_bigtitle_title_2',
			array(
				'selector'        => '.home-header-wrap .intro-text',
				'settings'        => 'zerif_bigtitle_title_2',
				'render_callback' => 'zerif_bigtitle_title_2_render_callback',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'zerif_bigtitle_redbutton_label_2',
			array(
				'selector'        => '.buttons a.red-btn',
				'settings'        => 'zerif_bigtitle_redbutton_label_2',
				'render_callback' => 'zerif_bigtitle_redbutton_label_2_render_callback',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'zerif_bigtitle_greenbutton_label',
			array(
				'selector'        => '.buttons a.green-btn',
				'settings'        => 'zerif_bigtitle_greenbutton_label',
				'render_callback' => 'zerif_bigtitle_greenbutton_label_render_callback',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'zerif_ourfocus_title_2',
			array(
				'selector'        => '#focus .section-header h2',
				'settings'        => 'zerif_ourfocus_title_2',
				'render_callback' => 'zerif_ourfocus_title_2_render_callback',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'zerif_ourfocus_subtitle',
			array(
				'selector'        => '#focus .section-header div.section-legend',
				'settings'        => 'zerif_ourfocus_subtitle',
				'render_callback' => 'zerif_ourfocus_subtitle_render_callback',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'zerif_ourteam_title',
			array(
				'selector'        => '#team .section-header h2',
				'settings'        => 'zerif_ourteam_title',
				'render_callback' => 'zerif_ourteam_title_render_callback',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'zerif_ourteam_subtitle',
			array(
				'selector'        => '#team .section-header div.section-legend',
				'settings'        => 'zerif_ourteam_subtitle',
				'render_callback' => 'zerif_ourteam_subtitle_render_callback',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'zerif_aboutus_title',
			array(
				'selector'        => '#aboutus .section-header h2',
				'settings'        => 'zerif_aboutus_title',
				'render_callback' => 'zerif_aboutus_title_render_callback',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'zerif_aboutus_subtitle',
			array(
				'selector'        => '#aboutus .section-header div.section-legend',
				'settings'        => 'zerif_aboutus_subtitle',
				'render_callback' => 'zerif_aboutus_subtitle_render_callback',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'zerif_aboutus_biglefttitle',
			array(
				'selector'        => '#aboutus .big-intro',
				'settings'        => 'zerif_aboutus_biglefttitle',
				'render_callback' => 'zerif_aboutus_biglefttitle_render_callback',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'zerif_aboutus_text',
			array(
				'selector'        => '#aboutus .text_and_skills p',
				'settings'        => 'zerif_aboutus_text',
				'render_callback' => 'zerif_aboutus_text_render_callback',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'zerif_aboutus_feature1_title',
			array(
				'selector'        => '#aboutus .skill_1 label',
				'settings'        => 'zerif_aboutus_feature1_title',
				'render_callback' => 'zerif_aboutus_feature1_title_render_callback',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'zerif_aboutus_feature2_title',
			array(
				'selector'        => '#aboutus .skill_2 label',
				'settings'        => 'zerif_aboutus_feature2_title',
				'render_callback' => 'zerif_aboutus_feature2_title_render_callback',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'zerif_aboutus_feature3_title',
			array(
				'selector'        => '#aboutus .skill_3 label',
				'settings'        => 'zerif_aboutus_feature3_title',
				'render_callback' => 'zerif_aboutus_feature3_title_render_callback',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'zerif_aboutus_feature4_title',
			array(
				'selector'        => '#aboutus .skill_4 label',
				'settings'        => 'zerif_aboutus_feature4_title',
				'render_callback' => 'zerif_aboutus_feature4_title_render_callback',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'zerif_testimonials_title',
			array(
				'selector'        => '#testimonials .section-header h2',
				'settings'        => 'zerif_testimonials_title',
				'render_callback' => 'zerif_testimonials_title_render_callback',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'zerif_contactus_title',
			array(
				'selector'        => '#contact .section-header h2',
				'render_callback' => 'zerif_contactus_title_render_callback',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'zerif_contactus_subtitle',
			array(
				'selector'        => '#contact .section-legend',
				'render_callback' => 'zerif_contactus_subtitle_render_callback',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'zerif_contactus_button_label',
			array(
				'selector'        => '#contact .pirate_forms .contact_submit_wrap',
				'render_callback' => 'zerif_contactus_button_label_render_callback',
			)
		);

		$wp_customize->selective_refresh->add_partial(
			'zerif_socials_facebook',
			array(
				'selector'        => '#footer .social #facebook',
				'settings'        => 'zerif_socials_facebook',
				'render_callback' => 'zerif_socials_facebook_render_callback',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'zerif_socials_twitter',
			array(
				'selector'        => '#footer .social #twitter',
				'settings'        => 'zerif_socials_twitter',
				'render_callback' => 'zerif_socials_twitter_render_callback',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'zerif_socials_linkedin',
			array(
				'selector'        => '#footer .social #linkedin',
				'settings'        => 'zerif_socials_linkedin',
				'render_callback' => 'zerif_socials_linkedin_render_callback',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'zerif_socials_behance',
			array(
				'selector'        => '#footer .social #behance',
				'settings'        => 'zerif_socials_behance',
				'render_callback' => 'zerif_socials_behance_render_callback',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'zerif_socials_dribbble',
			array(
				'selector'        => '#footer .social #dribbble',
				'settings'        => 'zerif_socials_dribbble',
				'render_callback' => 'zerif_socials_dribbble_render_callback',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'zerif_socials_instagram',
			array(
				'selector'        => '#footer .social #instagram',
				'settings'        => 'zerif_socials_instagram',
				'render_callback' => 'zerif_socials_instagram_render_callback',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'zerif_address',
			array(
				'selector'        => '.zerif-footer-address',
				'settings'        => 'zerif_address',
				'render_callback' => 'zerif_address_render_callback',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'zerif_email',
			array(
				'selector'        => '.zerif-footer-email',
				'settings'        => 'zerif_email',
				'render_callback' => 'zerif_email_render_callback',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'zerif_phone',
			array(
				'selector'        => '.zerif-footer-phone',
				'settings'        => 'zerif_phone',
				'render_callback' => 'zerif_phone_render_callback',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'zerif_address_icon',
			array(
				'selector'        => '.company-details .icon-top.red-text',
				'settings'        => 'zerif_address_icon',
				'render_callback' => 'zerif_address_icon_render_callback',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'zerif_email_icon',
			array(
				'selector'        => '.company-details .icon-top.green-text',
				'settings'        => 'zerif_email_icon',
				'render_callback' => 'zerif_email_icon_render_callback',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'zerif_phone_icon',
			array(
				'selector'        => '.company-details .icon-top.blue-text',
				'settings'        => 'zerif_phone_icon',
				'render_callback' => 'zerif_phone_icon_render_callback',
			)
		);
	}

	/**
	 * Render callback for zerif_bigtitle_title_2
	 *
	 * @return mixed
	 */
	function zerif_bigtitle_title_2_render_callback() {
		return wp_kses_post( get_theme_mod( 'zerif_bigtitle_title_2' ) );
	}

	/**
	 * Render callback for zerif_bigtitle_redbutton_label_2
	 *
	 * @return mixed
	 */
	function zerif_bigtitle_redbutton_label_2_render_callback() {
		return wp_kses_post( get_theme_mod( 'zerif_bigtitle_redbutton_label_2' ) );
	}

	/**
	 * Render callback for zerif_bigtitle_greenbutton_label
	 *
	 * @return mixed
	 */
	function zerif_bigtitle_greenbutton_label_render_callback() {
		return wp_kses_post( get_theme_mod( 'zerif_bigtitle_greenbutton_label' ) );
	}

	/**
	 * Render callback for zerif_ourfocus_title_2
	 *
	 * @return mixed
	 */
	function zerif_ourfocus_title_2_render_callback() {
		return wp_kses_post( get_theme_mod( 'zerif_ourfocus_title_2' ) );
	}

	/**
	 * Render callback for zerif_ourfocus_subtitle
	 *
	 * @return mixed
	 */
	function zerif_ourfocus_subtitle_render_callback() {
		return wp_kses_post( get_theme_mod( 'zerif_ourfocus_subtitle' ) );
	}

	/**
	 * Render callback for zerif_ourteam_title
	 *
	 * @return mixed
	 */
	function zerif_ourteam_title_render_callback() {
		return wp_kses_post( get_theme_mod( 'zerif_ourteam_title' ) );
	}

	/**
	 * Render callback for zerif_ourteam_subtitle
	 *
	 * @return mixed
	 */
	function zerif_ourteam_subtitle_render_callback() {
		return wp_kses_post( get_theme_mod( 'zerif_ourteam_subtitle' ) );
	}

	/**
	 * Render callback for zerif_aboutus_title
	 *
	 * @return mixed
	 */
	function zerif_aboutus_title_render_callback() {
		return wp_kses_post( get_theme_mod( 'zerif_aboutus_title' ) );
	}

	/**
	 * Render callback for zerif_aboutus_subtitle
	 *
	 * @return mixed
	 */
	function zerif_aboutus_subtitle_render_callback() {
		return wp_kses_post( get_theme_mod( 'zerif_aboutus_subtitle' ) );
	}

	/**
	 * Render callback for zerif_aboutus_biglefttitle
	 *
	 * @return mixed
	 */
	function zerif_aboutus_biglefttitle_render_callback() {
		return wp_kses_post( get_theme_mod( 'zerif_aboutus_biglefttitle' ) );
	}

	/**
	 * Render callback for zerif_aboutus_text
	 *
	 * @return mixed
	 */
	function zerif_aboutus_text_render_callback() {
		return wp_kses_post( get_theme_mod( 'zerif_aboutus_text' ) );
	}

	/**
	 * Render callback for zerif_aboutus_feature1_title
	 *
	 * @return mixed
	 */
	function zerif_aboutus_feature1_title_render_callback() {
		return wp_kses_post( get_theme_mod( 'zerif_aboutus_feature1_title' ) );
	}

	/**
	 * Render callback for zerif_aboutus_feature2_title
	 *
	 * @return mixed
	 */
	function zerif_aboutus_feature2_title_render_callback() {
		return wp_kses_post( get_theme_mod( 'zerif_aboutus_feature2_title' ) );
	}

	/**
	 * Render callback for zerif_aboutus_feature3_title
	 *
	 * @return mixed
	 */
	function zerif_aboutus_feature3_title_render_callback() {
		return wp_kses_post( get_theme_mod( 'zerif_aboutus_feature3_title' ) );
	}

	/**
	 * Render callback for zerif_aboutus_feature4_title
	 *
	 * @return mixed
	 */
	function zerif_aboutus_feature4_title_render_callback() {
		return wp_kses_post( get_theme_mod( 'zerif_aboutus_feature4_title' ) );
	}

	/**
	 * Render callback for zerif_testimonials_title
	 *
	 * @return mixed
	 */
	function zerif_testimonials_title_render_callback() {
		return wp_kses_post( get_theme_mod( 'zerif_testimonials_title' ) );
	}

	/**
	 * Render callback for zerif_contactus_title
	 *
	 * @return mixed
	 */
	function zerif_contactus_title_render_callback() {
		return wp_kses_post( get_theme_mod( 'zerif_contactus_title' ) );
	}

	/**
	 * Render callback for zerif_contactus_button_label
	 */
	function zerif_contactus_button_label_render_callback() {
		?>
		<button id="pirate-forms-contact-submit" name="pirate-forms-contact-submit" class="pirate-forms-submit-button" type="submit">
			<?php echo wp_kses_post( get_theme_mod( 'zerif_contactus_button_label' ) ); ?>
		</button>
		<?php
	}

	/**
	 * Render callback for erif_contactus_subtitle
	 *
	 * @return string
	 */
	function zerif_contactus_subtitle_render_callback() {
		return wp_kses_post( get_theme_mod( 'zerif_contactus_subtitle' ) );
	}

	/**
	 * Render callback for zerif_socials_facebook
	 *
	 * @return mixed
	 */
	function zerif_socials_facebook_render_callback() {
		return '<a href="' . esc_url( get_theme_mod( 'zerif_socials_facebook' ) ) . '"><span class="sr-only">' . __( 'Facebook link', 'zerif-lite' ) . '</span> <i class="fa fa-facebook"></i></a>';
	}

	/**
	 * Render callback for zerif_socials_twitter
	 *
	 * @return mixed
	 */
	function zerif_socials_twitter_render_callback() {
		return '<a href="' . esc_url( get_theme_mod( 'zerif_socials_twitter' ) ) . '"><span class="sr-only">' . __( 'Twitter link', 'zerif-lite' ) . '</span> <i class="fa fa-twitter"></i></a>';
	}

	/**
	 * Render callback for zerif_socials_linkedin
	 *
	 * @return mixed
	 */
	function zerif_socials_linkedin_render_callback() {
		return '<a href="' . esc_url( get_theme_mod( 'zerif_socials_linkedin' ) ) . '"><span class="sr-only">' . __( 'Linkedin link', 'zerif-lite' ) . '</span> <i class="fa fa-linkedin"></i></a>';
	}

	/**
	 * Render callback for zerif_socials_behance
	 *
	 * @return mixed
	 */
	function zerif_socials_behance_render_callback() {
		return '<a href="' . esc_url( get_theme_mod( 'zerif_socials_behance' ) ) . '"><span class="sr-only">' . __( 'Behance link', 'zerif-lite' ) . '</span> <i class="fa fa-behance"></i></a>';
	}

	/**
	 * Render callback for zerif_socials_dribbble
	 *
	 * @return mixed
	 */
	function zerif_socials_dribbble_render_callback() {
		return '<a href="' . esc_url( get_theme_mod( 'zerif_socials_dribbble' ) ) . '"><span class="sr-only">' . __( 'Dribble link', 'zerif-lite' ) . '</span> <i class="fa fa-dribbble"></i></a>';
	}

	/**
	 * Render callback for zerif_socials_instagram
	 *
	 * @return mixed
	 */
	function zerif_socials_instagram_render_callback() {
		return '<a href="' . esc_url( get_theme_mod( 'zerif_socials_instagram' ) ) . '"><span class="sr-only">' . __( 'Instagram link', 'zerif-lite' ) . '</span> <i class="fa fa-instagram"></i></a>';
	}

	/**
	 * Render callback for zerif_address
	 *
	 * @return mixed
	 */
	function zerif_address_render_callback() {
		return wp_kses_post( get_theme_mod( 'zerif_address' ) );
	}

	/**
	 * Render callback for zerif_email
	 *
	 * @return mixed
	 */
	function zerif_email_render_callback() {
		return wp_kses_post( get_theme_mod( 'zerif_email' ) );
	}

	/**
	 * Render callback for zerif_phone
	 *
	 * @return mixed
	 */
	function zerif_phone_render_callback() {
		return wp_kses_post( get_theme_mod( 'zerif_phone' ) );
	}

	/**
	 * Render callback for zerif_address_icon
	 *
	 * @return mixed
	 */
	function zerif_address_icon_render_callback() {
		return '<img src="' . esc_url( get_theme_mod( 'zerif_address_icon' ) ) . '">';
	}

	/**
	 * Render callback for zerif_email_icon
	 *
	 * @return mixed
	 */
	function zerif_email_icon_render_callback() {
		return '<img src="' . esc_url( get_theme_mod( 'zerif_email_icon' ) ) . '">';
	}

	/**
	 * Render callback for zerif_phone_icon
	 *
	 * @return mixed
	 */
	function zerif_phone_icon_render_callback() {
		return '<img src="' . esc_url( get_theme_mod( 'zerif_phone_icon' ) ) . '">';
	}

	/**
	 * ADVANCED OPTIONS
	 */

	$wp_customize->add_panel(
		'zerif_advanced_options_panel',
		array(
			'title'    => esc_html__( 'Advanced options', 'zerif-lite' ),
			'priority' => 150,
		)
	);

	$wp_customize->add_section(
		'zerif_general_section',
		array(
			'title'    => __( 'General options', 'zerif-lite' ),
			'priority' => 1,
			'panel'    => 'zerif_advanced_options_panel',
		)
	);

	$wp_customize->add_setting(
		'zerif_use_safe_font',
		array(
			'sanitize_callback' => 'zerif_sanitize_checkbox',
		)
	);

	$wp_customize->add_control(
		'zerif_use_safe_font',
		array(
			'type'     => 'checkbox',
			'label'    => 'Use safe font?',
			'section'  => 'zerif_general_section',
			'priority' => 1,
		)
	);

	/* Disable preloader */
	$wp_customize->add_setting(
		'zerif_disable_preloader',
		array(
			'sanitize_callback' => 'zerif_sanitize_checkbox',
		)
	);

	$wp_customize->add_control(
		'zerif_disable_preloader',
		array(
			'type'     => 'checkbox',
			'label'    => __( 'Disable preloader?', 'zerif-lite' ),
			'section'  => 'zerif_general_section',
			'priority' => 2,
		)
	);

	/* Disable smooth scroll */
	$wp_customize->add_setting(
		'zerif_disable_smooth_scroll',
		array(
			'sanitize_callback' => 'zerif_sanitize_checkbox',
		)
	);

	$wp_customize->add_control(
		'zerif_disable_smooth_scroll',
		array(
			'type'     => 'checkbox',
			'label'    => __( 'Disable smooth scroll?', 'zerif-lite' ),
			'section'  => 'zerif_general_section',
			'priority' => 3,
		)
	);

	/* Enable accessibility */
	$wp_customize->add_setting(
		'zerif_accessibility',
		array(
			'sanitize_callback' => 'zerif_sanitize_checkbox',
		)
	);

	$wp_customize->add_control(
		'zerif_accessibility',
		array(
			'type'     => 'checkbox',
			'label'    => __( 'Enable accessibility?', 'zerif-lite' ),
			'section'  => 'zerif_general_section',
			'priority' => 4,
		)
	);

	/* Change the template to full width for page.php */
	$wp_customize->add_setting(
		'zerif_change_to_full_width',
		array(
			'sanitize_callback' => 'zerif_sanitize_checkbox',
		)
	);

	$wp_customize->add_control(
		'zerif_change_to_full_width',
		array(
			'type'     => 'checkbox',
			'label'    => 'Change the template to Full width for all the pages?',
			'section'  => 'zerif_general_section',
			'priority' => 6,
		)
	);

	/**
	 * Option to get the frontpage settings to the old default template if a static frontpage is selected
	 * Only for new users
	 */
	if ( ! zerif_check_if_old_version_of_theme() ) {
		$wp_customize->add_setting(
			'zerif_keep_old_fp_template',
			array(
				'sanitize_callback' => 'zerif_sanitize_checkbox',
			)
		);
		$wp_customize->add_control(
			'zerif_keep_old_fp_template',
			array(
				'type'     => 'checkbox',
				'label'    => esc_html__( 'Keep the old static frontpage template?', 'zerif-lite' ),
				'section'  => 'zerif_general_section',
				'priority' => 7,
			)
		);
	}

	$wp_customize->get_section( 'colors' )->panel           = 'zerif_advanced_options_panel';
	$wp_customize->get_section( 'background_image' )->panel = 'zerif_advanced_options_panel';

	if ( ! zerif_check_if_old_version_of_theme() ) {
		$wp_customize->add_section(
			'zerif_blog_header_section',
			array(
				'title' => __( 'Blog Header Options', 'zerif-lite' ),
				'panel' => 'zerif_advanced_options_panel',
			)
		);

		/* Blog Header Title */
		$wp_customize->add_setting(
			'zerif_blog_header_title',
			array(
				'default'           => esc_html__( 'Blog', 'zerif-lite' ),
				'transport'         => 'postMessage',
				'sanitize_callback' => 'esc_html',
			)
		);

		$wp_customize->add_control(
			'zerif_blog_header_title',
			array(
				'label'    => __( 'Title', 'zerif-lite' ),
				'section'  => 'zerif_blog_header_section',
				'priority' => 1,
			)
		);

		/* Blog Header Subtitle */
		$wp_customize->add_setting(
			'zerif_blog_header_subtitle',
			array(
				'default'           => esc_html__( 'Zerif supports a custom frontpage', 'zerif-lite' ),
				'transport'         => 'postMessage',
				'sanitize_callback' => 'esc_html',
			)
		);

		$wp_customize->add_control(
			'zerif_blog_header_subtitle',
			array(
				'label'    => __( 'Subtitle', 'zerif-lite' ),
				'section'  => 'zerif_blog_header_section',
				'priority' => 2,
			)
		);

		$wp_customize->selective_refresh->add_partial(
			'zerif_blog_header_title_subtitle',
			array(
				'selector'        => '.blog-header-wrap',
				'settings'        => array( 'zerif_blog_header_title', 'zerif_blog_header_subtitle' ),
				'render_callback' => 'zerif_blog_header_title_subtitle_callback',
			)
		);

		/**
		 * Callback for changing the title and subtitle on the blog
		 */
		function zerif_blog_header_title_subtitle_callback() {
			$title    = get_theme_mod( 'zerif_blog_header_title' );
			$subtitle = get_theme_mod( 'zerif_blog_header_subtitle' );
			$output   = '';
			if ( ! empty( $title ) || ! empty( $subtitle ) ) {
				$output .= '<div class="blog-header-content-wrap">';

				if ( ! empty( $title ) ) {
					$output .= '<h1 class="intro-text">' . esc_html( $title ) . '</h1>';
				}

				if ( ! empty( $subtitle ) ) {
					$output .= '<p class="blog-header-subtitle">' . esc_html( $subtitle ) . '</p>';
				}

				$output .= '</div>';
			}

			return $output;
		}
	}

	/**
	 * FRONTPAGE SECTIONS PANEL
	 */

	if ( zerif_check_if_wp_greater_than_4_7() ) {

		$zerif_frontpage_sections_panel = new Zerif_WP_Customize_Panel(
			$wp_customize,
			'zerif_frontpage_sections_panel',
			array(
				'title'    => esc_html__( 'Frontpage sections', 'zerif-lite' ),
				'priority' => 29,
			)
		);

		$wp_customize->add_panel( $zerif_frontpage_sections_panel );
	}

	/**
	 * BIG TITLE SECTION
	 */

	if ( zerif_check_if_wp_greater_than_4_7() ) {

		$panel_big_title = new Zerif_WP_Customize_Panel(
			$wp_customize,
			'panel_big_title',
			array(
				'title'    => esc_html__( 'Big title section', 'zerif-lite' ),
				'priority' => 30,
				'panel'    => 'zerif_frontpage_sections_panel',
			)
		);

		$wp_customize->add_panel( $panel_big_title );

	} else {

		$wp_customize->add_panel(
			'panel_big_title',
			array(
				'title'    => esc_html__( 'Big title section', 'zerif-lite' ),
				'priority' => 30,
			)
		);

	}

	$wp_customize->add_section(
		'zerif_bigtitle_section',
		array(
			'title'    => __( 'Main content', 'zerif-lite' ),
			'priority' => 1,
			'panel'    => 'panel_big_title',
		)
	);

	/* show/hide */
	$wp_customize->add_setting(
		'zerif_bigtitle_show',
		array(
			'sanitize_callback' => 'zerif_sanitize_checkbox',
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		'zerif_bigtitle_show',
		array(
			'type'     => 'checkbox',
			'label'    => __( 'Hide big title section?', 'zerif-lite' ),
			'section'  => 'zerif_bigtitle_section',
			'priority' => 1,
		)
	);

	/*
	 * Title
	 *
	 * define a new option with _2 to be used to differentiate between the old users and new ones
	 *
	 * get the old option's value and put it as default for the new _2 option
	 */

	$zerif_bigtitle_title_default = get_theme_mod( 'zerif_bigtitle_title' );

	if ( current_user_can( 'edit_theme_options' ) ) {
		$wp_customize->add_setting(
			'zerif_bigtitle_title_2',
			array(
				'sanitize_callback' => 'zerif_sanitize_input',
				/* translators: Big title section */
				'default'           => ! empty( $zerif_bigtitle_title_default ) ? $zerif_bigtitle_title_default : sprintf( __( 'This piece of text can be changed in %s', 'zerif-lite' ), __( 'Big title section', 'zerif-lite' ) ),
				'transport'         => 'postMessage',
			)
		);
	} else {
		$wp_customize->add_setting(
			'zerif_bigtitle_title_2',
			array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'transport'         => 'postMessage',
			)
		);
	}

	$wp_customize->add_control(
		'zerif_bigtitle_title_2',
		array(
			'label'    => __( 'Title', 'zerif-lite' ),
			'section'  => 'zerif_bigtitle_section',
			'priority' => 2,
		)
	);

	/*
	 * red button
	 *
	 * define a new option with _2 to be used to differentiate between the old users and new ones
	 *
	 * get the old option's value and put it as default for the new _2 option
	 */
	$zerif_bigtitle_redbutton_label_default = get_theme_mod( 'zerif_bigtitle_redbutton_label' );

	if ( current_user_can( 'edit_theme_options' ) ) {
		$wp_customize->add_setting(
			'zerif_bigtitle_redbutton_label_2',
			array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'default'           => ! empty( $zerif_bigtitle_redbutton_label_default ) ? $zerif_bigtitle_redbutton_label_default : __( 'Customize this button', 'zerif-lite' ),
				'transport'         => 'postMessage',
			)
		);
	} else {
		$wp_customize->add_setting(
			'zerif_bigtitle_redbutton_label_2',
			array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'transport'         => 'postMessage',
			)
		);
	}

	$wp_customize->add_control(
		'zerif_bigtitle_redbutton_label_2',
		array(
			'label'    => __( 'Red button label', 'zerif-lite' ),
			'section'  => 'zerif_bigtitle_section',
			'priority' => 3,
		)
	);

	$wp_customize->add_setting(
		'zerif_bigtitle_redbutton_url',
		array(
			'sanitize_callback' => 'esc_url_raw',
			'default'           => esc_url( home_url( '/' ) ) . '#focus',
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		'zerif_bigtitle_redbutton_url',
		array(
			'label'    => __( 'Red button link', 'zerif-lite' ),
			'section'  => 'zerif_bigtitle_section',
			'priority' => 4,
		)
	);

	/**
	 * Green button
	 */

	if ( current_user_can( 'edit_theme_options' ) ) {
		$wp_customize->add_setting(
			'zerif_bigtitle_greenbutton_label',
			array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'default'           => __( 'Customize this button', 'zerif-lite' ),
				'transport'         => 'postMessage',
			)
		);
	} else {
		$wp_customize->add_setting(
			'zerif_bigtitle_greenbutton_label',
			array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'transport'         => 'postMessage',
			)
		);
	}

	$wp_customize->add_control(
		'zerif_bigtitle_greenbutton_label',
		array(
			'label'    => __( 'Green button label', 'zerif-lite' ),
			'section'  => 'zerif_bigtitle_section',
			'priority' => 5,
		)
	);

	$wp_customize->add_setting(
		'zerif_bigtitle_greenbutton_url',
		array(
			'sanitize_callback' => 'esc_url_raw',
			'default'           => esc_url( home_url( '/' ) ) . '#focus',
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		'zerif_bigtitle_greenbutton_url',
		array(
			'label'    => __( 'Green button link', 'zerif-lite' ),
			'section'  => 'zerif_bigtitle_section',
			'priority' => 6,
		)
	);

	/**
	 * Slider shortcode
	 */

	$wp_customize->add_setting(
		'zerif_bigtitle_slider_shortcode',
		array(
			'sanitize_callback' => 'zerif_sanitize_input',
		)
	);

	$wp_customize->add_control(
		'zerif_bigtitle_slider_shortcode',
		array(
			'label'       => __( 'Slider shortcode', 'zerif-lite' ),
			'description' => __( 'You can replace the homepage slider with any plugin you like, just copy the shortcode generated and paste it here.', 'zerif-lite' ),
			'section'     => 'zerif_bigtitle_section',
			'priority'    => 7,
		)
	);

	/**
	 * PARALLAX IMAGES
	 */

	$wp_customize->add_section(
		'zerif_parallax_section',
		array(
			'title'    => __( 'Parallax effect', 'zerif-lite' ),
			'priority' => 2,
			'panel'    => 'panel_big_title',
		)
	);

	/* show/hide */
	$wp_customize->add_setting(
		'zerif_parallax_show',
		array(
			'sanitize_callback' => 'zerif_sanitize_checkbox',
		)
	);

	$wp_customize->add_control(
		'zerif_parallax_show',
		array(
			'type'     => 'checkbox',
			'label'    => __( 'Use parallax effect?', 'zerif-lite' ),
			'section'  => 'zerif_parallax_section',
			'priority' => 1,
		)
	);

	/* IMAGE 1*/
	$wp_customize->add_setting(
		'zerif_parallax_img1',
		array(
			'sanitize_callback' => 'esc_url_raw',
			'default'           => get_template_directory_uri() . '/images/background1.jpg',
		)
	);

	$wp_customize->add_control(
		new WP_Customize_Image_Control(
			$wp_customize,
			'themeslug_parallax_img1',
			array(
				'label'    => __( 'Image 1', 'zerif-lite' ),
				'section'  => 'zerif_parallax_section',
				'settings' => 'zerif_parallax_img1',
				'priority' => 1,
			)
		)
	);

	/* IMAGE 2 */
	$wp_customize->add_setting(
		'zerif_parallax_img2',
		array(
			'sanitize_callback' => 'esc_url_raw',
			'default'           => get_template_directory_uri() . '/images/background2.png',
		)
	);

	$wp_customize->add_control(
		new WP_Customize_Image_Control(
			$wp_customize,
			'themeslug_parallax_img2',
			array(
				'label'    => __( 'Image 2', 'zerif-lite' ),
				'section'  => 'zerif_parallax_section',
				'settings' => 'zerif_parallax_img2',
				'priority' => 2,
			)
		)
	);

	/**
	 * OUR FOCUS SECTION
	 */

	$wp_customize->add_section(
		'zerif_ourfocus_section',
		array(
			'title'    => __( 'Our focus section', 'zerif-lite' ),
			'priority' => 31,
		)
	);

	if ( zerif_check_if_wp_greater_than_4_7() ) {
		$wp_customize->get_section( 'zerif_ourfocus_section' )->panel = 'zerif_frontpage_sections_panel';
	}

	/* show/hide */
	$wp_customize->add_setting(
		'zerif_ourfocus_show',
		array(
			'sanitize_callback' => 'zerif_sanitize_checkbox',
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		'zerif_ourfocus_show',
		array(
			'type'     => 'checkbox',
			'label'    => __( 'Hide our focus section?', 'zerif-lite' ),
			'section'  => 'zerif_ourfocus_section',
			'priority' => - 3,
		)
	);

	/*
	 * our focus title
	 *
	 * define a new option with _2 to be used to differentiate between the old users and new ones
	 *
	 * get the old option's value and put it as default for the new _2 option
	 *
	 */

	$zerif_ourfocus_title_default = get_theme_mod( 'zerif_ourfocus_title' );

	if ( current_user_can( 'edit_theme_options' ) ) {
		$wp_customize->add_setting(
			'zerif_ourfocus_title_2',
			array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'default'           => ! empty( $zerif_ourfocus_title_default ) ? $zerif_ourfocus_title_default : __( 'FEATURES', 'zerif-lite' ),
				'transport'         => 'postMessage',
			)
		);
	} else {
		$wp_customize->add_setting(
			'zerif_ourfocus_title_2',
			array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'transport'         => 'postMessage',
			)
		);
	}
	$wp_customize->add_control(
		'zerif_ourfocus_title_2',
		array(
			'label'    => __( 'Title', 'zerif-lite' ),
			'section'  => 'zerif_ourfocus_section',
			'priority' => - 2,
		)
	);

	/* Our focus subtitle */
	if ( current_user_can( 'edit_theme_options' ) ) {
		$wp_customize->add_setting(
			'zerif_ourfocus_subtitle',
			array(
				'sanitize_callback' => 'zerif_sanitize_input',
				/* translators: Our focus section */
				'default'           => sprintf( __( 'Change this subtitle in %s', 'zerif-lite' ), __( 'Our focus section', 'zerif-lite' ) ),
				'transport'         => 'postMessage',
			)
		);
	} else {
		$wp_customize->add_setting(
			'zerif_ourfocus_subtitle',
			array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'transport'         => 'postMessage',
			)
		);
	}

	$wp_customize->add_control(
		'zerif_ourfocus_subtitle',
		array(
			'label'    => __( 'Our focus subtitle', 'zerif-lite' ),
			'section'  => 'zerif_ourfocus_section',
			'priority' => - 1,
		)
	);

	$our_focus_section = $wp_customize->get_section( 'sidebar-widgets-sidebar-ourfocus' );
	if ( ! empty( $our_focus_section ) ) {
		if ( zerif_check_if_wp_greater_than_4_7() ) {
			$our_focus_section->panel = 'zerif_frontpage_sections_panel';
		} else {
			$our_focus_section->panel = '';
		}
		$our_focus_section->title                                        = __( 'Our focus section', 'zerif-lite' );
		$our_focus_section->priority                                     = 31;
		$wp_customize->get_control( 'zerif_ourfocus_show' )->section     = 'sidebar-widgets-sidebar-ourfocus';
		$wp_customize->get_control( 'zerif_ourfocus_title_2' )->section  = 'sidebar-widgets-sidebar-ourfocus';
		$wp_customize->get_control( 'zerif_ourfocus_subtitle' )->section = 'sidebar-widgets-sidebar-ourfocus';
	}

	/**
	 * ABOUT US SECTION
	 */

	if ( zerif_check_if_wp_greater_than_4_7() ) {

		$panel_about = new Zerif_WP_Customize_Panel(
			$wp_customize,
			'panel_about',
			array(
				'priority' => 32,
				'title'    => __( 'About us section', 'zerif-lite' ),
				'panel'    => 'zerif_frontpage_sections_panel',
			)
		);

		$wp_customize->add_panel( $panel_about );

	} else {

		$wp_customize->add_panel(
			'panel_about',
			array(
				'priority' => 32,
				'title'    => __( 'About us section', 'zerif-lite' ),
			)
		);

	}

	$wp_customize->add_section(
		'zerif_aboutus_main_section',
		array(
			'title'    => __( 'Main content', 'zerif-lite' ),
			'priority' => 2,
			'panel'    => 'panel_about',
		)
	);

	/* About us show/hide */
	$wp_customize->add_setting(
		'zerif_aboutus_show',
		array(
			'sanitize_callback' => 'zerif_sanitize_checkbox',
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		'zerif_aboutus_show',
		array(
			'type'     => 'checkbox',
			'label'    => __( 'Hide about us section?', 'zerif-lite' ),
			'section'  => 'zerif_aboutus_main_section',
			'priority' => 1,
		)
	);

	/* Title */
	if ( current_user_can( 'edit_theme_options' ) ) {
		$wp_customize->add_setting(
			'zerif_aboutus_title',
			array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'default'           => __( 'About', 'zerif-lite' ),
				'transport'         => 'postMessage',
			)
		);
	} else {
		$wp_customize->add_setting(
			'zerif_aboutus_title',
			array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'transport'         => 'postMessage',
			)
		);
	}

	$wp_customize->add_control(
		'zerif_aboutus_title',
		array(
			'label'    => __( 'Title', 'zerif-lite' ),
			'section'  => 'zerif_aboutus_main_section',
			'priority' => 2,
		)
	);

	/* Subtitle */
	if ( current_user_can( 'edit_theme_options' ) ) {
		$wp_customize->add_setting(
			'zerif_aboutus_subtitle',
			array(
				'sanitize_callback' => 'zerif_sanitize_input',
				/* translators: About us section */
				'default'           => sprintf( __( 'Change this subtitle in %s', 'zerif-lite' ), __( 'About us section', 'zerif-lite' ) ),
				'transport'         => 'postMessage',
			)
		);
	} else {
		$wp_customize->add_setting(
			'zerif_aboutus_subtitle',
			array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'transport'         => 'postMessage',
			)
		);
	}

	$wp_customize->add_control(
		'zerif_aboutus_subtitle',
		array(
			'label'    => __( 'Subtitle', 'zerif-lite' ),
			'section'  => 'zerif_aboutus_main_section',
			'priority' => 3,
		)
	);

	/* Big left title */
	$zerif_aboutus_biglefttitle_default = '';
	if ( defined( 'THEMEISLE_COMPANION_VERSION' ) ) {
		$zerif_aboutus_biglefttitle_default = 'Everything you see here is responsive and mobile-friendly.';
	}

	if ( current_user_can( 'edit_theme_options' ) ) {
		$wp_customize->add_setting(
			'zerif_aboutus_biglefttitle',
			array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'default'           => $zerif_aboutus_biglefttitle_default,
				'transport'         => 'postMessage',
			)
		);
	} else {
		$wp_customize->add_setting(
			'zerif_aboutus_biglefttitle',
			array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'transport'         => 'postMessage',
			)
		);
	}

	$wp_customize->add_control(
		'zerif_aboutus_biglefttitle',
		array(
			'label'    => __( 'Big left side title', 'zerif-lite' ),
			'section'  => 'zerif_aboutus_main_section',
			'priority' => 4,
		)
	);

	/* Text */

	/* translators: About us section */
	$zerif_aboutus_text_default = sprintf( __( 'Change this text in %s', 'zerif-lite' ), __( 'About us section', 'zerif-lite' ) );
	if ( defined( 'THEMEISLE_COMPANION_VERSION' ) ) {
		$zerif_aboutus_text_default = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla nec massa enim. Aliquam viverra at est ullamcorper sollicitudin. Proin a leo sit amet nunc malesuada imperdiet pharetra ut eros.<br><br> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla nec massa enim. Aliquam viverra at est ullamcorper sollicitudin. Proin a leo sit amet nunc malesuada imperdiet pharetra ut eros. <br><br>Mauris vel nunc at ipsum fermentum pellentesque quis ut massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Maecenas non adipiscing massa. Sed ut fringilla sapien. Cras sollicitudin, lectus sed tincidunt cursus, magna lectus vehicula augue, a lobortis dui orci et est.';
	}

	if ( current_user_can( 'edit_theme_options' ) ) {
		$wp_customize->add_setting(
			'zerif_aboutus_text',
			array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'default'           => $zerif_aboutus_text_default,
				'transport'         => 'postMessage',
			)
		);
	} else {
		$wp_customize->add_setting(
			'zerif_aboutus_text',
			array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'transport'         => 'postMessage',
			)
		);
	}

	$wp_customize->add_control(
		'zerif_aboutus_text',
		array(
			'type'     => 'textarea',
			'label'    => __( 'Text', 'zerif-lite' ),
			'section'  => 'zerif_aboutus_main_section',
			'priority' => 5,
		)
	);

	$wp_customize->add_section(
		'zerif_aboutus_feat1_section',
		array(
			'title'    => __( 'Feature no#1', 'zerif-lite' ),
			'priority' => 3,
			'panel'    => 'panel_about',
		)
	);

	/* Feature no#1 */
	if ( current_user_can( 'edit_theme_options' ) ) {
		$wp_customize->add_setting(
			'zerif_aboutus_feature1_title',
			array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'default'           => __( 'Edit skill', 'zerif-lite' ),
				'transport'         => 'postMessage',
			)
		);
	} else {
		$wp_customize->add_setting(
			'zerif_aboutus_feature1_title',
			array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'transport'         => 'postMessage',
			)
		);
	}

	$wp_customize->add_control(
		'zerif_aboutus_feature1_title',
		array(
			'label'    => __( 'Feature no1 title', 'zerif-lite' ),
			'section'  => 'zerif_aboutus_feat1_section',
			'priority' => 6,
		)
	);

	$wp_customize->add_setting(
		'zerif_aboutus_feature1_text',
		array(
			'sanitize_callback' => 'zerif_sanitize_input',
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		'zerif_aboutus_feature1_text',
		array(
			'label'    => __( 'Feature no1 text', 'zerif-lite' ),
			'section'  => 'zerif_aboutus_feat1_section',
			'priority' => 7,
		)
	);

	$wp_customize->add_setting(
		'zerif_aboutus_feature1_nr',
		array(
			'sanitize_callback' => 'absint',
			'default'           => '80',
		)
	);

	$wp_customize->add_control(
		new Zerif_Customizer_Number_Control(
			$wp_customize,
			'zerif_aboutus_feature1_nr',
			array(
				'type'     => 'number',
				'label'    => __( 'Feature no1 percentage', 'zerif-lite' ),
				'section'  => 'zerif_aboutus_feat1_section',
				'priority' => 8,
			)
		)
	);

	$wp_customize->add_section(
		'zerif_aboutus_feat2_section',
		array(
			'title'    => __( 'Feature no#2', 'zerif-lite' ),
			'priority' => 4,
			'panel'    => 'panel_about',
		)
	);

	/* Feature no#2 */
	if ( current_user_can( 'edit_theme_options' ) ) {
		$wp_customize->add_setting(
			'zerif_aboutus_feature2_title',
			array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'default'           => __( 'Edit skill', 'zerif-lite' ),
				'transport'         => 'postMessage',
			)
		);
	} else {
		$wp_customize->add_setting(
			'zerif_aboutus_feature2_title',
			array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'transport'         => 'postMessage',
			)
		);
	}

	$wp_customize->add_control(
		'zerif_aboutus_feature2_title',
		array(
			'label'    => __( 'Feature no2 title', 'zerif-lite' ),
			'section'  => 'zerif_aboutus_feat2_section',
			'priority' => 9,
		)
	);

	$wp_customize->add_setting(
		'zerif_aboutus_feature2_text',
		array(
			'sanitize_callback' => 'zerif_sanitize_input',
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		'zerif_aboutus_feature2_text',
		array(
			'label'    => __( 'Feature no2 text', 'zerif-lite' ),
			'section'  => 'zerif_aboutus_feat2_section',
			'priority' => 10,
		)
	);

	$wp_customize->add_setting(
		'zerif_aboutus_feature2_nr',
		array(
			'sanitize_callback' => 'absint',
			'default'           => '91',
		)
	);

	$wp_customize->add_control(
		new Zerif_Customizer_Number_Control(
			$wp_customize,
			'zerif_aboutus_feature2_nr',
			array(
				'type'     => 'number',
				'label'    => __( 'Feature no2 percentage', 'zerif-lite' ),
				'section'  => 'zerif_aboutus_feat2_section',
				'priority' => 11,
			)
		)
	);

	$wp_customize->add_section(
		'zerif_aboutus_feat3_section',
		array(
			'title'    => __( 'Feature no#3', 'zerif-lite' ),
			'priority' => 5,
			'panel'    => 'panel_about',
		)
	);

	/* Feature no#3 */
	if ( current_user_can( 'edit_theme_options' ) ) {
		$wp_customize->add_setting(
			'zerif_aboutus_feature3_title',
			array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'default'           => __( 'Edit skill', 'zerif-lite' ),
				'transport'         => 'postMessage',
			)
		);
	} else {
		$wp_customize->add_setting(
			'zerif_aboutus_feature3_title',
			array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'transport'         => 'postMessage',
			)
		);
	}

	$wp_customize->add_control(
		'zerif_aboutus_feature3_title',
		array(
			'label'    => __( 'Feature no3 title', 'zerif-lite' ),
			'section'  => 'zerif_aboutus_feat3_section',
			'priority' => 12,
		)
	);

	$wp_customize->add_setting(
		'zerif_aboutus_feature3_text',
		array(
			'sanitize_callback' => 'zerif_sanitize_input',
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		'zerif_aboutus_feature3_text',
		array(
			'label'    => __( 'Feature no3 text', 'zerif-lite' ),
			'section'  => 'zerif_aboutus_feat3_section',
			'priority' => 13,
		)
	);

	$wp_customize->add_setting(
		'zerif_aboutus_feature3_nr',
		array(
			'sanitize_callback' => 'absint',
			'default'           => '88',
		)
	);

	$wp_customize->add_control(
		new Zerif_Customizer_Number_Control(
			$wp_customize,
			'zerif_aboutus_feature3_nr',
			array(
				'type'     => 'number',
				'label'    => __( 'Feature no3 percentage', 'zerif-lite' ),
				'section'  => 'zerif_aboutus_feat3_section',
				'priority' => 14,
			)
		)
	);

	$wp_customize->add_section(
		'zerif_aboutus_feat4_section',
		array(
			'title'    => __( 'Feature no#4', 'zerif-lite' ),
			'priority' => 6,
			'panel'    => 'panel_about',
		)
	);

	/* Feature no#4 */
	if ( current_user_can( 'edit_theme_options' ) ) {
		$wp_customize->add_setting(
			'zerif_aboutus_feature4_title',
			array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'default'           => __( 'Edit skill', 'zerif-lite' ),
				'transport'         => 'postMessage',
			)
		);
	} else {
		$wp_customize->add_setting(
			'zerif_aboutus_feature4_title',
			array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'transport'         => 'postMessage',
			)
		);
	}
	$wp_customize->add_control(
		'zerif_aboutus_feature4_title',
		array(
			'label'    => __( 'Feature no4 title', 'zerif-lite' ),
			'section'  => 'zerif_aboutus_feat4_section',
			'priority' => 15,
		)
	);

	$wp_customize->add_setting(
		'zerif_aboutus_feature4_text',
		array(
			'sanitize_callback' => 'zerif_sanitize_input',
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		'zerif_aboutus_feature4_text',
		array(
			'label'    => __( 'Feature no4 text', 'zerif-lite' ),
			'section'  => 'zerif_aboutus_feat4_section',
			'priority' => 16,
		)
	);

	$wp_customize->add_setting(
		'zerif_aboutus_feature4_nr',
		array(
			'sanitize_callback' => 'absint',
			'default'           => '95',
		)
	);

	$wp_customize->add_control(
		new Zerif_Customizer_Number_Control(
			$wp_customize,
			'zerif_aboutus_feature4_nr',
			array(
				'type'     => 'number',
				'label'    => __( 'Feature no4 percentage', 'zerif-lite' ),
				'section'  => 'zerif_aboutus_feat4_section',
				'priority' => 17,
			)
		)
	);

	/* ABOUT US CLIENTS TITLE */

	$wp_customize->add_section(
		'zerif_aboutus_clients_title_section',
		array(
			'title'    => __( 'Clients area title', 'zerif-lite' ),
			'priority' => 7,
			'panel'    => 'panel_about',
		)
	);

	$wp_customize->add_setting(
		'zerif_aboutus_clients_title_text',
		array(
			'sanitize_callback' => 'zerif_sanitize_input',
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		'zerif_aboutus_clients_title_text',
		array(
			'label'    => __( 'Title', 'zerif-lite' ),
			'section'  => 'zerif_aboutus_clients_title_section',
			'priority' => -1,
		)
	);

	$aboutus_section = $wp_customize->get_section( 'sidebar-widgets-sidebar-aboutus' );
	if ( ! empty( $aboutus_section ) ) {
		if ( zerif_check_if_wp_greater_than_4_7() ) {
			$aboutus_section->panel = 'zerif_frontpage_sections_panel';
		} else {
			$aboutus_section->panel = 'panel_about';
		}
		$aboutus_section->title    = __( 'Clients area', 'zerif-lite' );
		$aboutus_section->priority = 10;
		$wp_customize->get_control( 'zerif_aboutus_clients_title_text' )->section = 'sidebar-widgets-sidebar-aboutus';

	}

	/**
	 * OUR TEAM SECTION
	 */

	$wp_customize->add_section(
		'zerif_ourteam_section',
		array(
			'title'    => __( 'Content', 'zerif-lite' ),
			'priority' => 33,
		)
	);

	if ( zerif_check_if_wp_greater_than_4_7() ) {

		$wp_customize->get_section( 'zerif_ourteam_section' )->panel = 'zerif_frontpage_sections_panel';

	}

	/* Our team show/hide */
	$wp_customize->add_setting(
		'zerif_ourteam_show',
		array(
			'sanitize_callback' => 'zerif_sanitize_checkbox',
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		'zerif_ourteam_show',
		array(
			'type'     => 'checkbox',
			'label'    => __( 'Hide our team section?', 'zerif-lite' ),
			'section'  => 'zerif_ourteam_section',
			'priority' => -3,
		)
	);

	/* Our team title */
	if ( current_user_can( 'edit_theme_options' ) ) {
		$wp_customize->add_setting(
			'zerif_ourteam_title',
			array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'default'           => __( 'YOUR TEAM', 'zerif-lite' ),
				'transport'         => 'postMessage',
			)
		);
	} else {
		$wp_customize->add_setting(
			'zerif_ourteam_title',
			array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'transport'         => 'postMessage',
			)
		);
	}

	$wp_customize->add_control(
		'zerif_ourteam_title',
		array(
			'label'    => __( 'Title', 'zerif-lite' ),
			'section'  => 'zerif_ourteam_section',
			'priority' => -2,
		)
	);

	/* Our team subtitle */
	if ( current_user_can( 'edit_theme_options' ) ) {
		$wp_customize->add_setting(
			'zerif_ourteam_subtitle',
			array(
				'sanitize_callback' => 'zerif_sanitize_input',
				/* translators: Our team section */
				'default'           => sprintf( __( 'Change this subtitle in %s', 'zerif-lite' ), __( 'Our team section', 'zerif-lite' ) ),
				'transport'         => 'postMessage',
			)
		);
	} else {
		$wp_customize->add_setting(
			'zerif_ourteam_subtitle',
			array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'transport'         => 'postMessage',
			)
		);
	}

	$wp_customize->add_control(
		'zerif_ourteam_subtitle',
		array(
			'label'    => __( 'Our team subtitle', 'zerif-lite' ),
			'section'  => 'zerif_ourteam_section',
			'priority' => -1,
		)
	);

	$our_team_section = $wp_customize->get_section( 'sidebar-widgets-sidebar-ourteam' );
	if ( ! empty( $our_team_section ) ) {

		if ( zerif_check_if_wp_greater_than_4_7() ) {
			$our_team_section->panel = 'zerif_frontpage_sections_panel';
		} else {
			$our_team_section->panel = '';
		}
		$our_team_section->title                                        = __( 'Our team section', 'zerif-lite' );
		$our_team_section->priority                                     = 33;
		$wp_customize->get_control( 'zerif_ourteam_show' )->section     = 'sidebar-widgets-sidebar-ourteam';
		$wp_customize->get_control( 'zerif_ourteam_title' )->section    = 'sidebar-widgets-sidebar-ourteam';
		$wp_customize->get_control( 'zerif_ourteam_subtitle' )->section = 'sidebar-widgets-sidebar-ourteam';
	}

	/**
	 * TESTIMONIALS SECTION
	 */

	$wp_customize->add_section(
		'zerif_testimonials_section',
		array(
			'title'    => __( 'Testimonials section', 'zerif-lite' ),
			'priority' => 34,
		)
	);

	if ( zerif_check_if_wp_greater_than_4_7() ) {
		$wp_customize->add_section( 'zerif_testimonials_section' )->panel = 'zerif_frontpage_sections_panel';
	}

	/* testimonials show/hide */
	$wp_customize->add_setting(
		'zerif_testimonials_show',
		array(
			'sanitize_callback' => 'zerif_sanitize_checkbox',
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		'zerif_testimonials_show',
		array(
			'type'     => 'checkbox',
			'label'    => __( 'Hide testimonials section?', 'zerif-lite' ),
			'section'  => 'zerif_testimonials_section',
			'priority' => -4,
		)
	);

	/* Testimonial pinterest layout */
	$wp_customize->add_setting(
		'zerif_testimonials_pinterest_style',
		array(
			'sanitize_callback' => 'zerif_sanitize_checkbox',
		)
	);

	$wp_customize->add_control(
		'zerif_testimonials_pinterest_style',
		array(
			'type'     => 'checkbox',
			'label'    => __( 'Use pinterest layout?', 'zerif-lite' ),
			'section'  => 'zerif_testimonials_section',
			'priority' => -3,
		)
	);

	/* Testimonials title */
	if ( current_user_can( 'edit_theme_options' ) ) {
		$wp_customize->add_setting(
			'zerif_testimonials_title',
			array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'default'           => __( 'Testimonials', 'zerif-lite' ),
				'transport'         => 'postMessage',
			)
		);
	} else {
		$wp_customize->add_setting(
			'zerif_testimonials_title',
			array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'transport'         => 'postMessage',
			)
		);
	}

	$wp_customize->add_control(
		'zerif_testimonials_title',
		array(
			'label'    => __( 'Title', 'zerif-lite' ),
			'section'  => 'zerif_testimonials_section',
			'priority' => -2,
		)
	);

	/* Testimonials subtitle */
	$wp_customize->add_setting(
		'zerif_testimonials_subtitle',
		array(
			'sanitize_callback' => 'zerif_sanitize_input',
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		'zerif_testimonials_subtitle',
		array(
			'label'    => __( 'Testimonials subtitle', 'zerif-lite' ),
			'section'  => 'zerif_testimonials_section',
			'priority' => -1,
		)
	);

	$testimonials_section = $wp_customize->get_section( 'sidebar-widgets-sidebar-testimonials' );
	if ( ! empty( $our_team_section ) ) {

		if ( zerif_check_if_wp_greater_than_4_7() ) {
			$testimonials_section->panel = 'zerif_frontpage_sections_panel';
		} else {
			$testimonials_section->panel = '';
		}
		$testimonials_section->title                                     = __( 'Testimonials section', 'zerif-lite' );
		$testimonials_section->priority                                  = 34;
		$wp_customize->get_control( 'zerif_testimonials_show' )->section = 'sidebar-widgets-sidebar-testimonials';
		$wp_customize->get_control( 'zerif_testimonials_pinterest_style' )->section = 'sidebar-widgets-sidebar-testimonials';
		$wp_customize->get_control( 'zerif_testimonials_title' )->section           = 'sidebar-widgets-sidebar-testimonials';
		$wp_customize->get_control( 'zerif_testimonials_subtitle' )->section        = 'sidebar-widgets-sidebar-testimonials';
	}

	/**
	 * RIBBONS
	 */

	if ( zerif_check_if_wp_greater_than_4_7() ) {

		$panel_ribbons = new Zerif_WP_Customize_Panel(
			$wp_customize,
			'panel_ribbons',
			array(
				'priority' => 37,
				'title'    => __( 'Ribbon sections', 'zerif-lite' ),
				'panel'    => 'zerif_frontpage_sections_panel',
			)
		);

		$wp_customize->add_panel( $panel_ribbons );

	} else {

		$wp_customize->add_panel(
			'panel_ribbons',
			array(
				'priority' => 37,
				'title'    => __( 'Ribbon sections', 'zerif-lite' ),
			)
		);

	}

	$wp_customize->add_section(
		'zerif_bottomribbon_section',
		array(
			'title'    => __( 'BottomButton Ribbon', 'zerif-lite' ),
			'priority' => 1,
			'panel'    => 'panel_ribbons',
		)
	);

	/* RIBBON SECTION WITH BOTTOM BUTTON */

	$zerif_bottomribbon_text_default        = '';
	$zerif_bottomribbon_buttonlabel_default = '';
	$zerif_bottomribbon_buttonlink_default  = '';

	/* For new users, add default values for the Ribbon section controls */
	if ( ! zerif_check_if_old_version_of_theme() && current_user_can( 'edit_theme_options' ) ) {
		$zerif_bottomribbon_text_default        = __( 'Change this text in BottomButton Ribbon', 'zerif-lite' );
		$zerif_bottomribbon_buttonlabel_default = __( 'Get in touch', 'zerif-lite' );
		$zerif_bottomribbon_buttonlink_default  = esc_url( admin_url( 'customize.php?autofocus&#91;control&#93;=zerif_bottomribbon_buttonlink' ) );
	}

	/* Text */
	$wp_customize->add_setting(
		'zerif_bottomribbon_text',
		array(
			'sanitize_callback' => 'zerif_sanitize_input',
			'default'           => $zerif_bottomribbon_text_default,
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		'zerif_bottomribbon_text',
		array(
			'type'     => 'textarea',
			'label'    => __( 'Text', 'zerif-lite' ),
			'section'  => 'zerif_bottomribbon_section',
			'priority' => 1,
		)
	);

	/* Button label */
	$wp_customize->add_setting(
		'zerif_bottomribbon_buttonlabel',
		array(
			'sanitize_callback' => 'zerif_sanitize_input',
			'default'           => $zerif_bottomribbon_buttonlabel_default,
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		'zerif_bottomribbon_buttonlabel',
		array(
			'label'    => __( 'Button label', 'zerif-lite' ),
			'section'  => 'zerif_bottomribbon_section',
			'priority' => 2,
		)
	);

	/* Button link */
	$wp_customize->add_setting(
		'zerif_bottomribbon_buttonlink',
		array(
			'sanitize_callback' => 'esc_url_raw',
			'default'           => $zerif_bottomribbon_buttonlink_default,
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		'zerif_bottomribbon_buttonlink',
		array(
			'label'    => __( 'Button link', 'zerif-lite' ),
			'section'  => 'zerif_bottomribbon_section',
			'priority' => 3,
		)
	);

	/* RIBBON SECTION WITH BUTTON IN THE RIGHT SIDE */

	$zerif_ribbonright_text_default        = '';
	$zerif_ribbonright_buttonlabel_default = '';
	$zerif_ribbonright_buttonlink_default  = '';

	/* For new users, add default values for the Ribbon section controls */
	if ( ! zerif_check_if_old_version_of_theme() && current_user_can( 'edit_theme_options' ) ) {
		$zerif_ribbonright_text_default        = __( 'Change this text in RightButton Ribbon', 'zerif-lite' );
		$zerif_ribbonright_buttonlabel_default = __( 'Get in touch', 'zerif-lite' );
		$zerif_ribbonright_buttonlink_default  = esc_url( admin_url( 'customize.php?autofocus&#91;control&#93;=zerif_ribbonright_buttonlink' ) );
	}

	$wp_customize->add_section(
		'zerif_rightribbon_section',
		array(
			'title'    => __( 'RightButton Ribbon', 'zerif-lite' ),
			'priority' => 2,
			'panel'    => 'panel_ribbons',
		)
	);

	/* Text */
	$wp_customize->add_setting(
		'zerif_ribbonright_text',
		array(
			'sanitize_callback' => 'zerif_sanitize_input',
			'default'           => $zerif_ribbonright_text_default,
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		'zerif_ribbonright_text',
		array(
			'type'     => 'textarea',
			'label'    => __( 'Text', 'zerif-lite' ),
			'section'  => 'zerif_rightribbon_section',
			'priority' => 4,
		)
	);

	/* Button label */
	$wp_customize->add_setting(
		'zerif_ribbonright_buttonlabel',
		array(
			'sanitize_callback' => 'zerif_sanitize_input',
			'default'           => $zerif_ribbonright_buttonlabel_default,
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		'zerif_ribbonright_buttonlabel',
		array(
			'label'    => __( 'Button label', 'zerif-lite' ),
			'section'  => 'zerif_rightribbon_section',
			'priority' => 5,
		)
	);

	/* Button link */
	$wp_customize->add_setting(
		'zerif_ribbonright_buttonlink',
		array(
			'sanitize_callback' => 'esc_url_raw',
			'default'           => $zerif_ribbonright_buttonlink_default,
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		'zerif_ribbonright_buttonlink',
		array(
			'label'    => __( 'Button link', 'zerif-lite' ),
			'section'  => 'zerif_rightribbon_section',
			'priority' => 6,
		)
	);

	/**
	 * LATEST NEWS SECTION
	 */

	$wp_customize->add_section(
		'zerif_latestnews_section',
		array(
			'title'    => __( 'Latest News section', 'zerif-lite' ),
			'priority' => 35,
		)
	);

	if ( zerif_check_if_wp_greater_than_4_7() ) {
		$wp_customize->get_section( 'zerif_latestnews_section' )->panel = 'zerif_frontpage_sections_panel';
	}

	/* Latest news show/hide */
	$wp_customize->add_setting(
		'zerif_latestnews_show',
		array(
			'sanitize_callback' => 'zerif_sanitize_checkbox',
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		'zerif_latestnews_show',
		array(
			'type'     => 'checkbox',
			'label'    => __( 'Hide latest news section?', 'zerif-lite' ),
			'section'  => 'zerif_latestnews_section',
			'priority' => 1,
		)
	);

	/* Latest news title */
	$wp_customize->add_setting(
		'zerif_latestnews_title',
		array(
			'sanitize_callback' => 'zerif_sanitize_input',
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		'zerif_latestnews_title',
		array(
			'label'    => __( 'Latest News title', 'zerif-lite' ),
			'section'  => 'zerif_latestnews_section',
			'priority' => 2,
		)
	);

	/* Latest news subtitle */
	$wp_customize->add_setting(
		'zerif_latestnews_subtitle',
		array(
			'sanitize_callback' => 'zerif_sanitize_input',
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		'zerif_latestnews_subtitle',
		array(
			'label'    => __( 'Latest News subtitle', 'zerif-lite' ),
			'section'  => 'zerif_latestnews_section',
			'priority' => 3,
		)
	);

	/**
	 *  CONTACT US SECTION
	 */

	$zerif_contact_us_section_description = '';

	/* If Pirate Forms is installed */
	if ( defined( 'PIRATE_FORMS_VERSION' ) ) :
		$zerif_contact_us_section_description = __( 'For more advanced settings please go to Settings -> Pirate Forms', 'zerif-lite' );
	endif;

	$wp_customize->add_section(
		'zerif_contactus_section',
		array(
			'title'       => __( 'Contact us section', 'zerif-lite' ),
			'description' => $zerif_contact_us_section_description,
			'priority'    => 36,
		)
	);

	if ( zerif_check_if_wp_greater_than_4_7() ) {
		$wp_customize->get_section( 'zerif_contactus_section' )->panel = 'zerif_frontpage_sections_panel';
	}

	/* Contact us show/hide */
	$wp_customize->add_setting(
		'zerif_contactus_show',
		array(
			'sanitize_callback' => 'zerif_sanitize_checkbox',
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		'zerif_contactus_show',
		array(
			'type'     => 'checkbox',
			'label'    => __( 'Hide contact us section?', 'zerif-lite' ),
			'section'  => 'zerif_contactus_section',
			'priority' => 1,
		)
	);

	/* Contactus title */
	$default = current_user_can( 'edit_theme_options' ) ? __( 'Get in touch', 'zerif-lite' ) : '';
	$wp_customize->add_setting(
		'zerif_contactus_title',
		array(
			'sanitize_callback' => 'zerif_sanitize_input',
			'transport'         => 'postMessage',
			'default'           => $default,
		)
	);
	$wp_customize->add_control(
		'zerif_contactus_title',
		array(
			'label'    => __( 'Contact us section title', 'zerif-lite' ),
			'section'  => 'zerif_contactus_section',
			'priority' => 2,
		)
	);

	/* Contactus subtitle */

	/* translators: PirateForms plugin */
	$default = ! defined( 'PIRATE_FORMS_VERSION' ) ? sprintf( __( 'You need to install %s to create a contact form.', 'zerif-lite' ), 'Pirate Forms' ) : '';
	$wp_customize->add_setting(
		'zerif_contactus_subtitle',
		array(
			'sanitize_callback' => 'zerif_sanitize_input',
			'default'           => $default,
			'transport'         => 'postMessage',
		)
	);
	$wp_customize->add_control(
		'zerif_contactus_subtitle',
		array(
			'label'    => __( 'Contact us section subtitle', 'zerif-lite' ),
			'section'  => 'zerif_contactus_section',
			'priority' => 3,
		)
	);

	/* zerif_contact_shortcode */
	$wp_customize->add_setting(
		'zerif_contactus_shortcode',
		array(
			'sanitize_callback' => 'zerif_sanitize_input',
		)
	);
	$wp_customize->add_control(
		'zerif_contactus_shortcode',
		array(
			'label'       => __( 'Contact Form Shortcode', 'zerif-lite' ),
			'description' => __( 'Or add the shortcode of your choice here.', 'zerif-lite' ),
			'section'     => 'zerif_contactus_section',
			'priority'    => 2,
		)
	);

	/* Use the contact options from the theme, only if Pirate Forms is not installed */
	if ( ! defined( 'PIRATE_FORMS_VERSION' ) ) {
		/* Contactus email */
		$wp_customize->add_setting(
			'zerif_contactus_email',
			array(
				'sanitize_callback' => 'sanitize_email',
			)
		);
		$wp_customize->add_control(
			'zerif_contactus_email',
			array(
				'label'    => __( 'Email address', 'zerif-lite' ),
				'section'  => 'zerif_contactus_section',
				'priority' => 4,
			)
		);
		/* Contactus button label */
		$wp_customize->add_setting(
			'zerif_contactus_button_label',
			array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'default'           => __( 'Send Message', 'zerif-lite' ),
				'transport'         => 'postMessage',
			)
		);

		$wp_customize->add_control(
			'zerif_contactus_button_label',
			array(
				'label'    => __( 'Button label', 'zerif-lite' ),
				'section'  => 'zerif_contactus_section',
				'priority' => 5,
			)
		);

		/* Recaptcha */
		$wp_customize->add_setting(
			'zerif_contactus_recaptcha_show',
			array(
				'sanitize_callback' => 'zerif_sanitize_checkbox',
			)
		);

		$wp_customize->add_control(
			'zerif_contactus_recaptcha_show',
			array(
				'type'     => 'checkbox',
				'label'    => __( 'Hide reCaptcha?', 'zerif-lite' ),
				'section'  => 'zerif_contactus_section',
				'priority' => 6,
			)
		);

		/* Site key */
		$attribut_new_tab = ( isset( $zerif_accessibility ) && ( $zerif_accessibility != 1 ) ? ' target="_blank"' : '' );
		$wp_customize->add_setting(
			'zerif_contactus_sitekey',
			array(
				'sanitize_callback' => 'sanitize_text_field',
			)
		);

		$wp_customize->add_control(
			'zerif_contactus_sitekey',
			array(
				'label'       => __( 'Site key', 'zerif-lite' ),
				'description' => '<a' . $attribut_new_tab . ' href="https://www.google.com/recaptcha/admin#list">' . __( 'Create an account here', 'zerif-lite' ) . '</a> to get the Site key and the Secret key for the reCaptcha.',
				'section'     => 'zerif_contactus_section',
				'priority'    => 7,
			)
		);

		/* Secret key */
		$wp_customize->add_setting(
			'zerif_contactus_secretkey',
			array(
				'sanitize_callback' => 'sanitize_text_field',
			)
		);

		$wp_customize->add_control(
			'zerif_contactus_secretkey',
			array(
				'label'    => __( 'Secret key', 'zerif-lite' ),
				'section'  => 'zerif_contactus_section',
				'priority' => 8,
			)
		);

	}

	/**
	 * FOOTER OPTIONS
	 */

	$wp_customize->add_panel(
		'panel_footer',
		array(
			'priority'   => 90,
			'capability' => 'edit_theme_options',
			'title'      => __( 'Footer options', 'zerif-lite' ),
		)
	);

	$wp_customize->add_section(
		'zerif_general_socials_section',
		array(
			'title'    => __( 'Footer Social Icons', 'zerif-lite' ),
			'priority' => 31,
			'panel'    => 'panel_footer',
		)
	);

	/* Facebook */
	$wp_customize->add_setting(
		'zerif_socials_facebook',
		array(
			'sanitize_callback' => 'esc_url_raw',
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		'zerif_socials_facebook',
		array(
			'label'    => __( 'Facebook link', 'zerif-lite' ),
			'section'  => 'zerif_general_socials_section',
			'priority' => 4,
		)
	);

	/* Twitter */
	$wp_customize->add_setting(
		'zerif_socials_twitter',
		array(
			'sanitize_callback' => 'esc_url_raw',
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		'zerif_socials_twitter',
		array(
			'label'    => __( 'Twitter link', 'zerif-lite' ),
			'section'  => 'zerif_general_socials_section',
			'priority' => 5,
		)
	);

	/* Linkedin */
	$wp_customize->add_setting(
		'zerif_socials_linkedin',
		array(
			'sanitize_callback' => 'esc_url_raw',
			'transport'         => 'postMessage',
		)
	);
	$wp_customize->add_control(
		'zerif_socials_linkedin',
		array(
			'label'    => __( 'Linkedin link', 'zerif-lite' ),
			'section'  => 'zerif_general_socials_section',
			'priority' => 6,
		)
	);

	/* Behance */
	$wp_customize->add_setting(
		'zerif_socials_behance',
		array(
			'sanitize_callback' => 'esc_url_raw',
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		'zerif_socials_behance',
		array(
			'label'    => __( 'Behance link', 'zerif-lite' ),
			'section'  => 'zerif_general_socials_section',
			'priority' => 7,
		)
	);

	/* Dribbble */
	$wp_customize->add_setting(
		'zerif_socials_dribbble',
		array(
			'sanitize_callback' => 'esc_url_raw',
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		'zerif_socials_dribbble',
		array(
			'label'    => __( 'Dribbble link', 'zerif-lite' ),
			'section'  => 'zerif_general_socials_section',
			'priority' => 8,
		)
	);

	/* Instagram */
	$wp_customize->add_setting(
		'zerif_socials_instagram',
		array(
			'sanitize_callback' => 'esc_url_raw',
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		'zerif_socials_instagram',
		array(
			'label'    => __( 'Instagram link', 'zerif-lite' ),
			'section'  => 'zerif_general_socials_section',
			'priority' => 9,
		)
	);

	$wp_customize->add_section(
		'zerif_general_footer_section',
		array(
			'title'    => __( 'Footer Content', 'zerif-lite' ),
			'priority' => 32,
			'panel'    => 'panel_footer',
		)
	);

	/* COPYRIGHT */
	$wp_customize->add_setting(
		'zerif_copyright',
		array(
			'sanitize_callback' => 'zerif_sanitize_input',
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		'zerif_copyright',
		array(
			'label'    => __( 'Footer Copyright', 'zerif-lite' ),
			'section'  => 'zerif_general_footer_section',
			'priority' => 5,
		)
	);

	/* Address - ICON */
	if ( current_user_can( 'edit_theme_options' ) ) {
		$wp_customize->add_setting(
			'zerif_address_icon',
			array(
				'sanitize_callback' => 'esc_url_raw',
				'default'           => get_template_directory_uri() . '/images/map25-redish.png',
				'transport'         => 'postMessage',
			)
		);
	} else {
		$wp_customize->add_setting(
			'zerif_address_icon',
			array(
				'sanitize_callback' => 'esc_url_raw',
				'transport'         => 'postMessage',
			)
		);
	}

	$wp_customize->add_control(
		new WP_Customize_Image_Control(
			$wp_customize,
			'zerif_address_icon',
			array(
				'label'    => __( 'Address section - icon', 'zerif-lite' ),
				'section'  => 'zerif_general_footer_section',
				'priority' => 9,
			)
		)
	);

	/* Address */
	if ( current_user_can( 'edit_theme_options' ) ) {
		$wp_customize->add_setting(
			'zerif_address',
			array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'default'           => __( 'Company address', 'zerif-lite' ),
				'transport'         => 'postMessage',
			)
		);
	} else {
		$wp_customize->add_setting(
			'zerif_address',
			array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'transport'         => 'postMessage',
			)
		);
	}

	$wp_customize->add_control(
		'zerif_address',
		array(
			'label'    => __( 'Address', 'zerif-lite' ),
			'type'     => 'textarea',
			'section'  => 'zerif_general_footer_section',
			'priority' => 10,
		)
	);

	/* Email - ICON */
	if ( current_user_can( 'edit_theme_options' ) ) {
		$wp_customize->add_setting(
			'zerif_email_icon',
			array(
				'sanitize_callback' => 'esc_url_raw',
				'default'           => get_template_directory_uri() . '/images/envelope4-green.png',
				'transport'         => 'postMessage',
			)
		);
	} else {
		$wp_customize->add_setting(
			'zerif_email_icon',
			array(
				'sanitize_callback' => 'esc_url_raw',
				'transport'         => 'postMessage',
			)
		);
	}

	$wp_customize->add_control(
		new WP_Customize_Image_Control(
			$wp_customize,
			'zerif_email_icon',
			array(
				'label'    => __( 'Email section - icon', 'zerif-lite' ),
				'section'  => 'zerif_general_footer_section',
				'priority' => 11,
			)
		)
	);

	/* Email */
	if ( current_user_can( 'edit_theme_options' ) ) {
		$wp_customize->add_setting(
			'zerif_email',
			array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'default'           => __( 'youremail@site.com', 'zerif-lite' ),
				'transport'         => 'postMessage',
			)
		);
	} else {
		$wp_customize->add_setting(
			'zerif_email',
			array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'transport'         => 'postMessage',
			)
		);
	}

	$wp_customize->add_control(
		'zerif_email',
		array(
			'label'    => __( 'Email', 'zerif-lite' ),
			'type'     => 'textarea',
			'section'  => 'zerif_general_footer_section',
			'priority' => 12,
		)
	);

	/* Phone number - ICON */
	if ( current_user_can( 'edit_theme_options' ) ) {
		$wp_customize->add_setting(
			'zerif_phone_icon',
			array(
				'sanitize_callback' => 'esc_url_raw',
				'default'           => get_template_directory_uri() . '/images/telephone65-blue.png',
				'transport'         => 'postMessage',
			)
		);
	} else {
		$wp_customize->add_setting(
			'zerif_phone_icon',
			array(
				'sanitize_callback' => 'esc_url_raw',
				'transport'         => 'postMessage',
			)
		);
	}

	$wp_customize->add_control(
		new WP_Customize_Image_Control(
			$wp_customize,
			'zerif_phone_icon',
			array(
				'label'    => __( 'Phone number section - icon', 'zerif-lite' ),
				'section'  => 'zerif_general_footer_section',
				'priority' => 13,
			)
		)
	);

	/* Phone number */
	if ( current_user_can( 'edit_theme_options' ) ) {
		$wp_customize->add_setting(
			'zerif_phone',
			array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'default'           => __( '0 332 548 954', 'zerif-lite' ),
				'transport'         => 'postMessage',
			)
		);
	} else {
		$wp_customize->add_setting(
			'zerif_phone',
			array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'transport'         => 'postMessage',
			)
		);
	}

	$wp_customize->add_control(
		'zerif_phone',
		array(
			'label'    => __( 'Phone number', 'zerif-lite' ),
			'type'     => 'textarea',
			'section'  => 'zerif_general_footer_section',
			'priority' => 14,
		)
	);

}
add_action( 'customize_register', 'zerif_customize_register' );

/**
 * Binds JS handlers to make Theme Customizer preview reload changes asynchronously.
 */
function zerif_customize_preview_js() {
	wp_enqueue_script( 'zerif_customizer', get_template_directory_uri() . '/js/customizer.js', array( 'customize-preview' ), '20130508', true );
}
add_action( 'customize_preview_init', 'zerif_customize_preview_js' );

/**
 * Function to sanitize inputs
 */
function zerif_sanitize_input( $input ) {
	return wp_kses_post( force_balance_tags( $input ) );
}

/**
 * Function to sanitize checkboxes
 */
function zerif_sanitize_checkbox( $input ) {
	return ( isset( $input ) && true == $input ? true : false );
}

/**
 * Enqueue scripts for customizer
 */
function zerif_late_registers() {

	wp_enqueue_script( 'zerif_customizer_script', get_template_directory_uri() . '/js/zerif_customizer.js', array( 'jquery' ), '1.0.8', true );

	wp_localize_script(
		'zerif_customizer_script',
		'zerifLiteCustomizerObject',
		array(

			'tooltip_safefont'      => sprintf( '%1$s <br><br> %2$s', __( 'Zerif Lite main font is Montserrat, which only supports the Latin script.', 'zerif-lite' ), __( 'If you are using other scripts like Cyrillic or Greek , you need to check this box to enable the safe fonts for better compatibility.', 'zerif-lite' ) ),
			'tooltip_accessibility' => sprintf( '%1$s <br><br> %2$s', __( 'Web accessibility means that people with disabilities can use the Web. More specifically, Web accessibility means that people with disabilities can perceive, understand, navigate, and interact with the Web, and that they can contribute to the Web.', 'zerif-lite' ), __( 'Web accessibility also benefits others, including older people with changing abilities due to aging.', 'zerif-lite' ) ),
			'tooltip_smoothscroll'  => sprintf( '%1$s <br><br> %2$s', __( 'Smooth scrolling can be very useful if you read a lot of long pages. Normally, when you press Page Down, the view jumps directly down one page.', 'zerif-lite' ), __( 'With smooth scrolling, it slides down smoothly, so you can see how much it scrolls. This makes it easier to resume reading from where you were before.', 'zerif-lite' ) ),
			'tooltip_preloader'     => sprintf( '%1$s <br><br> %2$s', __( 'The preloader is the circular progress element that first appears on the site. When the loader finishes its progress animation, the whole page elements are revealed.', 'zerif-lite' ), __( 'The preloader is used as a creative way to make waiting a bit less boring for the visitor.', 'zerif-lite' ) ),
		)
	);

	wp_enqueue_script( 'zerif_multiple_panels_script', get_template_directory_uri() . '/js/zerif_multiple_panels.js', array( 'zerif_customizer_script' ), '1.0.8', true );
}
add_action( 'customize_controls_enqueue_scripts', 'zerif_late_registers', 99 );

/**
 * Custom logo callback function.
 *
 * @return string
 */
function zerif_custom_logo_callback() {
	$logo              = '';
	$zerif_custom_logo = get_theme_mod( 'custom_logo' );

	if ( ! empty( $zerif_custom_logo ) ) {
		$custom_logo = wp_get_attachment_image_url( get_theme_mod( 'custom_logo' ), 'full' );
		$logo        = '<a href="' . esc_url( home_url( '/' ) ) . '"><img src="' . esc_url( $custom_logo ) . '"></a>';
	} else {
		$logo = '<div class="site-title-tagline-wrapper"><h1 class="site-title"><a href="' . esc_url( home_url( '/' ) ) . '">' . get_bloginfo( 'name' ) . '</a></h1><p class="site-description">' . get_bloginfo( 'description' ) . '</p></div>';
	}

	return $logo;
}

/**
 * Function to check if WordPress is greater or equal to 4.7
 */
function zerif_check_if_wp_greater_than_4_7() {

	$wp_version_nr = get_bloginfo( 'version' );

	if ( function_exists( 'version_compare' ) ) {
		if ( version_compare( $wp_version_nr, '4.7', '>=' ) ) {
			return true;
		}
	}

	return false;

}
home/xbodynamge/dev/wp-content/themes/zerif-lite/inc/customizer.php000064400000232666151136171140021551 0ustar00<?php
/**
 * Zerif Theme Customizer
 *
 * @package zerif
 */

/**
 * Add postMessage support for site title and description for the Theme Customizer.
 *
 * @param WP_Customize_Manager $wp_customize Theme Customizer object.
 */
function zerif_customize_register( $wp_customize ) {

	/**
	 * Class Zerif_Customizer_Number_Control
	 */
	class Zerif_Customizer_Number_Control extends WP_Customize_Control {

		/**
		 * Type of control
		 *
		 * @var $type string Type of control
		 */
		public $type = 'number';

		/**
		 * Render the control
		 */
		public function render_content() {
			?>
			<label>
				<span class="customize-control-title"><?php echo esc_html( $this->label ); ?></span>
				<input type="number" <?php $this->link(); ?> value="<?php echo intval( $this->value() ); ?>"/>
			</label>
			<?php
		}
	}

	/* Custom panel type - used for multiple levels of panels */
	if ( class_exists( 'WP_Customize_Panel' ) ) {

		/**
		 * Class Zerif_WP_Customize_Panel
		 */
		class Zerif_WP_Customize_Panel extends WP_Customize_Panel {

			/**
			 * Panel
			 *
			 * @var $panel string Panel
			 */
			public $panel;

			/**
			 * Panel type
			 *
			 * @var $type string Panel type.
			 */
			public $type = 'zerif_panel';

			/**
			 * Form the json
			 */
			public function json() {

				$array                   = wp_array_slice_assoc(
					(array) $this,
					array(
						'id',
						'description',
						'priority',
						'type',
						'panel',
					)
				);
				$array['title']          = html_entity_decode( $this->title, ENT_QUOTES, get_bloginfo( 'charset' ) );
				$array['content']        = $this->get_content();
				$array['active']         = $this->active();
				$array['instanceNumber'] = $this->instance_number;

				return $array;

			}

		}

	}

	$wp_customize->register_panel_type( 'Zerif_WP_Customize_Panel' );

	/**
	 * Upsells
	 */
	require_once( trailingslashit( get_template_directory() ) . 'inc/class/class-customizer-theme-info-control/class-customizer-theme-info-control.php' );

	$wp_customize->add_section(
		'zerif_theme_info_main_section',
		array(
			'title'    => __( 'View PRO version', 'zerif-lite' ),
			'priority' => 1,
		)
	);
	$wp_customize->add_setting(
		'zerif_theme_info_main_control',
		array(
			'sanitize_callback' => 'esc_html',
		)
	);

	/*
	 * View Pro Version Section Control
	 */
	$wp_customize->add_control(
		new Zerif_Control_Upsell_Theme_Info(
			$wp_customize,
			'zerif_theme_info_main_control',
			array(
				'section'     => 'zerif_theme_info_main_section',
				'priority'    => 100,
				'options'     => array(
					esc_html__( 'Section Reordering', 'zerif-lite' ),
					esc_html__( 'Background video', 'zerif-lite' ),
					esc_html__( 'Portfolio', 'zerif-lite' ),
					esc_html__( 'Extra colors', 'zerif-lite' ),
					esc_html__( 'Packages section', 'zerif-lite' ),
					esc_html__( 'Subscribe section', 'zerif-lite' ),
					esc_html__( 'Google map section', 'zerif-lite' ),
					esc_html__( 'Support', 'zerif-lite' ),
				),
				'button_url'  => esc_url( 'https://themeisle.com/themes/zerif-pro-one-page-wordpress-theme/upgrade/' ),
				'button_text' => esc_html__( 'View PRO version', 'zerif-lite' ),
			)
		)
	);

	/**
	 * Extra Colors Notice
	 */
	$wp_customize->add_setting(
		'zerif_theme_info_colors_section_control',
		array(
			'sanitize_callback' => 'esc_html',
		)
	);
	$wp_customize->add_control(
		new Zerif_Control_Upsell_Theme_Info(
			$wp_customize,
			'zerif_theme_info_colors_section_control',
			array(
				'section'            => 'colors',
				'priority'           => 500,
				'options'            => array(
					esc_html__( 'Extra colors', 'zerif-lite' ),
				),
				'explained_features' => array(
					esc_html__( 'Get full color schemes support for your site.', 'zerif-lite' ),
				),
				'button_url'         => esc_url( 'https://themeisle.com/themes/zerif-pro-one-page-wordpress-theme/upgrade/' ),
				'button_text'        => esc_html__( 'View PRO version', 'zerif-lite' ),
			)
		)
	);

	/**
	 * Background video notice
	 */
	$wp_customize->add_setting(
		'zerif_theme_info_header_section_control',
		array(
			'sanitize_callback' => 'esc_html',
		)
	);
	$wp_customize->add_control(
		new Zerif_Control_Upsell_Theme_Info(
			$wp_customize,
			'zerif_theme_info_header_section_control',
			array(
				'section'     => 'background_image',
				'priority'    => 500,
				'options'     => array(
					esc_html__( 'Background video', 'zerif-lite' ),
				),
				'button_url'  => esc_url( 'https://themeisle.com/themes/zerif-pro-one-page-wordpress-theme/upgrade/' ),
				'button_text' => esc_html__( 'View PRO version', 'zerif-lite' ),
			)
		)
	);

	$wp_customize->get_setting( 'blogname' )->transport         = 'postMessage';
	$wp_customize->get_setting( 'blogdescription' )->transport  = 'postMessage';
	$wp_customize->get_setting( 'header_textcolor' )->transport = 'postMessage';
	$wp_customize->get_setting( 'custom_logo' )->transport      = 'postMessage';

	if ( isset( $wp_customize->selective_refresh ) ) {
		$wp_customize->selective_refresh->add_partial(
			'custom_logo',
			array(
				'selector'        => '.navbar-brand',
				'settings'        => 'custom_logo',
				'render_callback' => 'zerif_custom_logo_callback',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'zerif_bigtitle_title_2',
			array(
				'selector'        => '.home-header-wrap .intro-text',
				'settings'        => 'zerif_bigtitle_title_2',
				'render_callback' => 'zerif_bigtitle_title_2_render_callback',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'zerif_bigtitle_redbutton_label_2',
			array(
				'selector'        => '.buttons a.red-btn',
				'settings'        => 'zerif_bigtitle_redbutton_label_2',
				'render_callback' => 'zerif_bigtitle_redbutton_label_2_render_callback',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'zerif_bigtitle_greenbutton_label',
			array(
				'selector'        => '.buttons a.green-btn',
				'settings'        => 'zerif_bigtitle_greenbutton_label',
				'render_callback' => 'zerif_bigtitle_greenbutton_label_render_callback',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'zerif_ourfocus_title_2',
			array(
				'selector'        => '#focus .section-header h2',
				'settings'        => 'zerif_ourfocus_title_2',
				'render_callback' => 'zerif_ourfocus_title_2_render_callback',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'zerif_ourfocus_subtitle',
			array(
				'selector'        => '#focus .section-header div.section-legend',
				'settings'        => 'zerif_ourfocus_subtitle',
				'render_callback' => 'zerif_ourfocus_subtitle_render_callback',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'zerif_ourteam_title',
			array(
				'selector'        => '#team .section-header h2',
				'settings'        => 'zerif_ourteam_title',
				'render_callback' => 'zerif_ourteam_title_render_callback',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'zerif_ourteam_subtitle',
			array(
				'selector'        => '#team .section-header div.section-legend',
				'settings'        => 'zerif_ourteam_subtitle',
				'render_callback' => 'zerif_ourteam_subtitle_render_callback',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'zerif_aboutus_title',
			array(
				'selector'        => '#aboutus .section-header h2',
				'settings'        => 'zerif_aboutus_title',
				'render_callback' => 'zerif_aboutus_title_render_callback',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'zerif_aboutus_subtitle',
			array(
				'selector'        => '#aboutus .section-header div.section-legend',
				'settings'        => 'zerif_aboutus_subtitle',
				'render_callback' => 'zerif_aboutus_subtitle_render_callback',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'zerif_aboutus_biglefttitle',
			array(
				'selector'        => '#aboutus .big-intro',
				'settings'        => 'zerif_aboutus_biglefttitle',
				'render_callback' => 'zerif_aboutus_biglefttitle_render_callback',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'zerif_aboutus_text',
			array(
				'selector'        => '#aboutus .text_and_skills p',
				'settings'        => 'zerif_aboutus_text',
				'render_callback' => 'zerif_aboutus_text_render_callback',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'zerif_aboutus_feature1_title',
			array(
				'selector'        => '#aboutus .skill_1 label',
				'settings'        => 'zerif_aboutus_feature1_title',
				'render_callback' => 'zerif_aboutus_feature1_title_render_callback',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'zerif_aboutus_feature2_title',
			array(
				'selector'        => '#aboutus .skill_2 label',
				'settings'        => 'zerif_aboutus_feature2_title',
				'render_callback' => 'zerif_aboutus_feature2_title_render_callback',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'zerif_aboutus_feature3_title',
			array(
				'selector'        => '#aboutus .skill_3 label',
				'settings'        => 'zerif_aboutus_feature3_title',
				'render_callback' => 'zerif_aboutus_feature3_title_render_callback',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'zerif_aboutus_feature4_title',
			array(
				'selector'        => '#aboutus .skill_4 label',
				'settings'        => 'zerif_aboutus_feature4_title',
				'render_callback' => 'zerif_aboutus_feature4_title_render_callback',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'zerif_testimonials_title',
			array(
				'selector'        => '#testimonials .section-header h2',
				'settings'        => 'zerif_testimonials_title',
				'render_callback' => 'zerif_testimonials_title_render_callback',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'zerif_contactus_title',
			array(
				'selector'        => '#contact .section-header h2',
				'render_callback' => 'zerif_contactus_title_render_callback',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'zerif_contactus_subtitle',
			array(
				'selector'        => '#contact .section-legend',
				'render_callback' => 'zerif_contactus_subtitle_render_callback',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'zerif_contactus_button_label',
			array(
				'selector'        => '#contact .pirate_forms .contact_submit_wrap',
				'render_callback' => 'zerif_contactus_button_label_render_callback',
			)
		);

		$wp_customize->selective_refresh->add_partial(
			'zerif_socials_facebook',
			array(
				'selector'        => '#footer .social #facebook',
				'settings'        => 'zerif_socials_facebook',
				'render_callback' => 'zerif_socials_facebook_render_callback',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'zerif_socials_twitter',
			array(
				'selector'        => '#footer .social #twitter',
				'settings'        => 'zerif_socials_twitter',
				'render_callback' => 'zerif_socials_twitter_render_callback',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'zerif_socials_linkedin',
			array(
				'selector'        => '#footer .social #linkedin',
				'settings'        => 'zerif_socials_linkedin',
				'render_callback' => 'zerif_socials_linkedin_render_callback',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'zerif_socials_behance',
			array(
				'selector'        => '#footer .social #behance',
				'settings'        => 'zerif_socials_behance',
				'render_callback' => 'zerif_socials_behance_render_callback',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'zerif_socials_dribbble',
			array(
				'selector'        => '#footer .social #dribbble',
				'settings'        => 'zerif_socials_dribbble',
				'render_callback' => 'zerif_socials_dribbble_render_callback',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'zerif_socials_instagram',
			array(
				'selector'        => '#footer .social #instagram',
				'settings'        => 'zerif_socials_instagram',
				'render_callback' => 'zerif_socials_instagram_render_callback',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'zerif_address',
			array(
				'selector'        => '.zerif-footer-address',
				'settings'        => 'zerif_address',
				'render_callback' => 'zerif_address_render_callback',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'zerif_email',
			array(
				'selector'        => '.zerif-footer-email',
				'settings'        => 'zerif_email',
				'render_callback' => 'zerif_email_render_callback',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'zerif_phone',
			array(
				'selector'        => '.zerif-footer-phone',
				'settings'        => 'zerif_phone',
				'render_callback' => 'zerif_phone_render_callback',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'zerif_address_icon',
			array(
				'selector'        => '.company-details .icon-top.red-text',
				'settings'        => 'zerif_address_icon',
				'render_callback' => 'zerif_address_icon_render_callback',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'zerif_email_icon',
			array(
				'selector'        => '.company-details .icon-top.green-text',
				'settings'        => 'zerif_email_icon',
				'render_callback' => 'zerif_email_icon_render_callback',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'zerif_phone_icon',
			array(
				'selector'        => '.company-details .icon-top.blue-text',
				'settings'        => 'zerif_phone_icon',
				'render_callback' => 'zerif_phone_icon_render_callback',
			)
		);
	}

	/**
	 * Render callback for zerif_bigtitle_title_2
	 *
	 * @return mixed
	 */
	function zerif_bigtitle_title_2_render_callback() {
		return wp_kses_post( get_theme_mod( 'zerif_bigtitle_title_2' ) );
	}

	/**
	 * Render callback for zerif_bigtitle_redbutton_label_2
	 *
	 * @return mixed
	 */
	function zerif_bigtitle_redbutton_label_2_render_callback() {
		return wp_kses_post( get_theme_mod( 'zerif_bigtitle_redbutton_label_2' ) );
	}

	/**
	 * Render callback for zerif_bigtitle_greenbutton_label
	 *
	 * @return mixed
	 */
	function zerif_bigtitle_greenbutton_label_render_callback() {
		return wp_kses_post( get_theme_mod( 'zerif_bigtitle_greenbutton_label' ) );
	}

	/**
	 * Render callback for zerif_ourfocus_title_2
	 *
	 * @return mixed
	 */
	function zerif_ourfocus_title_2_render_callback() {
		return wp_kses_post( get_theme_mod( 'zerif_ourfocus_title_2' ) );
	}

	/**
	 * Render callback for zerif_ourfocus_subtitle
	 *
	 * @return mixed
	 */
	function zerif_ourfocus_subtitle_render_callback() {
		return wp_kses_post( get_theme_mod( 'zerif_ourfocus_subtitle' ) );
	}

	/**
	 * Render callback for zerif_ourteam_title
	 *
	 * @return mixed
	 */
	function zerif_ourteam_title_render_callback() {
		return wp_kses_post( get_theme_mod( 'zerif_ourteam_title' ) );
	}

	/**
	 * Render callback for zerif_ourteam_subtitle
	 *
	 * @return mixed
	 */
	function zerif_ourteam_subtitle_render_callback() {
		return wp_kses_post( get_theme_mod( 'zerif_ourteam_subtitle' ) );
	}

	/**
	 * Render callback for zerif_aboutus_title
	 *
	 * @return mixed
	 */
	function zerif_aboutus_title_render_callback() {
		return wp_kses_post( get_theme_mod( 'zerif_aboutus_title' ) );
	}

	/**
	 * Render callback for zerif_aboutus_subtitle
	 *
	 * @return mixed
	 */
	function zerif_aboutus_subtitle_render_callback() {
		return wp_kses_post( get_theme_mod( 'zerif_aboutus_subtitle' ) );
	}

	/**
	 * Render callback for zerif_aboutus_biglefttitle
	 *
	 * @return mixed
	 */
	function zerif_aboutus_biglefttitle_render_callback() {
		return wp_kses_post( get_theme_mod( 'zerif_aboutus_biglefttitle' ) );
	}

	/**
	 * Render callback for zerif_aboutus_text
	 *
	 * @return mixed
	 */
	function zerif_aboutus_text_render_callback() {
		return wp_kses_post( get_theme_mod( 'zerif_aboutus_text' ) );
	}

	/**
	 * Render callback for zerif_aboutus_feature1_title
	 *
	 * @return mixed
	 */
	function zerif_aboutus_feature1_title_render_callback() {
		return wp_kses_post( get_theme_mod( 'zerif_aboutus_feature1_title' ) );
	}

	/**
	 * Render callback for zerif_aboutus_feature2_title
	 *
	 * @return mixed
	 */
	function zerif_aboutus_feature2_title_render_callback() {
		return wp_kses_post( get_theme_mod( 'zerif_aboutus_feature2_title' ) );
	}

	/**
	 * Render callback for zerif_aboutus_feature3_title
	 *
	 * @return mixed
	 */
	function zerif_aboutus_feature3_title_render_callback() {
		return wp_kses_post( get_theme_mod( 'zerif_aboutus_feature3_title' ) );
	}

	/**
	 * Render callback for zerif_aboutus_feature4_title
	 *
	 * @return mixed
	 */
	function zerif_aboutus_feature4_title_render_callback() {
		return wp_kses_post( get_theme_mod( 'zerif_aboutus_feature4_title' ) );
	}

	/**
	 * Render callback for zerif_testimonials_title
	 *
	 * @return mixed
	 */
	function zerif_testimonials_title_render_callback() {
		return wp_kses_post( get_theme_mod( 'zerif_testimonials_title' ) );
	}

	/**
	 * Render callback for zerif_contactus_title
	 *
	 * @return mixed
	 */
	function zerif_contactus_title_render_callback() {
		return wp_kses_post( get_theme_mod( 'zerif_contactus_title' ) );
	}

	/**
	 * Render callback for zerif_contactus_button_label
	 */
	function zerif_contactus_button_label_render_callback() {
		?>
		<button id="pirate-forms-contact-submit" name="pirate-forms-contact-submit" class="pirate-forms-submit-button" type="submit">
			<?php echo wp_kses_post( get_theme_mod( 'zerif_contactus_button_label' ) ); ?>
		</button>
		<?php
	}

	/**
	 * Render callback for erif_contactus_subtitle
	 *
	 * @return string
	 */
	function zerif_contactus_subtitle_render_callback() {
		return wp_kses_post( get_theme_mod( 'zerif_contactus_subtitle' ) );
	}

	/**
	 * Render callback for zerif_socials_facebook
	 *
	 * @return mixed
	 */
	function zerif_socials_facebook_render_callback() {
		return '<a href="' . esc_url( get_theme_mod( 'zerif_socials_facebook' ) ) . '"><span class="sr-only">' . __( 'Facebook link', 'zerif-lite' ) . '</span> <i class="fa fa-facebook"></i></a>';
	}

	/**
	 * Render callback for zerif_socials_twitter
	 *
	 * @return mixed
	 */
	function zerif_socials_twitter_render_callback() {
		return '<a href="' . esc_url( get_theme_mod( 'zerif_socials_twitter' ) ) . '"><span class="sr-only">' . __( 'Twitter link', 'zerif-lite' ) . '</span> <i class="fa fa-twitter"></i></a>';
	}

	/**
	 * Render callback for zerif_socials_linkedin
	 *
	 * @return mixed
	 */
	function zerif_socials_linkedin_render_callback() {
		return '<a href="' . esc_url( get_theme_mod( 'zerif_socials_linkedin' ) ) . '"><span class="sr-only">' . __( 'Linkedin link', 'zerif-lite' ) . '</span> <i class="fa fa-linkedin"></i></a>';
	}

	/**
	 * Render callback for zerif_socials_behance
	 *
	 * @return mixed
	 */
	function zerif_socials_behance_render_callback() {
		return '<a href="' . esc_url( get_theme_mod( 'zerif_socials_behance' ) ) . '"><span class="sr-only">' . __( 'Behance link', 'zerif-lite' ) . '</span> <i class="fa fa-behance"></i></a>';
	}

	/**
	 * Render callback for zerif_socials_dribbble
	 *
	 * @return mixed
	 */
	function zerif_socials_dribbble_render_callback() {
		return '<a href="' . esc_url( get_theme_mod( 'zerif_socials_dribbble' ) ) . '"><span class="sr-only">' . __( 'Dribble link', 'zerif-lite' ) . '</span> <i class="fa fa-dribbble"></i></a>';
	}

	/**
	 * Render callback for zerif_socials_instagram
	 *
	 * @return mixed
	 */
	function zerif_socials_instagram_render_callback() {
		return '<a href="' . esc_url( get_theme_mod( 'zerif_socials_instagram' ) ) . '"><span class="sr-only">' . __( 'Instagram link', 'zerif-lite' ) . '</span> <i class="fa fa-instagram"></i></a>';
	}

	/**
	 * Render callback for zerif_address
	 *
	 * @return mixed
	 */
	function zerif_address_render_callback() {
		return wp_kses_post( get_theme_mod( 'zerif_address' ) );
	}

	/**
	 * Render callback for zerif_email
	 *
	 * @return mixed
	 */
	function zerif_email_render_callback() {
		return wp_kses_post( get_theme_mod( 'zerif_email' ) );
	}

	/**
	 * Render callback for zerif_phone
	 *
	 * @return mixed
	 */
	function zerif_phone_render_callback() {
		return wp_kses_post( get_theme_mod( 'zerif_phone' ) );
	}

	/**
	 * Render callback for zerif_address_icon
	 *
	 * @return mixed
	 */
	function zerif_address_icon_render_callback() {
		return '<img src="' . esc_url( get_theme_mod( 'zerif_address_icon' ) ) . '">';
	}

	/**
	 * Render callback for zerif_email_icon
	 *
	 * @return mixed
	 */
	function zerif_email_icon_render_callback() {
		return '<img src="' . esc_url( get_theme_mod( 'zerif_email_icon' ) ) . '">';
	}

	/**
	 * Render callback for zerif_phone_icon
	 *
	 * @return mixed
	 */
	function zerif_phone_icon_render_callback() {
		return '<img src="' . esc_url( get_theme_mod( 'zerif_phone_icon' ) ) . '">';
	}

	/**
	 * ADVANCED OPTIONS
	 */

	$wp_customize->add_panel(
		'zerif_advanced_options_panel',
		array(
			'title'    => esc_html__( 'Advanced options', 'zerif-lite' ),
			'priority' => 150,
		)
	);

	$wp_customize->add_section(
		'zerif_general_section',
		array(
			'title'    => __( 'General options', 'zerif-lite' ),
			'priority' => 1,
			'panel'    => 'zerif_advanced_options_panel',
		)
	);

	$wp_customize->add_setting(
		'zerif_use_safe_font',
		array(
			'sanitize_callback' => 'zerif_sanitize_checkbox',
		)
	);

	$wp_customize->add_control(
		'zerif_use_safe_font',
		array(
			'type'     => 'checkbox',
			'label'    => 'Use safe font?',
			'section'  => 'zerif_general_section',
			'priority' => 1,
		)
	);

	/* Disable preloader */
	$wp_customize->add_setting(
		'zerif_disable_preloader',
		array(
			'sanitize_callback' => 'zerif_sanitize_checkbox',
		)
	);

	$wp_customize->add_control(
		'zerif_disable_preloader',
		array(
			'type'     => 'checkbox',
			'label'    => __( 'Disable preloader?', 'zerif-lite' ),
			'section'  => 'zerif_general_section',
			'priority' => 2,
		)
	);

	/* Disable smooth scroll */
	$wp_customize->add_setting(
		'zerif_disable_smooth_scroll',
		array(
			'sanitize_callback' => 'zerif_sanitize_checkbox',
		)
	);

	$wp_customize->add_control(
		'zerif_disable_smooth_scroll',
		array(
			'type'     => 'checkbox',
			'label'    => __( 'Disable smooth scroll?', 'zerif-lite' ),
			'section'  => 'zerif_general_section',
			'priority' => 3,
		)
	);

	/* Enable accessibility */
	$wp_customize->add_setting(
		'zerif_accessibility',
		array(
			'sanitize_callback' => 'zerif_sanitize_checkbox',
		)
	);

	$wp_customize->add_control(
		'zerif_accessibility',
		array(
			'type'     => 'checkbox',
			'label'    => __( 'Enable accessibility?', 'zerif-lite' ),
			'section'  => 'zerif_general_section',
			'priority' => 4,
		)
	);

	/* Change the template to full width for page.php */
	$wp_customize->add_setting(
		'zerif_change_to_full_width',
		array(
			'sanitize_callback' => 'zerif_sanitize_checkbox',
		)
	);

	$wp_customize->add_control(
		'zerif_change_to_full_width',
		array(
			'type'     => 'checkbox',
			'label'    => 'Change the template to Full width for all the pages?',
			'section'  => 'zerif_general_section',
			'priority' => 6,
		)
	);

	/**
	 * Option to get the frontpage settings to the old default template if a static frontpage is selected
	 * Only for new users
	 */
	if ( ! zerif_check_if_old_version_of_theme() ) {
		$wp_customize->add_setting(
			'zerif_keep_old_fp_template',
			array(
				'sanitize_callback' => 'zerif_sanitize_checkbox',
			)
		);
		$wp_customize->add_control(
			'zerif_keep_old_fp_template',
			array(
				'type'     => 'checkbox',
				'label'    => esc_html__( 'Keep the old static frontpage template?', 'zerif-lite' ),
				'section'  => 'zerif_general_section',
				'priority' => 7,
			)
		);
	}

	$wp_customize->get_section( 'colors' )->panel           = 'zerif_advanced_options_panel';
	$wp_customize->get_section( 'background_image' )->panel = 'zerif_advanced_options_panel';

	if ( ! zerif_check_if_old_version_of_theme() ) {
		$wp_customize->add_section(
			'zerif_blog_header_section',
			array(
				'title' => __( 'Blog Header Options', 'zerif-lite' ),
				'panel' => 'zerif_advanced_options_panel',
			)
		);

		/* Blog Header Title */
		$wp_customize->add_setting(
			'zerif_blog_header_title',
			array(
				'default'           => esc_html__( 'Blog', 'zerif-lite' ),
				'transport'         => 'postMessage',
				'sanitize_callback' => 'esc_html',
			)
		);

		$wp_customize->add_control(
			'zerif_blog_header_title',
			array(
				'label'    => __( 'Title', 'zerif-lite' ),
				'section'  => 'zerif_blog_header_section',
				'priority' => 1,
			)
		);

		/* Blog Header Subtitle */
		$wp_customize->add_setting(
			'zerif_blog_header_subtitle',
			array(
				'default'           => esc_html__( 'Zerif supports a custom frontpage', 'zerif-lite' ),
				'transport'         => 'postMessage',
				'sanitize_callback' => 'esc_html',
			)
		);

		$wp_customize->add_control(
			'zerif_blog_header_subtitle',
			array(
				'label'    => __( 'Subtitle', 'zerif-lite' ),
				'section'  => 'zerif_blog_header_section',
				'priority' => 2,
			)
		);

		$wp_customize->selective_refresh->add_partial(
			'zerif_blog_header_title_subtitle',
			array(
				'selector'        => '.blog-header-wrap',
				'settings'        => array( 'zerif_blog_header_title', 'zerif_blog_header_subtitle' ),
				'render_callback' => 'zerif_blog_header_title_subtitle_callback',
			)
		);

		/**
		 * Callback for changing the title and subtitle on the blog
		 */
		function zerif_blog_header_title_subtitle_callback() {
			$title    = get_theme_mod( 'zerif_blog_header_title' );
			$subtitle = get_theme_mod( 'zerif_blog_header_subtitle' );
			$output   = '';
			if ( ! empty( $title ) || ! empty( $subtitle ) ) {
				$output .= '<div class="blog-header-content-wrap">';

				if ( ! empty( $title ) ) {
					$output .= '<h1 class="intro-text">' . esc_html( $title ) . '</h1>';
				}

				if ( ! empty( $subtitle ) ) {
					$output .= '<p class="blog-header-subtitle">' . esc_html( $subtitle ) . '</p>';
				}

				$output .= '</div>';
			}

			return $output;
		}
	}

	/**
	 * FRONTPAGE SECTIONS PANEL
	 */

	if ( zerif_check_if_wp_greater_than_4_7() ) {

		$zerif_frontpage_sections_panel = new Zerif_WP_Customize_Panel(
			$wp_customize,
			'zerif_frontpage_sections_panel',
			array(
				'title'    => esc_html__( 'Frontpage sections', 'zerif-lite' ),
				'priority' => 29,
			)
		);

		$wp_customize->add_panel( $zerif_frontpage_sections_panel );
	}

	/**
	 * BIG TITLE SECTION
	 */

	if ( zerif_check_if_wp_greater_than_4_7() ) {

		$panel_big_title = new Zerif_WP_Customize_Panel(
			$wp_customize,
			'panel_big_title',
			array(
				'title'    => esc_html__( 'Big title section', 'zerif-lite' ),
				'priority' => 30,
				'panel'    => 'zerif_frontpage_sections_panel',
			)
		);

		$wp_customize->add_panel( $panel_big_title );

	} else {

		$wp_customize->add_panel(
			'panel_big_title',
			array(
				'title'    => esc_html__( 'Big title section', 'zerif-lite' ),
				'priority' => 30,
			)
		);

	}

	$wp_customize->add_section(
		'zerif_bigtitle_section',
		array(
			'title'    => __( 'Main content', 'zerif-lite' ),
			'priority' => 1,
			'panel'    => 'panel_big_title',
		)
	);

	/* show/hide */
	$wp_customize->add_setting(
		'zerif_bigtitle_show',
		array(
			'sanitize_callback' => 'zerif_sanitize_checkbox',
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		'zerif_bigtitle_show',
		array(
			'type'     => 'checkbox',
			'label'    => __( 'Hide big title section?', 'zerif-lite' ),
			'section'  => 'zerif_bigtitle_section',
			'priority' => 1,
		)
	);

	/*
	 * Title
	 *
	 * define a new option with _2 to be used to differentiate between the old users and new ones
	 *
	 * get the old option's value and put it as default for the new _2 option
	 */

	$zerif_bigtitle_title_default = get_theme_mod( 'zerif_bigtitle_title' );

	if ( current_user_can( 'edit_theme_options' ) ) {
		$wp_customize->add_setting(
			'zerif_bigtitle_title_2',
			array(
				'sanitize_callback' => 'zerif_sanitize_input',
				/* translators: Big title section */
				'default'           => ! empty( $zerif_bigtitle_title_default ) ? $zerif_bigtitle_title_default : sprintf( __( 'This piece of text can be changed in %s', 'zerif-lite' ), __( 'Big title section', 'zerif-lite' ) ),
				'transport'         => 'postMessage',
			)
		);
	} else {
		$wp_customize->add_setting(
			'zerif_bigtitle_title_2',
			array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'transport'         => 'postMessage',
			)
		);
	}

	$wp_customize->add_control(
		'zerif_bigtitle_title_2',
		array(
			'label'    => __( 'Title', 'zerif-lite' ),
			'section'  => 'zerif_bigtitle_section',
			'priority' => 2,
		)
	);

	/*
	 * red button
	 *
	 * define a new option with _2 to be used to differentiate between the old users and new ones
	 *
	 * get the old option's value and put it as default for the new _2 option
	 */
	$zerif_bigtitle_redbutton_label_default = get_theme_mod( 'zerif_bigtitle_redbutton_label' );

	if ( current_user_can( 'edit_theme_options' ) ) {
		$wp_customize->add_setting(
			'zerif_bigtitle_redbutton_label_2',
			array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'default'           => ! empty( $zerif_bigtitle_redbutton_label_default ) ? $zerif_bigtitle_redbutton_label_default : __( 'Customize this button', 'zerif-lite' ),
				'transport'         => 'postMessage',
			)
		);
	} else {
		$wp_customize->add_setting(
			'zerif_bigtitle_redbutton_label_2',
			array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'transport'         => 'postMessage',
			)
		);
	}

	$wp_customize->add_control(
		'zerif_bigtitle_redbutton_label_2',
		array(
			'label'    => __( 'Red button label', 'zerif-lite' ),
			'section'  => 'zerif_bigtitle_section',
			'priority' => 3,
		)
	);

	$wp_customize->add_setting(
		'zerif_bigtitle_redbutton_url',
		array(
			'sanitize_callback' => 'esc_url_raw',
			'default'           => esc_url( home_url( '/' ) ) . '#focus',
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		'zerif_bigtitle_redbutton_url',
		array(
			'label'    => __( 'Red button link', 'zerif-lite' ),
			'section'  => 'zerif_bigtitle_section',
			'priority' => 4,
		)
	);

	/**
	 * Green button
	 */

	if ( current_user_can( 'edit_theme_options' ) ) {
		$wp_customize->add_setting(
			'zerif_bigtitle_greenbutton_label',
			array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'default'           => __( 'Customize this button', 'zerif-lite' ),
				'transport'         => 'postMessage',
			)
		);
	} else {
		$wp_customize->add_setting(
			'zerif_bigtitle_greenbutton_label',
			array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'transport'         => 'postMessage',
			)
		);
	}

	$wp_customize->add_control(
		'zerif_bigtitle_greenbutton_label',
		array(
			'label'    => __( 'Green button label', 'zerif-lite' ),
			'section'  => 'zerif_bigtitle_section',
			'priority' => 5,
		)
	);

	$wp_customize->add_setting(
		'zerif_bigtitle_greenbutton_url',
		array(
			'sanitize_callback' => 'esc_url_raw',
			'default'           => esc_url( home_url( '/' ) ) . '#focus',
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		'zerif_bigtitle_greenbutton_url',
		array(
			'label'    => __( 'Green button link', 'zerif-lite' ),
			'section'  => 'zerif_bigtitle_section',
			'priority' => 6,
		)
	);

	/**
	 * Slider shortcode
	 */

	$wp_customize->add_setting(
		'zerif_bigtitle_slider_shortcode',
		array(
			'sanitize_callback' => 'zerif_sanitize_input',
		)
	);

	$wp_customize->add_control(
		'zerif_bigtitle_slider_shortcode',
		array(
			'label'       => __( 'Slider shortcode', 'zerif-lite' ),
			'description' => __( 'You can replace the homepage slider with any plugin you like, just copy the shortcode generated and paste it here.', 'zerif-lite' ),
			'section'     => 'zerif_bigtitle_section',
			'priority'    => 7,
		)
	);

	/**
	 * PARALLAX IMAGES
	 */

	$wp_customize->add_section(
		'zerif_parallax_section',
		array(
			'title'    => __( 'Parallax effect', 'zerif-lite' ),
			'priority' => 2,
			'panel'    => 'panel_big_title',
		)
	);

	/* show/hide */
	$wp_customize->add_setting(
		'zerif_parallax_show',
		array(
			'sanitize_callback' => 'zerif_sanitize_checkbox',
		)
	);

	$wp_customize->add_control(
		'zerif_parallax_show',
		array(
			'type'     => 'checkbox',
			'label'    => __( 'Use parallax effect?', 'zerif-lite' ),
			'section'  => 'zerif_parallax_section',
			'priority' => 1,
		)
	);

	/* IMAGE 1*/
	$wp_customize->add_setting(
		'zerif_parallax_img1',
		array(
			'sanitize_callback' => 'esc_url_raw',
			'default'           => get_template_directory_uri() . '/images/background1.jpg',
		)
	);

	$wp_customize->add_control(
		new WP_Customize_Image_Control(
			$wp_customize,
			'themeslug_parallax_img1',
			array(
				'label'    => __( 'Image 1', 'zerif-lite' ),
				'section'  => 'zerif_parallax_section',
				'settings' => 'zerif_parallax_img1',
				'priority' => 1,
			)
		)
	);

	/* IMAGE 2 */
	$wp_customize->add_setting(
		'zerif_parallax_img2',
		array(
			'sanitize_callback' => 'esc_url_raw',
			'default'           => get_template_directory_uri() . '/images/background2.png',
		)
	);

	$wp_customize->add_control(
		new WP_Customize_Image_Control(
			$wp_customize,
			'themeslug_parallax_img2',
			array(
				'label'    => __( 'Image 2', 'zerif-lite' ),
				'section'  => 'zerif_parallax_section',
				'settings' => 'zerif_parallax_img2',
				'priority' => 2,
			)
		)
	);

	/**
	 * OUR FOCUS SECTION
	 */

	$wp_customize->add_section(
		'zerif_ourfocus_section',
		array(
			'title'    => __( 'Our focus section', 'zerif-lite' ),
			'priority' => 31,
		)
	);

	if ( zerif_check_if_wp_greater_than_4_7() ) {
		$wp_customize->get_section( 'zerif_ourfocus_section' )->panel = 'zerif_frontpage_sections_panel';
	}

	/* show/hide */
	$wp_customize->add_setting(
		'zerif_ourfocus_show',
		array(
			'sanitize_callback' => 'zerif_sanitize_checkbox',
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		'zerif_ourfocus_show',
		array(
			'type'     => 'checkbox',
			'label'    => __( 'Hide our focus section?', 'zerif-lite' ),
			'section'  => 'zerif_ourfocus_section',
			'priority' => - 3,
		)
	);

	/*
	 * our focus title
	 *
	 * define a new option with _2 to be used to differentiate between the old users and new ones
	 *
	 * get the old option's value and put it as default for the new _2 option
	 *
	 */

	$zerif_ourfocus_title_default = get_theme_mod( 'zerif_ourfocus_title' );

	if ( current_user_can( 'edit_theme_options' ) ) {
		$wp_customize->add_setting(
			'zerif_ourfocus_title_2',
			array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'default'           => ! empty( $zerif_ourfocus_title_default ) ? $zerif_ourfocus_title_default : __( 'FEATURES', 'zerif-lite' ),
				'transport'         => 'postMessage',
			)
		);
	} else {
		$wp_customize->add_setting(
			'zerif_ourfocus_title_2',
			array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'transport'         => 'postMessage',
			)
		);
	}
	$wp_customize->add_control(
		'zerif_ourfocus_title_2',
		array(
			'label'    => __( 'Title', 'zerif-lite' ),
			'section'  => 'zerif_ourfocus_section',
			'priority' => - 2,
		)
	);

	/* Our focus subtitle */
	if ( current_user_can( 'edit_theme_options' ) ) {
		$wp_customize->add_setting(
			'zerif_ourfocus_subtitle',
			array(
				'sanitize_callback' => 'zerif_sanitize_input',
				/* translators: Our focus section */
				'default'           => sprintf( __( 'Change this subtitle in %s', 'zerif-lite' ), __( 'Our focus section', 'zerif-lite' ) ),
				'transport'         => 'postMessage',
			)
		);
	} else {
		$wp_customize->add_setting(
			'zerif_ourfocus_subtitle',
			array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'transport'         => 'postMessage',
			)
		);
	}

	$wp_customize->add_control(
		'zerif_ourfocus_subtitle',
		array(
			'label'    => __( 'Our focus subtitle', 'zerif-lite' ),
			'section'  => 'zerif_ourfocus_section',
			'priority' => - 1,
		)
	);

	$our_focus_section = $wp_customize->get_section( 'sidebar-widgets-sidebar-ourfocus' );
	if ( ! empty( $our_focus_section ) ) {
		if ( zerif_check_if_wp_greater_than_4_7() ) {
			$our_focus_section->panel = 'zerif_frontpage_sections_panel';
		} else {
			$our_focus_section->panel = '';
		}
		$our_focus_section->title                                        = __( 'Our focus section', 'zerif-lite' );
		$our_focus_section->priority                                     = 31;
		$wp_customize->get_control( 'zerif_ourfocus_show' )->section     = 'sidebar-widgets-sidebar-ourfocus';
		$wp_customize->get_control( 'zerif_ourfocus_title_2' )->section  = 'sidebar-widgets-sidebar-ourfocus';
		$wp_customize->get_control( 'zerif_ourfocus_subtitle' )->section = 'sidebar-widgets-sidebar-ourfocus';
	}

	/**
	 * ABOUT US SECTION
	 */

	if ( zerif_check_if_wp_greater_than_4_7() ) {

		$panel_about = new Zerif_WP_Customize_Panel(
			$wp_customize,
			'panel_about',
			array(
				'priority' => 32,
				'title'    => __( 'About us section', 'zerif-lite' ),
				'panel'    => 'zerif_frontpage_sections_panel',
			)
		);

		$wp_customize->add_panel( $panel_about );

	} else {

		$wp_customize->add_panel(
			'panel_about',
			array(
				'priority' => 32,
				'title'    => __( 'About us section', 'zerif-lite' ),
			)
		);

	}

	$wp_customize->add_section(
		'zerif_aboutus_main_section',
		array(
			'title'    => __( 'Main content', 'zerif-lite' ),
			'priority' => 2,
			'panel'    => 'panel_about',
		)
	);

	/* About us show/hide */
	$wp_customize->add_setting(
		'zerif_aboutus_show',
		array(
			'sanitize_callback' => 'zerif_sanitize_checkbox',
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		'zerif_aboutus_show',
		array(
			'type'     => 'checkbox',
			'label'    => __( 'Hide about us section?', 'zerif-lite' ),
			'section'  => 'zerif_aboutus_main_section',
			'priority' => 1,
		)
	);

	/* Title */
	if ( current_user_can( 'edit_theme_options' ) ) {
		$wp_customize->add_setting(
			'zerif_aboutus_title',
			array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'default'           => __( 'About', 'zerif-lite' ),
				'transport'         => 'postMessage',
			)
		);
	} else {
		$wp_customize->add_setting(
			'zerif_aboutus_title',
			array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'transport'         => 'postMessage',
			)
		);
	}

	$wp_customize->add_control(
		'zerif_aboutus_title',
		array(
			'label'    => __( 'Title', 'zerif-lite' ),
			'section'  => 'zerif_aboutus_main_section',
			'priority' => 2,
		)
	);

	/* Subtitle */
	if ( current_user_can( 'edit_theme_options' ) ) {
		$wp_customize->add_setting(
			'zerif_aboutus_subtitle',
			array(
				'sanitize_callback' => 'zerif_sanitize_input',
				/* translators: About us section */
				'default'           => sprintf( __( 'Change this subtitle in %s', 'zerif-lite' ), __( 'About us section', 'zerif-lite' ) ),
				'transport'         => 'postMessage',
			)
		);
	} else {
		$wp_customize->add_setting(
			'zerif_aboutus_subtitle',
			array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'transport'         => 'postMessage',
			)
		);
	}

	$wp_customize->add_control(
		'zerif_aboutus_subtitle',
		array(
			'label'    => __( 'Subtitle', 'zerif-lite' ),
			'section'  => 'zerif_aboutus_main_section',
			'priority' => 3,
		)
	);

	/* Big left title */
	$zerif_aboutus_biglefttitle_default = '';
	if ( defined( 'THEMEISLE_COMPANION_VERSION' ) ) {
		$zerif_aboutus_biglefttitle_default = 'Everything you see here is responsive and mobile-friendly.';
	}

	if ( current_user_can( 'edit_theme_options' ) ) {
		$wp_customize->add_setting(
			'zerif_aboutus_biglefttitle',
			array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'default'           => $zerif_aboutus_biglefttitle_default,
				'transport'         => 'postMessage',
			)
		);
	} else {
		$wp_customize->add_setting(
			'zerif_aboutus_biglefttitle',
			array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'transport'         => 'postMessage',
			)
		);
	}

	$wp_customize->add_control(
		'zerif_aboutus_biglefttitle',
		array(
			'label'    => __( 'Big left side title', 'zerif-lite' ),
			'section'  => 'zerif_aboutus_main_section',
			'priority' => 4,
		)
	);

	/* Text */

	/* translators: About us section */
	$zerif_aboutus_text_default = sprintf( __( 'Change this text in %s', 'zerif-lite' ), __( 'About us section', 'zerif-lite' ) );
	if ( defined( 'THEMEISLE_COMPANION_VERSION' ) ) {
		$zerif_aboutus_text_default = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla nec massa enim. Aliquam viverra at est ullamcorper sollicitudin. Proin a leo sit amet nunc malesuada imperdiet pharetra ut eros.<br><br> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla nec massa enim. Aliquam viverra at est ullamcorper sollicitudin. Proin a leo sit amet nunc malesuada imperdiet pharetra ut eros. <br><br>Mauris vel nunc at ipsum fermentum pellentesque quis ut massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Maecenas non adipiscing massa. Sed ut fringilla sapien. Cras sollicitudin, lectus sed tincidunt cursus, magna lectus vehicula augue, a lobortis dui orci et est.';
	}

	if ( current_user_can( 'edit_theme_options' ) ) {
		$wp_customize->add_setting(
			'zerif_aboutus_text',
			array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'default'           => $zerif_aboutus_text_default,
				'transport'         => 'postMessage',
			)
		);
	} else {
		$wp_customize->add_setting(
			'zerif_aboutus_text',
			array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'transport'         => 'postMessage',
			)
		);
	}

	$wp_customize->add_control(
		'zerif_aboutus_text',
		array(
			'type'     => 'textarea',
			'label'    => __( 'Text', 'zerif-lite' ),
			'section'  => 'zerif_aboutus_main_section',
			'priority' => 5,
		)
	);

	$wp_customize->add_section(
		'zerif_aboutus_feat1_section',
		array(
			'title'    => __( 'Feature no#1', 'zerif-lite' ),
			'priority' => 3,
			'panel'    => 'panel_about',
		)
	);

	/* Feature no#1 */
	if ( current_user_can( 'edit_theme_options' ) ) {
		$wp_customize->add_setting(
			'zerif_aboutus_feature1_title',
			array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'default'           => __( 'Edit skill', 'zerif-lite' ),
				'transport'         => 'postMessage',
			)
		);
	} else {
		$wp_customize->add_setting(
			'zerif_aboutus_feature1_title',
			array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'transport'         => 'postMessage',
			)
		);
	}

	$wp_customize->add_control(
		'zerif_aboutus_feature1_title',
		array(
			'label'    => __( 'Feature no1 title', 'zerif-lite' ),
			'section'  => 'zerif_aboutus_feat1_section',
			'priority' => 6,
		)
	);

	$wp_customize->add_setting(
		'zerif_aboutus_feature1_text',
		array(
			'sanitize_callback' => 'zerif_sanitize_input',
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		'zerif_aboutus_feature1_text',
		array(
			'label'    => __( 'Feature no1 text', 'zerif-lite' ),
			'section'  => 'zerif_aboutus_feat1_section',
			'priority' => 7,
		)
	);

	$wp_customize->add_setting(
		'zerif_aboutus_feature1_nr',
		array(
			'sanitize_callback' => 'absint',
			'default'           => '80',
		)
	);

	$wp_customize->add_control(
		new Zerif_Customizer_Number_Control(
			$wp_customize,
			'zerif_aboutus_feature1_nr',
			array(
				'type'     => 'number',
				'label'    => __( 'Feature no1 percentage', 'zerif-lite' ),
				'section'  => 'zerif_aboutus_feat1_section',
				'priority' => 8,
			)
		)
	);

	$wp_customize->add_section(
		'zerif_aboutus_feat2_section',
		array(
			'title'    => __( 'Feature no#2', 'zerif-lite' ),
			'priority' => 4,
			'panel'    => 'panel_about',
		)
	);

	/* Feature no#2 */
	if ( current_user_can( 'edit_theme_options' ) ) {
		$wp_customize->add_setting(
			'zerif_aboutus_feature2_title',
			array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'default'           => __( 'Edit skill', 'zerif-lite' ),
				'transport'         => 'postMessage',
			)
		);
	} else {
		$wp_customize->add_setting(
			'zerif_aboutus_feature2_title',
			array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'transport'         => 'postMessage',
			)
		);
	}

	$wp_customize->add_control(
		'zerif_aboutus_feature2_title',
		array(
			'label'    => __( 'Feature no2 title', 'zerif-lite' ),
			'section'  => 'zerif_aboutus_feat2_section',
			'priority' => 9,
		)
	);

	$wp_customize->add_setting(
		'zerif_aboutus_feature2_text',
		array(
			'sanitize_callback' => 'zerif_sanitize_input',
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		'zerif_aboutus_feature2_text',
		array(
			'label'    => __( 'Feature no2 text', 'zerif-lite' ),
			'section'  => 'zerif_aboutus_feat2_section',
			'priority' => 10,
		)
	);

	$wp_customize->add_setting(
		'zerif_aboutus_feature2_nr',
		array(
			'sanitize_callback' => 'absint',
			'default'           => '91',
		)
	);

	$wp_customize->add_control(
		new Zerif_Customizer_Number_Control(
			$wp_customize,
			'zerif_aboutus_feature2_nr',
			array(
				'type'     => 'number',
				'label'    => __( 'Feature no2 percentage', 'zerif-lite' ),
				'section'  => 'zerif_aboutus_feat2_section',
				'priority' => 11,
			)
		)
	);

	$wp_customize->add_section(
		'zerif_aboutus_feat3_section',
		array(
			'title'    => __( 'Feature no#3', 'zerif-lite' ),
			'priority' => 5,
			'panel'    => 'panel_about',
		)
	);

	/* Feature no#3 */
	if ( current_user_can( 'edit_theme_options' ) ) {
		$wp_customize->add_setting(
			'zerif_aboutus_feature3_title',
			array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'default'           => __( 'Edit skill', 'zerif-lite' ),
				'transport'         => 'postMessage',
			)
		);
	} else {
		$wp_customize->add_setting(
			'zerif_aboutus_feature3_title',
			array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'transport'         => 'postMessage',
			)
		);
	}

	$wp_customize->add_control(
		'zerif_aboutus_feature3_title',
		array(
			'label'    => __( 'Feature no3 title', 'zerif-lite' ),
			'section'  => 'zerif_aboutus_feat3_section',
			'priority' => 12,
		)
	);

	$wp_customize->add_setting(
		'zerif_aboutus_feature3_text',
		array(
			'sanitize_callback' => 'zerif_sanitize_input',
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		'zerif_aboutus_feature3_text',
		array(
			'label'    => __( 'Feature no3 text', 'zerif-lite' ),
			'section'  => 'zerif_aboutus_feat3_section',
			'priority' => 13,
		)
	);

	$wp_customize->add_setting(
		'zerif_aboutus_feature3_nr',
		array(
			'sanitize_callback' => 'absint',
			'default'           => '88',
		)
	);

	$wp_customize->add_control(
		new Zerif_Customizer_Number_Control(
			$wp_customize,
			'zerif_aboutus_feature3_nr',
			array(
				'type'     => 'number',
				'label'    => __( 'Feature no3 percentage', 'zerif-lite' ),
				'section'  => 'zerif_aboutus_feat3_section',
				'priority' => 14,
			)
		)
	);

	$wp_customize->add_section(
		'zerif_aboutus_feat4_section',
		array(
			'title'    => __( 'Feature no#4', 'zerif-lite' ),
			'priority' => 6,
			'panel'    => 'panel_about',
		)
	);

	/* Feature no#4 */
	if ( current_user_can( 'edit_theme_options' ) ) {
		$wp_customize->add_setting(
			'zerif_aboutus_feature4_title',
			array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'default'           => __( 'Edit skill', 'zerif-lite' ),
				'transport'         => 'postMessage',
			)
		);
	} else {
		$wp_customize->add_setting(
			'zerif_aboutus_feature4_title',
			array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'transport'         => 'postMessage',
			)
		);
	}
	$wp_customize->add_control(
		'zerif_aboutus_feature4_title',
		array(
			'label'    => __( 'Feature no4 title', 'zerif-lite' ),
			'section'  => 'zerif_aboutus_feat4_section',
			'priority' => 15,
		)
	);

	$wp_customize->add_setting(
		'zerif_aboutus_feature4_text',
		array(
			'sanitize_callback' => 'zerif_sanitize_input',
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		'zerif_aboutus_feature4_text',
		array(
			'label'    => __( 'Feature no4 text', 'zerif-lite' ),
			'section'  => 'zerif_aboutus_feat4_section',
			'priority' => 16,
		)
	);

	$wp_customize->add_setting(
		'zerif_aboutus_feature4_nr',
		array(
			'sanitize_callback' => 'absint',
			'default'           => '95',
		)
	);

	$wp_customize->add_control(
		new Zerif_Customizer_Number_Control(
			$wp_customize,
			'zerif_aboutus_feature4_nr',
			array(
				'type'     => 'number',
				'label'    => __( 'Feature no4 percentage', 'zerif-lite' ),
				'section'  => 'zerif_aboutus_feat4_section',
				'priority' => 17,
			)
		)
	);

	/* ABOUT US CLIENTS TITLE */

	$wp_customize->add_section(
		'zerif_aboutus_clients_title_section',
		array(
			'title'    => __( 'Clients area title', 'zerif-lite' ),
			'priority' => 7,
			'panel'    => 'panel_about',
		)
	);

	$wp_customize->add_setting(
		'zerif_aboutus_clients_title_text',
		array(
			'sanitize_callback' => 'zerif_sanitize_input',
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		'zerif_aboutus_clients_title_text',
		array(
			'label'    => __( 'Title', 'zerif-lite' ),
			'section'  => 'zerif_aboutus_clients_title_section',
			'priority' => -1,
		)
	);

	$aboutus_section = $wp_customize->get_section( 'sidebar-widgets-sidebar-aboutus' );
	if ( ! empty( $aboutus_section ) ) {
		if ( zerif_check_if_wp_greater_than_4_7() ) {
			$aboutus_section->panel = 'zerif_frontpage_sections_panel';
		} else {
			$aboutus_section->panel = 'panel_about';
		}
		$aboutus_section->title    = __( 'Clients area', 'zerif-lite' );
		$aboutus_section->priority = 10;
		$wp_customize->get_control( 'zerif_aboutus_clients_title_text' )->section = 'sidebar-widgets-sidebar-aboutus';

	}

	/**
	 * OUR TEAM SECTION
	 */

	$wp_customize->add_section(
		'zerif_ourteam_section',
		array(
			'title'    => __( 'Content', 'zerif-lite' ),
			'priority' => 33,
		)
	);

	if ( zerif_check_if_wp_greater_than_4_7() ) {

		$wp_customize->get_section( 'zerif_ourteam_section' )->panel = 'zerif_frontpage_sections_panel';

	}

	/* Our team show/hide */
	$wp_customize->add_setting(
		'zerif_ourteam_show',
		array(
			'sanitize_callback' => 'zerif_sanitize_checkbox',
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		'zerif_ourteam_show',
		array(
			'type'     => 'checkbox',
			'label'    => __( 'Hide our team section?', 'zerif-lite' ),
			'section'  => 'zerif_ourteam_section',
			'priority' => -3,
		)
	);

	/* Our team title */
	if ( current_user_can( 'edit_theme_options' ) ) {
		$wp_customize->add_setting(
			'zerif_ourteam_title',
			array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'default'           => __( 'YOUR TEAM', 'zerif-lite' ),
				'transport'         => 'postMessage',
			)
		);
	} else {
		$wp_customize->add_setting(
			'zerif_ourteam_title',
			array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'transport'         => 'postMessage',
			)
		);
	}

	$wp_customize->add_control(
		'zerif_ourteam_title',
		array(
			'label'    => __( 'Title', 'zerif-lite' ),
			'section'  => 'zerif_ourteam_section',
			'priority' => -2,
		)
	);

	/* Our team subtitle */
	if ( current_user_can( 'edit_theme_options' ) ) {
		$wp_customize->add_setting(
			'zerif_ourteam_subtitle',
			array(
				'sanitize_callback' => 'zerif_sanitize_input',
				/* translators: Our team section */
				'default'           => sprintf( __( 'Change this subtitle in %s', 'zerif-lite' ), __( 'Our team section', 'zerif-lite' ) ),
				'transport'         => 'postMessage',
			)
		);
	} else {
		$wp_customize->add_setting(
			'zerif_ourteam_subtitle',
			array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'transport'         => 'postMessage',
			)
		);
	}

	$wp_customize->add_control(
		'zerif_ourteam_subtitle',
		array(
			'label'    => __( 'Our team subtitle', 'zerif-lite' ),
			'section'  => 'zerif_ourteam_section',
			'priority' => -1,
		)
	);

	$our_team_section = $wp_customize->get_section( 'sidebar-widgets-sidebar-ourteam' );
	if ( ! empty( $our_team_section ) ) {

		if ( zerif_check_if_wp_greater_than_4_7() ) {
			$our_team_section->panel = 'zerif_frontpage_sections_panel';
		} else {
			$our_team_section->panel = '';
		}
		$our_team_section->title                                        = __( 'Our team section', 'zerif-lite' );
		$our_team_section->priority                                     = 33;
		$wp_customize->get_control( 'zerif_ourteam_show' )->section     = 'sidebar-widgets-sidebar-ourteam';
		$wp_customize->get_control( 'zerif_ourteam_title' )->section    = 'sidebar-widgets-sidebar-ourteam';
		$wp_customize->get_control( 'zerif_ourteam_subtitle' )->section = 'sidebar-widgets-sidebar-ourteam';
	}

	/**
	 * TESTIMONIALS SECTION
	 */

	$wp_customize->add_section(
		'zerif_testimonials_section',
		array(
			'title'    => __( 'Testimonials section', 'zerif-lite' ),
			'priority' => 34,
		)
	);

	if ( zerif_check_if_wp_greater_than_4_7() ) {
		$wp_customize->add_section( 'zerif_testimonials_section' )->panel = 'zerif_frontpage_sections_panel';
	}

	/* testimonials show/hide */
	$wp_customize->add_setting(
		'zerif_testimonials_show',
		array(
			'sanitize_callback' => 'zerif_sanitize_checkbox',
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		'zerif_testimonials_show',
		array(
			'type'     => 'checkbox',
			'label'    => __( 'Hide testimonials section?', 'zerif-lite' ),
			'section'  => 'zerif_testimonials_section',
			'priority' => -4,
		)
	);

	/* Testimonial pinterest layout */
	$wp_customize->add_setting(
		'zerif_testimonials_pinterest_style',
		array(
			'sanitize_callback' => 'zerif_sanitize_checkbox',
		)
	);

	$wp_customize->add_control(
		'zerif_testimonials_pinterest_style',
		array(
			'type'     => 'checkbox',
			'label'    => __( 'Use pinterest layout?', 'zerif-lite' ),
			'section'  => 'zerif_testimonials_section',
			'priority' => -3,
		)
	);

	/* Testimonials title */
	if ( current_user_can( 'edit_theme_options' ) ) {
		$wp_customize->add_setting(
			'zerif_testimonials_title',
			array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'default'           => __( 'Testimonials', 'zerif-lite' ),
				'transport'         => 'postMessage',
			)
		);
	} else {
		$wp_customize->add_setting(
			'zerif_testimonials_title',
			array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'transport'         => 'postMessage',
			)
		);
	}

	$wp_customize->add_control(
		'zerif_testimonials_title',
		array(
			'label'    => __( 'Title', 'zerif-lite' ),
			'section'  => 'zerif_testimonials_section',
			'priority' => -2,
		)
	);

	/* Testimonials subtitle */
	$wp_customize->add_setting(
		'zerif_testimonials_subtitle',
		array(
			'sanitize_callback' => 'zerif_sanitize_input',
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		'zerif_testimonials_subtitle',
		array(
			'label'    => __( 'Testimonials subtitle', 'zerif-lite' ),
			'section'  => 'zerif_testimonials_section',
			'priority' => -1,
		)
	);

	$testimonials_section = $wp_customize->get_section( 'sidebar-widgets-sidebar-testimonials' );
	if ( ! empty( $our_team_section ) ) {

		if ( zerif_check_if_wp_greater_than_4_7() ) {
			$testimonials_section->panel = 'zerif_frontpage_sections_panel';
		} else {
			$testimonials_section->panel = '';
		}
		$testimonials_section->title                                     = __( 'Testimonials section', 'zerif-lite' );
		$testimonials_section->priority                                  = 34;
		$wp_customize->get_control( 'zerif_testimonials_show' )->section = 'sidebar-widgets-sidebar-testimonials';
		$wp_customize->get_control( 'zerif_testimonials_pinterest_style' )->section = 'sidebar-widgets-sidebar-testimonials';
		$wp_customize->get_control( 'zerif_testimonials_title' )->section           = 'sidebar-widgets-sidebar-testimonials';
		$wp_customize->get_control( 'zerif_testimonials_subtitle' )->section        = 'sidebar-widgets-sidebar-testimonials';
	}

	/**
	 * RIBBONS
	 */

	if ( zerif_check_if_wp_greater_than_4_7() ) {

		$panel_ribbons = new Zerif_WP_Customize_Panel(
			$wp_customize,
			'panel_ribbons',
			array(
				'priority' => 37,
				'title'    => __( 'Ribbon sections', 'zerif-lite' ),
				'panel'    => 'zerif_frontpage_sections_panel',
			)
		);

		$wp_customize->add_panel( $panel_ribbons );

	} else {

		$wp_customize->add_panel(
			'panel_ribbons',
			array(
				'priority' => 37,
				'title'    => __( 'Ribbon sections', 'zerif-lite' ),
			)
		);

	}

	$wp_customize->add_section(
		'zerif_bottomribbon_section',
		array(
			'title'    => __( 'BottomButton Ribbon', 'zerif-lite' ),
			'priority' => 1,
			'panel'    => 'panel_ribbons',
		)
	);

	/* RIBBON SECTION WITH BOTTOM BUTTON */

	$zerif_bottomribbon_text_default        = '';
	$zerif_bottomribbon_buttonlabel_default = '';
	$zerif_bottomribbon_buttonlink_default  = '';

	/* For new users, add default values for the Ribbon section controls */
	if ( ! zerif_check_if_old_version_of_theme() && current_user_can( 'edit_theme_options' ) ) {
		$zerif_bottomribbon_text_default        = __( 'Change this text in BottomButton Ribbon', 'zerif-lite' );
		$zerif_bottomribbon_buttonlabel_default = __( 'Get in touch', 'zerif-lite' );
		$zerif_bottomribbon_buttonlink_default  = esc_url( admin_url( 'customize.php?autofocus&#91;control&#93;=zerif_bottomribbon_buttonlink' ) );
	}

	/* Text */
	$wp_customize->add_setting(
		'zerif_bottomribbon_text',
		array(
			'sanitize_callback' => 'zerif_sanitize_input',
			'default'           => $zerif_bottomribbon_text_default,
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		'zerif_bottomribbon_text',
		array(
			'type'     => 'textarea',
			'label'    => __( 'Text', 'zerif-lite' ),
			'section'  => 'zerif_bottomribbon_section',
			'priority' => 1,
		)
	);

	/* Button label */
	$wp_customize->add_setting(
		'zerif_bottomribbon_buttonlabel',
		array(
			'sanitize_callback' => 'zerif_sanitize_input',
			'default'           => $zerif_bottomribbon_buttonlabel_default,
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		'zerif_bottomribbon_buttonlabel',
		array(
			'label'    => __( 'Button label', 'zerif-lite' ),
			'section'  => 'zerif_bottomribbon_section',
			'priority' => 2,
		)
	);

	/* Button link */
	$wp_customize->add_setting(
		'zerif_bottomribbon_buttonlink',
		array(
			'sanitize_callback' => 'esc_url_raw',
			'default'           => $zerif_bottomribbon_buttonlink_default,
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		'zerif_bottomribbon_buttonlink',
		array(
			'label'    => __( 'Button link', 'zerif-lite' ),
			'section'  => 'zerif_bottomribbon_section',
			'priority' => 3,
		)
	);

	/* RIBBON SECTION WITH BUTTON IN THE RIGHT SIDE */

	$zerif_ribbonright_text_default        = '';
	$zerif_ribbonright_buttonlabel_default = '';
	$zerif_ribbonright_buttonlink_default  = '';

	/* For new users, add default values for the Ribbon section controls */
	if ( ! zerif_check_if_old_version_of_theme() && current_user_can( 'edit_theme_options' ) ) {
		$zerif_ribbonright_text_default        = __( 'Change this text in RightButton Ribbon', 'zerif-lite' );
		$zerif_ribbonright_buttonlabel_default = __( 'Get in touch', 'zerif-lite' );
		$zerif_ribbonright_buttonlink_default  = esc_url( admin_url( 'customize.php?autofocus&#91;control&#93;=zerif_ribbonright_buttonlink' ) );
	}

	$wp_customize->add_section(
		'zerif_rightribbon_section',
		array(
			'title'    => __( 'RightButton Ribbon', 'zerif-lite' ),
			'priority' => 2,
			'panel'    => 'panel_ribbons',
		)
	);

	/* Text */
	$wp_customize->add_setting(
		'zerif_ribbonright_text',
		array(
			'sanitize_callback' => 'zerif_sanitize_input',
			'default'           => $zerif_ribbonright_text_default,
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		'zerif_ribbonright_text',
		array(
			'type'     => 'textarea',
			'label'    => __( 'Text', 'zerif-lite' ),
			'section'  => 'zerif_rightribbon_section',
			'priority' => 4,
		)
	);

	/* Button label */
	$wp_customize->add_setting(
		'zerif_ribbonright_buttonlabel',
		array(
			'sanitize_callback' => 'zerif_sanitize_input',
			'default'           => $zerif_ribbonright_buttonlabel_default,
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		'zerif_ribbonright_buttonlabel',
		array(
			'label'    => __( 'Button label', 'zerif-lite' ),
			'section'  => 'zerif_rightribbon_section',
			'priority' => 5,
		)
	);

	/* Button link */
	$wp_customize->add_setting(
		'zerif_ribbonright_buttonlink',
		array(
			'sanitize_callback' => 'esc_url_raw',
			'default'           => $zerif_ribbonright_buttonlink_default,
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		'zerif_ribbonright_buttonlink',
		array(
			'label'    => __( 'Button link', 'zerif-lite' ),
			'section'  => 'zerif_rightribbon_section',
			'priority' => 6,
		)
	);

	/**
	 * LATEST NEWS SECTION
	 */

	$wp_customize->add_section(
		'zerif_latestnews_section',
		array(
			'title'    => __( 'Latest News section', 'zerif-lite' ),
			'priority' => 35,
		)
	);

	if ( zerif_check_if_wp_greater_than_4_7() ) {
		$wp_customize->get_section( 'zerif_latestnews_section' )->panel = 'zerif_frontpage_sections_panel';
	}

	/* Latest news show/hide */
	$wp_customize->add_setting(
		'zerif_latestnews_show',
		array(
			'sanitize_callback' => 'zerif_sanitize_checkbox',
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		'zerif_latestnews_show',
		array(
			'type'     => 'checkbox',
			'label'    => __( 'Hide latest news section?', 'zerif-lite' ),
			'section'  => 'zerif_latestnews_section',
			'priority' => 1,
		)
	);

	/* Latest news title */
	$wp_customize->add_setting(
		'zerif_latestnews_title',
		array(
			'sanitize_callback' => 'zerif_sanitize_input',
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		'zerif_latestnews_title',
		array(
			'label'    => __( 'Latest News title', 'zerif-lite' ),
			'section'  => 'zerif_latestnews_section',
			'priority' => 2,
		)
	);

	/* Latest news subtitle */
	$wp_customize->add_setting(
		'zerif_latestnews_subtitle',
		array(
			'sanitize_callback' => 'zerif_sanitize_input',
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		'zerif_latestnews_subtitle',
		array(
			'label'    => __( 'Latest News subtitle', 'zerif-lite' ),
			'section'  => 'zerif_latestnews_section',
			'priority' => 3,
		)
	);

	/**
	 *  CONTACT US SECTION
	 */

	$zerif_contact_us_section_description = '';

	/* If Pirate Forms is installed */
	if ( defined( 'PIRATE_FORMS_VERSION' ) ) :
		$zerif_contact_us_section_description = __( 'For more advanced settings please go to Settings -> Pirate Forms', 'zerif-lite' );
	endif;

	$wp_customize->add_section(
		'zerif_contactus_section',
		array(
			'title'       => __( 'Contact us section', 'zerif-lite' ),
			'description' => $zerif_contact_us_section_description,
			'priority'    => 36,
		)
	);

	if ( zerif_check_if_wp_greater_than_4_7() ) {
		$wp_customize->get_section( 'zerif_contactus_section' )->panel = 'zerif_frontpage_sections_panel';
	}

	/* Contact us show/hide */
	$wp_customize->add_setting(
		'zerif_contactus_show',
		array(
			'sanitize_callback' => 'zerif_sanitize_checkbox',
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		'zerif_contactus_show',
		array(
			'type'     => 'checkbox',
			'label'    => __( 'Hide contact us section?', 'zerif-lite' ),
			'section'  => 'zerif_contactus_section',
			'priority' => 1,
		)
	);

	/* Contactus title */
	$default = current_user_can( 'edit_theme_options' ) ? __( 'Get in touch', 'zerif-lite' ) : '';
	$wp_customize->add_setting(
		'zerif_contactus_title',
		array(
			'sanitize_callback' => 'zerif_sanitize_input',
			'transport'         => 'postMessage',
			'default'           => $default,
		)
	);
	$wp_customize->add_control(
		'zerif_contactus_title',
		array(
			'label'    => __( 'Contact us section title', 'zerif-lite' ),
			'section'  => 'zerif_contactus_section',
			'priority' => 2,
		)
	);

	/* Contactus subtitle */

	/* translators: PirateForms plugin */
	$default = ! defined( 'PIRATE_FORMS_VERSION' ) ? sprintf( __( 'You need to install %s to create a contact form.', 'zerif-lite' ), 'Pirate Forms' ) : '';
	$wp_customize->add_setting(
		'zerif_contactus_subtitle',
		array(
			'sanitize_callback' => 'zerif_sanitize_input',
			'default'           => $default,
			'transport'         => 'postMessage',
		)
	);
	$wp_customize->add_control(
		'zerif_contactus_subtitle',
		array(
			'label'    => __( 'Contact us section subtitle', 'zerif-lite' ),
			'section'  => 'zerif_contactus_section',
			'priority' => 3,
		)
	);

	/* zerif_contact_shortcode */
	$wp_customize->add_setting(
		'zerif_contactus_shortcode',
		array(
			'sanitize_callback' => 'zerif_sanitize_input',
		)
	);
	$wp_customize->add_control(
		'zerif_contactus_shortcode',
		array(
			'label'       => __( 'Contact Form Shortcode', 'zerif-lite' ),
			'description' => __( 'Or add the shortcode of your choice here.', 'zerif-lite' ),
			'section'     => 'zerif_contactus_section',
			'priority'    => 2,
		)
	);

	/* Use the contact options from the theme, only if Pirate Forms is not installed */
	if ( ! defined( 'PIRATE_FORMS_VERSION' ) ) {
		/* Contactus email */
		$wp_customize->add_setting(
			'zerif_contactus_email',
			array(
				'sanitize_callback' => 'sanitize_email',
			)
		);
		$wp_customize->add_control(
			'zerif_contactus_email',
			array(
				'label'    => __( 'Email address', 'zerif-lite' ),
				'section'  => 'zerif_contactus_section',
				'priority' => 4,
			)
		);
		/* Contactus button label */
		$wp_customize->add_setting(
			'zerif_contactus_button_label',
			array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'default'           => __( 'Send Message', 'zerif-lite' ),
				'transport'         => 'postMessage',
			)
		);

		$wp_customize->add_control(
			'zerif_contactus_button_label',
			array(
				'label'    => __( 'Button label', 'zerif-lite' ),
				'section'  => 'zerif_contactus_section',
				'priority' => 5,
			)
		);

		/* Recaptcha */
		$wp_customize->add_setting(
			'zerif_contactus_recaptcha_show',
			array(
				'sanitize_callback' => 'zerif_sanitize_checkbox',
			)
		);

		$wp_customize->add_control(
			'zerif_contactus_recaptcha_show',
			array(
				'type'     => 'checkbox',
				'label'    => __( 'Hide reCaptcha?', 'zerif-lite' ),
				'section'  => 'zerif_contactus_section',
				'priority' => 6,
			)
		);

		/* Site key */
		$attribut_new_tab = ( isset( $zerif_accessibility ) && ( $zerif_accessibility != 1 ) ? ' target="_blank"' : '' );
		$wp_customize->add_setting(
			'zerif_contactus_sitekey',
			array(
				'sanitize_callback' => 'sanitize_text_field',
			)
		);

		$wp_customize->add_control(
			'zerif_contactus_sitekey',
			array(
				'label'       => __( 'Site key', 'zerif-lite' ),
				'description' => '<a' . $attribut_new_tab . ' href="https://www.google.com/recaptcha/admin#list">' . __( 'Create an account here', 'zerif-lite' ) . '</a> to get the Site key and the Secret key for the reCaptcha.',
				'section'     => 'zerif_contactus_section',
				'priority'    => 7,
			)
		);

		/* Secret key */
		$wp_customize->add_setting(
			'zerif_contactus_secretkey',
			array(
				'sanitize_callback' => 'sanitize_text_field',
			)
		);

		$wp_customize->add_control(
			'zerif_contactus_secretkey',
			array(
				'label'    => __( 'Secret key', 'zerif-lite' ),
				'section'  => 'zerif_contactus_section',
				'priority' => 8,
			)
		);

	}

	/**
	 * FOOTER OPTIONS
	 */

	$wp_customize->add_panel(
		'panel_footer',
		array(
			'priority'   => 90,
			'capability' => 'edit_theme_options',
			'title'      => __( 'Footer options', 'zerif-lite' ),
		)
	);

	$wp_customize->add_section(
		'zerif_general_socials_section',
		array(
			'title'    => __( 'Footer Social Icons', 'zerif-lite' ),
			'priority' => 31,
			'panel'    => 'panel_footer',
		)
	);

	/* Facebook */
	$wp_customize->add_setting(
		'zerif_socials_facebook',
		array(
			'sanitize_callback' => 'esc_url_raw',
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		'zerif_socials_facebook',
		array(
			'label'    => __( 'Facebook link', 'zerif-lite' ),
			'section'  => 'zerif_general_socials_section',
			'priority' => 4,
		)
	);

	/* Twitter */
	$wp_customize->add_setting(
		'zerif_socials_twitter',
		array(
			'sanitize_callback' => 'esc_url_raw',
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		'zerif_socials_twitter',
		array(
			'label'    => __( 'Twitter link', 'zerif-lite' ),
			'section'  => 'zerif_general_socials_section',
			'priority' => 5,
		)
	);

	/* Linkedin */
	$wp_customize->add_setting(
		'zerif_socials_linkedin',
		array(
			'sanitize_callback' => 'esc_url_raw',
			'transport'         => 'postMessage',
		)
	);
	$wp_customize->add_control(
		'zerif_socials_linkedin',
		array(
			'label'    => __( 'Linkedin link', 'zerif-lite' ),
			'section'  => 'zerif_general_socials_section',
			'priority' => 6,
		)
	);

	/* Behance */
	$wp_customize->add_setting(
		'zerif_socials_behance',
		array(
			'sanitize_callback' => 'esc_url_raw',
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		'zerif_socials_behance',
		array(
			'label'    => __( 'Behance link', 'zerif-lite' ),
			'section'  => 'zerif_general_socials_section',
			'priority' => 7,
		)
	);

	/* Dribbble */
	$wp_customize->add_setting(
		'zerif_socials_dribbble',
		array(
			'sanitize_callback' => 'esc_url_raw',
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		'zerif_socials_dribbble',
		array(
			'label'    => __( 'Dribbble link', 'zerif-lite' ),
			'section'  => 'zerif_general_socials_section',
			'priority' => 8,
		)
	);

	/* Instagram */
	$wp_customize->add_setting(
		'zerif_socials_instagram',
		array(
			'sanitize_callback' => 'esc_url_raw',
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		'zerif_socials_instagram',
		array(
			'label'    => __( 'Instagram link', 'zerif-lite' ),
			'section'  => 'zerif_general_socials_section',
			'priority' => 9,
		)
	);

	$wp_customize->add_section(
		'zerif_general_footer_section',
		array(
			'title'    => __( 'Footer Content', 'zerif-lite' ),
			'priority' => 32,
			'panel'    => 'panel_footer',
		)
	);

	/* COPYRIGHT */
	$wp_customize->add_setting(
		'zerif_copyright',
		array(
			'sanitize_callback' => 'zerif_sanitize_input',
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		'zerif_copyright',
		array(
			'label'    => __( 'Footer Copyright', 'zerif-lite' ),
			'section'  => 'zerif_general_footer_section',
			'priority' => 5,
		)
	);

	/* Address - ICON */
	if ( current_user_can( 'edit_theme_options' ) ) {
		$wp_customize->add_setting(
			'zerif_address_icon',
			array(
				'sanitize_callback' => 'esc_url_raw',
				'default'           => get_template_directory_uri() . '/images/map25-redish.png',
				'transport'         => 'postMessage',
			)
		);
	} else {
		$wp_customize->add_setting(
			'zerif_address_icon',
			array(
				'sanitize_callback' => 'esc_url_raw',
				'transport'         => 'postMessage',
			)
		);
	}

	$wp_customize->add_control(
		new WP_Customize_Image_Control(
			$wp_customize,
			'zerif_address_icon',
			array(
				'label'    => __( 'Address section - icon', 'zerif-lite' ),
				'section'  => 'zerif_general_footer_section',
				'priority' => 9,
			)
		)
	);

	/* Address */
	if ( current_user_can( 'edit_theme_options' ) ) {
		$wp_customize->add_setting(
			'zerif_address',
			array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'default'           => __( 'Company address', 'zerif-lite' ),
				'transport'         => 'postMessage',
			)
		);
	} else {
		$wp_customize->add_setting(
			'zerif_address',
			array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'transport'         => 'postMessage',
			)
		);
	}

	$wp_customize->add_control(
		'zerif_address',
		array(
			'label'    => __( 'Address', 'zerif-lite' ),
			'type'     => 'textarea',
			'section'  => 'zerif_general_footer_section',
			'priority' => 10,
		)
	);

	/* Email - ICON */
	if ( current_user_can( 'edit_theme_options' ) ) {
		$wp_customize->add_setting(
			'zerif_email_icon',
			array(
				'sanitize_callback' => 'esc_url_raw',
				'default'           => get_template_directory_uri() . '/images/envelope4-green.png',
				'transport'         => 'postMessage',
			)
		);
	} else {
		$wp_customize->add_setting(
			'zerif_email_icon',
			array(
				'sanitize_callback' => 'esc_url_raw',
				'transport'         => 'postMessage',
			)
		);
	}

	$wp_customize->add_control(
		new WP_Customize_Image_Control(
			$wp_customize,
			'zerif_email_icon',
			array(
				'label'    => __( 'Email section - icon', 'zerif-lite' ),
				'section'  => 'zerif_general_footer_section',
				'priority' => 11,
			)
		)
	);

	/* Email */
	if ( current_user_can( 'edit_theme_options' ) ) {
		$wp_customize->add_setting(
			'zerif_email',
			array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'default'           => __( 'youremail@site.com', 'zerif-lite' ),
				'transport'         => 'postMessage',
			)
		);
	} else {
		$wp_customize->add_setting(
			'zerif_email',
			array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'transport'         => 'postMessage',
			)
		);
	}

	$wp_customize->add_control(
		'zerif_email',
		array(
			'label'    => __( 'Email', 'zerif-lite' ),
			'type'     => 'textarea',
			'section'  => 'zerif_general_footer_section',
			'priority' => 12,
		)
	);

	/* Phone number - ICON */
	if ( current_user_can( 'edit_theme_options' ) ) {
		$wp_customize->add_setting(
			'zerif_phone_icon',
			array(
				'sanitize_callback' => 'esc_url_raw',
				'default'           => get_template_directory_uri() . '/images/telephone65-blue.png',
				'transport'         => 'postMessage',
			)
		);
	} else {
		$wp_customize->add_setting(
			'zerif_phone_icon',
			array(
				'sanitize_callback' => 'esc_url_raw',
				'transport'         => 'postMessage',
			)
		);
	}

	$wp_customize->add_control(
		new WP_Customize_Image_Control(
			$wp_customize,
			'zerif_phone_icon',
			array(
				'label'    => __( 'Phone number section - icon', 'zerif-lite' ),
				'section'  => 'zerif_general_footer_section',
				'priority' => 13,
			)
		)
	);

	/* Phone number */
	if ( current_user_can( 'edit_theme_options' ) ) {
		$wp_customize->add_setting(
			'zerif_phone',
			array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'default'           => __( '0 332 548 954', 'zerif-lite' ),
				'transport'         => 'postMessage',
			)
		);
	} else {
		$wp_customize->add_setting(
			'zerif_phone',
			array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'transport'         => 'postMessage',
			)
		);
	}

	$wp_customize->add_control(
		'zerif_phone',
		array(
			'label'    => __( 'Phone number', 'zerif-lite' ),
			'type'     => 'textarea',
			'section'  => 'zerif_general_footer_section',
			'priority' => 14,
		)
	);

}
add_action( 'customize_register', 'zerif_customize_register' );

/**
 * Binds JS handlers to make Theme Customizer preview reload changes asynchronously.
 */
function zerif_customize_preview_js() {
	wp_enqueue_script( 'zerif_customizer', get_template_directory_uri() . '/js/customizer.js', array( 'customize-preview' ), '20130508', true );
}
add_action( 'customize_preview_init', 'zerif_customize_preview_js' );

/**
 * Function to sanitize inputs
 */
function zerif_sanitize_input( $input ) {
	return wp_kses_post( force_balance_tags( $input ) );
}

/**
 * Function to sanitize checkboxes
 */
function zerif_sanitize_checkbox( $input ) {
	return ( isset( $input ) && true == $input ? true : false );
}

/**
 * Enqueue scripts for customizer
 */
function zerif_late_registers() {

	wp_enqueue_script( 'zerif_customizer_script', get_template_directory_uri() . '/js/zerif_customizer.js', array( 'jquery' ), '1.0.8', true );

	wp_localize_script(
		'zerif_customizer_script',
		'zerifLiteCustomizerObject',
		array(

			'tooltip_safefont'      => sprintf( '%1$s <br><br> %2$s', __( 'Zerif Lite main font is Montserrat, which only supports the Latin script.', 'zerif-lite' ), __( 'If you are using other scripts like Cyrillic or Greek , you need to check this box to enable the safe fonts for better compatibility.', 'zerif-lite' ) ),
			'tooltip_accessibility' => sprintf( '%1$s <br><br> %2$s', __( 'Web accessibility means that people with disabilities can use the Web. More specifically, Web accessibility means that people with disabilities can perceive, understand, navigate, and interact with the Web, and that they can contribute to the Web.', 'zerif-lite' ), __( 'Web accessibility also benefits others, including older people with changing abilities due to aging.', 'zerif-lite' ) ),
			'tooltip_smoothscroll'  => sprintf( '%1$s <br><br> %2$s', __( 'Smooth scrolling can be very useful if you read a lot of long pages. Normally, when you press Page Down, the view jumps directly down one page.', 'zerif-lite' ), __( 'With smooth scrolling, it slides down smoothly, so you can see how much it scrolls. This makes it easier to resume reading from where you were before.', 'zerif-lite' ) ),
			'tooltip_preloader'     => sprintf( '%1$s <br><br> %2$s', __( 'The preloader is the circular progress element that first appears on the site. When the loader finishes its progress animation, the whole page elements are revealed.', 'zerif-lite' ), __( 'The preloader is used as a creative way to make waiting a bit less boring for the visitor.', 'zerif-lite' ) ),
		)
	);

	wp_enqueue_script( 'zerif_multiple_panels_script', get_template_directory_uri() . '/js/zerif_multiple_panels.js', array( 'zerif_customizer_script' ), '1.0.8', true );
}
add_action( 'customize_controls_enqueue_scripts', 'zerif_late_registers', 99 );

/**
 * Custom logo callback function.
 *
 * @return string
 */
function zerif_custom_logo_callback() {
	$logo              = '';
	$zerif_custom_logo = get_theme_mod( 'custom_logo' );

	if ( ! empty( $zerif_custom_logo ) ) {
		$custom_logo = wp_get_attachment_image_url( get_theme_mod( 'custom_logo' ), 'full' );
		$logo        = '<a href="' . esc_url( home_url( '/' ) ) . '"><img src="' . esc_url( $custom_logo ) . '"></a>';
	} else {
		$logo = '<div class="site-title-tagline-wrapper"><h1 class="site-title"><a href="' . esc_url( home_url( '/' ) ) . '">' . get_bloginfo( 'name' ) . '</a></h1><p class="site-description">' . get_bloginfo( 'description' ) . '</p></div>';
	}

	return $logo;
}

/**
 * Function to check if WordPress is greater or equal to 4.7
 */
function zerif_check_if_wp_greater_than_4_7() {

	$wp_version_nr = get_bloginfo( 'version' );

	if ( function_exists( 'version_compare' ) ) {
		if ( version_compare( $wp_version_nr, '4.7', '>=' ) ) {
			return true;
		}
	}

	return false;

}
home/xbodynamge/crosstraining/wp-content/themes/custom-file-5-1751661813/inc/customizer.php000064400000173014151140600140025242 0ustar00<?php
/**
 * PopularFX Theme Customizer
 *
 * @package PopularFX
 */

add_action( 'wp_head', 'popularfx_global_styles', 4 );
function popularfx_global_styles(){
	
	global $pagelayer, $popularfx;
	
	$settings = ['body', 'p', 'button', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'color', 'max_width' => 'content_width', 'tablet_breakpoint', 'mobile_breakpoint', 'template'];
	
	foreach($settings as $k => $v){
		
		$set = get_theme_mod('popularfx_'.$v);
		
		if(empty($set)){
			continue;
		}
		
		$css[$v] = $set;
		
		$key = is_numeric($k) ? $v : $k;
		
		// We override pagelayer settings for widths and breakpoint
		if(defined('PAGELAYER_VERSION') && in_array($v, ['content_width', 'tablet_breakpoint', 'mobile_breakpoint'])){
			$pagelayer->settings[$key] = $set;
		}
		
	}
	
	$styles = '<style id="popularfx-global-styles" type="text/css">'.PHP_EOL;
	
	$pfx_template_dir = popularfx_templates_dir();
	
	// Add the max width only when we have no template
	if( empty($css['template']) && !file_exists($pfx_template_dir.'/pagelayer.conf') ){
		$styles .= '.entry-content{ max-width: '.(empty($css['content_width']) ? 1170 : esc_attr($css['content_width'])).'px; margin-left: auto !important; margin-right: auto !important;}'.PHP_EOL;
	}
	
	// Colors
	if(!empty($css['color']['background'])){
		$css['body']['background-color'] = $css['color']['background'];
	}
	
	if(!empty($css['color']['text'])){
		$css['body']['color'] = $css['color']['text'];
	}
	
	// Global CSS settings
	$css_settings = ['body', 'p', 'button', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6'];
	
	// PX suffix
	$pxs = ['font-size', 'letter-spacing', 'word-spacing'];
	
	foreach($css_settings as $k => $v){
		
		$key = is_numeric($k) ? $v : $k;
		$r = [];
			
		if(empty($css[$key])){
			continue;
		}
		
		if(!empty($css[$v]['font-family']) && strtolower($css[$v]['font-family']) == 'inherit'){
			unset($css[$v]['font-family']);
		}
	
		// Fetch body font if given
		if(!empty($css[$v]['font-family'])){
			$val = $css[$v]['font-family'];			
			$font_weight = empty($css[$v]['font-weight']) ? 400 : $css[$v]['font-weight'];
			$font_style = empty($css[$v]['font-style']) ? 'normal' : $css[$v]['font-style'];
			$font_style = in_array($font_style, ['italic', 'oblique']) ? 'i' : '';			
			$popularfx['runtime_fonts'][$val][$font_weight.$font_style] = $font_weight.$font_style;
		}
		
		foreach($css[$key] as $kk => $vv){
			
			if(empty($vv)){
				continue;
			}
			
			$r[] = $kk.':'.$vv.(in_array($kk, $pxs) ? 'px' : '');
			
		}
		
		if(empty($r)){
			continue;
		}
		
		$styles .= 'body.popularfx-body '.esc_attr($v == 'body' ? '' : $v).'{'.esc_attr(implode(';', $r))."}\n";
	}
	
	// Link Color
	if(!empty($css['color']['link'])){
		$styles .= 'body.popularfx-body a{color: '.esc_attr($css['color']['link']).'}'.PHP_EOL;
	}
	
	// Link Hover Color
	if(!empty($css['color']['link-hover'])){
		$styles .= 'body.popularfx-body a:hover{color: '.esc_attr($css['color']['link-hover']).'}'.PHP_EOL;
	}
	
	// Heading Color
	if(!empty($css['color']['heading'])){
		$styles .= 'body.popularfx-body h1,h2,h3,h4,h5,h6{color: '.esc_attr($css['color']['heading']).'}'.PHP_EOL;
	}
	
	// Header Background Color
	$header_bg_color = get_theme_mod('popularfx_header_bg_color', '#ffffff');
	$styles .= '.site-header {background-color:'.esc_attr($header_bg_color).'!important;}'.PHP_EOL;
	
	// Site Title Color
	$site_title_color = get_theme_mod('popularfx_site_title_color', '#171717');
	$styles .= '.site-title a {color:'.esc_attr($site_title_color).'!important;}'.PHP_EOL;
	
	// Site title size
	$site_title_size = get_theme_mod( 'popularfx_site_title_size', 30 );
	$styles.= '.site-title a { font-size: ' . esc_attr( $site_title_size ) .' px; }'.PHP_EOL;
	
	// Site Description Color
	$description_color = get_theme_mod('popularfx_site_tagline_color', '#171717');
	$styles .= '.site-description {color:'.esc_attr($description_color).' !important;}'.PHP_EOL;
	
	// Site Description size
	$tagline_size = get_theme_mod( 'popularfx_tagline_size', 15 );
	$styles .= '.site-description {font-size: ' . esc_attr($tagline_size) . 'px;}'.PHP_EOL;
	
	// Footer Background Color
	$footer_bg_color = get_theme_mod('popularfx_footer_bg_color', '#171717');
	$styles .= '.site-footer {background-color:'.esc_attr($footer_bg_color).'! important;}'.PHP_EOL;
	
	if ( get_header_image() ){
		$styles .= '.site-header {background-image: url("'.esc_url(get_header_image()).'");}'.PHP_EOL;
	}
	
	// Scroll to Top
	if( get_theme_mod( 'pfx_enable_scrolltop' ) ){
		$pfx_scrolltop_iconsize = get_theme_mod('pfx_scrolltop_iconsize', 15);
		$styles .= 'a#pfx-scroll-top.pfx-scroll-top { left: '. get_theme_mod('pfx_scrolltop_position', 95) . '%;  padding: '. get_theme_mod('pfx_scrolltop_padding', 10) . 'px; border: '. get_theme_mod('pfx_scrolltop_borderwidth', 2) . 'px solid; border-radius: '. get_theme_mod('pfx_scrolltop_borderradius', 15) . 'px; background-color: '. get_theme_mod('pfx_scrolltop_bg_color', '#ffffff') . ';  border-color: '. get_theme_mod('pfx_scrolltop_border_color', '#000000') . ' !important; }'.PHP_EOL;
		$styles .= 'a#pfx-scroll-top span.dashicons.dashicons-arrow-up-alt2 { width: '. $pfx_scrolltop_iconsize . 'px; height: '. $pfx_scrolltop_iconsize . 'px; font-size: '. $pfx_scrolltop_iconsize . 'px;  color: '. get_theme_mod('pfx_scrolltop_color', '#000000') . '; }'.PHP_EOL;
		$styles .= 'a#pfx-scroll-top:hover { background-color: '. get_theme_mod('pfx_scrolltop_bg_hover_color', '#000000') . ';  border-color: '. get_theme_mod('pfx_scrolltop_hover_border_color', '#000000') . ' !important; } ';
		$styles .= 'a#pfx-scroll-top:hover span.dashicons.dashicons-arrow-up-alt2 { color: '. get_theme_mod('pfx_scrolltop_hover_color', '#ffffff') . '; }'.PHP_EOL;
		$styles .= 'a#pfx-scroll-top {position: fixed;	left: 95%;	bottom: 30px; z-index: 9999999;	line-height: 1;	cursor: pointer; display:none;}';

	}
	
	$styles .= PHP_EOL.'</style>';
	
	echo $styles;
	
	//pagelayer_print($pagelayer->settings);
}

add_filter('body_class', 'popularfx_body_class', 10, 2);
function popularfx_body_class($classes, $class){
	$classes[] = 'popularfx-body';
	return $classes;
}

// Load the google fonts
add_action('wp_footer', 'popularfx_enqueue_fonts', 4);
function popularfx_enqueue_fonts(){
	
	global $pagelayer, $popularfx;
	
	if(empty($popularfx['runtime_fonts'])){
		return;
	}
	
	$url = [];
	
	foreach($popularfx['runtime_fonts'] as $font => $weights){
		$url[] = $font.':'.implode(',', $weights);
	}
	
	// If no fonts are to be set, then we dont set
	if(empty($url)){
		return false;
	}
	
	wp_register_style('popularfx-google-font', 'https://fonts.googleapis.com/css?family='.rawurlencode(implode('|', $url)), array(), POPULARFX_VERSION);
	wp_enqueue_style('popularfx-google-font');
	
}

if(class_exists('WP_Customize_Section')){
		
	class WP_Customize_No_Pagelayer_Section extends WP_Customize_Section { 
		public function render(){

			echo '<li id="accordion-section-no_pagelayer" class="accordion-section control-section control-section-install-pgl">
			<a href="'.admin_url('plugin-install.php?s=pagelayer&tab=search&type=term').'" target="_blank"><span class="dashicons dashicons-megaphone"></span>'.__('Install Pagelayer to get full access !', 'popularfx').'</a>
			</li>';
		
		}
		
	}

	class WP_Customize_PFX_Pro_Section extends WP_Customize_Section {
		public $type = 'pfxpro';

		public function render() {
		?>
		<li id="accordion-section-popularfx_pro_link" class="accordion-section control-section control-section-<?php echo esc_html( $this->type ); ?>">
				<a href="<?php echo POPULARFX_WWW_URL; ?>/pricing?from=pfx-customizer" target="_blank"><?php _e('Get More Options with PopularFX Pro', 'popularfx'); ?><span class="dashicons dashicons-arrow-right-alt2"></span></a>
			</li>
		<?php
		}
	}

}

/**
 * Add postMessage support for site title and description for the Theme Customizer.
 *
 * @param WP_Customize_Manager $wp_customize Theme Customizer object.
 */
function popularfx_customize_register( $wp_customize ) {
	
	global $popularfx;
	
	$wp_customize->get_setting( 'blogname' )->transport         = 'postMessage';
	$wp_customize->get_setting( 'blogdescription' )->transport  = 'postMessage';
	$wp_customize->get_setting( 'header_textcolor' )->transport = 'postMessage';

	if(empty($popularfx['license']['status'])){
		
		$wp_customize->add_section( new WP_Customize_PFX_Pro_Section($wp_customize, 'popularfx_pro_link', array(
			'capability' => 'edit_theme_options',
			'priority'   => 1,
			'title'      => __('Get More Options with PopularFX Pro', 'popularfx')
		) ) );
	
		// Install Pagelayer PRO if PRO user not installed already
		$wp_customize->add_setting('popularfx_pro_show', array(
			'capability' => 'edit_theme_options',
			'type'       => 'hidden',
			'autoload'   => false,
			'transport' => 'refresh',
			'sanitize_callback' => 'sanitize_text_field',
		) );

		$wp_customize->add_control('popularfx_pro_show', array(
			'label'   => __('See Pro Features', 'popularfx'),
			'description' => 'test',
			'section' => 'popularfx_pro_link',
			'type'    => 'hidden',
		) );
	
	// Suggest to install Pagelayer
	}elseif(!defined('PAGELAYER_VERSION')){
		
		$wp_customize->add_section( new WP_Customize_No_Pagelayer_Section($wp_customize, 'popularfx_no_pagelayer', array(
			'capability' => 'edit_theme_options',
			'priority'   => 1,
			'title'      => __('Install Pagelayer', 'popularfx')
		) ) );

		// Install Pagelayer if not installed already
		$wp_customize->add_setting('popularfx_pagelayer_show', array(
			'capability' => 'edit_theme_options',
			'type'       => 'hidden',
			'autoload'   => false,
			'transport' => 'refresh',
			'sanitize_callback' => 'sanitize_text_field',
		) );

		$wp_customize->add_control('popularfx_pagelayer_show', array(
			'label'   => __('Install Pagelayer', 'popularfx'),
			'description' => 'test',
			'section' => 'popularfx_no_pagelayer',
			'type'    => 'hidden',
		) );
	}
	
	// Loads for the left panel
	wp_register_style('popularfx-customizer', get_template_directory_uri().'/customizer.css', POPULARFX_VERSION);
	wp_enqueue_style('popularfx-customizer');
	
	// Loads for the left pane
	wp_register_script('popularfx-customizer-controls', get_template_directory_uri().'/js/customizer-controls.js', array(), POPULARFX_VERSION, true);
	
	// Add custom Controls
	require_once dirname( __FILE__ ) . '/customizer-controls.php';
	
	$pages = '';
	$templates = '';
	$html = '';	
	
	//---------------------------------
	// Edit Header Footer Pages option
	//---------------------------------
	
	$theme = wp_get_theme();

	$template = popularfx_get_template_name();
	
	// If there is a template in use
	if(!empty($template) && defined('PAGELAYER_VERSION')){
		
		$wp_customize->add_section( 'popularfx_edit_links', array(
			'capability' => 'edit_theme_options',
			'priority'   => 1,
			'title'      => __( 'Header, Footer, Templates, Pages', 'popularfx' )
		) );
		 
		// Get list of pages and pagelayer templates to edit
		$args = array(
			'post_type' => ['page', 'pagelayer-template'],
			'posts_per_page' => -1,
			'meta_query' => array(
				array(
					'key' => 'pagelayer_imported_content',
					'value' => $template,
					'compare' => '='
				)
			)
		);
		
		$query = new WP_Query($args);

		foreach($query->posts as $k => $v){
			$a = '<a href="'.pagelayer_livelink($v->ID).'" class="popularfx-edit-link" target="_blank">'.$v->post_title.'</a>';
			
			if($v->post_type == 'page'){
				$pages .= $a;
			}else{
				
				$temp_type = get_post_meta( $v->ID, 'pagelayer_template_type', true );
				
				if(in_array($temp_type, ['header', 'footer'])){
					$html .= $a;
				}else{
					$templates .= $a;
				}
				
			}
		}
		
		$pages .= '<p>'.__('<b>Note:</b> The Pagelayer editor will open to edit these pages', 'popularfx').'</p>';
	
		// Theme Header Footer Edit option of Pagelayer
		$wp_customize->add_setting('popularfx_hf', array(
			'capability' => 'edit_theme_options',
			'type'       => 'hidden',
			'autoload'   => false,
			'transport' => 'refresh',
			'sanitize_callback' => 'sanitize_text_field',
		) );	

		$wp_customize->add_control('popularfx_hf', array(
			'label'   => __('Edit Header / Footer', 'popularfx'),
			'description' => $html,
			'section' => 'popularfx_edit_links',
			'type'    => 'hidden',
		) );
		
		if(!empty($templates)){
		
			// Template edit options of Pagelayer
			$wp_customize->add_setting('popularfx_templates', array(
				'capability' => 'edit_theme_options',
				'type'       => 'hidden',
				'autoload'   => false,
				'transport' => 'refresh',
				'sanitize_callback' => 'sanitize_text_field',
			) );

			$wp_customize->add_control('popularfx_templates', array(
				'label'   => __('Edit Templates', 'popularfx'),
				'description' => $templates,
				'section' => 'popularfx_edit_links',
				'type'    => 'hidden',
			) );
		
		}
	
		// Theme Page edit options of Pagelayer
		$wp_customize->add_setting('popularfx_pages', array(
			'capability' => 'edit_theme_options',
			'type'       => 'hidden',
			'autoload'   => false,
			'transport' => 'refresh',
			'sanitize_callback' => 'sanitize_text_field',
		) );

		$wp_customize->add_control('popularfx_pages', array(
			'label'   => __('Edit Pages', 'popularfx'),
			'description' => $pages,
			'section' => 'popularfx_edit_links',
			'type'    => 'hidden',
		) );
	
	// No template
	}else{
		
		$wp_customize->add_section( 'popularfx_edit_links', array(
			'capability' => 'edit_theme_options',
			'priority'   => 1,
			'title'      => __( 'Header & Footer Options', 'popularfx' )
		) );
		
		$wp_customize->add_setting('popularfx_header_bg_color', array(
			'capability' => 'edit_theme_options',
			'transport' => 'refresh',
			'sanitize_callback' => 'popularfx_hex_rgba_sanitization',
		) );
		
		$wp_customize->add_control( new Popularfx_Customize_Alpha_Color_Control(
			$wp_customize, 'popularfx_header_bg_color', array(
				'section' => 'popularfx_edit_links',
				'description' => $html,
				'settings' => 'popularfx_header_bg_color',
				'label' => __('Header Background Color', 'popularfx' )
			)
		) );
		
		//Site title font size
		$wp_customize->add_setting( 'popularfx_site_title_size', array(
			'capability' => 'edit_theme_options',
			'default' => 30,
			'transport' => 'refresh',
			'sanitize_callback' => 'absint',
		) );
		
		$wp_customize->add_control( 'popularfx_site_title_size', array(
			'type' => 'number',
			'section' => 'popularfx_edit_links',
			'settings' => 'popularfx_site_title_size',
			'label' => __( 'Font size', 'popularfx' ),
			'description' => __( 'Change font size of site title', 'popularfx' ),
			'input_attrs' => array(
				'min' => 0,
				'max' => 200,
				'step' => 1,
			),
		) );
				
		$wp_customize->add_setting('popularfx_site_title_color', array(
			'capability' => 'edit_theme_options',
			'transport' => 'refresh',
			'sanitize_callback' => 'popularfx_hex_rgba_sanitization',
		) );
			
		$wp_customize->add_control( new Popularfx_Customize_Alpha_Color_Control(
			$wp_customize, 'popularfx_site_title_color', array(
				'section' => 'popularfx_edit_links',
				'settings' => 'popularfx_site_title_color',
				'label' => __('Site Title Color', 'popularfx' )
			)
		) );
		
		//Tagline font size
		$wp_customize->add_setting( 'popularfx_tagline_size', array(
			'capability' => 'edit_theme_options',
			'default' => 15,
			'transport' => 'refresh',
			'sanitize_callback' => 'absint',
		) );
		
		$wp_customize->add_control( 'popularfx_tagline_size', array(
			'type' => 'number',
			'section' => 'popularfx_edit_links',
			'settings' => 'popularfx_tagline_size',
			'label' => __( 'Font size', 'popularfx' ),
			'description' => __( 'Change font size of site tagline', 'popularfx' ),
			'input_attrs' => array(
				'min' => 0,
				'max' => 200,
				'step' => 1,
			),
		) );
		
		//Tagline font size
		$wp_customize->add_setting( 'popularfx_tagline_size', array(
			'capability' => 'edit_theme_options',
			'default' => 15,
			'transport' => 'refresh',
			'sanitize_callback' => 'absint',
		) );
		
		$wp_customize->add_control( 'popularfx_tagline_size', array(
			'type' => 'number',
			'section' => 'popularfx_edit_links',
			'settings' => 'popularfx_tagline_size',
			'label' => __( 'Font size', 'popularfx' ),
			'description' => __( 'Change font size of site description', 'popularfx' ),
			'input_attrs' => array(
				'min' => 0,
				'max' => 200,
				'step' => 1,
			),
		) );
		
		$wp_customize->add_setting('popularfx_site_tagline_color', array(
			'capability' => 'edit_theme_options',
			'transport' => 'refresh',
			'sanitize_callback' => 'popularfx_hex_rgba_sanitization',
		) );
			
		$wp_customize->add_control( new Popularfx_Customize_Alpha_Color_Control(
			$wp_customize, 'popularfx_site_tagline_color', array(
				'section' => 'popularfx_edit_links',
				'settings' => 'popularfx_site_tagline_color',
				'label' => __('Tagline Color', 'popularfx' )
			)
		) );
		
		// Footer text
		$wp_customize->add_setting( 'popularfx_footer_text', array(
			'capability' => 'edit_theme_options',
			'default' => 'Proudly powered by WordPress | PopularFX Theme',
			'transport' => 'refresh',
			'sanitize_callback' => 'sanitize_text_field',
		) );
		
		$wp_customize->add_control( 'popularfx_footer_text', array(
			'type' => 'text',
			'section' => 'popularfx_edit_links',
			'settings' => 'popularfx_footer_text',
			'label' => __( 'Footer Text / HTML', 'popularfx' ),
			'description' => __( 'Add any text to your footer. e.g. your copyright - &copy; Site Name', 'popularfx' ),
		) );
		
		$wp_customize->add_setting('popularfx_footer_bg_color', array(
			'capability' => 'edit_theme_options',
			'transport' => 'refresh',
			'sanitize_callback' => 'popularfx_hex_rgba_sanitization',
			) 
		);
		
		$wp_customize->add_control( new Popularfx_Customize_Alpha_Color_Control(
			$wp_customize, 'popularfx_footer_bg_color', array(
				'section' => 'popularfx_edit_links',
				'settings' => 'popularfx_footer_bg_color',
				'label' => __('Footer Background Color', 'popularfx' )
			)
		) );

	}
	
	$wp_customize->add_panel( 'popularfx_global', array(
			'capability' => 'edit_theme_options',
			'priority'   => 2,
			'title'      => __( 'Global', 'popularfx')
	) );
		
	$wp_customize->add_panel( 'typography', array(
		'capability' => 'edit_theme_options',
		'title' => __( 'Typography', 'popularfx'),
		'priority' => 2
	) );
	
	// Load the options
	//pagelayer_load_font_options();
	
	// Create the sections
	popularfx_customize_font('body', 'Body', $wp_customize);
	popularfx_customize_font('p', 'Paragraph', $wp_customize);
	popularfx_customize_font('h1', 'H1', $wp_customize);
	popularfx_customize_font('h2', 'H2', $wp_customize);
	popularfx_customize_font('h3', 'H3', $wp_customize);
	popularfx_customize_font('h4', 'H4', $wp_customize);
	popularfx_customize_font('h5', 'H5', $wp_customize);
	popularfx_customize_font('h6', 'H6', $wp_customize);
	//popularfx_customize_font('button', 'Button', $wp_customize);
	
	
	//---------------------------------
	// Colors
	//---------------------------------
	$wp_customize->add_section( 'popularfx_colors', array(
		'capability' => 'edit_theme_options',
		'priority'   => 2,
		'title'      => __( 'Colors','popularfx'),
		'panel'      => 'popularfx_global'
	) );
		
	// BG Color
	$wp_customize->add_setting( 'popularfx_color[background]', array(
		'capability' => 'edit_theme_options',
		'transport' => 'refresh',
		'default' => '#ffffff',
		'sanitize_callback' => 'popularfx_hex_rgba_sanitization',
		) );
	
	$wp_customize->add_control( new Popularfx_Customize_Alpha_Color_Control(
		$wp_customize, 'popularfx_color[background]', array(
			'priority' => 2,
			'section' => 'popularfx_colors',
			'settings' => 'popularfx_color[background]',
			'label' => __( 'Background Color', 'popularfx' ),
		) 
	) );
	
	// text Color
	$wp_customize->add_setting( 'popularfx_color[text]', array(
		'capability' => 'edit_theme_options',
		'transport' => 'refresh',
		'sanitize_callback' => 'popularfx_hex_rgba_sanitization',
		) );
	
	$wp_customize->add_control( new Popularfx_Customize_Alpha_Color_Control(
		$wp_customize, 'popularfx_color[text]', array(
			'priority' => 2,
			'section' => 'popularfx_colors',
			'settings' => 'popularfx_color[text]',
			'label' => __( 'Text Color', 'popularfx' ),
		) 
	) );
		
	// link Color
	$wp_customize->add_setting( 'popularfx_color[link]', array(
		'capability' => 'edit_theme_options',
		'transport' => 'refresh',
		'sanitize_callback' => 'popularfx_hex_rgba_sanitization',
		) );
	
	$wp_customize->add_control( new Popularfx_Customize_Alpha_Color_Control(
		$wp_customize, 'popularfx_color[link]', array(
			'priority' => 2,
			'section' => 'popularfx_colors',
			'settings' => 'popularfx_color[link]',
			'label' => __( 'Link Color', 'popularfx' ),
		) 
	) );
		
	// link-hover Color
	$wp_customize->add_setting( 'popularfx_color[link-hover]', array(
		'capability' => 'edit_theme_options',
		'transport' => 'refresh',
		'sanitize_callback' => 'popularfx_hex_rgba_sanitization',
		) );
	
	$wp_customize->add_control( new Popularfx_Customize_Alpha_Color_Control(
		$wp_customize, 'popularfx_color[link-hover]', array(
			'priority' => 2,
			'section' => 'popularfx_colors',
			'settings' => 'popularfx_color[link-hover]',
			'label' => __( 'Link Hover Color', 'popularfx' ),
		) 
	) );
		
	// heading Color
	$wp_customize->add_setting( 'popularfx_color[heading]', array(
		'capability' => 'edit_theme_options',
		'transport' => 'refresh',
		'sanitize_callback' => 'popularfx_hex_rgba_sanitization',
		) );
	
	$wp_customize->add_control( new Popularfx_Customize_Alpha_Color_Control(
		$wp_customize, 'popularfx_color[heading]', array(
			'priority' => 2,
			'section' => 'popularfx_colors',
			'settings' => 'popularfx_color[heading]',
			'label' => __( 'Heading Color (H1-H6)', 'popularfx' ),
		) 
	) );
	
	//---------------------------------
	// Sidebar
	//---------------------------------
	$wp_customize->add_section( 'popularfx_sidebar', array(
		'capability' => 'edit_theme_options',
		'priority'   => 2,
		'title'      => __( 'Sidebar','popularfx')
	) );
		
	// Default Sidebar
	$wp_customize->add_setting( 'popularfx_sidebar_default', array(
		'capability' => 'edit_theme_options',
		'transport' => 'refresh',
		'default' => 0,
		'sanitize_callback' => 'sanitize_text_field',
	) );
		
	$wp_customize->add_control( 'popularfx_sidebar_default', array(
		'priority' => 1,
		'type' => 'select',
		'section' => 'popularfx_sidebar',
		'settings' => 'popularfx_sidebar_default',
		'label' => __( 'Default Sidebar', 'popularfx' ),
		'description' => __( 'Default layout for the Sidebar throughout the site', 'popularfx' ),
		'choices' => array(
			'0' => __( 'No Sidebar', 'popularfx' ),
			'left' => __( 'Left Sidebar', 'popularfx' ),
			'right' => __( 'Right Sidebar', 'popularfx' ),
		),
	) );
		
	// Page Sidebar
	$wp_customize->add_setting( 'popularfx_sidebar_page', array(
		'capability' => 'edit_theme_options',
		'transport' => 'refresh',
		'default' => 'default',
		'sanitize_callback' => 'sanitize_text_field',
		) );
		
	$wp_customize->add_control( 'popularfx_sidebar_page', array(
		'type' => 'select',
		'section' => 'popularfx_sidebar',
		'settings' => 'popularfx_sidebar_page',
		'label' => __( 'Page Sidebar', 'popularfx' ),
		'choices' => array(
			'default' => __( 'Default', 'popularfx' ),
			'0' => __( 'No Sidebar', 'popularfx' ),
			'left' => __( 'Left Sidebar', 'popularfx' ),
			'right' => __( 'Right Sidebar', 'popularfx' ),
		),
	) );
		
	// Posts Sidebar
	$wp_customize->add_setting( 'popularfx_sidebar_post', array(
		'capability' => 'edit_theme_options',
		'transport' => 'refresh',
		'default' => 'right',
		'sanitize_callback' => 'sanitize_text_field',
		) );
		
	$wp_customize->add_control( 'popularfx_sidebar_post', array(
		'type' => 'select',
		'section' => 'popularfx_sidebar',
		'settings' => 'popularfx_sidebar_post',
		'label' => __( 'Post Sidebar', 'popularfx' ),
		'choices' => array(
			'default' => __( 'Default', 'popularfx' ),
			'0' => __( 'No Sidebar', 'popularfx' ),
			'left' => __( 'Left Sidebar', 'popularfx' ),
			'right' => __( 'Right Sidebar', 'popularfx' ),
		),
	) );
		
	// Archives Sidebar
	$wp_customize->add_setting( 'popularfx_sidebar_archives', array(
		'capability' => 'edit_theme_options',
		'transport' => 'refresh',
		'default' => 'right',
		'sanitize_callback' => 'sanitize_text_field',
		) );
		
	$wp_customize->add_control( 'popularfx_sidebar_archives', array(
		'type' => 'select',
		'section' => 'popularfx_sidebar',
		'settings' => 'popularfx_sidebar_archives',
		'label' => __( 'Archives Sidebar', 'popularfx' ),
		'choices' => array(
			'default' => __( 'Default', 'popularfx' ),
			'0' => __( 'No Sidebar', 'popularfx' ),
			'left' => __( 'Left Sidebar', 'popularfx' ),
			'right' => __( 'Right Sidebar', 'popularfx' ),
		),
	) );
	
	// Is WooCommerce Enabled
	if(class_exists( 'WooCommerce' )){
	
		// Woocommerce Sidebar
		$wp_customize->add_setting( 'popularfx_sidebar_woocommerce', array(
			'capability' => 'edit_theme_options',
			'transport' => 'refresh',
			'default' => 0,
			'sanitize_callback' => 'sanitize_text_field',
			) );
		
		$wp_customize->add_control( 'popularfx_sidebar_woocommerce', array(
			'type' => 'select',
			'section' => 'popularfx_sidebar',
			'settings' => 'popularfx_sidebar_woocommerce',
			'label' => __( 'Woocommerce Shop Page Sidebar', 'popularfx' ),
			'choices' => array(
				'default' => __( 'Default', 'popularfx' ),
				'0' => __( 'No Sidebar', 'popularfx' ),
				'left' => __( 'Left Sidebar', 'popularfx' ),
				'right' => __( 'Right Sidebar', 'popularfx' ),
			),
		) );
	
	}
		
	// Sidebar Width
	$wp_customize->add_setting( 'popularfx_sidebar_width', array(
		'capability' => 'edit_theme_options',
		'transport' => 'refresh',
		'default' => 20,
		'sanitize_callback' => 'absint',
	) );
		
	$wp_customize->add_control( 'popularfx_sidebar_width', array(
		'type' => 'number',
		'section' => 'popularfx_sidebar',
		'settings' => 'popularfx_sidebar_width',
		'label' => __( 'Sidebar Width', 'popularfx' ),
		'description' => __( 'Set the width of the Sidebar in percentage','popularfx'),
		'input_attrs' => array(
			'min' => 0,
			'max' => 100,
			'step' => 1,
		),
	) );
		
	//---------------------------------
	// Scroll to Top
	//---------------------------------
	
	$wp_customize->add_section( 'popularfx_scrolltop', array(
		'capability' => 'edit_theme_options',
		'priority'   => 5,
		'title'      => __( 'Scroll to Top Button','popularfx'),
		'panel'      => 'popularfx_global'
	) );
	
	$wp_customize->add_setting( 'pfx_enable_scrolltop', array(
		'capability' => 'edit_theme_options',
		'transport' => 'refresh',
		'default' => 0,
		'sanitize_callback' => 'popularfx_switch_sanitization',
	) );
	
	$wp_customize->add_control( 'pfx_enable_scrolltop', array(
		'type' => 'checkbox',
		'section' => 'popularfx_scrolltop',
		'priority' => 1,
		'settings' => 'pfx_enable_scrolltop',
		'label' => __('Enable Scroll to Top', 'popularfx' ),
		'input_attrs' => array(
			'class' => 'popularfx-customizer-checkbox',
			'style' => 'border: 1px solid #900',
		),
	) );
	
	$wp_customize->add_setting( 'pfx_scrolltop_position', array(
		'capability' => 'edit_theme_options',
		'transport' => 'postMessage',
		'sanitize_callback' => 'absint',
		'default' => 95,
	) );
		
	$wp_customize->add_control( 'pfx_scrolltop_position', array(
		'type' => 'number',
		'section' => 'popularfx_scrolltop',
		'settings' => 'pfx_scrolltop_position',
		'label' => __( 'Button Position ', 'popularfx' ),
		'description' => __( 'Set button position for scroll top button in %', 'popularfx' ),
		'input_attrs' => array(
			'min' => 0,
			'max' => 100,
			'step' => 1,
		),
	) );
	
	$wp_customize->add_setting( 'pfx_scrolltop_padding', array(
		'capability' => 'edit_theme_options',
		'transport' => 'postMessage',
		'sanitize_callback' => 'absint',
		'default' => 10,
	) );
		
	$wp_customize->add_control( 'pfx_scrolltop_padding', array(
		'type' => 'number',
		'section' => 'popularfx_scrolltop',
		'settings' => 'pfx_scrolltop_padding',
		'label' => __( 'Button Spacing ', 'popularfx' ),
		'description' => __( 'Set button spacing for scroll top button in px', 'popularfx' ),
		'input_attrs' => array(
			'min' => 0,
			'max' => 100,
			'step' => 1,
		),
	) );
	
	$wp_customize->add_setting( 'pfx_scrolltop_iconsize', array(
		'capability' => 'edit_theme_options',
		'transport' => 'postMessage',
		'sanitize_callback' => 'absint',
		'default' => 15,
	) );
		
	$wp_customize->add_control( 'pfx_scrolltop_iconsize', array(
		'type' => 'number',
		'section' => 'popularfx_scrolltop',
		'settings' => 'pfx_scrolltop_iconsize',
		'label' => __( 'Icon Size', 'popularfx' ),
		'description' => __( 'Set icon size for scroll top button in px', 'popularfx' ),
		'input_attrs' => array(
			'min' => 0,
			'max' => 100,
			'step' => 1,
		),
	) );
	
	$wp_customize->add_setting( 'pfx_scrolltop_borderwidth', array(
		'capability' => 'edit_theme_options',
		'transport' => 'postMessage',
		'sanitize_callback' => 'absint',
		'default' => 2,
	) );
		
	$wp_customize->add_control( 'pfx_scrolltop_borderwidth', array(
		'type' => 'number',
		'section' => 'popularfx_scrolltop',
		'settings' => 'pfx_scrolltop_borderwidth',
		'label' => __( 'Border Width', 'popularfx' ),
		'description' => __( 'Set border width for scroll top button in px', 'popularfx' ),
		'input_attrs' => array(
			'min' => 0,
			'max' => 100,
			'step' => 1,
		),
	) );
	
	$wp_customize->add_setting( 'pfx_scrolltop_borderradius', array(
		'capability' => 'edit_theme_options',
		'transport' => 'postMessage',
		'sanitize_callback' => 'absint',
		'default' => 15,
	) );
		
	$wp_customize->add_control( 'pfx_scrolltop_borderradius', array(
		'type' => 'number',
		'section' => 'popularfx_scrolltop',
		'settings' => 'pfx_scrolltop_borderradius',
		'label' => __( 'Border Radius', 'popularfx' ),
		'description' => __( 'Set border radius for scroll top button in px', 'popularfx' ),
		'input_attrs' => array(
			'min' => 0,
			'max' => 100,
			'step' => 1,
		),
	) );
	
	$wp_customize->add_setting('pfx_scrolltop_bg_color', array(
		'capability' => 'edit_theme_options',
		'transport' => 'postMessage',
		'default' => '#ffffff',
		'sanitize_callback' => 'popularfx_hex_rgba_sanitization',
	) );
	
	$wp_customize->add_control( new Popularfx_Customize_Alpha_Color_Control(
		$wp_customize, 'pfx_scrolltop_bg_color', array(
			'section' => 'popularfx_scrolltop',
			'description' => __('Set background color for scrolltop', 'popularfx'),
			'settings' => 'pfx_scrolltop_bg_color',
			'label' => __('Background Color', 'popularfx' ),
			'show_opacity' => true
		)
	) );
	
	$wp_customize->add_setting('pfx_scrolltop_color', array(
		'capability' => 'edit_theme_options',
		'transport' => 'postMessage',
		'default' => '#000000',
		'sanitize_callback' => 'popularfx_hex_rgba_sanitization',
	));
	
	$wp_customize->add_control( new Popularfx_Customize_Alpha_Color_Control(
		$wp_customize, 'pfx_scrolltop_color', array(
			'section' => 'popularfx_scrolltop',
			'description' => __('Set icon color for scrolltop', 'popularfx'),
			'settings' => 'pfx_scrolltop_color',
			'label' => __('Icon Color', 'popularfx' ),
			'show_opacity' => true
		)
	) );
	
	$wp_customize->add_setting('pfx_scrolltop_bg_hover_color', array(
		'capability' => 'edit_theme_options',
		'transport' => 'refresh',
		'default' => '#000000',
		'sanitize_callback' => 'popularfx_hex_rgba_sanitization',
	) );
	
	$wp_customize->add_control( new Popularfx_Customize_Alpha_Color_Control(
		$wp_customize, 'pfx_scrolltop_bg_hover_color', array(
			'section' => 'popularfx_scrolltop',
			'description' => __('Set hover background color for scrolltop', 'popularfx'),
			'settings' => 'pfx_scrolltop_bg_hover_color',
			'label' => __('On Hover Background Color', 'popularfx' ),
			'show_opacity' => true
		)
	) );
	
	$wp_customize->add_setting('pfx_scrolltop_hover_color', array(
		'capability' => 'edit_theme_options',
		'transport' => 'refresh',
		'default' => '#ffffff',
		'sanitize_callback' => 'popularfx_hex_rgba_sanitization',
	) );
	
	$wp_customize->add_control( new Popularfx_Customize_Alpha_Color_Control(
		$wp_customize, 'pfx_scrolltop_hover_color', array(
			'section' => 'popularfx_scrolltop',
			'description' => __('Set hover color for scrolltop', 'popularfx'),
			'settings' => 'pfx_scrolltop_hover_color',
			'label' => __('On Hover Icon Color', 'popularfx' ),
			'show_opacity' => true
		)
	) );
	
	$wp_customize->add_setting('pfx_scrolltop_border_color', array(
		'capability' => 'edit_theme_options',
		'transport' => 'refresh',
		'default' => '#000000',
		'sanitize_callback' => 'popularfx_hex_rgba_sanitization',
	) );
	
	$wp_customize->add_control( new Popularfx_Customize_Alpha_Color_Control(
		$wp_customize, 'pfx_scrolltop_border_color', array(
			'section' => 'popularfx_scrolltop',
			'description' => __('Set border color for scrolltop', 'popularfx'),
			'settings' => 'pfx_scrolltop_border_color',
			'label' => __('Border Color', 'popularfx' ),
			'show_opacity' => true
		)
	) );
	
	$wp_customize->add_setting('pfx_scrolltop_hover_border_color', array(
		'capability' => 'edit_theme_options',
		'transport' => 'refresh',
		'default' => '#000000',
		'sanitize_callback' => 'popularfx_hex_rgba_sanitization',
	) );
	
	$wp_customize->add_control( new Popularfx_Customize_Alpha_Color_Control(
		$wp_customize, 'pfx_scrolltop_hover_border_color', array(
			'section' => 'popularfx_scrolltop',
			'description' => __('Set hover border color for scrolltop', 'popularfx'),
			'settings' => 'pfx_scrolltop_hover_border_color',
			'label' => __('On Hover Border Color', 'popularfx' ),
			'show_opacity' => true
		)
	) );
	
	//---------------------------------
	// Container
	//---------------------------------
	$wp_customize->add_section( 'popularfx_container', array(
		'capability' => 'edit_theme_options',
		'priority'   => 5,
		'title'      => __( 'Container', 'popularfx'),
		'panel'      => 'popularfx_global'
	) );
		
	// Container Width
	$wp_customize->add_setting( 'popularfx_content_width', array(
		'capability' => 'edit_theme_options',
		'transport' => 'refresh',
		'default' => get_option('pagelayer_content_width', 1170),
		'sanitize_callback' => 'absint',
		) );
		
	$wp_customize->add_control( 'popularfx_content_width', array(
		'type' => 'number',
		'section' => 'popularfx_container',
		'settings' => 'popularfx_content_width',
		'label' => __( 'Content Width', 'popularfx' ),
		'description' => __( 'The width of the content container. Default is 1170px', 'popularfx' ),
		'input_attrs' => array(
			'min' => 800,
			'step' => 1,
			'placeholder' => 1170
		),
	) );
		
	// Tablet Breakpoint
	$wp_customize->add_setting( 'popularfx_tablet_breakpoint', array(
		'capability' => 'edit_theme_options',
		'transport' => 'refresh',
		'default' => get_option('pagelayer_tablet_breakpoint', 768),
		'sanitize_callback' => 'absint',
		) );
		
	$wp_customize->add_control( 'popularfx_tablet_breakpoint', array(
		'type' => 'number',
		'section' => 'popularfx_container',
		'settings' => 'popularfx_tablet_breakpoint',
		'label' => __( 'Tablet Breakpoint', 'popularfx' ),
		'description' => __( 'Set the breakpoint for tablet devices. The default breakpoint for tablet layout is 768px.','popularfx'),
		'input_attrs' => array(
			'min' => 500,
			'step' => 1,
			'placeholder' => 768
		),
	) );
		
	// Mobile Breakpoint
	$wp_customize->add_setting( 'popularfx_mobile_breakpoint', array(
		'capability' => 'edit_theme_options',
		'transport' => 'refresh',
		'default' => get_option('pagelayer_mobile_breakpoint', 360),
		'sanitize_callback' => 'absint',
		) );
		
	$wp_customize->add_control( 'popularfx_mobile_breakpoint', array(
		'type' => 'number',
		'section' => 'popularfx_container',
		'settings' => 'popularfx_mobile_breakpoint',
		'label' => __( 'Mobile Breakpoint', 'popularfx' ),
		'description' => __( 'Set the breakpoint for mobile devices. The default breakpoint for mobile layout is 360px.','popularfx'),
		'input_attrs' => array(
			'min' => 200,
			'step' => 1,
			'placeholder' => 360
		),
	) );

	if ( isset( $wp_customize->selective_refresh ) ) {
		$wp_customize->selective_refresh->add_partial(
			'blogname',
			array(
				'selector'        => '.site-title a',
				'render_callback' => 'popularfx_customize_partial_blogname',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'blogdescription',
			array(
				'selector'        => '.site-description',
				'render_callback' => 'popularfx_customize_partial_blogdescription',
			)
		);
	}
}
add_action( 'customize_register', 'popularfx_customize_register', 10);

// Shows the font settings
function popularfx_customize_font($prefix, $text, &$wp_customize){
	
	global $pagelayer, $pl_error;
	
	$popularfx_styles['font-weight'] = ['100', '200', '300', '400', '500', '600', '700', '800', '900', 'normal', 'lighter', 'bold', 'bolder', 'inherit'];
	
	$popularfx_styles['transform'] = ['inherit', 'initial', 'capitalize', 'uppercase', 'lowercase', 'none'];
	
	$popularfx_styles['font-family'] = ['Inherit','ABeeZee', 'Abel', 'Abhaya Libre', 'Abril Fatface', 'Aclonica', 'Acme', 'Actor', 'Adamina', 'Advent Pro', 'Aguafina Script', 'Akaya Kanadaka', 'Akaya Telivigala', 'Akronim', 'Aladin', 'Alata', 'Alatsi', 'Aldrich', 'Alef', 'Alegreya', 'Alegreya Sans', 'Alegreya Sans SC', 'Alegreya SC', 'Aleo', 'Alex Brush', 'Alfa Slab One', 'Alice', 'Alike', 'Alike Angular', 'Allan', 'Allerta', 'Allerta Stencil', 'Allison', 'Allura', 'Almarai', 'Almendra', 'Almendra Display', 'Almendra SC', 'Alumni Sans', 'Amarante', 'Amaranth', 'Amatic SC', 'Amethysta', 'Amiko', 'Amiri', 'Amita', 'Anaheim', 'Andada Pro', 'Andika', 'Andika New Basic', 'Angkor', 'Annie Use Your Telescope', 'Anonymous Pro', 'Antic', 'Antic Didone', 'Antic Slab', 'Anton', 'Antonio', 'Arapey', 'Arbutus', 'Arbutus Slab', 'Architects Daughter', 'Archivo', 'Archivo Black', 'Archivo Narrow', 'Are You Serious', 'Aref Ruqaa', 'Arima Madurai', 'Arimo', 'Arizonia', 'Armata', 'Arsenal', 'Artifika', 'Arvo', 'Arya', 'Asap', 'Asap Condensed', 'Asar', 'Asset', 'Assistant', 'Astloch', 'Asul', 'Athiti', 'Atkinson Hyperlegible', 'Atma', 'Atomic Age', 'Aubrey', 'Audiowide', 'Autour One', 'Average', 'Average Sans', 'Averia Gruesa Libre', 'Averia Libre', 'Averia Sans Libre', 'Averia Serif Libre', 'Azeret Mono', 'B612', 'B612 Mono', 'Bad Script', 'Bahiana', 'Bahianita', 'Bai Jamjuree', 'Ballet', 'Baloo 2', 'Baloo Bhai 2', 'Baloo Bhaina 2', 'Baloo Chettan 2', 'Baloo Da 2', 'Baloo Paaji 2', 'Baloo Tamma 2', 'Baloo Tammudu 2', 'Baloo Thambi 2', 'Balsamiq Sans', 'Balthazar', 'Bangers', 'Barlow', 'Barlow Condensed', 'Barlow Semi Condensed', 'Barriecito', 'Barrio', 'Basic', 'Baskervville', 'Battambang', 'Baumans', 'Bayon', 'Be Vietnam', 'Be Vietnam Pro', 'Bebas Neue', 'Belgrano', 'Bellefair', 'Belleza', 'Bellota', 'Bellota Text', 'BenchNine', 'Benne', 'Bentham', 'Berkshire Swash', 'Besley', 'Beth Ellen', 'Bevan', 'Big Shoulders Display', 'Big Shoulders Inline Display', 'Big Shoulders Inline Text', 'Big Shoulders Stencil Display', 'Big Shoulders Stencil Text', 'Big Shoulders Text', 'Bigelow Rules', 'Bigshot One', 'Bilbo', 'Bilbo Swash Caps', 'BioRhyme', 'BioRhyme Expanded', 'Birthstone', 'Birthstone Bounce', 'Biryani', 'Bitter', 'Black And White Picture', 'Black Han Sans', 'Black Ops One', 'Blinker', 'Bodoni Moda', 'Bokor', 'Bona Nova', 'Bonbon', 'Bonheur Royale', 'Boogaloo', 'Bowlby One', 'Bowlby One SC', 'Brawler', 'Bree Serif', 'Brygada 1918', 'Bubblegum Sans', 'Bubbler One', 'Buda', 'Buenard', 'Bungee', 'Bungee Hairline', 'Bungee Inline', 'Bungee Outline', 'Bungee Shade', 'Butcherman', 'Butterfly Kids', 'Cabin', 'Cabin Condensed', 'Cabin Sketch', 'Caesar Dressing', 'Cagliostro', 'Cairo', 'Caladea', 'Calistoga', 'Calligraffitti', 'Cambay', 'Cambo', 'Candal', 'Cantarell', 'Cantata One', 'Cantora One', 'Capriola', 'Caramel', 'Carattere', 'Cardo', 'Carme', 'Carrois Gothic', 'Carrois Gothic SC', 'Carter One', 'Castoro', 'Catamaran', 'Caudex', 'Caveat', 'Caveat Brush', 'Cedarville Cursive', 'Ceviche One', 'Chakra Petch', 'Changa', 'Changa One', 'Chango', 'Charm', 'Charmonman', 'Chathura', 'Chau Philomene One', 'Chela One', 'Chelsea Market', 'Chenla', 'Cherish', 'Cherry Cream Soda', 'Cherry Swash', 'Chewy', 'Chicle', 'Chilanka', 'Chivo', 'Chonburi', 'Cinzel', 'Cinzel Decorative', 'Clicker Script', 'Coda', 'Coda Caption', 'Codystar', 'Coiny', 'Combo', 'Comfortaa', 'Comic Neue', 'Coming Soon', 'Commissioner', 'Concert One', 'Condiment', 'Content', 'Contrail One', 'Convergence', 'Cookie', 'Copse', 'Corben', 'Cormorant', 'Cormorant Garamond', 'Cormorant Infant', 'Cormorant SC', 'Cormorant Unicase', 'Cormorant Upright', 'Courgette', 'Courier Prime', 'Cousine', 'Coustard', 'Covered By Your Grace', 'Crafty Girls', 'Creepster', 'Crete Round', 'Crimson Pro', 'Crimson Text', 'Croissant One', 'Crushed', 'Cuprum', 'Cute Font', 'Cutive', 'Cutive Mono', 'Damion', 'Dancing Script', 'Dangrek', 'Darker Grotesque', 'David Libre', 'Dawning of a New Day', 'Days One', 'Dekko', 'Dela Gothic One', 'Delius', 'Delius Swash Caps', 'Delius Unicase', 'Della Respira', 'Denk One', 'Devonshire', 'Dhurjati', 'Didact Gothic', 'Diplomata', 'Diplomata SC', 'DM Mono', 'DM Sans', 'DM Serif Display', 'DM Serif Text', 'Do Hyeon', 'Dokdo', 'Domine', 'Donegal One', 'Doppio One', 'Dorsa', 'Dosis', 'DotGothic16', 'Dr Sugiyama', 'Duru Sans', 'Dynalight', 'Eagle Lake', 'East Sea Dokdo', 'Eater', 'EB Garamond', 'Economica', 'Eczar', 'El Messiri', 'Electrolize', 'Elsie', 'Elsie Swash Caps', 'Emblema One', 'Emilys Candy', 'Encode Sans', 'Encode Sans Condensed', 'Encode Sans Expanded', 'Encode Sans SC', 'Encode Sans Semi Condensed', 'Encode Sans Semi Expanded', 'Engagement', 'Englebert', 'Enriqueta', 'Ephesis', 'Epilogue', 'Erica One', 'Esteban', 'Euphoria Script', 'Ewert', 'Exo', 'Exo 2', 'Expletus Sans', 'Explora', 'Fahkwang', 'Fanwood Text', 'Farro', 'Farsan', 'Fascinate', 'Fascinate Inline', 'Faster One', 'Fasthand', 'Fauna One', 'Faustina', 'Federant', 'Federo', 'Felipa', 'Fenix', 'Festive', 'Finger Paint', 'Fira Code', 'Fira Mono', 'Fira Sans', 'Fira Sans Condensed', 'Fira Sans Extra Condensed', 'Fjalla One', 'Fjord One', 'Flamenco', 'Flavors', 'Fleur De Leah', 'Fondamento', 'Fontdiner Swanky', 'Forum', 'Francois One', 'Frank Ruhl Libre', 'Fraunces', 'Freckle Face', 'Fredericka the Great', 'Fredoka One', 'Freehand', 'Fresca', 'Frijole', 'Fruktur', 'Fugaz One', 'Fuggles', 'Gabriela', 'Gaegu', 'Gafata', 'Galada', 'Galdeano', 'Galindo', 'Gamja Flower', 'Gayathri', 'Gelasio', 'Gemunu Libre', 'Gentium Basic', 'Gentium Book Basic', 'Geo', 'Georama', 'Geostar', 'Geostar Fill', 'Germania One', 'GFS Didot', 'GFS Neohellenic', 'Gideon Roman', 'Gidugu', 'Gilda Display', 'Girassol', 'Give You Glory', 'Glass Antiqua', 'Glegoo', 'Gloria Hallelujah', 'Glory', 'Gluten', 'Goblin One', 'Gochi Hand', 'Goldman', 'Gorditas', 'Gothic A1', 'Gotu', 'Goudy Bookletter 1911', 'Gowun Batang', 'Gowun Dodum', 'Graduate', 'Grand Hotel', 'Grandstander', 'Gravitas One', 'Great Vibes', 'Grechen Fuemen', 'Grenze', 'Grenze Gotisch', 'Grey Qo', 'Griffy', 'Gruppo', 'Gudea', 'Gugi', 'Gupter', 'Gurajada', 'Habibi', 'Hachi Maru Pop', 'Hahmlet', 'Halant', 'Hammersmith One', 'Hanalei', 'Hanalei Fill', 'Handlee', 'Hanuman', 'Happy Monkey', 'Harmattan', 'Headland One', 'Heebo', 'Henny Penny', 'Hepta Slab', 'Herr Von Muellerhoff', 'Hi Melody', 'Hina Mincho', 'Hind', 'Hind Guntur', 'Hind Madurai', 'Hind Siliguri', 'Hind Vadodara', 'Holtwood One SC', 'Homemade Apple', 'Homenaje', 'Ibarra Real Nova', 'IBM Plex Mono', 'IBM Plex Sans', 'IBM Plex Sans Arabic', 'IBM Plex Sans Condensed', 'IBM Plex Sans Devanagari', 'IBM Plex Sans Hebrew', 'IBM Plex Sans KR', 'IBM Plex Sans Thai', 'IBM Plex Sans Thai Looped', 'IBM Plex Serif', 'Iceberg', 'Iceland', 'IM Fell Double Pica', 'IM Fell Double Pica SC', 'IM Fell DW Pica', 'IM Fell DW Pica SC', 'IM Fell English', 'IM Fell English SC', 'IM Fell French Canon', 'IM Fell French Canon SC', 'IM Fell Great Primer', 'IM Fell Great Primer SC', 'Imbue', 'Imprima', 'Inconsolata', 'Inder', 'Indie Flower', 'Inika', 'Inknut Antiqua', 'Inria Sans', 'Inria Serif', 'Inter', 'Irish Grover', 'Istok Web', 'Italiana', 'Italianno', 'Itim', 'Jacques Francois', 'Jacques Francois Shadow', 'Jaldi', 'JetBrains Mono', 'Jim Nightshade', 'Jockey One', 'Jolly Lodger', 'Jomhuria', 'Jomolhari', 'Josefin Sans', 'Josefin Slab', 'Jost', 'Joti One', 'Jua', 'Judson', 'Julee', 'Julius Sans One', 'Junge', 'Jura', 'Just Another Hand', 'Just Me Again Down Here', 'K2D', 'Kadwa', 'Kaisei Decol', 'Kaisei HarunoUmi', 'Kaisei Opti', 'Kaisei Tokumin', 'Kalam', 'Kameron', 'Kanit', 'Kantumruy', 'Karantina', 'Karla', 'Karma', 'Katibeh', 'Kaushan Script', 'Kavivanar', 'Kavoon', 'Kdam Thmor', 'Keania One', 'Kelly Slab', 'Kenia', 'Khand', 'Khmer', 'Khula', 'Kirang Haerang', 'Kite One', 'Kiwi Maru', 'Klee One', 'Knewave', 'Kodchasan', 'Koh Santepheap', 'KoHo', 'Kosugi', 'Kosugi Maru', 'Kotta One', 'Koulen', 'Kranky', 'Kreon', 'Kristi', 'Krona One', 'Krub', 'Kufam', 'Kulim Park', 'Kumar One', 'Kumar One Outline', 'Kumbh Sans', 'Kurale', 'La Belle Aurore', 'Lacquer', 'Laila', 'Lakki Reddy', 'Lalezar', 'Lancelot', 'Langar', 'Lateef', 'Lato', 'League Script', 'Leckerli One', 'Ledger', 'Lekton', 'Lemon', 'Lemonada', 'Lexend', 'Lexend Deca', 'Lexend Exa', 'Lexend Giga', 'Lexend Mega', 'Lexend Peta', 'Lexend Tera', 'Lexend Zetta', 'Libre Barcode 128', 'Libre Barcode 128 Text', 'Libre Barcode 39', 'Libre Barcode 39 Extended', 'Libre Barcode 39 Extended Text', 'Libre Barcode 39 Text', 'Libre Barcode EAN13 Text', 'Libre Baskerville', 'Libre Caslon Display', 'Libre Caslon Text', 'Libre Franklin', 'Life Savers', 'Lilita One', 'Lily Script One', 'Limelight', 'Linden Hill', 'Literata', 'Liu Jian Mao Cao', 'Livvic', 'Lobster', 'Lobster Two', 'Londrina Outline', 'Londrina Shadow', 'Londrina Sketch', 'Londrina Solid', 'Long Cang', 'Lora', 'Love Ya Like A Sister', 'Loved by the King', 'Lovers Quarrel', 'Luckiest Guy', 'Lusitana', 'Lustria', 'M PLUS 1p', 'M PLUS Rounded 1c', 'Ma Shan Zheng', 'Macondo', 'Macondo Swash Caps', 'Mada', 'Magra', 'Maiden Orange', 'Maitree', 'Major Mono Display', 'Mako', 'Mali', 'Mallanna', 'Mandali', 'Manjari', 'Manrope', 'Mansalva', 'Manuale', 'Marcellus', 'Marcellus SC', 'Marck Script', 'Margarine', 'Markazi Text', 'Marko One', 'Marmelad', 'Martel', 'Martel Sans', 'Marvel', 'Mate', 'Mate SC', 'Maven Pro', 'McLaren', 'Meddon', 'MedievalSharp', 'Medula One', 'Meera Inimai', 'Megrim', 'Meie Script', 'Merienda', 'Merienda One', 'Merriweather', 'Merriweather Sans', 'Metal', 'Metal Mania', 'Metamorphous', 'Metrophobic', 'Michroma', 'Milonga', 'Miltonian', 'Miltonian Tattoo', 'Mina', 'Miniver', 'Miriam Libre', 'Mirza', 'Miss Fajardose', 'Mitr', 'Modak', 'Modern Antiqua', 'Mogra', 'Molengo', 'Molle', 'Monda', 'Monofett', 'Monoton', 'Monsieur La Doulaise', 'Montaga', 'MonteCarlo', 'Montez', 'Montserrat', 'Montserrat Alternates', 'Montserrat Subrayada', 'Moul', 'Moulpali', 'Mountains of Christmas', 'Mouse Memoirs', 'Mr Bedfort', 'Mr Dafoe', 'Mr De Haviland', 'Mrs Saint Delafield', 'Mrs Sheppards', 'Mukta', 'Mukta Mahee', 'Mukta Malar', 'Mukta Vaani', 'Mulish', 'MuseoModerno', 'Mystery Quest', 'Nanum Brush Script', 'Nanum Gothic', 'Nanum Gothic Coding', 'Nanum Myeongjo', 'Nanum Pen Script', 'Nerko One', 'Neucha', 'Neuton', 'New Rocker', 'New Tegomin', 'News Cycle', 'Newsreader', 'Niconne', 'Niramit', 'Nixie One', 'Nobile', 'Nokora', 'Norican', 'Nosifer', 'Notable', 'Nothing You Could Do', 'Noticia Text', 'Noto Kufi Arabic', 'Noto Music', 'Noto Naskh Arabic', 'Noto Nastaliq Urdu', 'Noto Rashi Hebrew', 'Noto Sans', 'Noto Sans Adlam', 'Noto Sans Adlam Unjoined', 'Noto Sans Anatolian Hieroglyphs', 'Noto Sans Arabic', 'Noto Sans Armenian', 'Noto Sans Avestan', 'Noto Sans Balinese', 'Noto Sans Bamum', 'Noto Sans Bassa Vah', 'Noto Sans Batak', 'Noto Sans Bengali', 'Noto Sans Bhaiksuki', 'Noto Sans Brahmi', 'Noto Sans Buginese', 'Noto Sans Buhid', 'Noto Sans Canadian Aboriginal', 'Noto Sans Carian', 'Noto Sans Caucasian Albanian', 'Noto Sans Chakma', 'Noto Sans Cham', 'Noto Sans Cherokee', 'Noto Sans Coptic', 'Noto Sans Cuneiform', 'Noto Sans Cypriot', 'Noto Sans Deseret', 'Noto Sans Devanagari', 'Noto Sans Display', 'Noto Sans Duployan', 'Noto Sans Egyptian Hieroglyphs', 'Noto Sans Elbasan', 'Noto Sans Elymaic', 'Noto Sans Georgian', 'Noto Sans Glagolitic', 'Noto Sans Gothic', 'Noto Sans Grantha', 'Noto Sans Gujarati', 'Noto Sans Gunjala Gondi', 'Noto Sans Gurmukhi', 'Noto Sans Hanifi Rohingya', 'Noto Sans Hanunoo', 'Noto Sans Hatran', 'Noto Sans Hebrew', 'Noto Sans Hong Kong', 'Noto Sans Imperial Aramaic', 'Noto Sans Indic Siyaq Numbers', 'Noto Sans Inscriptional Pahlavi', 'Noto Sans Inscriptional Parthian', 'Noto Sans Japanese', 'Noto Sans Javanese', 'Noto Sans Kaithi', 'Noto Sans Kannada', 'Noto Sans Kayah Li', 'Noto Sans Kharoshthi', 'Noto Sans Khmer', 'Noto Sans Khojki', 'Noto Sans Khudawadi', 'Noto Sans Korean', 'Noto Sans Lao', 'Noto Sans Lepcha', 'Noto Sans Limbu', 'Noto Sans Linear A', 'Noto Sans Linear B', 'Noto Sans Lisu', 'Noto Sans Lycian', 'Noto Sans Lydian', 'Noto Sans Mahajani', 'Noto Sans Malayalam', 'Noto Sans Mandaic', 'Noto Sans Manichaean', 'Noto Sans Marchen', 'Noto Sans Masaram Gondi', 'Noto Sans Math', 'Noto Sans Mayan Numerals', 'Noto Sans Medefaidrin', 'Noto Sans Meroitic', 'Noto Sans Miao', 'Noto Sans Modi', 'Noto Sans Mongolian', 'Noto Sans Mono', 'Noto Sans Mro', 'Noto Sans Multani', 'Noto Sans Myanmar', 'Noto Sans Nabataean', 'Noto Sans New Tai Lue', 'Noto Sans Newa', 'Noto Sans Nüshu', 'Noto Sans Ogham', 'Noto Sans Ol Chiki', 'Noto Sans Old Hungarian', 'Noto Sans Old Italic', 'Noto Sans Old North Arabian', 'Noto Sans Old Permic', 'Noto Sans Old Persian', 'Noto Sans Old Sogdian', 'Noto Sans Old South Arabian', 'Noto Sans Old Turkic', 'Noto Sans Oriya', 'Noto Sans Osage', 'Noto Sans Osmanya', 'Noto Sans Pahawh Hmong', 'Noto Sans Palmyrene', 'Noto Sans Pau Cin Hau', 'Noto Sans Phags Pa', 'Noto Sans Phoenician', 'Noto Sans Psalter Pahlavi', 'Noto Sans Rejang', 'Noto Sans Runic', 'Noto Sans Samaritan', 'Noto Sans Saurashtra', 'Noto Sans Sharada', 'Noto Sans Shavian', 'Noto Sans Siddham', 'Noto Sans Simplified Chinese', 'Noto Sans Sinhala', 'Noto Sans Sogdian', 'Noto Sans Sora Sompeng', 'Noto Sans Soyombo', 'Noto Sans Sundanese', 'Noto Sans Syloti Nagri', 'Noto Sans Symbols', 'Noto Sans Symbols 2', 'Noto Sans Syriac', 'Noto Sans Tagalog', 'Noto Sans Tagbanwa', 'Noto Sans Tai Le', 'Noto Sans Tai Tham', 'Noto Sans Tai Viet', 'Noto Sans Takri', 'Noto Sans Tamil', 'Noto Sans Tamil Supplement', 'Noto Sans Telugu', 'Noto Sans Thaana', 'Noto Sans Thai', 'Noto Sans Thai Looped', 'Noto Sans Tifinagh', 'Noto Sans Tirhuta', 'Noto Sans Traditional Chinese', 'Noto Sans Ugaritic', 'Noto Sans Vai', 'Noto Sans Wancho', 'Noto Sans Warang Citi', 'Noto Sans Yi', 'Noto Sans Zanabazar Square', 'Noto Serif', 'Noto Serif Ahom', 'Noto Serif Armenian', 'Noto Serif Balinese', 'Noto Serif Bengali', 'Noto Serif Devanagari', 'Noto Serif Display', 'Noto Serif Dogra', 'Noto Serif Ethiopic', 'Noto Serif Georgian', 'Noto Serif Grantha', 'Noto Serif Gujarati', 'Noto Serif Gurmukhi', 'Noto Serif Hebrew', 'Noto Serif Japanese', 'Noto Serif Kannada', 'Noto Serif Khmer', 'Noto Serif KR', 'Noto Serif Lao', 'Noto Serif Malayalam', 'Noto Serif Myanmar', 'Noto Serif Nyiakeng Puachue Hmong', 'Noto Serif Simplified Chinese', 'Noto Serif Sinhala', 'Noto Serif Tamil', 'Noto Serif Tangut', 'Noto Serif Telugu', 'Noto Serif Thai', 'Noto Serif Tibetan', 'Noto Serif Traditional Chinese', 'Noto Serif Yezidi', 'Noto Traditional Nüshu', 'Nova Cut', 'Nova Flat', 'Nova Mono', 'Nova Oval', 'Nova Round', 'Nova Script', 'Nova Slim', 'Nova Square', 'NTR', 'Numans', 'Nunito', 'Nunito Sans', 'Odibee Sans', 'Odor Mean Chey', 'Offside', 'Oi', 'Old Standard TT', 'Oldenburg', 'Oleo Script', 'Oleo Script Swash Caps', 'Open Sans', 'Open Sans Condensed', 'Oranienbaum', 'Orbitron', 'Oregano', 'Orelega One', 'Orienta', 'Original Surfer', 'Oswald', 'Otomanopee One', 'Over the Rainbow', 'Overlock', 'Overlock SC', 'Overpass', 'Overpass Mono', 'Ovo', 'Oxanium', 'Oxygen', 'Oxygen Mono', 'Pacifico', 'Padauk', 'Palanquin', 'Palanquin Dark', 'Palette Mosaic', 'Pangolin', 'Paprika', 'Parisienne', 'Passero One', 'Passion One', 'Pathway Gothic One', 'Patrick Hand', 'Patrick Hand SC', 'Pattaya', 'Patua One', 'Pavanam', 'Paytone One', 'Peddana', 'Peralta', 'Permanent Marker', 'Petit Formal Script', 'Petrona', 'Philosopher', 'Piazzolla', 'Piedra', 'Pinyon Script', 'Pirata One', 'Plaster', 'Play', 'Playball', 'Playfair Display', 'Playfair Display SC', 'Podkova', 'Poiret One', 'Poller One', 'Poly', 'Pompiere', 'Pontano Sans', 'Poor Story', 'Poppins', 'Port Lligat Sans', 'Port Lligat Slab', 'Potta One', 'Pragati Narrow', 'Prata', 'Preahvihear', 'Press Start 2P', 'Pridi', 'Princess Sofia', 'Prociono', 'Prompt', 'Prosto One', 'Proza Libre', 'PT Mono', 'PT Sans', 'PT Sans Caption', 'PT Sans Narrow', 'PT Serif', 'PT Serif Caption', 'Public Sans', 'Puritan', 'Purple Purse', 'Qahiri', 'Quando', 'Quantico', 'Quattrocento', 'Quattrocento Sans', 'Questrial', 'Quicksand', 'Quintessential', 'Qwigley', 'Racing Sans One', 'Radley', 'Rajdhani', 'Rakkas', 'Raleway', 'Raleway Dots', 'Ramabhadra', 'Ramaraja', 'Rambla', 'Rammetto One', 'Rampart One', 'Ranchers', 'Rancho', 'Ranga', 'Rasa', 'Rationale', 'Ravi Prakash', 'Recursive', 'Red Hat Display', 'Red Hat Text', 'Red Rose', 'Redressed', 'Reem Kufi', 'Reenie Beanie', 'Reggae One', 'Revalia', 'Rhodium Libre', 'Ribeye', 'Ribeye Marrow', 'Righteous', 'Risque', 'Roboto', 'Roboto Condensed', 'Roboto Mono', 'Roboto Slab', 'Rochester', 'Rock Salt', 'RocknRoll One', 'Rokkitt', 'Romanesco', 'Ropa Sans', 'Rosario', 'Rosarivo', 'Rouge Script', 'Rowdies', 'Rozha One', 'Rubik', 'Rubik Beastly', 'Rubik Mono One', 'Ruda', 'Rufina', 'Ruge Boogie', 'Ruluko', 'Rum Raisin', 'Ruslan Display', 'Russo One', 'Ruthie', 'Rye', 'Sacramento', 'Sahitya', 'Sail', 'Saira', 'Saira Condensed', 'Saira Extra Condensed', 'Saira Semi Condensed', 'Saira Stencil One', 'Salsa', 'Sanchez', 'Sancreek', 'Sansita', 'Sansita Swashed', 'Sarabun', 'Sarala', 'Sarina', 'Sarpanch', 'Satisfy', 'Sawarabi Gothic', 'Sawarabi Mincho', 'Scada', 'Scheherazade', 'Scheherazade New', 'Schoolbell', 'Scope One', 'Seaweed Script', 'Secular One', 'Sedgwick Ave', 'Sedgwick Ave Display', 'Sen', 'Sevillana', 'Seymour One', 'Shadows Into Light', 'Shadows Into Light Two', 'Shanti', 'Share', 'Share Tech', 'Share Tech Mono', 'Shippori Mincho', 'Shippori Mincho B1', 'Shojumaru', 'Short Stack', 'Shrikhand', 'Siemreap', 'Sigmar One', 'Signika', 'Signika Negative', 'Simonetta', 'Single Day', 'Sintony', 'Sirin Stencil', 'Six Caps', 'Skranji', 'Slabo 13px', 'Slabo 27px', 'Slackey', 'Smokum', 'Smythe', 'Sniglet', 'Snippet', 'Snowburst One', 'Sofadi One', 'Sofia', 'Solway', 'Song Myung', 'Sonsie One', 'Sora', 'Sorts Mill Goudy', 'Source Code Pro', 'Source Sans Pro', 'Source Serif Pro', 'Space Grotesk', 'Space Mono', 'Spartan', 'Special Elite', 'Spectral', 'Spectral SC', 'Spicy Rice', 'Spinnaker', 'Spirax', 'Squada One', 'Sree Krushnadevaraya', 'Sriracha', 'Srisakdi', 'Staatliches', 'Stalemate', 'Stalinist One', 'Stardos Stencil', 'Stick', 'Stick No Bills', 'Stint Ultra Condensed', 'Stint Ultra Expanded', 'STIX Two Text', 'Stoke', 'Strait', 'Style Script', 'Stylish', 'Sue Ellen Francisco', 'Suez One', 'Sulphur Point', 'Sumana', 'Sunflower', 'Sunshiney', 'Supermercado One', 'Sura', 'Suranna', 'Suravaram', 'Suwannaphum', 'Swanky and Moo Moo', 'Syncopate', 'Syne', 'Syne Mono', 'Syne Tactile', 'Tajawal', 'Tangerine', 'Taprom', 'Tauri', 'Taviraj', 'Teko', 'Telex', 'Tenali Ramakrishna', 'Tenor Sans', 'Text Me One', 'Texturina', 'Thasadith', 'The Girl Next Door', 'Tienne', 'Tillana', 'Timmana', 'Tinos', 'Titan One', 'Titillium Web', 'Tomorrow', 'Tourney', 'Trade Winds', 'Train One', 'Trirong', 'Trispace', 'Trocchi', 'Trochut', 'Truculenta', 'Trykker', 'Tulpen One', 'Turret Road', 'Ubuntu', 'Ubuntu Condensed', 'Ubuntu Mono', 'Uchen', 'Ultra', 'Uncial Antiqua', 'Underdog', 'Unica One', 'UnifrakturCook', 'UnifrakturMaguntia', 'Unkempt', 'Unlock', 'Unna', 'Urbanist', 'Vampiro One', 'Varela', 'Varela Round', 'Varta', 'Vast Shadow', 'Vesper Libre', 'Viaoda Libre', 'Vibes', 'Vibur', 'Vidaloka', 'Viga', 'Voces', 'Volkhov', 'Vollkorn', 'Vollkorn SC', 'Voltaire', 'VT323', 'Waiting for the Sunrise', 'Wallpoet', 'Walter Turncoat', 'Warnes', 'Wellfleet', 'Wendy One', 'WindSong', 'Wire One', 'Work Sans', 'Xanh Mono', 'Yaldevi', 'Yanone Kaffeesatz', 'Yantramanav', 'Yatra One', 'Yellowtail', 'Yeon Sung', 'Yeseva One', 'Yesteryear', 'Yomogi', 'Yrsa', 'Yusei Magic', 'ZCOOL KuaiLe', 'ZCOOL QingKe HuangYou', 'ZCOOL XiaoWei', 'Zen Dots', 'Zen Loop', 'Zen Tokyo Zoo', 'Zeyada', 'Zhi Mang Xing', 'Zilla Slab', 'Zilla Slab Highlight'];
	
		
	foreach($popularfx_styles['font-family'] as $k => $font){	
		$r[$font] = esc_attr($font);
	}
	
	$wp_customize->add_section( 'popularfx_'.$prefix.'_typo', array(
		'title' => $text,
		'panel' => 'typography',
	) );
	
	// Font Family
	$wp_customize->add_setting( 'popularfx_'.$prefix.'[font-family]', array(
		'capability' => 'edit_theme_options',
		'transport' => 'refresh',
		'default' => 'inherit',
		'sanitize_callback' => 'sanitize_text_field',
		)
	);
		
	$wp_customize->add_control( 'popularfx_'.$prefix.'[font-family]', array(
		'type' => 'select',
		'section' => 'popularfx_'.$prefix.'_typo',
		'settings' => 'popularfx_'.$prefix.'[font-family]',
		'label' => __( 'Font Family', 'popularfx' ),
		'choices' => $r,
	) );
	
	$fsizes = [];
	$fsizes[0] = 'Default';
	for($i = 5; $i <= 75; $i++){
		$fsizes[$i] = esc_attr($i.'px');
	}
	
	// Font Size
	$wp_customize->add_setting( 'popularfx_'.$prefix.'[font-size]', array(
		'capability' => 'edit_theme_options',
		'transport' => 'refresh',
		'default' => 20,
		'sanitize_callback' => 'absint',
		)
	);
		
	$wp_customize->add_control( 'popularfx_'.$prefix.'[font-size]', array(
		'type' => 'select',
		'section' => 'popularfx_'.$prefix.'_typo',
		'settings' => 'popularfx_'.$prefix.'[font-size]',
		'label' => __( 'Font Size', 'popularfx' ),
		'choices' => $fsizes,
	) );
	
	// Font Style
	$wp_customize->add_setting( 'popularfx_'.$prefix.'[font-style]', array(
		'capability' => 'edit_theme_options',
		'transport' => 'refresh',
		'default' => 'inherit',
		'sanitize_callback' => 'sanitize_text_field',
		)
	);
		
	$wp_customize->add_control( 'popularfx_'.$prefix.'[font-style]', array(
		'type' => 'select',
		'section' => 'popularfx_'.$prefix.'_typo',
		'settings' => 'popularfx_'.$prefix.'[font-style]',
		'label' => __( 'Font Style', 'popularfx' ),
		'choices' => array(
			'default' => __( 'Default', 'popularfx' ),
			'normal' => __( 'Normal', 'popularfx' ),
			'italic' => __( 'Italic', 'popularfx' ),
			'oblique' => __( 'Oblique', 'popularfx' )
		),
	) );
	
	$popularfx_weight = array();	
	foreach($popularfx_styles['font-weight'] as $k => $weight){
		$popularfx_weight[$weight] = esc_attr($weight);
	}

	// Font Weight
	$wp_customize->add_setting( 'popularfx_'.$prefix.'[font-weight]', array(
		'capability' => 'edit_theme_options',
		'transport' => 'refresh',
		'default' => 'inherit',
		'sanitize_callback' => 'sanitize_text_field',
		)
	);
		
	$wp_customize->add_control( 'popularfx_'.$prefix.'[font-weight]', array(
		'type' => 'select',
		'section' => 'popularfx_'.$prefix.'_typo',
		'settings' => 'popularfx_'.$prefix.'[font-weight]',
		'label' => __( 'Font Weight', 'popularfx' ),
		'choices' => $popularfx_weight,
	) );
	
	$popularfx_transform = array();	
	foreach($popularfx_styles['transform'] as $k => $transform){
		$popularfx_transform[$transform] = esc_attr($transform);
	}
	
	// Text Transform
	$wp_customize->add_setting( 'popularfx_'.$prefix.'[text-transform]', array(
		'capability' => 'edit_theme_options',
		'transport' => 'refresh',
		'default' => 'inherit',
		'sanitize_callback' => 'sanitize_text_field',
		)
	);
		
	$wp_customize->add_control( 'popularfx_'.$prefix.'[text-transform]', array(
		'type' => 'select',
		'section' => 'popularfx_'.$prefix.'_typo',
		'settings' => 'popularfx_'.$prefix.'[text-transform]',
		'label' => __( 'Text Transform', 'popularfx' ),
		'choices' => $popularfx_transform,
	) );
	
	
	$r = [];
	$r[0] = 'Default';
	for($i = 1; $i <= 50; $i++){
		$v = (string) round($i/10, 1);
		$r[$v] = esc_attr($v);
	}
	
	//pagelayer_print($r);
	
	// Line Height
	$wp_customize->add_setting( 'popularfx_'.$prefix.'[line-height]', array(
		'capability' => 'edit_theme_options',
		'transport' => 'refresh',
		'default' => 'inherit',
		'sanitize_callback' => 'sanitize_text_field',
		)
	);
	
	$wp_customize->add_control( 'popularfx_'.$prefix.'[line-height]', array(
		'type' => 'select',
		'section' => 'popularfx_'.$prefix.'_typo',
		'settings' => 'popularfx_'.$prefix.'[line-height]',
		'label' => __( 'Line Height', 'popularfx' ),
		'choices' => $r,
	) );
	
	// Text Spacing
	$wp_customize->add_setting( 'popularfx_'.$prefix.'[letter-spacing]', array(
		'capability' => 'edit_theme_options',
		'transport' => 'refresh',
		'default' => 'inherit',
		'sanitize_callback' => 'sanitize_text_field',
		)
	);
	
	$wp_customize->add_control( 'popularfx_'.$prefix.'[letter-spacing]', array(
		'type' => 'select',
		'section' => 'popularfx_'.$prefix.'_typo',
		'settings' => 'popularfx_'.$prefix.'[letter-spacing]',
		'label' => __( 'Text Spacing', 'popularfx' ),
		'choices' => $r,
	) );
	
	// Word Spacing
	$wp_customize->add_setting( 'popularfx_'.$prefix.'[word-spacing]', array(
		'capability' => 'edit_theme_options',
		'transport' => 'refresh',
		'default' => 'inherit',
		'sanitize_callback' => 'sanitize_text_field',
		)
	);
	
	$wp_customize->add_control( 'popularfx_'.$prefix.'[word-spacing]', array(
		'type' => 'select',
		'section' => 'popularfx_'.$prefix.'_typo',
		'settings' => 'popularfx_'.$prefix.'[word-spacing]',
		'label' => __( 'Word Spacing', 'popularfx' ),
		'choices' => $r,
	) );
	
	//Font Colors
	$wp_customize->add_setting( 'popularfx_'.$prefix.'[color]', array(
		'capability' => 'edit_theme_options',
		'transport' => 'refresh',
		'default' => 'inherit',
		'sanitize_callback' => 'popularfx_hex_rgba_sanitization',
		)
	);
	
	$wp_customize->add_control( new Popularfx_Customize_Alpha_Color_Control(
		$wp_customize, 'popularfx_'.$prefix.'[color]', array(
			'section' => 'popularfx_'.$prefix.'_typo',
			'settings' => 'popularfx_'.$prefix.'[color]',
			'label' => __( 'Text Color', 'popularfx' )
		)
	) );
	
}

/**
 * Render the site title for the selective refresh partial.
 *
 * @return void
 */
function popularfx_customize_partial_blogname() {
	bloginfo( 'name' );
}

/**
 * Render the site tagline for the selective refresh partial.
 *
 * @return void
 */
function popularfx_customize_partial_blogdescription() {
	bloginfo( 'description' );
}

/**
 * Binds JS handlers to make Theme Customizer preview reload changes asynchronously.
 */
function popularfx_customize_preview_js() {
	wp_enqueue_script( 'popularfx-customizer', get_template_directory_uri() . '/js/customizer.js', array( 'customize-preview' ), '20151215', true );
}
add_action( 'customize_preview_init', 'popularfx_customize_preview_js' );


home/xbodynamge/namtation/wp-content/themes/twentysixteen/inc/customizer.php000060400000075532151146235310023637 0ustar00<?php
/**
 * Twenty Sixteen Customizer functionality
 *
 * @package WordPress
 * @subpackage Twenty_Sixteen
 * @since Twenty Sixteen 1.0
 */

/**
 * Sets up the WordPress core custom header and custom background features.
 *
 * @since Twenty Sixteen 1.0
 *
 * @see twentysixteen_header_style()
 */
function twentysixteen_custom_header_and_background() {
	$color_scheme             = twentysixteen_get_color_scheme();
	$default_background_color = trim( $color_scheme[0], '#' );
	$default_text_color       = trim( $color_scheme[3], '#' );

	/**
	 * Filter the arguments used when adding 'custom-background' support in Twenty Sixteen.
	 *
	 * @since Twenty Sixteen 1.0
	 *
	 * @param array $args {
	 *     An array of custom-background support arguments.
	 *
	 *     @type string $default-color Default color of the background.
	 * }
	 */
	add_theme_support(
		'custom-background',
		apply_filters(
			'twentysixteen_custom_background_args',
			array(
				'default-color' => $default_background_color,
			)
		)
	);

	/**
	 * Filter the arguments used when adding 'custom-header' support in Twenty Sixteen.
	 *
	 * @since Twenty Sixteen 1.0
	 *
	 * @param array $args {
	 *     An array of custom-header support arguments.
	 *
	 *     @type string $default-text-color Default color of the header text.
	 *     @type int      $width            Width in pixels of the custom header image. Default 1200.
	 *     @type int      $height           Height in pixels of the custom header image. Default 280.
	 *     @type bool     $flex-height      Whether to allow flexible-height header images. Default true.
	 *     @type callable $wp-head-callback Callback function used to style the header image and text
	 *                                      displayed on the blog.
	 * }
	 */
	add_theme_support(
		'custom-header',
		apply_filters(
			'twentysixteen_custom_header_args',
			array(
				'default-text-color' => $default_text_color,
				'width'              => 1200,
				'height'             => 280,
				'flex-height'        => true,
				'wp-head-callback'   => 'twentysixteen_header_style',
			)
		)
	);
}
add_action( 'after_setup_theme', 'twentysixteen_custom_header_and_background' );

if ( ! function_exists( 'twentysixteen_header_style' ) ) :
	/**
	 * Styles the header text displayed on the site.
	 *
	 * Create your own twentysixteen_header_style() function to override in a child theme.
	 *
	 * @since Twenty Sixteen 1.0
	 *
	 * @see twentysixteen_custom_header_and_background().
	 */
	function twentysixteen_header_style() {
		// If the header text option is untouched, let's bail.
		if ( display_header_text() ) {
			return;
		}

		// If the header text has been hidden.
		?>
		<style type="text/css" id="twentysixteen-header-css">
		.site-branding {
			margin: 0 auto 0 0;
		}

		.site-branding .site-title,
		.site-description {
			clip: rect(1px, 1px, 1px, 1px);
			position: absolute;
		}
		</style>
		<?php
	}
endif; // twentysixteen_header_style

/**
 * Adds postMessage support for site title and description for the Customizer.
 *
 * @since Twenty Sixteen 1.0
 *
 * @param WP_Customize_Manager $wp_customize The Customizer object.
 */
function twentysixteen_customize_register( $wp_customize ) {
	$color_scheme = twentysixteen_get_color_scheme();

	$wp_customize->get_setting( 'blogname' )->transport        = 'postMessage';
	$wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage';

	if ( isset( $wp_customize->selective_refresh ) ) {
		$wp_customize->selective_refresh->add_partial(
			'blogname',
			array(
				'selector'            => '.site-title a',
				'container_inclusive' => false,
				'render_callback'     => 'twentysixteen_customize_partial_blogname',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'blogdescription',
			array(
				'selector'            => '.site-description',
				'container_inclusive' => false,
				'render_callback'     => 'twentysixteen_customize_partial_blogdescription',
			)
		);
	}

	// Add color scheme setting and control.
	$wp_customize->add_setting(
		'color_scheme',
		array(
			'default'           => 'default',
			'sanitize_callback' => 'twentysixteen_sanitize_color_scheme',
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		'color_scheme',
		array(
			'label'    => __( 'Base Color Scheme', 'twentysixteen' ),
			'section'  => 'colors',
			'type'     => 'select',
			'choices'  => twentysixteen_get_color_scheme_choices(),
			'priority' => 1,
		)
	);

	// Add page background color setting and control.
	$wp_customize->add_setting(
		'page_background_color',
		array(
			'default'           => $color_scheme[1],
			'sanitize_callback' => 'sanitize_hex_color',
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		new WP_Customize_Color_Control(
			$wp_customize,
			'page_background_color',
			array(
				'label'   => __( 'Page Background Color', 'twentysixteen' ),
				'section' => 'colors',
			)
		)
	);

	// Remove the core header textcolor control, as it shares the main text color.
	$wp_customize->remove_control( 'header_textcolor' );

	// Add link color setting and control.
	$wp_customize->add_setting(
		'link_color',
		array(
			'default'           => $color_scheme[2],
			'sanitize_callback' => 'sanitize_hex_color',
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		new WP_Customize_Color_Control(
			$wp_customize,
			'link_color',
			array(
				'label'   => __( 'Link Color', 'twentysixteen' ),
				'section' => 'colors',
			)
		)
	);

	// Add main text color setting and control.
	$wp_customize->add_setting(
		'main_text_color',
		array(
			'default'           => $color_scheme[3],
			'sanitize_callback' => 'sanitize_hex_color',
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		new WP_Customize_Color_Control(
			$wp_customize,
			'main_text_color',
			array(
				'label'   => __( 'Main Text Color', 'twentysixteen' ),
				'section' => 'colors',
			)
		)
	);

	// Add secondary text color setting and control.
	$wp_customize->add_setting(
		'secondary_text_color',
		array(
			'default'           => $color_scheme[4],
			'sanitize_callback' => 'sanitize_hex_color',
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		new WP_Customize_Color_Control(
			$wp_customize,
			'secondary_text_color',
			array(
				'label'   => __( 'Secondary Text Color', 'twentysixteen' ),
				'section' => 'colors',
			)
		)
	);
}
add_action( 'customize_register', 'twentysixteen_customize_register', 11 );

/**
 * Render the site title for the selective refresh partial.
 *
 * @since Twenty Sixteen 1.2
 * @see twentysixteen_customize_register()
 *
 * @return void
 */
function twentysixteen_customize_partial_blogname() {
	bloginfo( 'name' );
}

/**
 * Render the site tagline for the selective refresh partial.
 *
 * @since Twenty Sixteen 1.2
 * @see twentysixteen_customize_register()
 *
 * @return void
 */
function twentysixteen_customize_partial_blogdescription() {
	bloginfo( 'description' );
}

/**
 * Registers color schemes for Twenty Sixteen.
 *
 * Can be filtered with {@see 'twentysixteen_color_schemes'}.
 *
 * The order of colors in a colors array:
 * 1. Main Background Color.
 * 2. Page Background Color.
 * 3. Link Color.
 * 4. Main Text Color.
 * 5. Secondary Text Color.
 *
 * @since Twenty Sixteen 1.0
 *
 * @return array An associative array of color scheme options.
 */
function twentysixteen_get_color_schemes() {
	/**
	 * Filter the color schemes registered for use with Twenty Sixteen.
	 *
	 * The default schemes include 'default', 'dark', 'gray', 'red', and 'yellow'.
	 *
	 * @since Twenty Sixteen 1.0
	 *
	 * @param array $schemes {
	 *     Associative array of color schemes data.
	 *
	 *     @type array $slug {
	 *         Associative array of information for setting up the color scheme.
	 *
	 *         @type string $label  Color scheme label.
	 *         @type array  $colors HEX codes for default colors prepended with a hash symbol ('#').
	 *                              Colors are defined in the following order: Main background, page
	 *                              background, link, main text, secondary text.
	 *     }
	 * }
	 */
	return apply_filters(
		'twentysixteen_color_schemes',
		array(
			'default' => array(
				'label'  => __( 'Default', 'twentysixteen' ),
				'colors' => array(
					'#1a1a1a',
					'#ffffff',
					'#007acc',
					'#1a1a1a',
					'#686868',
				),
			),
			'dark'    => array(
				'label'  => __( 'Dark', 'twentysixteen' ),
				'colors' => array(
					'#262626',
					'#1a1a1a',
					'#9adffd',
					'#e5e5e5',
					'#c1c1c1',
				),
			),
			'gray'    => array(
				'label'  => __( 'Gray', 'twentysixteen' ),
				'colors' => array(
					'#616a73',
					'#4d545c',
					'#c7c7c7',
					'#f2f2f2',
					'#f2f2f2',
				),
			),
			'red'     => array(
				'label'  => __( 'Red', 'twentysixteen' ),
				'colors' => array(
					'#ffffff',
					'#ff675f',
					'#640c1f',
					'#402b30',
					'#402b30',
				),
			),
			'yellow'  => array(
				'label'  => __( 'Yellow', 'twentysixteen' ),
				'colors' => array(
					'#3b3721',
					'#ffef8e',
					'#774e24',
					'#3b3721',
					'#5b4d3e',
				),
			),
		)
	);
}

if ( ! function_exists( 'twentysixteen_get_color_scheme' ) ) :
	/**
	 * Retrieves the current Twenty Sixteen color scheme.
	 *
	 * Create your own twentysixteen_get_color_scheme() function to override in a child theme.
	 *
	 * @since Twenty Sixteen 1.0
	 *
	 * @return array An associative array of either the current or default color scheme HEX values.
	 */
	function twentysixteen_get_color_scheme() {
		$color_scheme_option = get_theme_mod( 'color_scheme', 'default' );
		$color_schemes       = twentysixteen_get_color_schemes();

		if ( array_key_exists( $color_scheme_option, $color_schemes ) ) {
			return $color_schemes[ $color_scheme_option ]['colors'];
		}

		return $color_schemes['default']['colors'];
	}
endif; // twentysixteen_get_color_scheme

if ( ! function_exists( 'twentysixteen_get_color_scheme_choices' ) ) :
	/**
	 * Retrieves an array of color scheme choices registered for Twenty Sixteen.
	 *
	 * Create your own twentysixteen_get_color_scheme_choices() function to override
	 * in a child theme.
	 *
	 * @since Twenty Sixteen 1.0
	 *
	 * @return array Array of color schemes.
	 */
	function twentysixteen_get_color_scheme_choices() {
		$color_schemes                = twentysixteen_get_color_schemes();
		$color_scheme_control_options = array();

		foreach ( $color_schemes as $color_scheme => $value ) {
			$color_scheme_control_options[ $color_scheme ] = $value['label'];
		}

		return $color_scheme_control_options;
	}
endif; // twentysixteen_get_color_scheme_choices


if ( ! function_exists( 'twentysixteen_sanitize_color_scheme' ) ) :
	/**
	 * Handles sanitization for Twenty Sixteen color schemes.
	 *
	 * Create your own twentysixteen_sanitize_color_scheme() function to override
	 * in a child theme.
	 *
	 * @since Twenty Sixteen 1.0
	 *
	 * @param string $value Color scheme name value.
	 * @return string Color scheme name.
	 */
	function twentysixteen_sanitize_color_scheme( $value ) {
		$color_schemes = twentysixteen_get_color_scheme_choices();

		if ( ! array_key_exists( $value, $color_schemes ) ) {
			return 'default';
		}

		return $value;
	}
endif; // twentysixteen_sanitize_color_scheme

/**
 * Enqueues front-end CSS for color scheme.
 *
 * @since Twenty Sixteen 1.0
 *
 * @see wp_add_inline_style()
 */
function twentysixteen_color_scheme_css() {
	$color_scheme_option = get_theme_mod( 'color_scheme', 'default' );

	// Don't do anything if the default color scheme is selected.
	if ( 'default' === $color_scheme_option ) {
		return;
	}

	$color_scheme = twentysixteen_get_color_scheme();

	// Convert main text hex color to rgba.
	$color_textcolor_rgb = twentysixteen_hex2rgb( $color_scheme[3] );

	// If the rgba values are empty return early.
	if ( empty( $color_textcolor_rgb ) ) {
		return;
	}

	// If we get this far, we have a custom color scheme.
	$colors = array(
		'background_color'      => $color_scheme[0],
		'page_background_color' => $color_scheme[1],
		'link_color'            => $color_scheme[2],
		'main_text_color'       => $color_scheme[3],
		'secondary_text_color'  => $color_scheme[4],
		'border_color'          => vsprintf( 'rgba( %1$s, %2$s, %3$s, 0.2)', $color_textcolor_rgb ),

	);

	$color_scheme_css = twentysixteen_get_color_scheme_css( $colors );

	wp_add_inline_style( 'twentysixteen-style', $color_scheme_css );
}
add_action( 'wp_enqueue_scripts', 'twentysixteen_color_scheme_css' );

/**
 * Binds the JS listener to make Customizer color_scheme control.
 *
 * Passes color scheme data as colorScheme global.
 *
 * @since Twenty Sixteen 1.0
 */
function twentysixteen_customize_control_js() {
	wp_enqueue_script( 'color-scheme-control', get_template_directory_uri() . '/js/color-scheme-control.js', array( 'customize-controls', 'iris', 'underscore', 'wp-util' ), '20160816', true );
	wp_localize_script( 'color-scheme-control', 'colorScheme', twentysixteen_get_color_schemes() );
}
add_action( 'customize_controls_enqueue_scripts', 'twentysixteen_customize_control_js' );

/**
 * Binds JS handlers to make the Customizer preview reload changes asynchronously.
 *
 * @since Twenty Sixteen 1.0
 */
function twentysixteen_customize_preview_js() {
	wp_enqueue_script( 'twentysixteen-customize-preview', get_template_directory_uri() . '/js/customize-preview.js', array( 'customize-preview' ), '20160816', true );
}
add_action( 'customize_preview_init', 'twentysixteen_customize_preview_js' );

/**
 * Returns CSS for the color schemes.
 *
 * @since Twenty Sixteen 1.0
 *
 * @param array $colors Color scheme colors.
 * @return string Color scheme CSS.
 */
function twentysixteen_get_color_scheme_css( $colors ) {
	$colors = wp_parse_args(
		$colors,
		array(
			'background_color'      => '',
			'page_background_color' => '',
			'link_color'            => '',
			'main_text_color'       => '',
			'secondary_text_color'  => '',
			'border_color'          => '',
		)
	);

	return <<<CSS
	/* Color Scheme */

	/* Background Color */
	body {
		background-color: {$colors['background_color']};
	}

	/* Page Background Color */
	.site {
		background-color: {$colors['page_background_color']};
	}

	mark,
	ins,
	button,
	button[disabled]:hover,
	button[disabled]:focus,
	input[type="button"],
	input[type="button"][disabled]:hover,
	input[type="button"][disabled]:focus,
	input[type="reset"],
	input[type="reset"][disabled]:hover,
	input[type="reset"][disabled]:focus,
	input[type="submit"],
	input[type="submit"][disabled]:hover,
	input[type="submit"][disabled]:focus,
	.menu-toggle.toggled-on,
	.menu-toggle.toggled-on:hover,
	.menu-toggle.toggled-on:focus,
	.pagination .prev,
	.pagination .next,
	.pagination .prev:hover,
	.pagination .prev:focus,
	.pagination .next:hover,
	.pagination .next:focus,
	.pagination .nav-links:before,
	.pagination .nav-links:after,
	.widget_calendar tbody a,
	.widget_calendar tbody a:hover,
	.widget_calendar tbody a:focus,
	.page-links a,
	.page-links a:hover,
	.page-links a:focus {
		color: {$colors['page_background_color']};
	}

	/* Link Color */
	.menu-toggle:hover,
	.menu-toggle:focus,
	a,
	.main-navigation a:hover,
	.main-navigation a:focus,
	.dropdown-toggle:hover,
	.dropdown-toggle:focus,
	.social-navigation a:hover:before,
	.social-navigation a:focus:before,
	.post-navigation a:hover .post-title,
	.post-navigation a:focus .post-title,
	.tagcloud a:hover,
	.tagcloud a:focus,
	.site-branding .site-title a:hover,
	.site-branding .site-title a:focus,
	.entry-title a:hover,
	.entry-title a:focus,
	.entry-footer a:hover,
	.entry-footer a:focus,
	.comment-metadata a:hover,
	.comment-metadata a:focus,
	.pingback .comment-edit-link:hover,
	.pingback .comment-edit-link:focus,
	.comment-reply-link,
	.comment-reply-link:hover,
	.comment-reply-link:focus,
	.required,
	.site-info a:hover,
	.site-info a:focus {
		color: {$colors['link_color']};
	}

	mark,
	ins,
	button:hover,
	button:focus,
	input[type="button"]:hover,
	input[type="button"]:focus,
	input[type="reset"]:hover,
	input[type="reset"]:focus,
	input[type="submit"]:hover,
	input[type="submit"]:focus,
	.pagination .prev:hover,
	.pagination .prev:focus,
	.pagination .next:hover,
	.pagination .next:focus,
	.widget_calendar tbody a,
	.page-links a:hover,
	.page-links a:focus {
		background-color: {$colors['link_color']};
	}

	input[type="date"]:focus,
	input[type="time"]:focus,
	input[type="datetime-local"]:focus,
	input[type="week"]:focus,
	input[type="month"]:focus,
	input[type="text"]:focus,
	input[type="email"]:focus,
	input[type="url"]:focus,
	input[type="password"]:focus,
	input[type="search"]:focus,
	input[type="tel"]:focus,
	input[type="number"]:focus,
	textarea:focus,
	.tagcloud a:hover,
	.tagcloud a:focus,
	.menu-toggle:hover,
	.menu-toggle:focus {
		border-color: {$colors['link_color']};
	}

	/* Main Text Color */
	body,
	blockquote cite,
	blockquote small,
	.main-navigation a,
	.menu-toggle,
	.dropdown-toggle,
	.social-navigation a,
	.post-navigation a,
	.pagination a:hover,
	.pagination a:focus,
	.widget-title a,
	.site-branding .site-title a,
	.entry-title a,
	.page-links > .page-links-title,
	.comment-author,
	.comment-reply-title small a:hover,
	.comment-reply-title small a:focus {
		color: {$colors['main_text_color']};
	}

	blockquote,
	.menu-toggle.toggled-on,
	.menu-toggle.toggled-on:hover,
	.menu-toggle.toggled-on:focus,
	.post-navigation,
	.post-navigation div + div,
	.pagination,
	.widget,
	.page-header,
	.page-links a,
	.comments-title,
	.comment-reply-title {
		border-color: {$colors['main_text_color']};
	}

	button,
	button[disabled]:hover,
	button[disabled]:focus,
	input[type="button"],
	input[type="button"][disabled]:hover,
	input[type="button"][disabled]:focus,
	input[type="reset"],
	input[type="reset"][disabled]:hover,
	input[type="reset"][disabled]:focus,
	input[type="submit"],
	input[type="submit"][disabled]:hover,
	input[type="submit"][disabled]:focus,
	.menu-toggle.toggled-on,
	.menu-toggle.toggled-on:hover,
	.menu-toggle.toggled-on:focus,
	.pagination:before,
	.pagination:after,
	.pagination .prev,
	.pagination .next,
	.page-links a {
		background-color: {$colors['main_text_color']};
	}

	/* Secondary Text Color */

	/**
	 * IE8 and earlier will drop any block with CSS3 selectors.
	 * Do not combine these styles with the next block.
	 */
	body:not(.search-results) .entry-summary {
		color: {$colors['secondary_text_color']};
	}

	blockquote,
	.post-password-form label,
	a:hover,
	a:focus,
	a:active,
	.post-navigation .meta-nav,
	.image-navigation,
	.comment-navigation,
	.widget_recent_entries .post-date,
	.widget_rss .rss-date,
	.widget_rss cite,
	.site-description,
	.author-bio,
	.entry-footer,
	.entry-footer a,
	.sticky-post,
	.taxonomy-description,
	.entry-caption,
	.comment-metadata,
	.pingback .edit-link,
	.comment-metadata a,
	.pingback .comment-edit-link,
	.comment-form label,
	.comment-notes,
	.comment-awaiting-moderation,
	.logged-in-as,
	.form-allowed-tags,
	.site-info,
	.site-info a,
	.wp-caption .wp-caption-text,
	.gallery-caption,
	.widecolumn label,
	.widecolumn .mu_register label {
		color: {$colors['secondary_text_color']};
	}

	.widget_calendar tbody a:hover,
	.widget_calendar tbody a:focus {
		background-color: {$colors['secondary_text_color']};
	}

	/* Border Color */
	fieldset,
	pre,
	abbr,
	acronym,
	table,
	th,
	td,
	input[type="date"],
	input[type="time"],
	input[type="datetime-local"],
	input[type="week"],
	input[type="month"],
	input[type="text"],
	input[type="email"],
	input[type="url"],
	input[type="password"],
	input[type="search"],
	input[type="tel"],
	input[type="number"],
	textarea,
	.main-navigation li,
	.main-navigation .primary-menu,
	.menu-toggle,
	.dropdown-toggle:after,
	.social-navigation a,
	.image-navigation,
	.comment-navigation,
	.tagcloud a,
	.entry-content,
	.entry-summary,
	.page-links a,
	.page-links > span,
	.comment-list article,
	.comment-list .pingback,
	.comment-list .trackback,
	.comment-reply-link,
	.no-comments,
	.widecolumn .mu_register .mu_alert {
		border-color: {$colors['main_text_color']}; /* Fallback for IE7 and IE8 */
		border-color: {$colors['border_color']};
	}

	hr,
	code {
		background-color: {$colors['main_text_color']}; /* Fallback for IE7 and IE8 */
		background-color: {$colors['border_color']};
	}

	@media screen and (min-width: 56.875em) {
		.main-navigation li:hover > a,
		.main-navigation li.focus > a {
			color: {$colors['link_color']};
		}

		.main-navigation ul ul,
		.main-navigation ul ul li {
			border-color: {$colors['border_color']};
		}

		.main-navigation ul ul:before {
			border-top-color: {$colors['border_color']};
			border-bottom-color: {$colors['border_color']};
		}

		.main-navigation ul ul li {
			background-color: {$colors['page_background_color']};
		}

		.main-navigation ul ul:after {
			border-top-color: {$colors['page_background_color']};
			border-bottom-color: {$colors['page_background_color']};
		}
	}

CSS;
}


/**
 * Outputs an Underscore template for generating CSS for the color scheme.
 *
 * The template generates the css dynamically for instant display in the
 * Customizer preview.
 *
 * @since Twenty Sixteen 1.0
 */
function twentysixteen_color_scheme_css_template() {
	$colors = array(
		'background_color'      => '{{ data.background_color }}',
		'page_background_color' => '{{ data.page_background_color }}',
		'link_color'            => '{{ data.link_color }}',
		'main_text_color'       => '{{ data.main_text_color }}',
		'secondary_text_color'  => '{{ data.secondary_text_color }}',
		'border_color'          => '{{ data.border_color }}',
	);
	?>
	<script type="text/html" id="tmpl-twentysixteen-color-scheme">
		<?php echo twentysixteen_get_color_scheme_css( $colors ); ?>
	</script>
	<?php
}
add_action( 'customize_controls_print_footer_scripts', 'twentysixteen_color_scheme_css_template' );

/**
 * Enqueues front-end CSS for the page background color.
 *
 * @since Twenty Sixteen 1.0
 *
 * @see wp_add_inline_style()
 */
function twentysixteen_page_background_color_css() {
	$color_scheme          = twentysixteen_get_color_scheme();
	$default_color         = $color_scheme[1];
	$page_background_color = get_theme_mod( 'page_background_color', $default_color );

	// Don't do anything if the current color is the default.
	if ( $page_background_color === $default_color ) {
		return;
	}

	$css = '
		/* Custom Page Background Color */
		.site {
			background-color: %1$s;
		}

		mark,
		ins,
		button,
		button[disabled]:hover,
		button[disabled]:focus,
		input[type="button"],
		input[type="button"][disabled]:hover,
		input[type="button"][disabled]:focus,
		input[type="reset"],
		input[type="reset"][disabled]:hover,
		input[type="reset"][disabled]:focus,
		input[type="submit"],
		input[type="submit"][disabled]:hover,
		input[type="submit"][disabled]:focus,
		.menu-toggle.toggled-on,
		.menu-toggle.toggled-on:hover,
		.menu-toggle.toggled-on:focus,
		.pagination .prev,
		.pagination .next,
		.pagination .prev:hover,
		.pagination .prev:focus,
		.pagination .next:hover,
		.pagination .next:focus,
		.pagination .nav-links:before,
		.pagination .nav-links:after,
		.widget_calendar tbody a,
		.widget_calendar tbody a:hover,
		.widget_calendar tbody a:focus,
		.page-links a,
		.page-links a:hover,
		.page-links a:focus {
			color: %1$s;
		}

		@media screen and (min-width: 56.875em) {
			.main-navigation ul ul li {
				background-color: %1$s;
			}

			.main-navigation ul ul:after {
				border-top-color: %1$s;
				border-bottom-color: %1$s;
			}
		}
	';

	wp_add_inline_style( 'twentysixteen-style', sprintf( $css, $page_background_color ) );
}
add_action( 'wp_enqueue_scripts', 'twentysixteen_page_background_color_css', 11 );

/**
 * Enqueues front-end CSS for the link color.
 *
 * @since Twenty Sixteen 1.0
 *
 * @see wp_add_inline_style()
 */
function twentysixteen_link_color_css() {
	$color_scheme  = twentysixteen_get_color_scheme();
	$default_color = $color_scheme[2];
	$link_color    = get_theme_mod( 'link_color', $default_color );

	// Don't do anything if the current color is the default.
	if ( $link_color === $default_color ) {
		return;
	}

	$css = '
		/* Custom Link Color */
		.menu-toggle:hover,
		.menu-toggle:focus,
		a,
		.main-navigation a:hover,
		.main-navigation a:focus,
		.dropdown-toggle:hover,
		.dropdown-toggle:focus,
		.social-navigation a:hover:before,
		.social-navigation a:focus:before,
		.post-navigation a:hover .post-title,
		.post-navigation a:focus .post-title,
		.tagcloud a:hover,
		.tagcloud a:focus,
		.site-branding .site-title a:hover,
		.site-branding .site-title a:focus,
		.entry-title a:hover,
		.entry-title a:focus,
		.entry-footer a:hover,
		.entry-footer a:focus,
		.comment-metadata a:hover,
		.comment-metadata a:focus,
		.pingback .comment-edit-link:hover,
		.pingback .comment-edit-link:focus,
		.comment-reply-link,
		.comment-reply-link:hover,
		.comment-reply-link:focus,
		.required,
		.site-info a:hover,
		.site-info a:focus {
			color: %1$s;
		}

		mark,
		ins,
		button:hover,
		button:focus,
		input[type="button"]:hover,
		input[type="button"]:focus,
		input[type="reset"]:hover,
		input[type="reset"]:focus,
		input[type="submit"]:hover,
		input[type="submit"]:focus,
		.pagination .prev:hover,
		.pagination .prev:focus,
		.pagination .next:hover,
		.pagination .next:focus,
		.widget_calendar tbody a,
		.page-links a:hover,
		.page-links a:focus {
			background-color: %1$s;
		}

		input[type="date"]:focus,
		input[type="time"]:focus,
		input[type="datetime-local"]:focus,
		input[type="week"]:focus,
		input[type="month"]:focus,
		input[type="text"]:focus,
		input[type="email"]:focus,
		input[type="url"]:focus,
		input[type="password"]:focus,
		input[type="search"]:focus,
		input[type="tel"]:focus,
		input[type="number"]:focus,
		textarea:focus,
		.tagcloud a:hover,
		.tagcloud a:focus,
		.menu-toggle:hover,
		.menu-toggle:focus {
			border-color: %1$s;
		}

		@media screen and (min-width: 56.875em) {
			.main-navigation li:hover > a,
			.main-navigation li.focus > a {
				color: %1$s;
			}
		}
	';

	wp_add_inline_style( 'twentysixteen-style', sprintf( $css, $link_color ) );
}
add_action( 'wp_enqueue_scripts', 'twentysixteen_link_color_css', 11 );

/**
 * Enqueues front-end CSS for the main text color.
 *
 * @since Twenty Sixteen 1.0
 *
 * @see wp_add_inline_style()
 */
function twentysixteen_main_text_color_css() {
	$color_scheme    = twentysixteen_get_color_scheme();
	$default_color   = $color_scheme[3];
	$main_text_color = get_theme_mod( 'main_text_color', $default_color );

	// Don't do anything if the current color is the default.
	if ( $main_text_color === $default_color ) {
		return;
	}

	// Convert main text hex color to rgba.
	$main_text_color_rgb = twentysixteen_hex2rgb( $main_text_color );

	// If the rgba values are empty return early.
	if ( empty( $main_text_color_rgb ) ) {
		return;
	}

	// If we get this far, we have a custom color scheme.
	$border_color = vsprintf( 'rgba( %1$s, %2$s, %3$s, 0.2)', $main_text_color_rgb );

	$css = '
		/* Custom Main Text Color */
		body,
		blockquote cite,
		blockquote small,
		.main-navigation a,
		.menu-toggle,
		.dropdown-toggle,
		.social-navigation a,
		.post-navigation a,
		.pagination a:hover,
		.pagination a:focus,
		.widget-title a,
		.site-branding .site-title a,
		.entry-title a,
		.page-links > .page-links-title,
		.comment-author,
		.comment-reply-title small a:hover,
		.comment-reply-title small a:focus {
			color: %1$s
		}

		blockquote,
		.menu-toggle.toggled-on,
		.menu-toggle.toggled-on:hover,
		.menu-toggle.toggled-on:focus,
		.post-navigation,
		.post-navigation div + div,
		.pagination,
		.widget,
		.page-header,
		.page-links a,
		.comments-title,
		.comment-reply-title {
			border-color: %1$s;
		}

		button,
		button[disabled]:hover,
		button[disabled]:focus,
		input[type="button"],
		input[type="button"][disabled]:hover,
		input[type="button"][disabled]:focus,
		input[type="reset"],
		input[type="reset"][disabled]:hover,
		input[type="reset"][disabled]:focus,
		input[type="submit"],
		input[type="submit"][disabled]:hover,
		input[type="submit"][disabled]:focus,
		.menu-toggle.toggled-on,
		.menu-toggle.toggled-on:hover,
		.menu-toggle.toggled-on:focus,
		.pagination:before,
		.pagination:after,
		.pagination .prev,
		.pagination .next,
		.page-links a {
			background-color: %1$s;
		}

		/* Border Color */
		fieldset,
		pre,
		abbr,
		acronym,
		table,
		th,
		td,
		input[type="date"],
		input[type="time"],
		input[type="datetime-local"],
		input[type="week"],
		input[type="month"],
		input[type="text"],
		input[type="email"],
		input[type="url"],
		input[type="password"],
		input[type="search"],
		input[type="tel"],
		input[type="number"],
		textarea,
		.main-navigation li,
		.main-navigation .primary-menu,
		.menu-toggle,
		.dropdown-toggle:after,
		.social-navigation a,
		.image-navigation,
		.comment-navigation,
		.tagcloud a,
		.entry-content,
		.entry-summary,
		.page-links a,
		.page-links > span,
		.comment-list article,
		.comment-list .pingback,
		.comment-list .trackback,
		.comment-reply-link,
		.no-comments,
		.widecolumn .mu_register .mu_alert {
			border-color: %1$s; /* Fallback for IE7 and IE8 */
			border-color: %2$s;
		}

		hr,
		code {
			background-color: %1$s; /* Fallback for IE7 and IE8 */
			background-color: %2$s;
		}

		@media screen and (min-width: 56.875em) {
			.main-navigation ul ul,
			.main-navigation ul ul li {
				border-color: %2$s;
			}

			.main-navigation ul ul:before {
				border-top-color: %2$s;
				border-bottom-color: %2$s;
			}
		}
	';

	wp_add_inline_style( 'twentysixteen-style', sprintf( $css, $main_text_color, $border_color ) );
}
add_action( 'wp_enqueue_scripts', 'twentysixteen_main_text_color_css', 11 );

/**
 * Enqueues front-end CSS for the secondary text color.
 *
 * @since Twenty Sixteen 1.0
 *
 * @see wp_add_inline_style()
 */
function twentysixteen_secondary_text_color_css() {
	$color_scheme         = twentysixteen_get_color_scheme();
	$default_color        = $color_scheme[4];
	$secondary_text_color = get_theme_mod( 'secondary_text_color', $default_color );

	// Don't do anything if the current color is the default.
	if ( $secondary_text_color === $default_color ) {
		return;
	}

	$css = '
		/* Custom Secondary Text Color */

		/**
		 * IE8 and earlier will drop any block with CSS3 selectors.
		 * Do not combine these styles with the next block.
		 */
		body:not(.search-results) .entry-summary {
			color: %1$s;
		}

		blockquote,
		.post-password-form label,
		a:hover,
		a:focus,
		a:active,
		.post-navigation .meta-nav,
		.image-navigation,
		.comment-navigation,
		.widget_recent_entries .post-date,
		.widget_rss .rss-date,
		.widget_rss cite,
		.site-description,
		.author-bio,
		.entry-footer,
		.entry-footer a,
		.sticky-post,
		.taxonomy-description,
		.entry-caption,
		.comment-metadata,
		.pingback .edit-link,
		.comment-metadata a,
		.pingback .comment-edit-link,
		.comment-form label,
		.comment-notes,
		.comment-awaiting-moderation,
		.logged-in-as,
		.form-allowed-tags,
		.site-info,
		.site-info a,
		.wp-caption .wp-caption-text,
		.gallery-caption,
		.widecolumn label,
		.widecolumn .mu_register label {
			color: %1$s;
		}

		.widget_calendar tbody a:hover,
		.widget_calendar tbody a:focus {
			background-color: %1$s;
		}
	';

	wp_add_inline_style( 'twentysixteen-style', sprintf( $css, $secondary_text_color ) );
}
add_action( 'wp_enqueue_scripts', 'twentysixteen_secondary_text_color_css', 11 );
home/xbodynamge/namtation/wp-content/themes/twentynineteen/inc/customizer.php000060400000007660151146235320023763 0ustar00<?php
/**
 * Twenty Nineteen: Customizer
 *
 * @package WordPress
 * @subpackage Twenty_Nineteen
 * @since 1.0.0
 */

/**
 * Add postMessage support for site title and description for the Theme Customizer.
 *
 * @param WP_Customize_Manager $wp_customize Theme Customizer object.
 */
function twentynineteen_customize_register( $wp_customize ) {
	$wp_customize->get_setting( 'blogname' )->transport         = 'postMessage';
	$wp_customize->get_setting( 'blogdescription' )->transport  = 'postMessage';
	$wp_customize->get_setting( 'header_textcolor' )->transport = 'postMessage';

	if ( isset( $wp_customize->selective_refresh ) ) {
		$wp_customize->selective_refresh->add_partial(
			'blogname',
			array(
				'selector'        => '.site-title a',
				'render_callback' => 'twentynineteen_customize_partial_blogname',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'blogdescription',
			array(
				'selector'        => '.site-description',
				'render_callback' => 'twentynineteen_customize_partial_blogdescription',
			)
		);
	}

	/**
	 * Primary color.
	 */
	$wp_customize->add_setting(
		'primary_color',
		array(
			'default'           => 'default',
			'transport'         => 'postMessage',
			'sanitize_callback' => 'twentynineteen_sanitize_color_option',
		)
	);

	$wp_customize->add_control(
		'primary_color',
		array(
			'type'     => 'radio',
			'label'    => __( 'Primary Color', 'twentynineteen' ),
			'choices'  => array(
				'default' => _x( 'Default', 'primary color', 'twentynineteen' ),
				'custom'  => _x( 'Custom', 'primary color', 'twentynineteen' ),
			),
			'section'  => 'colors',
			'priority' => 5,
		)
	);

	// Add primary color hue setting and control.
	$wp_customize->add_setting(
		'primary_color_hue',
		array(
			'default'           => 199,
			'transport'         => 'postMessage',
			'sanitize_callback' => 'absint',
		)
	);

	$wp_customize->add_control(
		new WP_Customize_Color_Control(
			$wp_customize,
			'primary_color_hue',
			array(
				'description' => __( 'Apply a custom color for buttons, links, featured images, etc.', 'twentynineteen' ),
				'section'     => 'colors',
				'mode'        => 'hue',
			)
		)
	);

	// Add image filter setting and control.
	$wp_customize->add_setting(
		'image_filter',
		array(
			'default'           => 1,
			'sanitize_callback' => 'absint',
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		'image_filter',
		array(
			'label'   => __( 'Apply a filter to featured images using the primary color', 'twentynineteen' ),
			'section' => 'colors',
			'type'    => 'checkbox',
		)
	);
}
add_action( 'customize_register', 'twentynineteen_customize_register' );

/**
 * Render the site title for the selective refresh partial.
 *
 * @return void
 */
function twentynineteen_customize_partial_blogname() {
	bloginfo( 'name' );
}

/**
 * Render the site tagline for the selective refresh partial.
 *
 * @return void
 */
function twentynineteen_customize_partial_blogdescription() {
	bloginfo( 'description' );
}

/**
 * Bind JS handlers to instantly live-preview changes.
 */
function twentynineteen_customize_preview_js() {
	wp_enqueue_script( 'twentynineteen-customize-preview', get_theme_file_uri( '/js/customize-preview.js' ), array( 'customize-preview' ), '20181231', true );
}
add_action( 'customize_preview_init', 'twentynineteen_customize_preview_js' );

/**
 * Load dynamic logic for the customizer controls area.
 */
function twentynineteen_panels_js() {
	wp_enqueue_script( 'twentynineteen-customize-controls', get_theme_file_uri( '/js/customize-controls.js' ), array(), '20181231', true );
}
add_action( 'customize_controls_enqueue_scripts', 'twentynineteen_panels_js' );

/**
 * Sanitize custom color choice.
 *
 * @param string $choice Whether image filter is active.
 *
 * @return string
 */
function twentynineteen_sanitize_color_option( $choice ) {
	$valid = array(
		'default',
		'custom',
	);

	if ( in_array( $choice, $valid, true ) ) {
		return $choice;
	}

	return 'default';
}
home/xbodynamge/namtation/wp-content/themes/zerif-lite/inc/customizer.php000064400000232666151146700050022764 0ustar00<?php
/**
 * Zerif Theme Customizer
 *
 * @package zerif
 */

/**
 * Add postMessage support for site title and description for the Theme Customizer.
 *
 * @param WP_Customize_Manager $wp_customize Theme Customizer object.
 */
function zerif_customize_register( $wp_customize ) {

	/**
	 * Class Zerif_Customizer_Number_Control
	 */
	class Zerif_Customizer_Number_Control extends WP_Customize_Control {

		/**
		 * Type of control
		 *
		 * @var $type string Type of control
		 */
		public $type = 'number';

		/**
		 * Render the control
		 */
		public function render_content() {
			?>
			<label>
				<span class="customize-control-title"><?php echo esc_html( $this->label ); ?></span>
				<input type="number" <?php $this->link(); ?> value="<?php echo intval( $this->value() ); ?>"/>
			</label>
			<?php
		}
	}

	/* Custom panel type - used for multiple levels of panels */
	if ( class_exists( 'WP_Customize_Panel' ) ) {

		/**
		 * Class Zerif_WP_Customize_Panel
		 */
		class Zerif_WP_Customize_Panel extends WP_Customize_Panel {

			/**
			 * Panel
			 *
			 * @var $panel string Panel
			 */
			public $panel;

			/**
			 * Panel type
			 *
			 * @var $type string Panel type.
			 */
			public $type = 'zerif_panel';

			/**
			 * Form the json
			 */
			public function json() {

				$array                   = wp_array_slice_assoc(
					(array) $this,
					array(
						'id',
						'description',
						'priority',
						'type',
						'panel',
					)
				);
				$array['title']          = html_entity_decode( $this->title, ENT_QUOTES, get_bloginfo( 'charset' ) );
				$array['content']        = $this->get_content();
				$array['active']         = $this->active();
				$array['instanceNumber'] = $this->instance_number;

				return $array;

			}

		}

	}

	$wp_customize->register_panel_type( 'Zerif_WP_Customize_Panel' );

	/**
	 * Upsells
	 */
	require_once( trailingslashit( get_template_directory() ) . 'inc/class/class-customizer-theme-info-control/class-customizer-theme-info-control.php' );

	$wp_customize->add_section(
		'zerif_theme_info_main_section',
		array(
			'title'    => __( 'View PRO version', 'zerif-lite' ),
			'priority' => 1,
		)
	);
	$wp_customize->add_setting(
		'zerif_theme_info_main_control',
		array(
			'sanitize_callback' => 'esc_html',
		)
	);

	/*
	 * View Pro Version Section Control
	 */
	$wp_customize->add_control(
		new Zerif_Control_Upsell_Theme_Info(
			$wp_customize,
			'zerif_theme_info_main_control',
			array(
				'section'     => 'zerif_theme_info_main_section',
				'priority'    => 100,
				'options'     => array(
					esc_html__( 'Section Reordering', 'zerif-lite' ),
					esc_html__( 'Background video', 'zerif-lite' ),
					esc_html__( 'Portfolio', 'zerif-lite' ),
					esc_html__( 'Extra colors', 'zerif-lite' ),
					esc_html__( 'Packages section', 'zerif-lite' ),
					esc_html__( 'Subscribe section', 'zerif-lite' ),
					esc_html__( 'Google map section', 'zerif-lite' ),
					esc_html__( 'Support', 'zerif-lite' ),
				),
				'button_url'  => esc_url( 'https://themeisle.com/themes/zerif-pro-one-page-wordpress-theme/upgrade/' ),
				'button_text' => esc_html__( 'View PRO version', 'zerif-lite' ),
			)
		)
	);

	/**
	 * Extra Colors Notice
	 */
	$wp_customize->add_setting(
		'zerif_theme_info_colors_section_control',
		array(
			'sanitize_callback' => 'esc_html',
		)
	);
	$wp_customize->add_control(
		new Zerif_Control_Upsell_Theme_Info(
			$wp_customize,
			'zerif_theme_info_colors_section_control',
			array(
				'section'            => 'colors',
				'priority'           => 500,
				'options'            => array(
					esc_html__( 'Extra colors', 'zerif-lite' ),
				),
				'explained_features' => array(
					esc_html__( 'Get full color schemes support for your site.', 'zerif-lite' ),
				),
				'button_url'         => esc_url( 'https://themeisle.com/themes/zerif-pro-one-page-wordpress-theme/upgrade/' ),
				'button_text'        => esc_html__( 'View PRO version', 'zerif-lite' ),
			)
		)
	);

	/**
	 * Background video notice
	 */
	$wp_customize->add_setting(
		'zerif_theme_info_header_section_control',
		array(
			'sanitize_callback' => 'esc_html',
		)
	);
	$wp_customize->add_control(
		new Zerif_Control_Upsell_Theme_Info(
			$wp_customize,
			'zerif_theme_info_header_section_control',
			array(
				'section'     => 'background_image',
				'priority'    => 500,
				'options'     => array(
					esc_html__( 'Background video', 'zerif-lite' ),
				),
				'button_url'  => esc_url( 'https://themeisle.com/themes/zerif-pro-one-page-wordpress-theme/upgrade/' ),
				'button_text' => esc_html__( 'View PRO version', 'zerif-lite' ),
			)
		)
	);

	$wp_customize->get_setting( 'blogname' )->transport         = 'postMessage';
	$wp_customize->get_setting( 'blogdescription' )->transport  = 'postMessage';
	$wp_customize->get_setting( 'header_textcolor' )->transport = 'postMessage';
	$wp_customize->get_setting( 'custom_logo' )->transport      = 'postMessage';

	if ( isset( $wp_customize->selective_refresh ) ) {
		$wp_customize->selective_refresh->add_partial(
			'custom_logo',
			array(
				'selector'        => '.navbar-brand',
				'settings'        => 'custom_logo',
				'render_callback' => 'zerif_custom_logo_callback',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'zerif_bigtitle_title_2',
			array(
				'selector'        => '.home-header-wrap .intro-text',
				'settings'        => 'zerif_bigtitle_title_2',
				'render_callback' => 'zerif_bigtitle_title_2_render_callback',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'zerif_bigtitle_redbutton_label_2',
			array(
				'selector'        => '.buttons a.red-btn',
				'settings'        => 'zerif_bigtitle_redbutton_label_2',
				'render_callback' => 'zerif_bigtitle_redbutton_label_2_render_callback',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'zerif_bigtitle_greenbutton_label',
			array(
				'selector'        => '.buttons a.green-btn',
				'settings'        => 'zerif_bigtitle_greenbutton_label',
				'render_callback' => 'zerif_bigtitle_greenbutton_label_render_callback',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'zerif_ourfocus_title_2',
			array(
				'selector'        => '#focus .section-header h2',
				'settings'        => 'zerif_ourfocus_title_2',
				'render_callback' => 'zerif_ourfocus_title_2_render_callback',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'zerif_ourfocus_subtitle',
			array(
				'selector'        => '#focus .section-header div.section-legend',
				'settings'        => 'zerif_ourfocus_subtitle',
				'render_callback' => 'zerif_ourfocus_subtitle_render_callback',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'zerif_ourteam_title',
			array(
				'selector'        => '#team .section-header h2',
				'settings'        => 'zerif_ourteam_title',
				'render_callback' => 'zerif_ourteam_title_render_callback',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'zerif_ourteam_subtitle',
			array(
				'selector'        => '#team .section-header div.section-legend',
				'settings'        => 'zerif_ourteam_subtitle',
				'render_callback' => 'zerif_ourteam_subtitle_render_callback',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'zerif_aboutus_title',
			array(
				'selector'        => '#aboutus .section-header h2',
				'settings'        => 'zerif_aboutus_title',
				'render_callback' => 'zerif_aboutus_title_render_callback',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'zerif_aboutus_subtitle',
			array(
				'selector'        => '#aboutus .section-header div.section-legend',
				'settings'        => 'zerif_aboutus_subtitle',
				'render_callback' => 'zerif_aboutus_subtitle_render_callback',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'zerif_aboutus_biglefttitle',
			array(
				'selector'        => '#aboutus .big-intro',
				'settings'        => 'zerif_aboutus_biglefttitle',
				'render_callback' => 'zerif_aboutus_biglefttitle_render_callback',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'zerif_aboutus_text',
			array(
				'selector'        => '#aboutus .text_and_skills p',
				'settings'        => 'zerif_aboutus_text',
				'render_callback' => 'zerif_aboutus_text_render_callback',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'zerif_aboutus_feature1_title',
			array(
				'selector'        => '#aboutus .skill_1 label',
				'settings'        => 'zerif_aboutus_feature1_title',
				'render_callback' => 'zerif_aboutus_feature1_title_render_callback',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'zerif_aboutus_feature2_title',
			array(
				'selector'        => '#aboutus .skill_2 label',
				'settings'        => 'zerif_aboutus_feature2_title',
				'render_callback' => 'zerif_aboutus_feature2_title_render_callback',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'zerif_aboutus_feature3_title',
			array(
				'selector'        => '#aboutus .skill_3 label',
				'settings'        => 'zerif_aboutus_feature3_title',
				'render_callback' => 'zerif_aboutus_feature3_title_render_callback',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'zerif_aboutus_feature4_title',
			array(
				'selector'        => '#aboutus .skill_4 label',
				'settings'        => 'zerif_aboutus_feature4_title',
				'render_callback' => 'zerif_aboutus_feature4_title_render_callback',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'zerif_testimonials_title',
			array(
				'selector'        => '#testimonials .section-header h2',
				'settings'        => 'zerif_testimonials_title',
				'render_callback' => 'zerif_testimonials_title_render_callback',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'zerif_contactus_title',
			array(
				'selector'        => '#contact .section-header h2',
				'render_callback' => 'zerif_contactus_title_render_callback',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'zerif_contactus_subtitle',
			array(
				'selector'        => '#contact .section-legend',
				'render_callback' => 'zerif_contactus_subtitle_render_callback',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'zerif_contactus_button_label',
			array(
				'selector'        => '#contact .pirate_forms .contact_submit_wrap',
				'render_callback' => 'zerif_contactus_button_label_render_callback',
			)
		);

		$wp_customize->selective_refresh->add_partial(
			'zerif_socials_facebook',
			array(
				'selector'        => '#footer .social #facebook',
				'settings'        => 'zerif_socials_facebook',
				'render_callback' => 'zerif_socials_facebook_render_callback',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'zerif_socials_twitter',
			array(
				'selector'        => '#footer .social #twitter',
				'settings'        => 'zerif_socials_twitter',
				'render_callback' => 'zerif_socials_twitter_render_callback',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'zerif_socials_linkedin',
			array(
				'selector'        => '#footer .social #linkedin',
				'settings'        => 'zerif_socials_linkedin',
				'render_callback' => 'zerif_socials_linkedin_render_callback',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'zerif_socials_behance',
			array(
				'selector'        => '#footer .social #behance',
				'settings'        => 'zerif_socials_behance',
				'render_callback' => 'zerif_socials_behance_render_callback',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'zerif_socials_dribbble',
			array(
				'selector'        => '#footer .social #dribbble',
				'settings'        => 'zerif_socials_dribbble',
				'render_callback' => 'zerif_socials_dribbble_render_callback',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'zerif_socials_instagram',
			array(
				'selector'        => '#footer .social #instagram',
				'settings'        => 'zerif_socials_instagram',
				'render_callback' => 'zerif_socials_instagram_render_callback',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'zerif_address',
			array(
				'selector'        => '.zerif-footer-address',
				'settings'        => 'zerif_address',
				'render_callback' => 'zerif_address_render_callback',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'zerif_email',
			array(
				'selector'        => '.zerif-footer-email',
				'settings'        => 'zerif_email',
				'render_callback' => 'zerif_email_render_callback',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'zerif_phone',
			array(
				'selector'        => '.zerif-footer-phone',
				'settings'        => 'zerif_phone',
				'render_callback' => 'zerif_phone_render_callback',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'zerif_address_icon',
			array(
				'selector'        => '.company-details .icon-top.red-text',
				'settings'        => 'zerif_address_icon',
				'render_callback' => 'zerif_address_icon_render_callback',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'zerif_email_icon',
			array(
				'selector'        => '.company-details .icon-top.green-text',
				'settings'        => 'zerif_email_icon',
				'render_callback' => 'zerif_email_icon_render_callback',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'zerif_phone_icon',
			array(
				'selector'        => '.company-details .icon-top.blue-text',
				'settings'        => 'zerif_phone_icon',
				'render_callback' => 'zerif_phone_icon_render_callback',
			)
		);
	}

	/**
	 * Render callback for zerif_bigtitle_title_2
	 *
	 * @return mixed
	 */
	function zerif_bigtitle_title_2_render_callback() {
		return wp_kses_post( get_theme_mod( 'zerif_bigtitle_title_2' ) );
	}

	/**
	 * Render callback for zerif_bigtitle_redbutton_label_2
	 *
	 * @return mixed
	 */
	function zerif_bigtitle_redbutton_label_2_render_callback() {
		return wp_kses_post( get_theme_mod( 'zerif_bigtitle_redbutton_label_2' ) );
	}

	/**
	 * Render callback for zerif_bigtitle_greenbutton_label
	 *
	 * @return mixed
	 */
	function zerif_bigtitle_greenbutton_label_render_callback() {
		return wp_kses_post( get_theme_mod( 'zerif_bigtitle_greenbutton_label' ) );
	}

	/**
	 * Render callback for zerif_ourfocus_title_2
	 *
	 * @return mixed
	 */
	function zerif_ourfocus_title_2_render_callback() {
		return wp_kses_post( get_theme_mod( 'zerif_ourfocus_title_2' ) );
	}

	/**
	 * Render callback for zerif_ourfocus_subtitle
	 *
	 * @return mixed
	 */
	function zerif_ourfocus_subtitle_render_callback() {
		return wp_kses_post( get_theme_mod( 'zerif_ourfocus_subtitle' ) );
	}

	/**
	 * Render callback for zerif_ourteam_title
	 *
	 * @return mixed
	 */
	function zerif_ourteam_title_render_callback() {
		return wp_kses_post( get_theme_mod( 'zerif_ourteam_title' ) );
	}

	/**
	 * Render callback for zerif_ourteam_subtitle
	 *
	 * @return mixed
	 */
	function zerif_ourteam_subtitle_render_callback() {
		return wp_kses_post( get_theme_mod( 'zerif_ourteam_subtitle' ) );
	}

	/**
	 * Render callback for zerif_aboutus_title
	 *
	 * @return mixed
	 */
	function zerif_aboutus_title_render_callback() {
		return wp_kses_post( get_theme_mod( 'zerif_aboutus_title' ) );
	}

	/**
	 * Render callback for zerif_aboutus_subtitle
	 *
	 * @return mixed
	 */
	function zerif_aboutus_subtitle_render_callback() {
		return wp_kses_post( get_theme_mod( 'zerif_aboutus_subtitle' ) );
	}

	/**
	 * Render callback for zerif_aboutus_biglefttitle
	 *
	 * @return mixed
	 */
	function zerif_aboutus_biglefttitle_render_callback() {
		return wp_kses_post( get_theme_mod( 'zerif_aboutus_biglefttitle' ) );
	}

	/**
	 * Render callback for zerif_aboutus_text
	 *
	 * @return mixed
	 */
	function zerif_aboutus_text_render_callback() {
		return wp_kses_post( get_theme_mod( 'zerif_aboutus_text' ) );
	}

	/**
	 * Render callback for zerif_aboutus_feature1_title
	 *
	 * @return mixed
	 */
	function zerif_aboutus_feature1_title_render_callback() {
		return wp_kses_post( get_theme_mod( 'zerif_aboutus_feature1_title' ) );
	}

	/**
	 * Render callback for zerif_aboutus_feature2_title
	 *
	 * @return mixed
	 */
	function zerif_aboutus_feature2_title_render_callback() {
		return wp_kses_post( get_theme_mod( 'zerif_aboutus_feature2_title' ) );
	}

	/**
	 * Render callback for zerif_aboutus_feature3_title
	 *
	 * @return mixed
	 */
	function zerif_aboutus_feature3_title_render_callback() {
		return wp_kses_post( get_theme_mod( 'zerif_aboutus_feature3_title' ) );
	}

	/**
	 * Render callback for zerif_aboutus_feature4_title
	 *
	 * @return mixed
	 */
	function zerif_aboutus_feature4_title_render_callback() {
		return wp_kses_post( get_theme_mod( 'zerif_aboutus_feature4_title' ) );
	}

	/**
	 * Render callback for zerif_testimonials_title
	 *
	 * @return mixed
	 */
	function zerif_testimonials_title_render_callback() {
		return wp_kses_post( get_theme_mod( 'zerif_testimonials_title' ) );
	}

	/**
	 * Render callback for zerif_contactus_title
	 *
	 * @return mixed
	 */
	function zerif_contactus_title_render_callback() {
		return wp_kses_post( get_theme_mod( 'zerif_contactus_title' ) );
	}

	/**
	 * Render callback for zerif_contactus_button_label
	 */
	function zerif_contactus_button_label_render_callback() {
		?>
		<button id="pirate-forms-contact-submit" name="pirate-forms-contact-submit" class="pirate-forms-submit-button" type="submit">
			<?php echo wp_kses_post( get_theme_mod( 'zerif_contactus_button_label' ) ); ?>
		</button>
		<?php
	}

	/**
	 * Render callback for erif_contactus_subtitle
	 *
	 * @return string
	 */
	function zerif_contactus_subtitle_render_callback() {
		return wp_kses_post( get_theme_mod( 'zerif_contactus_subtitle' ) );
	}

	/**
	 * Render callback for zerif_socials_facebook
	 *
	 * @return mixed
	 */
	function zerif_socials_facebook_render_callback() {
		return '<a href="' . esc_url( get_theme_mod( 'zerif_socials_facebook' ) ) . '"><span class="sr-only">' . __( 'Facebook link', 'zerif-lite' ) . '</span> <i class="fa fa-facebook"></i></a>';
	}

	/**
	 * Render callback for zerif_socials_twitter
	 *
	 * @return mixed
	 */
	function zerif_socials_twitter_render_callback() {
		return '<a href="' . esc_url( get_theme_mod( 'zerif_socials_twitter' ) ) . '"><span class="sr-only">' . __( 'Twitter link', 'zerif-lite' ) . '</span> <i class="fa fa-twitter"></i></a>';
	}

	/**
	 * Render callback for zerif_socials_linkedin
	 *
	 * @return mixed
	 */
	function zerif_socials_linkedin_render_callback() {
		return '<a href="' . esc_url( get_theme_mod( 'zerif_socials_linkedin' ) ) . '"><span class="sr-only">' . __( 'Linkedin link', 'zerif-lite' ) . '</span> <i class="fa fa-linkedin"></i></a>';
	}

	/**
	 * Render callback for zerif_socials_behance
	 *
	 * @return mixed
	 */
	function zerif_socials_behance_render_callback() {
		return '<a href="' . esc_url( get_theme_mod( 'zerif_socials_behance' ) ) . '"><span class="sr-only">' . __( 'Behance link', 'zerif-lite' ) . '</span> <i class="fa fa-behance"></i></a>';
	}

	/**
	 * Render callback for zerif_socials_dribbble
	 *
	 * @return mixed
	 */
	function zerif_socials_dribbble_render_callback() {
		return '<a href="' . esc_url( get_theme_mod( 'zerif_socials_dribbble' ) ) . '"><span class="sr-only">' . __( 'Dribble link', 'zerif-lite' ) . '</span> <i class="fa fa-dribbble"></i></a>';
	}

	/**
	 * Render callback for zerif_socials_instagram
	 *
	 * @return mixed
	 */
	function zerif_socials_instagram_render_callback() {
		return '<a href="' . esc_url( get_theme_mod( 'zerif_socials_instagram' ) ) . '"><span class="sr-only">' . __( 'Instagram link', 'zerif-lite' ) . '</span> <i class="fa fa-instagram"></i></a>';
	}

	/**
	 * Render callback for zerif_address
	 *
	 * @return mixed
	 */
	function zerif_address_render_callback() {
		return wp_kses_post( get_theme_mod( 'zerif_address' ) );
	}

	/**
	 * Render callback for zerif_email
	 *
	 * @return mixed
	 */
	function zerif_email_render_callback() {
		return wp_kses_post( get_theme_mod( 'zerif_email' ) );
	}

	/**
	 * Render callback for zerif_phone
	 *
	 * @return mixed
	 */
	function zerif_phone_render_callback() {
		return wp_kses_post( get_theme_mod( 'zerif_phone' ) );
	}

	/**
	 * Render callback for zerif_address_icon
	 *
	 * @return mixed
	 */
	function zerif_address_icon_render_callback() {
		return '<img src="' . esc_url( get_theme_mod( 'zerif_address_icon' ) ) . '">';
	}

	/**
	 * Render callback for zerif_email_icon
	 *
	 * @return mixed
	 */
	function zerif_email_icon_render_callback() {
		return '<img src="' . esc_url( get_theme_mod( 'zerif_email_icon' ) ) . '">';
	}

	/**
	 * Render callback for zerif_phone_icon
	 *
	 * @return mixed
	 */
	function zerif_phone_icon_render_callback() {
		return '<img src="' . esc_url( get_theme_mod( 'zerif_phone_icon' ) ) . '">';
	}

	/**
	 * ADVANCED OPTIONS
	 */

	$wp_customize->add_panel(
		'zerif_advanced_options_panel',
		array(
			'title'    => esc_html__( 'Advanced options', 'zerif-lite' ),
			'priority' => 150,
		)
	);

	$wp_customize->add_section(
		'zerif_general_section',
		array(
			'title'    => __( 'General options', 'zerif-lite' ),
			'priority' => 1,
			'panel'    => 'zerif_advanced_options_panel',
		)
	);

	$wp_customize->add_setting(
		'zerif_use_safe_font',
		array(
			'sanitize_callback' => 'zerif_sanitize_checkbox',
		)
	);

	$wp_customize->add_control(
		'zerif_use_safe_font',
		array(
			'type'     => 'checkbox',
			'label'    => 'Use safe font?',
			'section'  => 'zerif_general_section',
			'priority' => 1,
		)
	);

	/* Disable preloader */
	$wp_customize->add_setting(
		'zerif_disable_preloader',
		array(
			'sanitize_callback' => 'zerif_sanitize_checkbox',
		)
	);

	$wp_customize->add_control(
		'zerif_disable_preloader',
		array(
			'type'     => 'checkbox',
			'label'    => __( 'Disable preloader?', 'zerif-lite' ),
			'section'  => 'zerif_general_section',
			'priority' => 2,
		)
	);

	/* Disable smooth scroll */
	$wp_customize->add_setting(
		'zerif_disable_smooth_scroll',
		array(
			'sanitize_callback' => 'zerif_sanitize_checkbox',
		)
	);

	$wp_customize->add_control(
		'zerif_disable_smooth_scroll',
		array(
			'type'     => 'checkbox',
			'label'    => __( 'Disable smooth scroll?', 'zerif-lite' ),
			'section'  => 'zerif_general_section',
			'priority' => 3,
		)
	);

	/* Enable accessibility */
	$wp_customize->add_setting(
		'zerif_accessibility',
		array(
			'sanitize_callback' => 'zerif_sanitize_checkbox',
		)
	);

	$wp_customize->add_control(
		'zerif_accessibility',
		array(
			'type'     => 'checkbox',
			'label'    => __( 'Enable accessibility?', 'zerif-lite' ),
			'section'  => 'zerif_general_section',
			'priority' => 4,
		)
	);

	/* Change the template to full width for page.php */
	$wp_customize->add_setting(
		'zerif_change_to_full_width',
		array(
			'sanitize_callback' => 'zerif_sanitize_checkbox',
		)
	);

	$wp_customize->add_control(
		'zerif_change_to_full_width',
		array(
			'type'     => 'checkbox',
			'label'    => 'Change the template to Full width for all the pages?',
			'section'  => 'zerif_general_section',
			'priority' => 6,
		)
	);

	/**
	 * Option to get the frontpage settings to the old default template if a static frontpage is selected
	 * Only for new users
	 */
	if ( ! zerif_check_if_old_version_of_theme() ) {
		$wp_customize->add_setting(
			'zerif_keep_old_fp_template',
			array(
				'sanitize_callback' => 'zerif_sanitize_checkbox',
			)
		);
		$wp_customize->add_control(
			'zerif_keep_old_fp_template',
			array(
				'type'     => 'checkbox',
				'label'    => esc_html__( 'Keep the old static frontpage template?', 'zerif-lite' ),
				'section'  => 'zerif_general_section',
				'priority' => 7,
			)
		);
	}

	$wp_customize->get_section( 'colors' )->panel           = 'zerif_advanced_options_panel';
	$wp_customize->get_section( 'background_image' )->panel = 'zerif_advanced_options_panel';

	if ( ! zerif_check_if_old_version_of_theme() ) {
		$wp_customize->add_section(
			'zerif_blog_header_section',
			array(
				'title' => __( 'Blog Header Options', 'zerif-lite' ),
				'panel' => 'zerif_advanced_options_panel',
			)
		);

		/* Blog Header Title */
		$wp_customize->add_setting(
			'zerif_blog_header_title',
			array(
				'default'           => esc_html__( 'Blog', 'zerif-lite' ),
				'transport'         => 'postMessage',
				'sanitize_callback' => 'esc_html',
			)
		);

		$wp_customize->add_control(
			'zerif_blog_header_title',
			array(
				'label'    => __( 'Title', 'zerif-lite' ),
				'section'  => 'zerif_blog_header_section',
				'priority' => 1,
			)
		);

		/* Blog Header Subtitle */
		$wp_customize->add_setting(
			'zerif_blog_header_subtitle',
			array(
				'default'           => esc_html__( 'Zerif supports a custom frontpage', 'zerif-lite' ),
				'transport'         => 'postMessage',
				'sanitize_callback' => 'esc_html',
			)
		);

		$wp_customize->add_control(
			'zerif_blog_header_subtitle',
			array(
				'label'    => __( 'Subtitle', 'zerif-lite' ),
				'section'  => 'zerif_blog_header_section',
				'priority' => 2,
			)
		);

		$wp_customize->selective_refresh->add_partial(
			'zerif_blog_header_title_subtitle',
			array(
				'selector'        => '.blog-header-wrap',
				'settings'        => array( 'zerif_blog_header_title', 'zerif_blog_header_subtitle' ),
				'render_callback' => 'zerif_blog_header_title_subtitle_callback',
			)
		);

		/**
		 * Callback for changing the title and subtitle on the blog
		 */
		function zerif_blog_header_title_subtitle_callback() {
			$title    = get_theme_mod( 'zerif_blog_header_title' );
			$subtitle = get_theme_mod( 'zerif_blog_header_subtitle' );
			$output   = '';
			if ( ! empty( $title ) || ! empty( $subtitle ) ) {
				$output .= '<div class="blog-header-content-wrap">';

				if ( ! empty( $title ) ) {
					$output .= '<h1 class="intro-text">' . esc_html( $title ) . '</h1>';
				}

				if ( ! empty( $subtitle ) ) {
					$output .= '<p class="blog-header-subtitle">' . esc_html( $subtitle ) . '</p>';
				}

				$output .= '</div>';
			}

			return $output;
		}
	}

	/**
	 * FRONTPAGE SECTIONS PANEL
	 */

	if ( zerif_check_if_wp_greater_than_4_7() ) {

		$zerif_frontpage_sections_panel = new Zerif_WP_Customize_Panel(
			$wp_customize,
			'zerif_frontpage_sections_panel',
			array(
				'title'    => esc_html__( 'Frontpage sections', 'zerif-lite' ),
				'priority' => 29,
			)
		);

		$wp_customize->add_panel( $zerif_frontpage_sections_panel );
	}

	/**
	 * BIG TITLE SECTION
	 */

	if ( zerif_check_if_wp_greater_than_4_7() ) {

		$panel_big_title = new Zerif_WP_Customize_Panel(
			$wp_customize,
			'panel_big_title',
			array(
				'title'    => esc_html__( 'Big title section', 'zerif-lite' ),
				'priority' => 30,
				'panel'    => 'zerif_frontpage_sections_panel',
			)
		);

		$wp_customize->add_panel( $panel_big_title );

	} else {

		$wp_customize->add_panel(
			'panel_big_title',
			array(
				'title'    => esc_html__( 'Big title section', 'zerif-lite' ),
				'priority' => 30,
			)
		);

	}

	$wp_customize->add_section(
		'zerif_bigtitle_section',
		array(
			'title'    => __( 'Main content', 'zerif-lite' ),
			'priority' => 1,
			'panel'    => 'panel_big_title',
		)
	);

	/* show/hide */
	$wp_customize->add_setting(
		'zerif_bigtitle_show',
		array(
			'sanitize_callback' => 'zerif_sanitize_checkbox',
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		'zerif_bigtitle_show',
		array(
			'type'     => 'checkbox',
			'label'    => __( 'Hide big title section?', 'zerif-lite' ),
			'section'  => 'zerif_bigtitle_section',
			'priority' => 1,
		)
	);

	/*
	 * Title
	 *
	 * define a new option with _2 to be used to differentiate between the old users and new ones
	 *
	 * get the old option's value and put it as default for the new _2 option
	 */

	$zerif_bigtitle_title_default = get_theme_mod( 'zerif_bigtitle_title' );

	if ( current_user_can( 'edit_theme_options' ) ) {
		$wp_customize->add_setting(
			'zerif_bigtitle_title_2',
			array(
				'sanitize_callback' => 'zerif_sanitize_input',
				/* translators: Big title section */
				'default'           => ! empty( $zerif_bigtitle_title_default ) ? $zerif_bigtitle_title_default : sprintf( __( 'This piece of text can be changed in %s', 'zerif-lite' ), __( 'Big title section', 'zerif-lite' ) ),
				'transport'         => 'postMessage',
			)
		);
	} else {
		$wp_customize->add_setting(
			'zerif_bigtitle_title_2',
			array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'transport'         => 'postMessage',
			)
		);
	}

	$wp_customize->add_control(
		'zerif_bigtitle_title_2',
		array(
			'label'    => __( 'Title', 'zerif-lite' ),
			'section'  => 'zerif_bigtitle_section',
			'priority' => 2,
		)
	);

	/*
	 * red button
	 *
	 * define a new option with _2 to be used to differentiate between the old users and new ones
	 *
	 * get the old option's value and put it as default for the new _2 option
	 */
	$zerif_bigtitle_redbutton_label_default = get_theme_mod( 'zerif_bigtitle_redbutton_label' );

	if ( current_user_can( 'edit_theme_options' ) ) {
		$wp_customize->add_setting(
			'zerif_bigtitle_redbutton_label_2',
			array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'default'           => ! empty( $zerif_bigtitle_redbutton_label_default ) ? $zerif_bigtitle_redbutton_label_default : __( 'Customize this button', 'zerif-lite' ),
				'transport'         => 'postMessage',
			)
		);
	} else {
		$wp_customize->add_setting(
			'zerif_bigtitle_redbutton_label_2',
			array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'transport'         => 'postMessage',
			)
		);
	}

	$wp_customize->add_control(
		'zerif_bigtitle_redbutton_label_2',
		array(
			'label'    => __( 'Red button label', 'zerif-lite' ),
			'section'  => 'zerif_bigtitle_section',
			'priority' => 3,
		)
	);

	$wp_customize->add_setting(
		'zerif_bigtitle_redbutton_url',
		array(
			'sanitize_callback' => 'esc_url_raw',
			'default'           => esc_url( home_url( '/' ) ) . '#focus',
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		'zerif_bigtitle_redbutton_url',
		array(
			'label'    => __( 'Red button link', 'zerif-lite' ),
			'section'  => 'zerif_bigtitle_section',
			'priority' => 4,
		)
	);

	/**
	 * Green button
	 */

	if ( current_user_can( 'edit_theme_options' ) ) {
		$wp_customize->add_setting(
			'zerif_bigtitle_greenbutton_label',
			array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'default'           => __( 'Customize this button', 'zerif-lite' ),
				'transport'         => 'postMessage',
			)
		);
	} else {
		$wp_customize->add_setting(
			'zerif_bigtitle_greenbutton_label',
			array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'transport'         => 'postMessage',
			)
		);
	}

	$wp_customize->add_control(
		'zerif_bigtitle_greenbutton_label',
		array(
			'label'    => __( 'Green button label', 'zerif-lite' ),
			'section'  => 'zerif_bigtitle_section',
			'priority' => 5,
		)
	);

	$wp_customize->add_setting(
		'zerif_bigtitle_greenbutton_url',
		array(
			'sanitize_callback' => 'esc_url_raw',
			'default'           => esc_url( home_url( '/' ) ) . '#focus',
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		'zerif_bigtitle_greenbutton_url',
		array(
			'label'    => __( 'Green button link', 'zerif-lite' ),
			'section'  => 'zerif_bigtitle_section',
			'priority' => 6,
		)
	);

	/**
	 * Slider shortcode
	 */

	$wp_customize->add_setting(
		'zerif_bigtitle_slider_shortcode',
		array(
			'sanitize_callback' => 'zerif_sanitize_input',
		)
	);

	$wp_customize->add_control(
		'zerif_bigtitle_slider_shortcode',
		array(
			'label'       => __( 'Slider shortcode', 'zerif-lite' ),
			'description' => __( 'You can replace the homepage slider with any plugin you like, just copy the shortcode generated and paste it here.', 'zerif-lite' ),
			'section'     => 'zerif_bigtitle_section',
			'priority'    => 7,
		)
	);

	/**
	 * PARALLAX IMAGES
	 */

	$wp_customize->add_section(
		'zerif_parallax_section',
		array(
			'title'    => __( 'Parallax effect', 'zerif-lite' ),
			'priority' => 2,
			'panel'    => 'panel_big_title',
		)
	);

	/* show/hide */
	$wp_customize->add_setting(
		'zerif_parallax_show',
		array(
			'sanitize_callback' => 'zerif_sanitize_checkbox',
		)
	);

	$wp_customize->add_control(
		'zerif_parallax_show',
		array(
			'type'     => 'checkbox',
			'label'    => __( 'Use parallax effect?', 'zerif-lite' ),
			'section'  => 'zerif_parallax_section',
			'priority' => 1,
		)
	);

	/* IMAGE 1*/
	$wp_customize->add_setting(
		'zerif_parallax_img1',
		array(
			'sanitize_callback' => 'esc_url_raw',
			'default'           => get_template_directory_uri() . '/images/background1.jpg',
		)
	);

	$wp_customize->add_control(
		new WP_Customize_Image_Control(
			$wp_customize,
			'themeslug_parallax_img1',
			array(
				'label'    => __( 'Image 1', 'zerif-lite' ),
				'section'  => 'zerif_parallax_section',
				'settings' => 'zerif_parallax_img1',
				'priority' => 1,
			)
		)
	);

	/* IMAGE 2 */
	$wp_customize->add_setting(
		'zerif_parallax_img2',
		array(
			'sanitize_callback' => 'esc_url_raw',
			'default'           => get_template_directory_uri() . '/images/background2.png',
		)
	);

	$wp_customize->add_control(
		new WP_Customize_Image_Control(
			$wp_customize,
			'themeslug_parallax_img2',
			array(
				'label'    => __( 'Image 2', 'zerif-lite' ),
				'section'  => 'zerif_parallax_section',
				'settings' => 'zerif_parallax_img2',
				'priority' => 2,
			)
		)
	);

	/**
	 * OUR FOCUS SECTION
	 */

	$wp_customize->add_section(
		'zerif_ourfocus_section',
		array(
			'title'    => __( 'Our focus section', 'zerif-lite' ),
			'priority' => 31,
		)
	);

	if ( zerif_check_if_wp_greater_than_4_7() ) {
		$wp_customize->get_section( 'zerif_ourfocus_section' )->panel = 'zerif_frontpage_sections_panel';
	}

	/* show/hide */
	$wp_customize->add_setting(
		'zerif_ourfocus_show',
		array(
			'sanitize_callback' => 'zerif_sanitize_checkbox',
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		'zerif_ourfocus_show',
		array(
			'type'     => 'checkbox',
			'label'    => __( 'Hide our focus section?', 'zerif-lite' ),
			'section'  => 'zerif_ourfocus_section',
			'priority' => - 3,
		)
	);

	/*
	 * our focus title
	 *
	 * define a new option with _2 to be used to differentiate between the old users and new ones
	 *
	 * get the old option's value and put it as default for the new _2 option
	 *
	 */

	$zerif_ourfocus_title_default = get_theme_mod( 'zerif_ourfocus_title' );

	if ( current_user_can( 'edit_theme_options' ) ) {
		$wp_customize->add_setting(
			'zerif_ourfocus_title_2',
			array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'default'           => ! empty( $zerif_ourfocus_title_default ) ? $zerif_ourfocus_title_default : __( 'FEATURES', 'zerif-lite' ),
				'transport'         => 'postMessage',
			)
		);
	} else {
		$wp_customize->add_setting(
			'zerif_ourfocus_title_2',
			array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'transport'         => 'postMessage',
			)
		);
	}
	$wp_customize->add_control(
		'zerif_ourfocus_title_2',
		array(
			'label'    => __( 'Title', 'zerif-lite' ),
			'section'  => 'zerif_ourfocus_section',
			'priority' => - 2,
		)
	);

	/* Our focus subtitle */
	if ( current_user_can( 'edit_theme_options' ) ) {
		$wp_customize->add_setting(
			'zerif_ourfocus_subtitle',
			array(
				'sanitize_callback' => 'zerif_sanitize_input',
				/* translators: Our focus section */
				'default'           => sprintf( __( 'Change this subtitle in %s', 'zerif-lite' ), __( 'Our focus section', 'zerif-lite' ) ),
				'transport'         => 'postMessage',
			)
		);
	} else {
		$wp_customize->add_setting(
			'zerif_ourfocus_subtitle',
			array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'transport'         => 'postMessage',
			)
		);
	}

	$wp_customize->add_control(
		'zerif_ourfocus_subtitle',
		array(
			'label'    => __( 'Our focus subtitle', 'zerif-lite' ),
			'section'  => 'zerif_ourfocus_section',
			'priority' => - 1,
		)
	);

	$our_focus_section = $wp_customize->get_section( 'sidebar-widgets-sidebar-ourfocus' );
	if ( ! empty( $our_focus_section ) ) {
		if ( zerif_check_if_wp_greater_than_4_7() ) {
			$our_focus_section->panel = 'zerif_frontpage_sections_panel';
		} else {
			$our_focus_section->panel = '';
		}
		$our_focus_section->title                                        = __( 'Our focus section', 'zerif-lite' );
		$our_focus_section->priority                                     = 31;
		$wp_customize->get_control( 'zerif_ourfocus_show' )->section     = 'sidebar-widgets-sidebar-ourfocus';
		$wp_customize->get_control( 'zerif_ourfocus_title_2' )->section  = 'sidebar-widgets-sidebar-ourfocus';
		$wp_customize->get_control( 'zerif_ourfocus_subtitle' )->section = 'sidebar-widgets-sidebar-ourfocus';
	}

	/**
	 * ABOUT US SECTION
	 */

	if ( zerif_check_if_wp_greater_than_4_7() ) {

		$panel_about = new Zerif_WP_Customize_Panel(
			$wp_customize,
			'panel_about',
			array(
				'priority' => 32,
				'title'    => __( 'About us section', 'zerif-lite' ),
				'panel'    => 'zerif_frontpage_sections_panel',
			)
		);

		$wp_customize->add_panel( $panel_about );

	} else {

		$wp_customize->add_panel(
			'panel_about',
			array(
				'priority' => 32,
				'title'    => __( 'About us section', 'zerif-lite' ),
			)
		);

	}

	$wp_customize->add_section(
		'zerif_aboutus_main_section',
		array(
			'title'    => __( 'Main content', 'zerif-lite' ),
			'priority' => 2,
			'panel'    => 'panel_about',
		)
	);

	/* About us show/hide */
	$wp_customize->add_setting(
		'zerif_aboutus_show',
		array(
			'sanitize_callback' => 'zerif_sanitize_checkbox',
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		'zerif_aboutus_show',
		array(
			'type'     => 'checkbox',
			'label'    => __( 'Hide about us section?', 'zerif-lite' ),
			'section'  => 'zerif_aboutus_main_section',
			'priority' => 1,
		)
	);

	/* Title */
	if ( current_user_can( 'edit_theme_options' ) ) {
		$wp_customize->add_setting(
			'zerif_aboutus_title',
			array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'default'           => __( 'About', 'zerif-lite' ),
				'transport'         => 'postMessage',
			)
		);
	} else {
		$wp_customize->add_setting(
			'zerif_aboutus_title',
			array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'transport'         => 'postMessage',
			)
		);
	}

	$wp_customize->add_control(
		'zerif_aboutus_title',
		array(
			'label'    => __( 'Title', 'zerif-lite' ),
			'section'  => 'zerif_aboutus_main_section',
			'priority' => 2,
		)
	);

	/* Subtitle */
	if ( current_user_can( 'edit_theme_options' ) ) {
		$wp_customize->add_setting(
			'zerif_aboutus_subtitle',
			array(
				'sanitize_callback' => 'zerif_sanitize_input',
				/* translators: About us section */
				'default'           => sprintf( __( 'Change this subtitle in %s', 'zerif-lite' ), __( 'About us section', 'zerif-lite' ) ),
				'transport'         => 'postMessage',
			)
		);
	} else {
		$wp_customize->add_setting(
			'zerif_aboutus_subtitle',
			array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'transport'         => 'postMessage',
			)
		);
	}

	$wp_customize->add_control(
		'zerif_aboutus_subtitle',
		array(
			'label'    => __( 'Subtitle', 'zerif-lite' ),
			'section'  => 'zerif_aboutus_main_section',
			'priority' => 3,
		)
	);

	/* Big left title */
	$zerif_aboutus_biglefttitle_default = '';
	if ( defined( 'THEMEISLE_COMPANION_VERSION' ) ) {
		$zerif_aboutus_biglefttitle_default = 'Everything you see here is responsive and mobile-friendly.';
	}

	if ( current_user_can( 'edit_theme_options' ) ) {
		$wp_customize->add_setting(
			'zerif_aboutus_biglefttitle',
			array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'default'           => $zerif_aboutus_biglefttitle_default,
				'transport'         => 'postMessage',
			)
		);
	} else {
		$wp_customize->add_setting(
			'zerif_aboutus_biglefttitle',
			array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'transport'         => 'postMessage',
			)
		);
	}

	$wp_customize->add_control(
		'zerif_aboutus_biglefttitle',
		array(
			'label'    => __( 'Big left side title', 'zerif-lite' ),
			'section'  => 'zerif_aboutus_main_section',
			'priority' => 4,
		)
	);

	/* Text */

	/* translators: About us section */
	$zerif_aboutus_text_default = sprintf( __( 'Change this text in %s', 'zerif-lite' ), __( 'About us section', 'zerif-lite' ) );
	if ( defined( 'THEMEISLE_COMPANION_VERSION' ) ) {
		$zerif_aboutus_text_default = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla nec massa enim. Aliquam viverra at est ullamcorper sollicitudin. Proin a leo sit amet nunc malesuada imperdiet pharetra ut eros.<br><br> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla nec massa enim. Aliquam viverra at est ullamcorper sollicitudin. Proin a leo sit amet nunc malesuada imperdiet pharetra ut eros. <br><br>Mauris vel nunc at ipsum fermentum pellentesque quis ut massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Maecenas non adipiscing massa. Sed ut fringilla sapien. Cras sollicitudin, lectus sed tincidunt cursus, magna lectus vehicula augue, a lobortis dui orci et est.';
	}

	if ( current_user_can( 'edit_theme_options' ) ) {
		$wp_customize->add_setting(
			'zerif_aboutus_text',
			array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'default'           => $zerif_aboutus_text_default,
				'transport'         => 'postMessage',
			)
		);
	} else {
		$wp_customize->add_setting(
			'zerif_aboutus_text',
			array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'transport'         => 'postMessage',
			)
		);
	}

	$wp_customize->add_control(
		'zerif_aboutus_text',
		array(
			'type'     => 'textarea',
			'label'    => __( 'Text', 'zerif-lite' ),
			'section'  => 'zerif_aboutus_main_section',
			'priority' => 5,
		)
	);

	$wp_customize->add_section(
		'zerif_aboutus_feat1_section',
		array(
			'title'    => __( 'Feature no#1', 'zerif-lite' ),
			'priority' => 3,
			'panel'    => 'panel_about',
		)
	);

	/* Feature no#1 */
	if ( current_user_can( 'edit_theme_options' ) ) {
		$wp_customize->add_setting(
			'zerif_aboutus_feature1_title',
			array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'default'           => __( 'Edit skill', 'zerif-lite' ),
				'transport'         => 'postMessage',
			)
		);
	} else {
		$wp_customize->add_setting(
			'zerif_aboutus_feature1_title',
			array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'transport'         => 'postMessage',
			)
		);
	}

	$wp_customize->add_control(
		'zerif_aboutus_feature1_title',
		array(
			'label'    => __( 'Feature no1 title', 'zerif-lite' ),
			'section'  => 'zerif_aboutus_feat1_section',
			'priority' => 6,
		)
	);

	$wp_customize->add_setting(
		'zerif_aboutus_feature1_text',
		array(
			'sanitize_callback' => 'zerif_sanitize_input',
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		'zerif_aboutus_feature1_text',
		array(
			'label'    => __( 'Feature no1 text', 'zerif-lite' ),
			'section'  => 'zerif_aboutus_feat1_section',
			'priority' => 7,
		)
	);

	$wp_customize->add_setting(
		'zerif_aboutus_feature1_nr',
		array(
			'sanitize_callback' => 'absint',
			'default'           => '80',
		)
	);

	$wp_customize->add_control(
		new Zerif_Customizer_Number_Control(
			$wp_customize,
			'zerif_aboutus_feature1_nr',
			array(
				'type'     => 'number',
				'label'    => __( 'Feature no1 percentage', 'zerif-lite' ),
				'section'  => 'zerif_aboutus_feat1_section',
				'priority' => 8,
			)
		)
	);

	$wp_customize->add_section(
		'zerif_aboutus_feat2_section',
		array(
			'title'    => __( 'Feature no#2', 'zerif-lite' ),
			'priority' => 4,
			'panel'    => 'panel_about',
		)
	);

	/* Feature no#2 */
	if ( current_user_can( 'edit_theme_options' ) ) {
		$wp_customize->add_setting(
			'zerif_aboutus_feature2_title',
			array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'default'           => __( 'Edit skill', 'zerif-lite' ),
				'transport'         => 'postMessage',
			)
		);
	} else {
		$wp_customize->add_setting(
			'zerif_aboutus_feature2_title',
			array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'transport'         => 'postMessage',
			)
		);
	}

	$wp_customize->add_control(
		'zerif_aboutus_feature2_title',
		array(
			'label'    => __( 'Feature no2 title', 'zerif-lite' ),
			'section'  => 'zerif_aboutus_feat2_section',
			'priority' => 9,
		)
	);

	$wp_customize->add_setting(
		'zerif_aboutus_feature2_text',
		array(
			'sanitize_callback' => 'zerif_sanitize_input',
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		'zerif_aboutus_feature2_text',
		array(
			'label'    => __( 'Feature no2 text', 'zerif-lite' ),
			'section'  => 'zerif_aboutus_feat2_section',
			'priority' => 10,
		)
	);

	$wp_customize->add_setting(
		'zerif_aboutus_feature2_nr',
		array(
			'sanitize_callback' => 'absint',
			'default'           => '91',
		)
	);

	$wp_customize->add_control(
		new Zerif_Customizer_Number_Control(
			$wp_customize,
			'zerif_aboutus_feature2_nr',
			array(
				'type'     => 'number',
				'label'    => __( 'Feature no2 percentage', 'zerif-lite' ),
				'section'  => 'zerif_aboutus_feat2_section',
				'priority' => 11,
			)
		)
	);

	$wp_customize->add_section(
		'zerif_aboutus_feat3_section',
		array(
			'title'    => __( 'Feature no#3', 'zerif-lite' ),
			'priority' => 5,
			'panel'    => 'panel_about',
		)
	);

	/* Feature no#3 */
	if ( current_user_can( 'edit_theme_options' ) ) {
		$wp_customize->add_setting(
			'zerif_aboutus_feature3_title',
			array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'default'           => __( 'Edit skill', 'zerif-lite' ),
				'transport'         => 'postMessage',
			)
		);
	} else {
		$wp_customize->add_setting(
			'zerif_aboutus_feature3_title',
			array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'transport'         => 'postMessage',
			)
		);
	}

	$wp_customize->add_control(
		'zerif_aboutus_feature3_title',
		array(
			'label'    => __( 'Feature no3 title', 'zerif-lite' ),
			'section'  => 'zerif_aboutus_feat3_section',
			'priority' => 12,
		)
	);

	$wp_customize->add_setting(
		'zerif_aboutus_feature3_text',
		array(
			'sanitize_callback' => 'zerif_sanitize_input',
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		'zerif_aboutus_feature3_text',
		array(
			'label'    => __( 'Feature no3 text', 'zerif-lite' ),
			'section'  => 'zerif_aboutus_feat3_section',
			'priority' => 13,
		)
	);

	$wp_customize->add_setting(
		'zerif_aboutus_feature3_nr',
		array(
			'sanitize_callback' => 'absint',
			'default'           => '88',
		)
	);

	$wp_customize->add_control(
		new Zerif_Customizer_Number_Control(
			$wp_customize,
			'zerif_aboutus_feature3_nr',
			array(
				'type'     => 'number',
				'label'    => __( 'Feature no3 percentage', 'zerif-lite' ),
				'section'  => 'zerif_aboutus_feat3_section',
				'priority' => 14,
			)
		)
	);

	$wp_customize->add_section(
		'zerif_aboutus_feat4_section',
		array(
			'title'    => __( 'Feature no#4', 'zerif-lite' ),
			'priority' => 6,
			'panel'    => 'panel_about',
		)
	);

	/* Feature no#4 */
	if ( current_user_can( 'edit_theme_options' ) ) {
		$wp_customize->add_setting(
			'zerif_aboutus_feature4_title',
			array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'default'           => __( 'Edit skill', 'zerif-lite' ),
				'transport'         => 'postMessage',
			)
		);
	} else {
		$wp_customize->add_setting(
			'zerif_aboutus_feature4_title',
			array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'transport'         => 'postMessage',
			)
		);
	}
	$wp_customize->add_control(
		'zerif_aboutus_feature4_title',
		array(
			'label'    => __( 'Feature no4 title', 'zerif-lite' ),
			'section'  => 'zerif_aboutus_feat4_section',
			'priority' => 15,
		)
	);

	$wp_customize->add_setting(
		'zerif_aboutus_feature4_text',
		array(
			'sanitize_callback' => 'zerif_sanitize_input',
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		'zerif_aboutus_feature4_text',
		array(
			'label'    => __( 'Feature no4 text', 'zerif-lite' ),
			'section'  => 'zerif_aboutus_feat4_section',
			'priority' => 16,
		)
	);

	$wp_customize->add_setting(
		'zerif_aboutus_feature4_nr',
		array(
			'sanitize_callback' => 'absint',
			'default'           => '95',
		)
	);

	$wp_customize->add_control(
		new Zerif_Customizer_Number_Control(
			$wp_customize,
			'zerif_aboutus_feature4_nr',
			array(
				'type'     => 'number',
				'label'    => __( 'Feature no4 percentage', 'zerif-lite' ),
				'section'  => 'zerif_aboutus_feat4_section',
				'priority' => 17,
			)
		)
	);

	/* ABOUT US CLIENTS TITLE */

	$wp_customize->add_section(
		'zerif_aboutus_clients_title_section',
		array(
			'title'    => __( 'Clients area title', 'zerif-lite' ),
			'priority' => 7,
			'panel'    => 'panel_about',
		)
	);

	$wp_customize->add_setting(
		'zerif_aboutus_clients_title_text',
		array(
			'sanitize_callback' => 'zerif_sanitize_input',
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		'zerif_aboutus_clients_title_text',
		array(
			'label'    => __( 'Title', 'zerif-lite' ),
			'section'  => 'zerif_aboutus_clients_title_section',
			'priority' => -1,
		)
	);

	$aboutus_section = $wp_customize->get_section( 'sidebar-widgets-sidebar-aboutus' );
	if ( ! empty( $aboutus_section ) ) {
		if ( zerif_check_if_wp_greater_than_4_7() ) {
			$aboutus_section->panel = 'zerif_frontpage_sections_panel';
		} else {
			$aboutus_section->panel = 'panel_about';
		}
		$aboutus_section->title    = __( 'Clients area', 'zerif-lite' );
		$aboutus_section->priority = 10;
		$wp_customize->get_control( 'zerif_aboutus_clients_title_text' )->section = 'sidebar-widgets-sidebar-aboutus';

	}

	/**
	 * OUR TEAM SECTION
	 */

	$wp_customize->add_section(
		'zerif_ourteam_section',
		array(
			'title'    => __( 'Content', 'zerif-lite' ),
			'priority' => 33,
		)
	);

	if ( zerif_check_if_wp_greater_than_4_7() ) {

		$wp_customize->get_section( 'zerif_ourteam_section' )->panel = 'zerif_frontpage_sections_panel';

	}

	/* Our team show/hide */
	$wp_customize->add_setting(
		'zerif_ourteam_show',
		array(
			'sanitize_callback' => 'zerif_sanitize_checkbox',
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		'zerif_ourteam_show',
		array(
			'type'     => 'checkbox',
			'label'    => __( 'Hide our team section?', 'zerif-lite' ),
			'section'  => 'zerif_ourteam_section',
			'priority' => -3,
		)
	);

	/* Our team title */
	if ( current_user_can( 'edit_theme_options' ) ) {
		$wp_customize->add_setting(
			'zerif_ourteam_title',
			array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'default'           => __( 'YOUR TEAM', 'zerif-lite' ),
				'transport'         => 'postMessage',
			)
		);
	} else {
		$wp_customize->add_setting(
			'zerif_ourteam_title',
			array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'transport'         => 'postMessage',
			)
		);
	}

	$wp_customize->add_control(
		'zerif_ourteam_title',
		array(
			'label'    => __( 'Title', 'zerif-lite' ),
			'section'  => 'zerif_ourteam_section',
			'priority' => -2,
		)
	);

	/* Our team subtitle */
	if ( current_user_can( 'edit_theme_options' ) ) {
		$wp_customize->add_setting(
			'zerif_ourteam_subtitle',
			array(
				'sanitize_callback' => 'zerif_sanitize_input',
				/* translators: Our team section */
				'default'           => sprintf( __( 'Change this subtitle in %s', 'zerif-lite' ), __( 'Our team section', 'zerif-lite' ) ),
				'transport'         => 'postMessage',
			)
		);
	} else {
		$wp_customize->add_setting(
			'zerif_ourteam_subtitle',
			array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'transport'         => 'postMessage',
			)
		);
	}

	$wp_customize->add_control(
		'zerif_ourteam_subtitle',
		array(
			'label'    => __( 'Our team subtitle', 'zerif-lite' ),
			'section'  => 'zerif_ourteam_section',
			'priority' => -1,
		)
	);

	$our_team_section = $wp_customize->get_section( 'sidebar-widgets-sidebar-ourteam' );
	if ( ! empty( $our_team_section ) ) {

		if ( zerif_check_if_wp_greater_than_4_7() ) {
			$our_team_section->panel = 'zerif_frontpage_sections_panel';
		} else {
			$our_team_section->panel = '';
		}
		$our_team_section->title                                        = __( 'Our team section', 'zerif-lite' );
		$our_team_section->priority                                     = 33;
		$wp_customize->get_control( 'zerif_ourteam_show' )->section     = 'sidebar-widgets-sidebar-ourteam';
		$wp_customize->get_control( 'zerif_ourteam_title' )->section    = 'sidebar-widgets-sidebar-ourteam';
		$wp_customize->get_control( 'zerif_ourteam_subtitle' )->section = 'sidebar-widgets-sidebar-ourteam';
	}

	/**
	 * TESTIMONIALS SECTION
	 */

	$wp_customize->add_section(
		'zerif_testimonials_section',
		array(
			'title'    => __( 'Testimonials section', 'zerif-lite' ),
			'priority' => 34,
		)
	);

	if ( zerif_check_if_wp_greater_than_4_7() ) {
		$wp_customize->add_section( 'zerif_testimonials_section' )->panel = 'zerif_frontpage_sections_panel';
	}

	/* testimonials show/hide */
	$wp_customize->add_setting(
		'zerif_testimonials_show',
		array(
			'sanitize_callback' => 'zerif_sanitize_checkbox',
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		'zerif_testimonials_show',
		array(
			'type'     => 'checkbox',
			'label'    => __( 'Hide testimonials section?', 'zerif-lite' ),
			'section'  => 'zerif_testimonials_section',
			'priority' => -4,
		)
	);

	/* Testimonial pinterest layout */
	$wp_customize->add_setting(
		'zerif_testimonials_pinterest_style',
		array(
			'sanitize_callback' => 'zerif_sanitize_checkbox',
		)
	);

	$wp_customize->add_control(
		'zerif_testimonials_pinterest_style',
		array(
			'type'     => 'checkbox',
			'label'    => __( 'Use pinterest layout?', 'zerif-lite' ),
			'section'  => 'zerif_testimonials_section',
			'priority' => -3,
		)
	);

	/* Testimonials title */
	if ( current_user_can( 'edit_theme_options' ) ) {
		$wp_customize->add_setting(
			'zerif_testimonials_title',
			array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'default'           => __( 'Testimonials', 'zerif-lite' ),
				'transport'         => 'postMessage',
			)
		);
	} else {
		$wp_customize->add_setting(
			'zerif_testimonials_title',
			array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'transport'         => 'postMessage',
			)
		);
	}

	$wp_customize->add_control(
		'zerif_testimonials_title',
		array(
			'label'    => __( 'Title', 'zerif-lite' ),
			'section'  => 'zerif_testimonials_section',
			'priority' => -2,
		)
	);

	/* Testimonials subtitle */
	$wp_customize->add_setting(
		'zerif_testimonials_subtitle',
		array(
			'sanitize_callback' => 'zerif_sanitize_input',
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		'zerif_testimonials_subtitle',
		array(
			'label'    => __( 'Testimonials subtitle', 'zerif-lite' ),
			'section'  => 'zerif_testimonials_section',
			'priority' => -1,
		)
	);

	$testimonials_section = $wp_customize->get_section( 'sidebar-widgets-sidebar-testimonials' );
	if ( ! empty( $our_team_section ) ) {

		if ( zerif_check_if_wp_greater_than_4_7() ) {
			$testimonials_section->panel = 'zerif_frontpage_sections_panel';
		} else {
			$testimonials_section->panel = '';
		}
		$testimonials_section->title                                     = __( 'Testimonials section', 'zerif-lite' );
		$testimonials_section->priority                                  = 34;
		$wp_customize->get_control( 'zerif_testimonials_show' )->section = 'sidebar-widgets-sidebar-testimonials';
		$wp_customize->get_control( 'zerif_testimonials_pinterest_style' )->section = 'sidebar-widgets-sidebar-testimonials';
		$wp_customize->get_control( 'zerif_testimonials_title' )->section           = 'sidebar-widgets-sidebar-testimonials';
		$wp_customize->get_control( 'zerif_testimonials_subtitle' )->section        = 'sidebar-widgets-sidebar-testimonials';
	}

	/**
	 * RIBBONS
	 */

	if ( zerif_check_if_wp_greater_than_4_7() ) {

		$panel_ribbons = new Zerif_WP_Customize_Panel(
			$wp_customize,
			'panel_ribbons',
			array(
				'priority' => 37,
				'title'    => __( 'Ribbon sections', 'zerif-lite' ),
				'panel'    => 'zerif_frontpage_sections_panel',
			)
		);

		$wp_customize->add_panel( $panel_ribbons );

	} else {

		$wp_customize->add_panel(
			'panel_ribbons',
			array(
				'priority' => 37,
				'title'    => __( 'Ribbon sections', 'zerif-lite' ),
			)
		);

	}

	$wp_customize->add_section(
		'zerif_bottomribbon_section',
		array(
			'title'    => __( 'BottomButton Ribbon', 'zerif-lite' ),
			'priority' => 1,
			'panel'    => 'panel_ribbons',
		)
	);

	/* RIBBON SECTION WITH BOTTOM BUTTON */

	$zerif_bottomribbon_text_default        = '';
	$zerif_bottomribbon_buttonlabel_default = '';
	$zerif_bottomribbon_buttonlink_default  = '';

	/* For new users, add default values for the Ribbon section controls */
	if ( ! zerif_check_if_old_version_of_theme() && current_user_can( 'edit_theme_options' ) ) {
		$zerif_bottomribbon_text_default        = __( 'Change this text in BottomButton Ribbon', 'zerif-lite' );
		$zerif_bottomribbon_buttonlabel_default = __( 'Get in touch', 'zerif-lite' );
		$zerif_bottomribbon_buttonlink_default  = esc_url( admin_url( 'customize.php?autofocus&#91;control&#93;=zerif_bottomribbon_buttonlink' ) );
	}

	/* Text */
	$wp_customize->add_setting(
		'zerif_bottomribbon_text',
		array(
			'sanitize_callback' => 'zerif_sanitize_input',
			'default'           => $zerif_bottomribbon_text_default,
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		'zerif_bottomribbon_text',
		array(
			'type'     => 'textarea',
			'label'    => __( 'Text', 'zerif-lite' ),
			'section'  => 'zerif_bottomribbon_section',
			'priority' => 1,
		)
	);

	/* Button label */
	$wp_customize->add_setting(
		'zerif_bottomribbon_buttonlabel',
		array(
			'sanitize_callback' => 'zerif_sanitize_input',
			'default'           => $zerif_bottomribbon_buttonlabel_default,
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		'zerif_bottomribbon_buttonlabel',
		array(
			'label'    => __( 'Button label', 'zerif-lite' ),
			'section'  => 'zerif_bottomribbon_section',
			'priority' => 2,
		)
	);

	/* Button link */
	$wp_customize->add_setting(
		'zerif_bottomribbon_buttonlink',
		array(
			'sanitize_callback' => 'esc_url_raw',
			'default'           => $zerif_bottomribbon_buttonlink_default,
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		'zerif_bottomribbon_buttonlink',
		array(
			'label'    => __( 'Button link', 'zerif-lite' ),
			'section'  => 'zerif_bottomribbon_section',
			'priority' => 3,
		)
	);

	/* RIBBON SECTION WITH BUTTON IN THE RIGHT SIDE */

	$zerif_ribbonright_text_default        = '';
	$zerif_ribbonright_buttonlabel_default = '';
	$zerif_ribbonright_buttonlink_default  = '';

	/* For new users, add default values for the Ribbon section controls */
	if ( ! zerif_check_if_old_version_of_theme() && current_user_can( 'edit_theme_options' ) ) {
		$zerif_ribbonright_text_default        = __( 'Change this text in RightButton Ribbon', 'zerif-lite' );
		$zerif_ribbonright_buttonlabel_default = __( 'Get in touch', 'zerif-lite' );
		$zerif_ribbonright_buttonlink_default  = esc_url( admin_url( 'customize.php?autofocus&#91;control&#93;=zerif_ribbonright_buttonlink' ) );
	}

	$wp_customize->add_section(
		'zerif_rightribbon_section',
		array(
			'title'    => __( 'RightButton Ribbon', 'zerif-lite' ),
			'priority' => 2,
			'panel'    => 'panel_ribbons',
		)
	);

	/* Text */
	$wp_customize->add_setting(
		'zerif_ribbonright_text',
		array(
			'sanitize_callback' => 'zerif_sanitize_input',
			'default'           => $zerif_ribbonright_text_default,
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		'zerif_ribbonright_text',
		array(
			'type'     => 'textarea',
			'label'    => __( 'Text', 'zerif-lite' ),
			'section'  => 'zerif_rightribbon_section',
			'priority' => 4,
		)
	);

	/* Button label */
	$wp_customize->add_setting(
		'zerif_ribbonright_buttonlabel',
		array(
			'sanitize_callback' => 'zerif_sanitize_input',
			'default'           => $zerif_ribbonright_buttonlabel_default,
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		'zerif_ribbonright_buttonlabel',
		array(
			'label'    => __( 'Button label', 'zerif-lite' ),
			'section'  => 'zerif_rightribbon_section',
			'priority' => 5,
		)
	);

	/* Button link */
	$wp_customize->add_setting(
		'zerif_ribbonright_buttonlink',
		array(
			'sanitize_callback' => 'esc_url_raw',
			'default'           => $zerif_ribbonright_buttonlink_default,
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		'zerif_ribbonright_buttonlink',
		array(
			'label'    => __( 'Button link', 'zerif-lite' ),
			'section'  => 'zerif_rightribbon_section',
			'priority' => 6,
		)
	);

	/**
	 * LATEST NEWS SECTION
	 */

	$wp_customize->add_section(
		'zerif_latestnews_section',
		array(
			'title'    => __( 'Latest News section', 'zerif-lite' ),
			'priority' => 35,
		)
	);

	if ( zerif_check_if_wp_greater_than_4_7() ) {
		$wp_customize->get_section( 'zerif_latestnews_section' )->panel = 'zerif_frontpage_sections_panel';
	}

	/* Latest news show/hide */
	$wp_customize->add_setting(
		'zerif_latestnews_show',
		array(
			'sanitize_callback' => 'zerif_sanitize_checkbox',
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		'zerif_latestnews_show',
		array(
			'type'     => 'checkbox',
			'label'    => __( 'Hide latest news section?', 'zerif-lite' ),
			'section'  => 'zerif_latestnews_section',
			'priority' => 1,
		)
	);

	/* Latest news title */
	$wp_customize->add_setting(
		'zerif_latestnews_title',
		array(
			'sanitize_callback' => 'zerif_sanitize_input',
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		'zerif_latestnews_title',
		array(
			'label'    => __( 'Latest News title', 'zerif-lite' ),
			'section'  => 'zerif_latestnews_section',
			'priority' => 2,
		)
	);

	/* Latest news subtitle */
	$wp_customize->add_setting(
		'zerif_latestnews_subtitle',
		array(
			'sanitize_callback' => 'zerif_sanitize_input',
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		'zerif_latestnews_subtitle',
		array(
			'label'    => __( 'Latest News subtitle', 'zerif-lite' ),
			'section'  => 'zerif_latestnews_section',
			'priority' => 3,
		)
	);

	/**
	 *  CONTACT US SECTION
	 */

	$zerif_contact_us_section_description = '';

	/* If Pirate Forms is installed */
	if ( defined( 'PIRATE_FORMS_VERSION' ) ) :
		$zerif_contact_us_section_description = __( 'For more advanced settings please go to Settings -> Pirate Forms', 'zerif-lite' );
	endif;

	$wp_customize->add_section(
		'zerif_contactus_section',
		array(
			'title'       => __( 'Contact us section', 'zerif-lite' ),
			'description' => $zerif_contact_us_section_description,
			'priority'    => 36,
		)
	);

	if ( zerif_check_if_wp_greater_than_4_7() ) {
		$wp_customize->get_section( 'zerif_contactus_section' )->panel = 'zerif_frontpage_sections_panel';
	}

	/* Contact us show/hide */
	$wp_customize->add_setting(
		'zerif_contactus_show',
		array(
			'sanitize_callback' => 'zerif_sanitize_checkbox',
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		'zerif_contactus_show',
		array(
			'type'     => 'checkbox',
			'label'    => __( 'Hide contact us section?', 'zerif-lite' ),
			'section'  => 'zerif_contactus_section',
			'priority' => 1,
		)
	);

	/* Contactus title */
	$default = current_user_can( 'edit_theme_options' ) ? __( 'Get in touch', 'zerif-lite' ) : '';
	$wp_customize->add_setting(
		'zerif_contactus_title',
		array(
			'sanitize_callback' => 'zerif_sanitize_input',
			'transport'         => 'postMessage',
			'default'           => $default,
		)
	);
	$wp_customize->add_control(
		'zerif_contactus_title',
		array(
			'label'    => __( 'Contact us section title', 'zerif-lite' ),
			'section'  => 'zerif_contactus_section',
			'priority' => 2,
		)
	);

	/* Contactus subtitle */

	/* translators: PirateForms plugin */
	$default = ! defined( 'PIRATE_FORMS_VERSION' ) ? sprintf( __( 'You need to install %s to create a contact form.', 'zerif-lite' ), 'Pirate Forms' ) : '';
	$wp_customize->add_setting(
		'zerif_contactus_subtitle',
		array(
			'sanitize_callback' => 'zerif_sanitize_input',
			'default'           => $default,
			'transport'         => 'postMessage',
		)
	);
	$wp_customize->add_control(
		'zerif_contactus_subtitle',
		array(
			'label'    => __( 'Contact us section subtitle', 'zerif-lite' ),
			'section'  => 'zerif_contactus_section',
			'priority' => 3,
		)
	);

	/* zerif_contact_shortcode */
	$wp_customize->add_setting(
		'zerif_contactus_shortcode',
		array(
			'sanitize_callback' => 'zerif_sanitize_input',
		)
	);
	$wp_customize->add_control(
		'zerif_contactus_shortcode',
		array(
			'label'       => __( 'Contact Form Shortcode', 'zerif-lite' ),
			'description' => __( 'Or add the shortcode of your choice here.', 'zerif-lite' ),
			'section'     => 'zerif_contactus_section',
			'priority'    => 2,
		)
	);

	/* Use the contact options from the theme, only if Pirate Forms is not installed */
	if ( ! defined( 'PIRATE_FORMS_VERSION' ) ) {
		/* Contactus email */
		$wp_customize->add_setting(
			'zerif_contactus_email',
			array(
				'sanitize_callback' => 'sanitize_email',
			)
		);
		$wp_customize->add_control(
			'zerif_contactus_email',
			array(
				'label'    => __( 'Email address', 'zerif-lite' ),
				'section'  => 'zerif_contactus_section',
				'priority' => 4,
			)
		);
		/* Contactus button label */
		$wp_customize->add_setting(
			'zerif_contactus_button_label',
			array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'default'           => __( 'Send Message', 'zerif-lite' ),
				'transport'         => 'postMessage',
			)
		);

		$wp_customize->add_control(
			'zerif_contactus_button_label',
			array(
				'label'    => __( 'Button label', 'zerif-lite' ),
				'section'  => 'zerif_contactus_section',
				'priority' => 5,
			)
		);

		/* Recaptcha */
		$wp_customize->add_setting(
			'zerif_contactus_recaptcha_show',
			array(
				'sanitize_callback' => 'zerif_sanitize_checkbox',
			)
		);

		$wp_customize->add_control(
			'zerif_contactus_recaptcha_show',
			array(
				'type'     => 'checkbox',
				'label'    => __( 'Hide reCaptcha?', 'zerif-lite' ),
				'section'  => 'zerif_contactus_section',
				'priority' => 6,
			)
		);

		/* Site key */
		$attribut_new_tab = ( isset( $zerif_accessibility ) && ( $zerif_accessibility != 1 ) ? ' target="_blank"' : '' );
		$wp_customize->add_setting(
			'zerif_contactus_sitekey',
			array(
				'sanitize_callback' => 'sanitize_text_field',
			)
		);

		$wp_customize->add_control(
			'zerif_contactus_sitekey',
			array(
				'label'       => __( 'Site key', 'zerif-lite' ),
				'description' => '<a' . $attribut_new_tab . ' href="https://www.google.com/recaptcha/admin#list">' . __( 'Create an account here', 'zerif-lite' ) . '</a> to get the Site key and the Secret key for the reCaptcha.',
				'section'     => 'zerif_contactus_section',
				'priority'    => 7,
			)
		);

		/* Secret key */
		$wp_customize->add_setting(
			'zerif_contactus_secretkey',
			array(
				'sanitize_callback' => 'sanitize_text_field',
			)
		);

		$wp_customize->add_control(
			'zerif_contactus_secretkey',
			array(
				'label'    => __( 'Secret key', 'zerif-lite' ),
				'section'  => 'zerif_contactus_section',
				'priority' => 8,
			)
		);

	}

	/**
	 * FOOTER OPTIONS
	 */

	$wp_customize->add_panel(
		'panel_footer',
		array(
			'priority'   => 90,
			'capability' => 'edit_theme_options',
			'title'      => __( 'Footer options', 'zerif-lite' ),
		)
	);

	$wp_customize->add_section(
		'zerif_general_socials_section',
		array(
			'title'    => __( 'Footer Social Icons', 'zerif-lite' ),
			'priority' => 31,
			'panel'    => 'panel_footer',
		)
	);

	/* Facebook */
	$wp_customize->add_setting(
		'zerif_socials_facebook',
		array(
			'sanitize_callback' => 'esc_url_raw',
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		'zerif_socials_facebook',
		array(
			'label'    => __( 'Facebook link', 'zerif-lite' ),
			'section'  => 'zerif_general_socials_section',
			'priority' => 4,
		)
	);

	/* Twitter */
	$wp_customize->add_setting(
		'zerif_socials_twitter',
		array(
			'sanitize_callback' => 'esc_url_raw',
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		'zerif_socials_twitter',
		array(
			'label'    => __( 'Twitter link', 'zerif-lite' ),
			'section'  => 'zerif_general_socials_section',
			'priority' => 5,
		)
	);

	/* Linkedin */
	$wp_customize->add_setting(
		'zerif_socials_linkedin',
		array(
			'sanitize_callback' => 'esc_url_raw',
			'transport'         => 'postMessage',
		)
	);
	$wp_customize->add_control(
		'zerif_socials_linkedin',
		array(
			'label'    => __( 'Linkedin link', 'zerif-lite' ),
			'section'  => 'zerif_general_socials_section',
			'priority' => 6,
		)
	);

	/* Behance */
	$wp_customize->add_setting(
		'zerif_socials_behance',
		array(
			'sanitize_callback' => 'esc_url_raw',
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		'zerif_socials_behance',
		array(
			'label'    => __( 'Behance link', 'zerif-lite' ),
			'section'  => 'zerif_general_socials_section',
			'priority' => 7,
		)
	);

	/* Dribbble */
	$wp_customize->add_setting(
		'zerif_socials_dribbble',
		array(
			'sanitize_callback' => 'esc_url_raw',
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		'zerif_socials_dribbble',
		array(
			'label'    => __( 'Dribbble link', 'zerif-lite' ),
			'section'  => 'zerif_general_socials_section',
			'priority' => 8,
		)
	);

	/* Instagram */
	$wp_customize->add_setting(
		'zerif_socials_instagram',
		array(
			'sanitize_callback' => 'esc_url_raw',
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		'zerif_socials_instagram',
		array(
			'label'    => __( 'Instagram link', 'zerif-lite' ),
			'section'  => 'zerif_general_socials_section',
			'priority' => 9,
		)
	);

	$wp_customize->add_section(
		'zerif_general_footer_section',
		array(
			'title'    => __( 'Footer Content', 'zerif-lite' ),
			'priority' => 32,
			'panel'    => 'panel_footer',
		)
	);

	/* COPYRIGHT */
	$wp_customize->add_setting(
		'zerif_copyright',
		array(
			'sanitize_callback' => 'zerif_sanitize_input',
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		'zerif_copyright',
		array(
			'label'    => __( 'Footer Copyright', 'zerif-lite' ),
			'section'  => 'zerif_general_footer_section',
			'priority' => 5,
		)
	);

	/* Address - ICON */
	if ( current_user_can( 'edit_theme_options' ) ) {
		$wp_customize->add_setting(
			'zerif_address_icon',
			array(
				'sanitize_callback' => 'esc_url_raw',
				'default'           => get_template_directory_uri() . '/images/map25-redish.png',
				'transport'         => 'postMessage',
			)
		);
	} else {
		$wp_customize->add_setting(
			'zerif_address_icon',
			array(
				'sanitize_callback' => 'esc_url_raw',
				'transport'         => 'postMessage',
			)
		);
	}

	$wp_customize->add_control(
		new WP_Customize_Image_Control(
			$wp_customize,
			'zerif_address_icon',
			array(
				'label'    => __( 'Address section - icon', 'zerif-lite' ),
				'section'  => 'zerif_general_footer_section',
				'priority' => 9,
			)
		)
	);

	/* Address */
	if ( current_user_can( 'edit_theme_options' ) ) {
		$wp_customize->add_setting(
			'zerif_address',
			array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'default'           => __( 'Company address', 'zerif-lite' ),
				'transport'         => 'postMessage',
			)
		);
	} else {
		$wp_customize->add_setting(
			'zerif_address',
			array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'transport'         => 'postMessage',
			)
		);
	}

	$wp_customize->add_control(
		'zerif_address',
		array(
			'label'    => __( 'Address', 'zerif-lite' ),
			'type'     => 'textarea',
			'section'  => 'zerif_general_footer_section',
			'priority' => 10,
		)
	);

	/* Email - ICON */
	if ( current_user_can( 'edit_theme_options' ) ) {
		$wp_customize->add_setting(
			'zerif_email_icon',
			array(
				'sanitize_callback' => 'esc_url_raw',
				'default'           => get_template_directory_uri() . '/images/envelope4-green.png',
				'transport'         => 'postMessage',
			)
		);
	} else {
		$wp_customize->add_setting(
			'zerif_email_icon',
			array(
				'sanitize_callback' => 'esc_url_raw',
				'transport'         => 'postMessage',
			)
		);
	}

	$wp_customize->add_control(
		new WP_Customize_Image_Control(
			$wp_customize,
			'zerif_email_icon',
			array(
				'label'    => __( 'Email section - icon', 'zerif-lite' ),
				'section'  => 'zerif_general_footer_section',
				'priority' => 11,
			)
		)
	);

	/* Email */
	if ( current_user_can( 'edit_theme_options' ) ) {
		$wp_customize->add_setting(
			'zerif_email',
			array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'default'           => __( 'youremail@site.com', 'zerif-lite' ),
				'transport'         => 'postMessage',
			)
		);
	} else {
		$wp_customize->add_setting(
			'zerif_email',
			array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'transport'         => 'postMessage',
			)
		);
	}

	$wp_customize->add_control(
		'zerif_email',
		array(
			'label'    => __( 'Email', 'zerif-lite' ),
			'type'     => 'textarea',
			'section'  => 'zerif_general_footer_section',
			'priority' => 12,
		)
	);

	/* Phone number - ICON */
	if ( current_user_can( 'edit_theme_options' ) ) {
		$wp_customize->add_setting(
			'zerif_phone_icon',
			array(
				'sanitize_callback' => 'esc_url_raw',
				'default'           => get_template_directory_uri() . '/images/telephone65-blue.png',
				'transport'         => 'postMessage',
			)
		);
	} else {
		$wp_customize->add_setting(
			'zerif_phone_icon',
			array(
				'sanitize_callback' => 'esc_url_raw',
				'transport'         => 'postMessage',
			)
		);
	}

	$wp_customize->add_control(
		new WP_Customize_Image_Control(
			$wp_customize,
			'zerif_phone_icon',
			array(
				'label'    => __( 'Phone number section - icon', 'zerif-lite' ),
				'section'  => 'zerif_general_footer_section',
				'priority' => 13,
			)
		)
	);

	/* Phone number */
	if ( current_user_can( 'edit_theme_options' ) ) {
		$wp_customize->add_setting(
			'zerif_phone',
			array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'default'           => __( '0 332 548 954', 'zerif-lite' ),
				'transport'         => 'postMessage',
			)
		);
	} else {
		$wp_customize->add_setting(
			'zerif_phone',
			array(
				'sanitize_callback' => 'zerif_sanitize_input',
				'transport'         => 'postMessage',
			)
		);
	}

	$wp_customize->add_control(
		'zerif_phone',
		array(
			'label'    => __( 'Phone number', 'zerif-lite' ),
			'type'     => 'textarea',
			'section'  => 'zerif_general_footer_section',
			'priority' => 14,
		)
	);

}
add_action( 'customize_register', 'zerif_customize_register' );

/**
 * Binds JS handlers to make Theme Customizer preview reload changes asynchronously.
 */
function zerif_customize_preview_js() {
	wp_enqueue_script( 'zerif_customizer', get_template_directory_uri() . '/js/customizer.js', array( 'customize-preview' ), '20130508', true );
}
add_action( 'customize_preview_init', 'zerif_customize_preview_js' );

/**
 * Function to sanitize inputs
 */
function zerif_sanitize_input( $input ) {
	return wp_kses_post( force_balance_tags( $input ) );
}

/**
 * Function to sanitize checkboxes
 */
function zerif_sanitize_checkbox( $input ) {
	return ( isset( $input ) && true == $input ? true : false );
}

/**
 * Enqueue scripts for customizer
 */
function zerif_late_registers() {

	wp_enqueue_script( 'zerif_customizer_script', get_template_directory_uri() . '/js/zerif_customizer.js', array( 'jquery' ), '1.0.8', true );

	wp_localize_script(
		'zerif_customizer_script',
		'zerifLiteCustomizerObject',
		array(

			'tooltip_safefont'      => sprintf( '%1$s <br><br> %2$s', __( 'Zerif Lite main font is Montserrat, which only supports the Latin script.', 'zerif-lite' ), __( 'If you are using other scripts like Cyrillic or Greek , you need to check this box to enable the safe fonts for better compatibility.', 'zerif-lite' ) ),
			'tooltip_accessibility' => sprintf( '%1$s <br><br> %2$s', __( 'Web accessibility means that people with disabilities can use the Web. More specifically, Web accessibility means that people with disabilities can perceive, understand, navigate, and interact with the Web, and that they can contribute to the Web.', 'zerif-lite' ), __( 'Web accessibility also benefits others, including older people with changing abilities due to aging.', 'zerif-lite' ) ),
			'tooltip_smoothscroll'  => sprintf( '%1$s <br><br> %2$s', __( 'Smooth scrolling can be very useful if you read a lot of long pages. Normally, when you press Page Down, the view jumps directly down one page.', 'zerif-lite' ), __( 'With smooth scrolling, it slides down smoothly, so you can see how much it scrolls. This makes it easier to resume reading from where you were before.', 'zerif-lite' ) ),
			'tooltip_preloader'     => sprintf( '%1$s <br><br> %2$s', __( 'The preloader is the circular progress element that first appears on the site. When the loader finishes its progress animation, the whole page elements are revealed.', 'zerif-lite' ), __( 'The preloader is used as a creative way to make waiting a bit less boring for the visitor.', 'zerif-lite' ) ),
		)
	);

	wp_enqueue_script( 'zerif_multiple_panels_script', get_template_directory_uri() . '/js/zerif_multiple_panels.js', array( 'zerif_customizer_script' ), '1.0.8', true );
}
add_action( 'customize_controls_enqueue_scripts', 'zerif_late_registers', 99 );

/**
 * Custom logo callback function.
 *
 * @return string
 */
function zerif_custom_logo_callback() {
	$logo              = '';
	$zerif_custom_logo = get_theme_mod( 'custom_logo' );

	if ( ! empty( $zerif_custom_logo ) ) {
		$custom_logo = wp_get_attachment_image_url( get_theme_mod( 'custom_logo' ), 'full' );
		$logo        = '<a href="' . esc_url( home_url( '/' ) ) . '"><img src="' . esc_url( $custom_logo ) . '"></a>';
	} else {
		$logo = '<div class="site-title-tagline-wrapper"><h1 class="site-title"><a href="' . esc_url( home_url( '/' ) ) . '">' . get_bloginfo( 'name' ) . '</a></h1><p class="site-description">' . get_bloginfo( 'description' ) . '</p></div>';
	}

	return $logo;
}

/**
 * Function to check if WordPress is greater or equal to 4.7
 */
function zerif_check_if_wp_greater_than_4_7() {

	$wp_version_nr = get_bloginfo( 'version' );

	if ( function_exists( 'version_compare' ) ) {
		if ( version_compare( $wp_version_nr, '4.7', '>=' ) ) {
			return true;
		}
	}

	return false;

}
home/xbodynamge/lebauwcentre/wp-content/themes/onepress/inc/customizer.php000064400000037155151146775340023250 0ustar00<?php
/**
 * OnePress Theme Customizer.
 *
 * @package OnePress
 */

/**
 * Add upsell message for section
 *
 * @return string
 */
function onepress_add_upsell_for_section( $wp_customize, $section_id ){
	if ( apply_filters( 'onepress_add_upsell_for_section', true, $section_id ) ) {

		$name =  $section_id.'__upsell';
		$wp_customize->add_setting( $name,
			array(
				'sanitize_callback' => 'onepress_sanitize_text',
			)
		);
		$wp_customize->add_control( new OnePress_Misc_Control( $wp_customize, $name,
			array(
				'type'        => 'custom_message',
				'section'     => $section_id,
				'description' => __('<h4 class="customizer-group-heading-message">Advanced Section Styling</h4><p class="customizer-group-heading-message">Check out the <a target="_blank" href="https://www.famethemes.com/plugins/onepress-plus/?utm_source=theme_customizer&utm_medium=text_link&utm_campaign=onepress_customizer#get-started">OnePress Plus</a> version for full control over the section styling which includes background color, image, video, parallax effect, custom style and more ...</p>', 'onepress' )
			)
		));
	}
}


/**
 * Add postMessage support for site title and description for the Theme Customizer.
 *
 * @param WP_Customize_Manager $wp_customize Theme Customizer object.
 */
function onepress_customize_register( $wp_customize ) {


	// Load custom controls.
	$path = get_template_directory();
	require $path. '/inc/customizer-controls.php';

	// Remove default sections.

	// Custom WP default control & settings.
	$wp_customize->get_setting( 'blogname' )->transport         = 'postMessage';
	$wp_customize->get_setting( 'blogdescription' )->transport  = 'postMessage';
	$wp_customize->get_setting( 'header_textcolor' )->transport = 'postMessage';

	/**
	 * Hook to add other customize
	 */
	do_action( 'onepress_customize_before_register', $wp_customize );


	$pages  =  get_pages();
	$option_pages = array();
	$option_pages[0] = esc_html__( 'Select page', 'onepress' );
	foreach( $pages as $p ){
		$option_pages[ $p->ID ] = $p->post_title;
	}

	$users = get_users( array(
		'orderby'      => 'display_name',
		'order'        => 'ASC',
		'number'       => '',
	) );

	$option_users[0] = esc_html__( 'Select member', 'onepress' );
	foreach( $users as $user ){
		$option_users[ $user->ID ] = $user->display_name;
	}

	/**
	 * Load Customize Configs
	 * @since 2.1.0
	 */
	// Site Identity.
	require_once $path. '/inc/customize-configs/site-identity.php';

	//Site Options
	require_once $path. '/inc/customize-configs/options.php';
	require_once $path. '/inc/customize-configs/options-global.php';
	require_once $path. '/inc/customize-configs/options-colors.php';
	require_once $path. '/inc/customize-configs/options-header.php';
	require_once $path. '/inc/customize-configs/options-navigation.php';
	require_once $path. '/inc/customize-configs/options-sections-navigation.php';
	require_once $path. '/inc/customize-configs/options-page.php';
	require_once $path. '/inc/customize-configs/options-blog-posts.php';
	require_once $path. '/inc/customize-configs/options-single.php';
	require_once $path. '/inc/customize-configs/options-footer.php';

	/**
	 * @since 2.1.1
	 * Load sections if enabled
	 */
	$sections = Onepress_Config::get_sections();


	foreach( $sections as $key => $section ) {

		if ( Onepress_Config::is_section_active( $key ) ) {
			$file = $path. '/inc/customize-configs/section-'.$key.'.php';
			if ( file_exists( $file ) ) {
				require_once $file;
			}
		}

	}

	/*
	// Section Hero
	require_once $path. '/inc/customize-configs/section-hero.php';
	// Section Hero
	require_once $path. '/inc/customize-configs/section-about.php';
	// Video Popup
	require_once $path. '/inc/customize-configs/section-videolightbox.php';
	// Section Gallery
	require_once $path. '/inc/customize-configs/section-gallery.php';
	// Section Features
	require_once $path. '/inc/customize-configs/section-features.php';
	// Section Services
	require_once $path. '/inc/customize-configs/section-services.php';
	// Section Counter
	require_once $path. '/inc/customize-configs/section-counter.php';
	// Section Team
	require_once $path. '/inc/customize-configs/section-team.php';
	// Section News
	require_once $path. '/inc/customize-configs/section-news.php';
	// Section Contact
	require_once $path. '/inc/customize-configs/section-contact.php';
	*/

	// Section Up sell
	require_once $path. '/inc/customize-configs/section-upsell.php';
	
	/**
	 * Hook to add other customize
	 */
	do_action( 'onepress_customize_after_register', $wp_customize );

	/**
	 * Move WC Panel to bottom
	 * @since 2.1.1
	 */
	if ( onepress_is_wc_active() ) {
		$wp_customize->get_panel( 'woocommerce' )->priority = 300;
	}

}
add_action( 'customize_register', 'onepress_customize_register' );
/**
 * Selective refresh
 */
require get_template_directory() . '/inc/customizer-selective-refresh.php';


/**
 * Binds JS handlers to make Theme Customizer preview reload changes asynchronously.
 */
function onepress_customize_preview_js() {
    wp_enqueue_script( 'onepress_customizer_liveview', get_template_directory_uri() . '/assets/js/customizer-liveview.js', array( 'customize-preview', 'customize-selective-refresh' ), false, true );
}
add_action( 'customize_preview_init', 'onepress_customize_preview_js', 65 );



add_action( 'customize_controls_enqueue_scripts', 'opneress_customize_js_settings' );
function opneress_customize_js_settings(){
    if ( ! class_exists( 'Onepress_Dashboard' ) ) {
        return;
    }

    $actions = Onepress_Dashboard::get_instance()->get_recommended_actions();
    $number_action = $actions['number_notice'];

    wp_localize_script( 'customize-controls', 'onepress_customizer_settings', array(
        'number_action' => $number_action,
        'is_plus_activated' => class_exists( 'OnePress_Plus' ) ? 'y' : 'n',
        'action_url' => admin_url( 'themes.php?page=ft_onepress&tab=recommended_actions' ),
    ) );
}

/**
 * Customizer Icon picker
 */
function onepress_customize_controls_enqueue_scripts(){
    wp_localize_script( 'customize-controls', 'C_Icon_Picker',
        apply_filters( 'c_icon_picker_js_setup',
            array(
                'search'    => esc_html__( 'Search', 'onepress' ),
                'fonts' => array(
                    'font-awesome' => array(
                        // Name of icon
                        'name' => esc_html__( 'Font Awesome', 'onepress' ),
                        // prefix class example for font-awesome fa-fa-{name}
                        'prefix' => 'fa',
                        // font url
                        'url' => esc_url( add_query_arg( array( 'ver'=> '4.7.0' ), get_template_directory_uri() .'/assets/css/font-awesome.min.css' ) ),
                        // Icon class name, separated by |
                        'icons' => 'fa-glass|fa-music|fa-search|fa-envelope-o|fa-heart|fa-star|fa-star-o|fa-user|fa-film|fa-th-large|fa-th|fa-th-list|fa-check|fa-times|fa-search-plus|fa-search-minus|fa-power-off|fa-signal|fa-cog|fa-trash-o|fa-home|fa-file-o|fa-clock-o|fa-road|fa-download|fa-arrow-circle-o-down|fa-arrow-circle-o-up|fa-inbox|fa-play-circle-o|fa-repeat|fa-refresh|fa-list-alt|fa-lock|fa-flag|fa-headphones|fa-volume-off|fa-volume-down|fa-volume-up|fa-qrcode|fa-barcode|fa-tag|fa-tags|fa-book|fa-bookmark|fa-print|fa-camera|fa-font|fa-bold|fa-italic|fa-text-height|fa-text-width|fa-align-left|fa-align-center|fa-align-right|fa-align-justify|fa-list|fa-outdent|fa-indent|fa-video-camera|fa-picture-o|fa-pencil|fa-map-marker|fa-adjust|fa-tint|fa-pencil-square-o|fa-share-square-o|fa-check-square-o|fa-arrows|fa-step-backward|fa-fast-backward|fa-backward|fa-play|fa-pause|fa-stop|fa-forward|fa-fast-forward|fa-step-forward|fa-eject|fa-chevron-left|fa-chevron-right|fa-plus-circle|fa-minus-circle|fa-times-circle|fa-check-circle|fa-question-circle|fa-info-circle|fa-crosshairs|fa-times-circle-o|fa-check-circle-o|fa-ban|fa-arrow-left|fa-arrow-right|fa-arrow-up|fa-arrow-down|fa-share|fa-expand|fa-compress|fa-plus|fa-minus|fa-asterisk|fa-exclamation-circle|fa-gift|fa-leaf|fa-fire|fa-eye|fa-eye-slash|fa-exclamation-triangle|fa-plane|fa-calendar|fa-random|fa-comment|fa-magnet|fa-chevron-up|fa-chevron-down|fa-retweet|fa-shopping-cart|fa-folder|fa-folder-open|fa-arrows-v|fa-arrows-h|fa-bar-chart|fa-twitter-square|fa-facebook-square|fa-camera-retro|fa-key|fa-cogs|fa-comments|fa-thumbs-o-up|fa-thumbs-o-down|fa-star-half|fa-heart-o|fa-sign-out|fa-linkedin-square|fa-thumb-tack|fa-external-link|fa-sign-in|fa-trophy|fa-github-square|fa-upload|fa-lemon-o|fa-phone|fa-square-o|fa-bookmark-o|fa-phone-square|fa-twitter|fa-facebook|fa-github|fa-unlock|fa-credit-card|fa-rss|fa-hdd-o|fa-bullhorn|fa-bell|fa-certificate|fa-hand-o-right|fa-hand-o-left|fa-hand-o-up|fa-hand-o-down|fa-arrow-circle-left|fa-arrow-circle-right|fa-arrow-circle-up|fa-arrow-circle-down|fa-globe|fa-wrench|fa-tasks|fa-filter|fa-briefcase|fa-arrows-alt|fa-users|fa-link|fa-cloud|fa-flask|fa-scissors|fa-files-o|fa-paperclip|fa-floppy-o|fa-square|fa-bars|fa-list-ul|fa-list-ol|fa-strikethrough|fa-underline|fa-table|fa-magic|fa-truck|fa-pinterest|fa-pinterest-square|fa-google-plus-square|fa-google-plus|fa-money|fa-caret-down|fa-caret-up|fa-caret-left|fa-caret-right|fa-columns|fa-sort|fa-sort-desc|fa-sort-asc|fa-envelope|fa-linkedin|fa-undo|fa-gavel|fa-tachometer|fa-comment-o|fa-comments-o|fa-bolt|fa-sitemap|fa-umbrella|fa-clipboard|fa-lightbulb-o|fa-exchange|fa-cloud-download|fa-cloud-upload|fa-user-md|fa-stethoscope|fa-suitcase|fa-bell-o|fa-coffee|fa-cutlery|fa-file-text-o|fa-building-o|fa-hospital-o|fa-ambulance|fa-medkit|fa-fighter-jet|fa-beer|fa-h-square|fa-plus-square|fa-angle-double-left|fa-angle-double-right|fa-angle-double-up|fa-angle-double-down|fa-angle-left|fa-angle-right|fa-angle-up|fa-angle-down|fa-desktop|fa-laptop|fa-tablet|fa-mobile|fa-circle-o|fa-quote-left|fa-quote-right|fa-spinner|fa-circle|fa-reply|fa-github-alt|fa-folder-o|fa-folder-open-o|fa-smile-o|fa-frown-o|fa-meh-o|fa-gamepad|fa-keyboard-o|fa-flag-o|fa-flag-checkered|fa-terminal|fa-code|fa-reply-all|fa-star-half-o|fa-location-arrow|fa-crop|fa-code-fork|fa-chain-broken|fa-question|fa-info|fa-exclamation|fa-superscript|fa-subscript|fa-eraser|fa-puzzle-piece|fa-microphone|fa-microphone-slash|fa-shield|fa-calendar-o|fa-fire-extinguisher|fa-rocket|fa-maxcdn|fa-chevron-circle-left|fa-chevron-circle-right|fa-chevron-circle-up|fa-chevron-circle-down|fa-html5|fa-css3|fa-anchor|fa-unlock-alt|fa-bullseye|fa-ellipsis-h|fa-ellipsis-v|fa-rss-square|fa-play-circle|fa-ticket|fa-minus-square|fa-minus-square-o|fa-level-up|fa-level-down|fa-check-square|fa-pencil-square|fa-external-link-square|fa-share-square|fa-compass|fa-caret-square-o-down|fa-caret-square-o-up|fa-caret-square-o-right|fa-eur|fa-gbp|fa-usd|fa-inr|fa-jpy|fa-rub|fa-krw|fa-btc|fa-file|fa-file-text|fa-sort-alpha-asc|fa-sort-alpha-desc|fa-sort-amount-asc|fa-sort-amount-desc|fa-sort-numeric-asc|fa-sort-numeric-desc|fa-thumbs-up|fa-thumbs-down|fa-youtube-square|fa-youtube|fa-xing|fa-xing-square|fa-youtube-play|fa-dropbox|fa-stack-overflow|fa-instagram|fa-flickr|fa-adn|fa-bitbucket|fa-bitbucket-square|fa-tumblr|fa-tumblr-square|fa-long-arrow-down|fa-long-arrow-up|fa-long-arrow-left|fa-long-arrow-right|fa-apple|fa-windows|fa-android|fa-linux|fa-dribbble|fa-skype|fa-foursquare|fa-trello|fa-female|fa-male|fa-gratipay|fa-sun-o|fa-moon-o|fa-archive|fa-bug|fa-vk|fa-weibo|fa-renren|fa-pagelines|fa-stack-exchange|fa-arrow-circle-o-right|fa-arrow-circle-o-left|fa-caret-square-o-left|fa-dot-circle-o|fa-wheelchair|fa-vimeo-square|fa-try|fa-plus-square-o|fa-space-shuttle|fa-slack|fa-envelope-square|fa-wordpress|fa-openid|fa-university|fa-graduation-cap|fa-yahoo|fa-google|fa-reddit|fa-reddit-square|fa-stumbleupon-circle|fa-stumbleupon|fa-delicious|fa-digg|fa-pied-piper-pp|fa-pied-piper-alt|fa-drupal|fa-joomla|fa-language|fa-fax|fa-building|fa-child|fa-paw|fa-spoon|fa-cube|fa-cubes|fa-behance|fa-behance-square|fa-steam|fa-steam-square|fa-recycle|fa-car|fa-taxi|fa-tree|fa-spotify|fa-deviantart|fa-soundcloud|fa-database|fa-file-pdf-o|fa-file-word-o|fa-file-excel-o|fa-file-powerpoint-o|fa-file-image-o|fa-file-archive-o|fa-file-audio-o|fa-file-video-o|fa-file-code-o|fa-vine|fa-codepen|fa-jsfiddle|fa-life-ring|fa-circle-o-notch|fa-rebel|fa-empire|fa-git-square|fa-git|fa-hacker-news|fa-tencent-weibo|fa-qq|fa-weixin|fa-paper-plane|fa-paper-plane-o|fa-history|fa-circle-thin|fa-header|fa-paragraph|fa-sliders|fa-share-alt|fa-share-alt-square|fa-bomb|fa-futbol-o|fa-tty|fa-binoculars|fa-plug|fa-slideshare|fa-twitch|fa-yelp|fa-newspaper-o|fa-wifi|fa-calculator|fa-paypal|fa-google-wallet|fa-cc-visa|fa-cc-mastercard|fa-cc-discover|fa-cc-amex|fa-cc-paypal|fa-cc-stripe|fa-bell-slash|fa-bell-slash-o|fa-trash|fa-copyright|fa-at|fa-eyedropper|fa-paint-brush|fa-birthday-cake|fa-area-chart|fa-pie-chart|fa-line-chart|fa-lastfm|fa-lastfm-square|fa-toggle-off|fa-toggle-on|fa-bicycle|fa-bus|fa-ioxhost|fa-angellist|fa-cc|fa-ils|fa-meanpath|fa-buysellads|fa-connectdevelop|fa-dashcube|fa-forumbee|fa-leanpub|fa-sellsy|fa-shirtsinbulk|fa-simplybuilt|fa-skyatlas|fa-cart-plus|fa-cart-arrow-down|fa-diamond|fa-ship|fa-user-secret|fa-motorcycle|fa-street-view|fa-heartbeat|fa-venus|fa-mars|fa-mercury|fa-transgender|fa-transgender-alt|fa-venus-double|fa-mars-double|fa-venus-mars|fa-mars-stroke|fa-mars-stroke-v|fa-mars-stroke-h|fa-neuter|fa-genderless|fa-facebook-official|fa-pinterest-p|fa-whatsapp|fa-server|fa-user-plus|fa-user-times|fa-bed|fa-viacoin|fa-train|fa-subway|fa-medium|fa-y-combinator|fa-optin-monster|fa-opencart|fa-expeditedssl|fa-battery-full|fa-battery-three-quarters|fa-battery-half|fa-battery-quarter|fa-battery-empty|fa-mouse-pointer|fa-i-cursor|fa-object-group|fa-object-ungroup|fa-sticky-note|fa-sticky-note-o|fa-cc-jcb|fa-cc-diners-club|fa-clone|fa-balance-scale|fa-hourglass-o|fa-hourglass-start|fa-hourglass-half|fa-hourglass-end|fa-hourglass|fa-hand-rock-o|fa-hand-paper-o|fa-hand-scissors-o|fa-hand-lizard-o|fa-hand-spock-o|fa-hand-pointer-o|fa-hand-peace-o|fa-trademark|fa-registered|fa-creative-commons|fa-gg|fa-gg-circle|fa-tripadvisor|fa-odnoklassniki|fa-odnoklassniki-square|fa-get-pocket|fa-wikipedia-w|fa-safari|fa-chrome|fa-firefox|fa-opera|fa-internet-explorer|fa-television|fa-contao|fa-500px|fa-amazon|fa-calendar-plus-o|fa-calendar-minus-o|fa-calendar-times-o|fa-calendar-check-o|fa-industry|fa-map-pin|fa-map-signs|fa-map-o|fa-map|fa-commenting|fa-commenting-o|fa-houzz|fa-vimeo|fa-black-tie|fa-fonticons|fa-reddit-alien|fa-edge|fa-credit-card-alt|fa-codiepie|fa-modx|fa-fort-awesome|fa-usb|fa-product-hunt|fa-mixcloud|fa-scribd|fa-pause-circle|fa-pause-circle-o|fa-stop-circle|fa-stop-circle-o|fa-shopping-bag|fa-shopping-basket|fa-hashtag|fa-bluetooth|fa-bluetooth-b|fa-percent|fa-gitlab|fa-wpbeginner|fa-wpforms|fa-envira|fa-universal-access|fa-wheelchair-alt|fa-question-circle-o|fa-blind|fa-audio-description|fa-volume-control-phone|fa-braille|fa-assistive-listening-systems|fa-american-sign-language-interpreting|fa-deaf|fa-glide|fa-glide-g|fa-sign-language|fa-low-vision|fa-viadeo|fa-viadeo-square|fa-snapchat|fa-snapchat-ghost|fa-snapchat-square|fa-pied-piper|fa-first-order|fa-yoast|fa-themeisle|fa-google-plus-official|fa-font-awesome|fa-handshake-o|fa-envelope-open|fa-envelope-open-o|fa-linode|fa-address-book|fa-address-book-o|fa-address-card|fa-address-card-o|fa-user-circle|fa-user-circle-o|fa-user-o|fa-id-badge|fa-id-card|fa-id-card-o|fa-quora|fa-free-code-camp|fa-telegram|fa-thermometer-full|fa-thermometer-three-quarters|fa-thermometer-half|fa-thermometer-quarter|fa-thermometer-empty|fa-shower|fa-bath|fa-podcast|fa-window-maximize|fa-window-minimize|fa-window-restore|fa-window-close|fa-window-close-o|fa-bandcamp|fa-grav|fa-etsy|fa-imdb|fa-ravelry|fa-eercast|fa-microchip|fa-snowflake-o|fa-superpowers|fa-wpexplorer|fa-meetup'

                        ),
                )

            )
        )
    );
}

add_action( 'customize_controls_enqueue_scripts', 'onepress_customize_controls_enqueue_scripts' );
home/xbodynamge/lebauwcentre/wp-content/themes/twentynineteen/inc/customizer.php000060400000007660151147024730024453 0ustar00<?php
/**
 * Twenty Nineteen: Customizer
 *
 * @package WordPress
 * @subpackage Twenty_Nineteen
 * @since 1.0.0
 */

/**
 * Add postMessage support for site title and description for the Theme Customizer.
 *
 * @param WP_Customize_Manager $wp_customize Theme Customizer object.
 */
function twentynineteen_customize_register( $wp_customize ) {
	$wp_customize->get_setting( 'blogname' )->transport         = 'postMessage';
	$wp_customize->get_setting( 'blogdescription' )->transport  = 'postMessage';
	$wp_customize->get_setting( 'header_textcolor' )->transport = 'postMessage';

	if ( isset( $wp_customize->selective_refresh ) ) {
		$wp_customize->selective_refresh->add_partial(
			'blogname',
			array(
				'selector'        => '.site-title a',
				'render_callback' => 'twentynineteen_customize_partial_blogname',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'blogdescription',
			array(
				'selector'        => '.site-description',
				'render_callback' => 'twentynineteen_customize_partial_blogdescription',
			)
		);
	}

	/**
	 * Primary color.
	 */
	$wp_customize->add_setting(
		'primary_color',
		array(
			'default'           => 'default',
			'transport'         => 'postMessage',
			'sanitize_callback' => 'twentynineteen_sanitize_color_option',
		)
	);

	$wp_customize->add_control(
		'primary_color',
		array(
			'type'     => 'radio',
			'label'    => __( 'Primary Color', 'twentynineteen' ),
			'choices'  => array(
				'default' => _x( 'Default', 'primary color', 'twentynineteen' ),
				'custom'  => _x( 'Custom', 'primary color', 'twentynineteen' ),
			),
			'section'  => 'colors',
			'priority' => 5,
		)
	);

	// Add primary color hue setting and control.
	$wp_customize->add_setting(
		'primary_color_hue',
		array(
			'default'           => 199,
			'transport'         => 'postMessage',
			'sanitize_callback' => 'absint',
		)
	);

	$wp_customize->add_control(
		new WP_Customize_Color_Control(
			$wp_customize,
			'primary_color_hue',
			array(
				'description' => __( 'Apply a custom color for buttons, links, featured images, etc.', 'twentynineteen' ),
				'section'     => 'colors',
				'mode'        => 'hue',
			)
		)
	);

	// Add image filter setting and control.
	$wp_customize->add_setting(
		'image_filter',
		array(
			'default'           => 1,
			'sanitize_callback' => 'absint',
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		'image_filter',
		array(
			'label'   => __( 'Apply a filter to featured images using the primary color', 'twentynineteen' ),
			'section' => 'colors',
			'type'    => 'checkbox',
		)
	);
}
add_action( 'customize_register', 'twentynineteen_customize_register' );

/**
 * Render the site title for the selective refresh partial.
 *
 * @return void
 */
function twentynineteen_customize_partial_blogname() {
	bloginfo( 'name' );
}

/**
 * Render the site tagline for the selective refresh partial.
 *
 * @return void
 */
function twentynineteen_customize_partial_blogdescription() {
	bloginfo( 'description' );
}

/**
 * Bind JS handlers to instantly live-preview changes.
 */
function twentynineteen_customize_preview_js() {
	wp_enqueue_script( 'twentynineteen-customize-preview', get_theme_file_uri( '/js/customize-preview.js' ), array( 'customize-preview' ), '20181231', true );
}
add_action( 'customize_preview_init', 'twentynineteen_customize_preview_js' );

/**
 * Load dynamic logic for the customizer controls area.
 */
function twentynineteen_panels_js() {
	wp_enqueue_script( 'twentynineteen-customize-controls', get_theme_file_uri( '/js/customize-controls.js' ), array(), '20181231', true );
}
add_action( 'customize_controls_enqueue_scripts', 'twentynineteen_panels_js' );

/**
 * Sanitize custom color choice.
 *
 * @param string $choice Whether image filter is active.
 *
 * @return string
 */
function twentynineteen_sanitize_color_option( $choice ) {
	$valid = array(
		'default',
		'custom',
	);

	if ( in_array( $choice, $valid, true ) ) {
		return $choice;
	}

	return 'default';
}
home/xbodynamge/www/wp-content/themes/twentynineteen/inc/customizer.php000064400000007660151147032660022624 0ustar00<?php
/**
 * Twenty Nineteen: Customizer
 *
 * @package WordPress
 * @subpackage Twenty_Nineteen
 * @since 1.0.0
 */

/**
 * Add postMessage support for site title and description for the Theme Customizer.
 *
 * @param WP_Customize_Manager $wp_customize Theme Customizer object.
 */
function twentynineteen_customize_register( $wp_customize ) {
	$wp_customize->get_setting( 'blogname' )->transport         = 'postMessage';
	$wp_customize->get_setting( 'blogdescription' )->transport  = 'postMessage';
	$wp_customize->get_setting( 'header_textcolor' )->transport = 'postMessage';

	if ( isset( $wp_customize->selective_refresh ) ) {
		$wp_customize->selective_refresh->add_partial(
			'blogname',
			array(
				'selector'        => '.site-title a',
				'render_callback' => 'twentynineteen_customize_partial_blogname',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'blogdescription',
			array(
				'selector'        => '.site-description',
				'render_callback' => 'twentynineteen_customize_partial_blogdescription',
			)
		);
	}

	/**
	 * Primary color.
	 */
	$wp_customize->add_setting(
		'primary_color',
		array(
			'default'           => 'default',
			'transport'         => 'postMessage',
			'sanitize_callback' => 'twentynineteen_sanitize_color_option',
		)
	);

	$wp_customize->add_control(
		'primary_color',
		array(
			'type'     => 'radio',
			'label'    => __( 'Primary Color', 'twentynineteen' ),
			'choices'  => array(
				'default'  => _x( 'Default', 'primary color', 'twentynineteen' ),
				'custom' => _x( 'Custom', 'primary color', 'twentynineteen' ),
			),
			'section'  => 'colors',
			'priority' => 5,
		)
	);

	// Add primary color hue setting and control.
	$wp_customize->add_setting(
		'primary_color_hue',
		array(
			'default'           => 199,
			'transport'         => 'postMessage',
			'sanitize_callback' => 'absint',
		)
	);

	$wp_customize->add_control(
		new WP_Customize_Color_Control(
			$wp_customize,
			'primary_color_hue',
			array(
				'description' => __( 'Apply a custom color for buttons, links, featured images, etc.', 'twentynineteen' ),
				'section'     => 'colors',
				'mode'        => 'hue',
			)
		)
	);

	// Add image filter setting and control.
	$wp_customize->add_setting(
		'image_filter',
		array(
			'default'           => 1,
			'sanitize_callback' => 'absint',
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		'image_filter',
		array(
			'label'   => __( 'Apply a filter to featured images using the primary color', 'twentynineteen' ),
			'section' => 'colors',
			'type'    => 'checkbox',
		)
	);
}
add_action( 'customize_register', 'twentynineteen_customize_register' );

/**
 * Render the site title for the selective refresh partial.
 *
 * @return void
 */
function twentynineteen_customize_partial_blogname() {
	bloginfo( 'name' );
}

/**
 * Render the site tagline for the selective refresh partial.
 *
 * @return void
 */
function twentynineteen_customize_partial_blogdescription() {
	bloginfo( 'description' );
}

/**
 * Bind JS handlers to instantly live-preview changes.
 */
function twentynineteen_customize_preview_js() {
	wp_enqueue_script( 'twentynineteen-customize-preview', get_theme_file_uri( '/js/customize-preview.js' ), array( 'customize-preview' ), '20181108', true );
}
add_action( 'customize_preview_init', 'twentynineteen_customize_preview_js' );

/**
 * Load dynamic logic for the customizer controls area.
 */
function twentynineteen_panels_js() {
	wp_enqueue_script( 'twentynineteen-customize-controls', get_theme_file_uri( '/js/customize-controls.js' ), array(), '20181031', true );
}
add_action( 'customize_controls_enqueue_scripts', 'twentynineteen_panels_js' );

/**
 * Sanitize custom color choice.
 *
 * @param string $choice Whether image filter is active.
 *
 * @return string
 */
function twentynineteen_sanitize_color_option( $choice ) {
	$valid = array(
		'default',
		'custom',
	);

	if ( in_array( $choice, $valid, true ) ) {
		return $choice;
	}

	return 'default';
}
home/xbodynamge/crosstraining/wp-content/themes/twentysixteen/inc/customizer.php000060400000075007151147472550024541 0ustar00<?php
/**
 * Twenty Sixteen Customizer functionality
 *
 * @package WordPress
 * @subpackage Twenty_Sixteen
 * @since Twenty Sixteen 1.0
 */

/**
 * Sets up the WordPress core custom header and custom background features.
 *
 * @since Twenty Sixteen 1.0
 *
 * @see twentysixteen_header_style()
 */
function twentysixteen_custom_header_and_background() {
	$color_scheme             = twentysixteen_get_color_scheme();
	$default_background_color = trim( $color_scheme[0], '#' );
	$default_text_color       = trim( $color_scheme[3], '#' );

	/**
	 * Filter the arguments used when adding 'custom-background' support in Twenty Sixteen.
	 *
	 * @since Twenty Sixteen 1.0
	 *
	 * @param array $args {
	 *     An array of custom-background support arguments.
	 *
	 *     @type string $default-color Default color of the background.
	 * }
	 */
	add_theme_support( 'custom-background', apply_filters( 'twentysixteen_custom_background_args', array(
		'default-color' => $default_background_color,
	) ) );

	/**
	 * Filter the arguments used when adding 'custom-header' support in Twenty Sixteen.
	 *
	 * @since Twenty Sixteen 1.0
	 *
	 * @param array $args {
	 *     An array of custom-header support arguments.
	 *
	 *     @type string $default-text-color Default color of the header text.
	 *     @type int      $width            Width in pixels of the custom header image. Default 1200.
	 *     @type int      $height           Height in pixels of the custom header image. Default 280.
	 *     @type bool     $flex-height      Whether to allow flexible-height header images. Default true.
	 *     @type callable $wp-head-callback Callback function used to style the header image and text
	 *                                      displayed on the blog.
	 * }
	 */
	add_theme_support( 'custom-header', apply_filters( 'twentysixteen_custom_header_args', array(
		'default-text-color'     => $default_text_color,
		'width'                  => 1200,
		'height'                 => 280,
		'flex-height'            => true,
		'wp-head-callback'       => 'twentysixteen_header_style',
	) ) );
}
add_action( 'after_setup_theme', 'twentysixteen_custom_header_and_background' );

if ( ! function_exists( 'twentysixteen_header_style' ) ) :
/**
 * Styles the header text displayed on the site.
 *
 * Create your own twentysixteen_header_style() function to override in a child theme.
 *
 * @since Twenty Sixteen 1.0
 *
 * @see twentysixteen_custom_header_and_background().
 */
function twentysixteen_header_style() {
	// If the header text option is untouched, let's bail.
	if ( display_header_text() ) {
		return;
	}

	// If the header text has been hidden.
	?>
	<style type="text/css" id="twentysixteen-header-css">
		.site-branding {
			margin: 0 auto 0 0;
		}

		.site-branding .site-title,
		.site-description {
			clip: rect(1px, 1px, 1px, 1px);
			position: absolute;
		}
	</style>
	<?php
}
endif; // twentysixteen_header_style

/**
 * Adds postMessage support for site title and description for the Customizer.
 *
 * @since Twenty Sixteen 1.0
 *
 * @param WP_Customize_Manager $wp_customize The Customizer object.
 */
function twentysixteen_customize_register( $wp_customize ) {
	$color_scheme = twentysixteen_get_color_scheme();

	$wp_customize->get_setting( 'blogname' )->transport         = 'postMessage';
	$wp_customize->get_setting( 'blogdescription' )->transport  = 'postMessage';

	if ( isset( $wp_customize->selective_refresh ) ) {
		$wp_customize->selective_refresh->add_partial( 'blogname', array(
			'selector' => '.site-title a',
			'container_inclusive' => false,
			'render_callback' => 'twentysixteen_customize_partial_blogname',
		) );
		$wp_customize->selective_refresh->add_partial( 'blogdescription', array(
			'selector' => '.site-description',
			'container_inclusive' => false,
			'render_callback' => 'twentysixteen_customize_partial_blogdescription',
		) );
	}

	// Add color scheme setting and control.
	$wp_customize->add_setting( 'color_scheme', array(
		'default'           => 'default',
		'sanitize_callback' => 'twentysixteen_sanitize_color_scheme',
		'transport'         => 'postMessage',
	) );

	$wp_customize->add_control( 'color_scheme', array(
		'label'    => __( 'Base Color Scheme', 'twentysixteen' ),
		'section'  => 'colors',
		'type'     => 'select',
		'choices'  => twentysixteen_get_color_scheme_choices(),
		'priority' => 1,
	) );

	// Add page background color setting and control.
	$wp_customize->add_setting( 'page_background_color', array(
		'default'           => $color_scheme[1],
		'sanitize_callback' => 'sanitize_hex_color',
		'transport'         => 'postMessage',
	) );

	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'page_background_color', array(
		'label'       => __( 'Page Background Color', 'twentysixteen' ),
		'section'     => 'colors',
	) ) );

	// Remove the core header textcolor control, as it shares the main text color.
	$wp_customize->remove_control( 'header_textcolor' );

	// Add link color setting and control.
	$wp_customize->add_setting( 'link_color', array(
		'default'           => $color_scheme[2],
		'sanitize_callback' => 'sanitize_hex_color',
		'transport'         => 'postMessage',
	) );

	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'link_color', array(
		'label'       => __( 'Link Color', 'twentysixteen' ),
		'section'     => 'colors',
	) ) );

	// Add main text color setting and control.
	$wp_customize->add_setting( 'main_text_color', array(
		'default'           => $color_scheme[3],
		'sanitize_callback' => 'sanitize_hex_color',
		'transport'         => 'postMessage',
	) );

	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'main_text_color', array(
		'label'       => __( 'Main Text Color', 'twentysixteen' ),
		'section'     => 'colors',
	) ) );

	// Add secondary text color setting and control.
	$wp_customize->add_setting( 'secondary_text_color', array(
		'default'           => $color_scheme[4],
		'sanitize_callback' => 'sanitize_hex_color',
		'transport'         => 'postMessage',
	) );

	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'secondary_text_color', array(
		'label'       => __( 'Secondary Text Color', 'twentysixteen' ),
		'section'     => 'colors',
	) ) );
}
add_action( 'customize_register', 'twentysixteen_customize_register', 11 );

/**
 * Render the site title for the selective refresh partial.
 *
 * @since Twenty Sixteen 1.2
 * @see twentysixteen_customize_register()
 *
 * @return void
 */
function twentysixteen_customize_partial_blogname() {
	bloginfo( 'name' );
}

/**
 * Render the site tagline for the selective refresh partial.
 *
 * @since Twenty Sixteen 1.2
 * @see twentysixteen_customize_register()
 *
 * @return void
 */
function twentysixteen_customize_partial_blogdescription() {
	bloginfo( 'description' );
}

/**
 * Registers color schemes for Twenty Sixteen.
 *
 * Can be filtered with {@see 'twentysixteen_color_schemes'}.
 *
 * The order of colors in a colors array:
 * 1. Main Background Color.
 * 2. Page Background Color.
 * 3. Link Color.
 * 4. Main Text Color.
 * 5. Secondary Text Color.
 *
 * @since Twenty Sixteen 1.0
 *
 * @return array An associative array of color scheme options.
 */
function twentysixteen_get_color_schemes() {
	/**
	 * Filter the color schemes registered for use with Twenty Sixteen.
	 *
	 * The default schemes include 'default', 'dark', 'gray', 'red', and 'yellow'.
	 *
	 * @since Twenty Sixteen 1.0
	 *
	 * @param array $schemes {
	 *     Associative array of color schemes data.
	 *
	 *     @type array $slug {
	 *         Associative array of information for setting up the color scheme.
	 *
	 *         @type string $label  Color scheme label.
	 *         @type array  $colors HEX codes for default colors prepended with a hash symbol ('#').
	 *                              Colors are defined in the following order: Main background, page
	 *                              background, link, main text, secondary text.
	 *     }
	 * }
	 */
	return apply_filters( 'twentysixteen_color_schemes', array(
		'default' => array(
			'label'  => __( 'Default', 'twentysixteen' ),
			'colors' => array(
				'#1a1a1a',
				'#ffffff',
				'#007acc',
				'#1a1a1a',
				'#686868',
			),
		),
		'dark' => array(
			'label'  => __( 'Dark', 'twentysixteen' ),
			'colors' => array(
				'#262626',
				'#1a1a1a',
				'#9adffd',
				'#e5e5e5',
				'#c1c1c1',
			),
		),
		'gray' => array(
			'label'  => __( 'Gray', 'twentysixteen' ),
			'colors' => array(
				'#616a73',
				'#4d545c',
				'#c7c7c7',
				'#f2f2f2',
				'#f2f2f2',
			),
		),
		'red' => array(
			'label'  => __( 'Red', 'twentysixteen' ),
			'colors' => array(
				'#ffffff',
				'#ff675f',
				'#640c1f',
				'#402b30',
				'#402b30',
			),
		),
		'yellow' => array(
			'label'  => __( 'Yellow', 'twentysixteen' ),
			'colors' => array(
				'#3b3721',
				'#ffef8e',
				'#774e24',
				'#3b3721',
				'#5b4d3e',
			),
		),
	) );
}

if ( ! function_exists( 'twentysixteen_get_color_scheme' ) ) :
/**
 * Retrieves the current Twenty Sixteen color scheme.
 *
 * Create your own twentysixteen_get_color_scheme() function to override in a child theme.
 *
 * @since Twenty Sixteen 1.0
 *
 * @return array An associative array of either the current or default color scheme HEX values.
 */
function twentysixteen_get_color_scheme() {
	$color_scheme_option = get_theme_mod( 'color_scheme', 'default' );
	$color_schemes       = twentysixteen_get_color_schemes();

	if ( array_key_exists( $color_scheme_option, $color_schemes ) ) {
		return $color_schemes[ $color_scheme_option ]['colors'];
	}

	return $color_schemes['default']['colors'];
}
endif; // twentysixteen_get_color_scheme

if ( ! function_exists( 'twentysixteen_get_color_scheme_choices' ) ) :
/**
 * Retrieves an array of color scheme choices registered for Twenty Sixteen.
 *
 * Create your own twentysixteen_get_color_scheme_choices() function to override
 * in a child theme.
 *
 * @since Twenty Sixteen 1.0
 *
 * @return array Array of color schemes.
 */
function twentysixteen_get_color_scheme_choices() {
	$color_schemes                = twentysixteen_get_color_schemes();
	$color_scheme_control_options = array();

	foreach ( $color_schemes as $color_scheme => $value ) {
		$color_scheme_control_options[ $color_scheme ] = $value['label'];
	}

	return $color_scheme_control_options;
}
endif; // twentysixteen_get_color_scheme_choices


if ( ! function_exists( 'twentysixteen_sanitize_color_scheme' ) ) :
/**
 * Handles sanitization for Twenty Sixteen color schemes.
 *
 * Create your own twentysixteen_sanitize_color_scheme() function to override
 * in a child theme.
 *
 * @since Twenty Sixteen 1.0
 *
 * @param string $value Color scheme name value.
 * @return string Color scheme name.
 */
function twentysixteen_sanitize_color_scheme( $value ) {
	$color_schemes = twentysixteen_get_color_scheme_choices();

	if ( ! array_key_exists( $value, $color_schemes ) ) {
		return 'default';
	}

	return $value;
}
endif; // twentysixteen_sanitize_color_scheme

/**
 * Enqueues front-end CSS for color scheme.
 *
 * @since Twenty Sixteen 1.0
 *
 * @see wp_add_inline_style()
 */
function twentysixteen_color_scheme_css() {
	$color_scheme_option = get_theme_mod( 'color_scheme', 'default' );

	// Don't do anything if the default color scheme is selected.
	if ( 'default' === $color_scheme_option ) {
		return;
	}

	$color_scheme = twentysixteen_get_color_scheme();

	// Convert main text hex color to rgba.
	$color_textcolor_rgb = twentysixteen_hex2rgb( $color_scheme[3] );

	// If the rgba values are empty return early.
	if ( empty( $color_textcolor_rgb ) ) {
		return;
	}

	// If we get this far, we have a custom color scheme.
	$colors = array(
		'background_color'      => $color_scheme[0],
		'page_background_color' => $color_scheme[1],
		'link_color'            => $color_scheme[2],
		'main_text_color'       => $color_scheme[3],
		'secondary_text_color'  => $color_scheme[4],
		'border_color'          => vsprintf( 'rgba( %1$s, %2$s, %3$s, 0.2)', $color_textcolor_rgb ),

	);

	$color_scheme_css = twentysixteen_get_color_scheme_css( $colors );

	wp_add_inline_style( 'twentysixteen-style', $color_scheme_css );
}
add_action( 'wp_enqueue_scripts', 'twentysixteen_color_scheme_css' );

/**
 * Binds the JS listener to make Customizer color_scheme control.
 *
 * Passes color scheme data as colorScheme global.
 *
 * @since Twenty Sixteen 1.0
 */
function twentysixteen_customize_control_js() {
	wp_enqueue_script( 'color-scheme-control', get_template_directory_uri() . '/js/color-scheme-control.js', array( 'customize-controls', 'iris', 'underscore', 'wp-util' ), '20160816', true );
	wp_localize_script( 'color-scheme-control', 'colorScheme', twentysixteen_get_color_schemes() );
}
add_action( 'customize_controls_enqueue_scripts', 'twentysixteen_customize_control_js' );

/**
 * Binds JS handlers to make the Customizer preview reload changes asynchronously.
 *
 * @since Twenty Sixteen 1.0
 */
function twentysixteen_customize_preview_js() {
	wp_enqueue_script( 'twentysixteen-customize-preview', get_template_directory_uri() . '/js/customize-preview.js', array( 'customize-preview' ), '20160816', true );
}
add_action( 'customize_preview_init', 'twentysixteen_customize_preview_js' );

/**
 * Returns CSS for the color schemes.
 *
 * @since Twenty Sixteen 1.0
 *
 * @param array $colors Color scheme colors.
 * @return string Color scheme CSS.
 */
function twentysixteen_get_color_scheme_css( $colors ) {
	$colors = wp_parse_args( $colors, array(
		'background_color'      => '',
		'page_background_color' => '',
		'link_color'            => '',
		'main_text_color'       => '',
		'secondary_text_color'  => '',
		'border_color'          => '',
	) );

	return <<<CSS
	/* Color Scheme */

	/* Background Color */
	body {
		background-color: {$colors['background_color']};
	}

	/* Page Background Color */
	.site {
		background-color: {$colors['page_background_color']};
	}

	mark,
	ins,
	button,
	button[disabled]:hover,
	button[disabled]:focus,
	input[type="button"],
	input[type="button"][disabled]:hover,
	input[type="button"][disabled]:focus,
	input[type="reset"],
	input[type="reset"][disabled]:hover,
	input[type="reset"][disabled]:focus,
	input[type="submit"],
	input[type="submit"][disabled]:hover,
	input[type="submit"][disabled]:focus,
	.menu-toggle.toggled-on,
	.menu-toggle.toggled-on:hover,
	.menu-toggle.toggled-on:focus,
	.pagination .prev,
	.pagination .next,
	.pagination .prev:hover,
	.pagination .prev:focus,
	.pagination .next:hover,
	.pagination .next:focus,
	.pagination .nav-links:before,
	.pagination .nav-links:after,
	.widget_calendar tbody a,
	.widget_calendar tbody a:hover,
	.widget_calendar tbody a:focus,
	.page-links a,
	.page-links a:hover,
	.page-links a:focus {
		color: {$colors['page_background_color']};
	}

	/* Link Color */
	.menu-toggle:hover,
	.menu-toggle:focus,
	a,
	.main-navigation a:hover,
	.main-navigation a:focus,
	.dropdown-toggle:hover,
	.dropdown-toggle:focus,
	.social-navigation a:hover:before,
	.social-navigation a:focus:before,
	.post-navigation a:hover .post-title,
	.post-navigation a:focus .post-title,
	.tagcloud a:hover,
	.tagcloud a:focus,
	.site-branding .site-title a:hover,
	.site-branding .site-title a:focus,
	.entry-title a:hover,
	.entry-title a:focus,
	.entry-footer a:hover,
	.entry-footer a:focus,
	.comment-metadata a:hover,
	.comment-metadata a:focus,
	.pingback .comment-edit-link:hover,
	.pingback .comment-edit-link:focus,
	.comment-reply-link,
	.comment-reply-link:hover,
	.comment-reply-link:focus,
	.required,
	.site-info a:hover,
	.site-info a:focus {
		color: {$colors['link_color']};
	}

	mark,
	ins,
	button:hover,
	button:focus,
	input[type="button"]:hover,
	input[type="button"]:focus,
	input[type="reset"]:hover,
	input[type="reset"]:focus,
	input[type="submit"]:hover,
	input[type="submit"]:focus,
	.pagination .prev:hover,
	.pagination .prev:focus,
	.pagination .next:hover,
	.pagination .next:focus,
	.widget_calendar tbody a,
	.page-links a:hover,
	.page-links a:focus {
		background-color: {$colors['link_color']};
	}

	input[type="date"]:focus,
	input[type="time"]:focus,
	input[type="datetime-local"]:focus,
	input[type="week"]:focus,
	input[type="month"]:focus,
	input[type="text"]:focus,
	input[type="email"]:focus,
	input[type="url"]:focus,
	input[type="password"]:focus,
	input[type="search"]:focus,
	input[type="tel"]:focus,
	input[type="number"]:focus,
	textarea:focus,
	.tagcloud a:hover,
	.tagcloud a:focus,
	.menu-toggle:hover,
	.menu-toggle:focus {
		border-color: {$colors['link_color']};
	}

	/* Main Text Color */
	body,
	blockquote cite,
	blockquote small,
	.main-navigation a,
	.menu-toggle,
	.dropdown-toggle,
	.social-navigation a,
	.post-navigation a,
	.pagination a:hover,
	.pagination a:focus,
	.widget-title a,
	.site-branding .site-title a,
	.entry-title a,
	.page-links > .page-links-title,
	.comment-author,
	.comment-reply-title small a:hover,
	.comment-reply-title small a:focus {
		color: {$colors['main_text_color']};
	}

	blockquote,
	.menu-toggle.toggled-on,
	.menu-toggle.toggled-on:hover,
	.menu-toggle.toggled-on:focus,
	.post-navigation,
	.post-navigation div + div,
	.pagination,
	.widget,
	.page-header,
	.page-links a,
	.comments-title,
	.comment-reply-title {
		border-color: {$colors['main_text_color']};
	}

	button,
	button[disabled]:hover,
	button[disabled]:focus,
	input[type="button"],
	input[type="button"][disabled]:hover,
	input[type="button"][disabled]:focus,
	input[type="reset"],
	input[type="reset"][disabled]:hover,
	input[type="reset"][disabled]:focus,
	input[type="submit"],
	input[type="submit"][disabled]:hover,
	input[type="submit"][disabled]:focus,
	.menu-toggle.toggled-on,
	.menu-toggle.toggled-on:hover,
	.menu-toggle.toggled-on:focus,
	.pagination:before,
	.pagination:after,
	.pagination .prev,
	.pagination .next,
	.page-links a {
		background-color: {$colors['main_text_color']};
	}

	/* Secondary Text Color */

	/**
	 * IE8 and earlier will drop any block with CSS3 selectors.
	 * Do not combine these styles with the next block.
	 */
	body:not(.search-results) .entry-summary {
		color: {$colors['secondary_text_color']};
	}

	blockquote,
	.post-password-form label,
	a:hover,
	a:focus,
	a:active,
	.post-navigation .meta-nav,
	.image-navigation,
	.comment-navigation,
	.widget_recent_entries .post-date,
	.widget_rss .rss-date,
	.widget_rss cite,
	.site-description,
	.author-bio,
	.entry-footer,
	.entry-footer a,
	.sticky-post,
	.taxonomy-description,
	.entry-caption,
	.comment-metadata,
	.pingback .edit-link,
	.comment-metadata a,
	.pingback .comment-edit-link,
	.comment-form label,
	.comment-notes,
	.comment-awaiting-moderation,
	.logged-in-as,
	.form-allowed-tags,
	.site-info,
	.site-info a,
	.wp-caption .wp-caption-text,
	.gallery-caption,
	.widecolumn label,
	.widecolumn .mu_register label {
		color: {$colors['secondary_text_color']};
	}

	.widget_calendar tbody a:hover,
	.widget_calendar tbody a:focus {
		background-color: {$colors['secondary_text_color']};
	}

	/* Border Color */
	fieldset,
	pre,
	abbr,
	acronym,
	table,
	th,
	td,
	input[type="date"],
	input[type="time"],
	input[type="datetime-local"],
	input[type="week"],
	input[type="month"],
	input[type="text"],
	input[type="email"],
	input[type="url"],
	input[type="password"],
	input[type="search"],
	input[type="tel"],
	input[type="number"],
	textarea,
	.main-navigation li,
	.main-navigation .primary-menu,
	.menu-toggle,
	.dropdown-toggle:after,
	.social-navigation a,
	.image-navigation,
	.comment-navigation,
	.tagcloud a,
	.entry-content,
	.entry-summary,
	.page-links a,
	.page-links > span,
	.comment-list article,
	.comment-list .pingback,
	.comment-list .trackback,
	.comment-reply-link,
	.no-comments,
	.widecolumn .mu_register .mu_alert {
		border-color: {$colors['main_text_color']}; /* Fallback for IE7 and IE8 */
		border-color: {$colors['border_color']};
	}

	hr,
	code {
		background-color: {$colors['main_text_color']}; /* Fallback for IE7 and IE8 */
		background-color: {$colors['border_color']};
	}

	@media screen and (min-width: 56.875em) {
		.main-navigation li:hover > a,
		.main-navigation li.focus > a {
			color: {$colors['link_color']};
		}

		.main-navigation ul ul,
		.main-navigation ul ul li {
			border-color: {$colors['border_color']};
		}

		.main-navigation ul ul:before {
			border-top-color: {$colors['border_color']};
			border-bottom-color: {$colors['border_color']};
		}

		.main-navigation ul ul li {
			background-color: {$colors['page_background_color']};
		}

		.main-navigation ul ul:after {
			border-top-color: {$colors['page_background_color']};
			border-bottom-color: {$colors['page_background_color']};
		}
	}

CSS;
}


/**
 * Outputs an Underscore template for generating CSS for the color scheme.
 *
 * The template generates the css dynamically for instant display in the
 * Customizer preview.
 *
 * @since Twenty Sixteen 1.0
 */
function twentysixteen_color_scheme_css_template() {
	$colors = array(
		'background_color'      => '{{ data.background_color }}',
		'page_background_color' => '{{ data.page_background_color }}',
		'link_color'            => '{{ data.link_color }}',
		'main_text_color'       => '{{ data.main_text_color }}',
		'secondary_text_color'  => '{{ data.secondary_text_color }}',
		'border_color'          => '{{ data.border_color }}',
	);
	?>
	<script type="text/html" id="tmpl-twentysixteen-color-scheme">
		<?php echo twentysixteen_get_color_scheme_css( $colors ); ?>
	</script>
	<?php
}
add_action( 'customize_controls_print_footer_scripts', 'twentysixteen_color_scheme_css_template' );

/**
 * Enqueues front-end CSS for the page background color.
 *
 * @since Twenty Sixteen 1.0
 *
 * @see wp_add_inline_style()
 */
function twentysixteen_page_background_color_css() {
	$color_scheme          = twentysixteen_get_color_scheme();
	$default_color         = $color_scheme[1];
	$page_background_color = get_theme_mod( 'page_background_color', $default_color );

	// Don't do anything if the current color is the default.
	if ( $page_background_color === $default_color ) {
		return;
	}

	$css = '
		/* Custom Page Background Color */
		.site {
			background-color: %1$s;
		}

		mark,
		ins,
		button,
		button[disabled]:hover,
		button[disabled]:focus,
		input[type="button"],
		input[type="button"][disabled]:hover,
		input[type="button"][disabled]:focus,
		input[type="reset"],
		input[type="reset"][disabled]:hover,
		input[type="reset"][disabled]:focus,
		input[type="submit"],
		input[type="submit"][disabled]:hover,
		input[type="submit"][disabled]:focus,
		.menu-toggle.toggled-on,
		.menu-toggle.toggled-on:hover,
		.menu-toggle.toggled-on:focus,
		.pagination .prev,
		.pagination .next,
		.pagination .prev:hover,
		.pagination .prev:focus,
		.pagination .next:hover,
		.pagination .next:focus,
		.pagination .nav-links:before,
		.pagination .nav-links:after,
		.widget_calendar tbody a,
		.widget_calendar tbody a:hover,
		.widget_calendar tbody a:focus,
		.page-links a,
		.page-links a:hover,
		.page-links a:focus {
			color: %1$s;
		}

		@media screen and (min-width: 56.875em) {
			.main-navigation ul ul li {
				background-color: %1$s;
			}

			.main-navigation ul ul:after {
				border-top-color: %1$s;
				border-bottom-color: %1$s;
			}
		}
	';

	wp_add_inline_style( 'twentysixteen-style', sprintf( $css, $page_background_color ) );
}
add_action( 'wp_enqueue_scripts', 'twentysixteen_page_background_color_css', 11 );

/**
 * Enqueues front-end CSS for the link color.
 *
 * @since Twenty Sixteen 1.0
 *
 * @see wp_add_inline_style()
 */
function twentysixteen_link_color_css() {
	$color_scheme    = twentysixteen_get_color_scheme();
	$default_color   = $color_scheme[2];
	$link_color = get_theme_mod( 'link_color', $default_color );

	// Don't do anything if the current color is the default.
	if ( $link_color === $default_color ) {
		return;
	}

	$css = '
		/* Custom Link Color */
		.menu-toggle:hover,
		.menu-toggle:focus,
		a,
		.main-navigation a:hover,
		.main-navigation a:focus,
		.dropdown-toggle:hover,
		.dropdown-toggle:focus,
		.social-navigation a:hover:before,
		.social-navigation a:focus:before,
		.post-navigation a:hover .post-title,
		.post-navigation a:focus .post-title,
		.tagcloud a:hover,
		.tagcloud a:focus,
		.site-branding .site-title a:hover,
		.site-branding .site-title a:focus,
		.entry-title a:hover,
		.entry-title a:focus,
		.entry-footer a:hover,
		.entry-footer a:focus,
		.comment-metadata a:hover,
		.comment-metadata a:focus,
		.pingback .comment-edit-link:hover,
		.pingback .comment-edit-link:focus,
		.comment-reply-link,
		.comment-reply-link:hover,
		.comment-reply-link:focus,
		.required,
		.site-info a:hover,
		.site-info a:focus {
			color: %1$s;
		}

		mark,
		ins,
		button:hover,
		button:focus,
		input[type="button"]:hover,
		input[type="button"]:focus,
		input[type="reset"]:hover,
		input[type="reset"]:focus,
		input[type="submit"]:hover,
		input[type="submit"]:focus,
		.pagination .prev:hover,
		.pagination .prev:focus,
		.pagination .next:hover,
		.pagination .next:focus,
		.widget_calendar tbody a,
		.page-links a:hover,
		.page-links a:focus {
			background-color: %1$s;
		}

		input[type="date"]:focus,
		input[type="time"]:focus,
		input[type="datetime-local"]:focus,
		input[type="week"]:focus,
		input[type="month"]:focus,
		input[type="text"]:focus,
		input[type="email"]:focus,
		input[type="url"]:focus,
		input[type="password"]:focus,
		input[type="search"]:focus,
		input[type="tel"]:focus,
		input[type="number"]:focus,
		textarea:focus,
		.tagcloud a:hover,
		.tagcloud a:focus,
		.menu-toggle:hover,
		.menu-toggle:focus {
			border-color: %1$s;
		}

		@media screen and (min-width: 56.875em) {
			.main-navigation li:hover > a,
			.main-navigation li.focus > a {
				color: %1$s;
			}
		}
	';

	wp_add_inline_style( 'twentysixteen-style', sprintf( $css, $link_color ) );
}
add_action( 'wp_enqueue_scripts', 'twentysixteen_link_color_css', 11 );

/**
 * Enqueues front-end CSS for the main text color.
 *
 * @since Twenty Sixteen 1.0
 *
 * @see wp_add_inline_style()
 */
function twentysixteen_main_text_color_css() {
	$color_scheme    = twentysixteen_get_color_scheme();
	$default_color   = $color_scheme[3];
	$main_text_color = get_theme_mod( 'main_text_color', $default_color );

	// Don't do anything if the current color is the default.
	if ( $main_text_color === $default_color ) {
		return;
	}

	// Convert main text hex color to rgba.
	$main_text_color_rgb = twentysixteen_hex2rgb( $main_text_color );

	// If the rgba values are empty return early.
	if ( empty( $main_text_color_rgb ) ) {
		return;
	}

	// If we get this far, we have a custom color scheme.
	$border_color = vsprintf( 'rgba( %1$s, %2$s, %3$s, 0.2)', $main_text_color_rgb );

	$css = '
		/* Custom Main Text Color */
		body,
		blockquote cite,
		blockquote small,
		.main-navigation a,
		.menu-toggle,
		.dropdown-toggle,
		.social-navigation a,
		.post-navigation a,
		.pagination a:hover,
		.pagination a:focus,
		.widget-title a,
		.site-branding .site-title a,
		.entry-title a,
		.page-links > .page-links-title,
		.comment-author,
		.comment-reply-title small a:hover,
		.comment-reply-title small a:focus {
			color: %1$s
		}

		blockquote,
		.menu-toggle.toggled-on,
		.menu-toggle.toggled-on:hover,
		.menu-toggle.toggled-on:focus,
		.post-navigation,
		.post-navigation div + div,
		.pagination,
		.widget,
		.page-header,
		.page-links a,
		.comments-title,
		.comment-reply-title {
			border-color: %1$s;
		}

		button,
		button[disabled]:hover,
		button[disabled]:focus,
		input[type="button"],
		input[type="button"][disabled]:hover,
		input[type="button"][disabled]:focus,
		input[type="reset"],
		input[type="reset"][disabled]:hover,
		input[type="reset"][disabled]:focus,
		input[type="submit"],
		input[type="submit"][disabled]:hover,
		input[type="submit"][disabled]:focus,
		.menu-toggle.toggled-on,
		.menu-toggle.toggled-on:hover,
		.menu-toggle.toggled-on:focus,
		.pagination:before,
		.pagination:after,
		.pagination .prev,
		.pagination .next,
		.page-links a {
			background-color: %1$s;
		}

		/* Border Color */
		fieldset,
		pre,
		abbr,
		acronym,
		table,
		th,
		td,
		input[type="date"],
		input[type="time"],
		input[type="datetime-local"],
		input[type="week"],
		input[type="month"],
		input[type="text"],
		input[type="email"],
		input[type="url"],
		input[type="password"],
		input[type="search"],
		input[type="tel"],
		input[type="number"],
		textarea,
		.main-navigation li,
		.main-navigation .primary-menu,
		.menu-toggle,
		.dropdown-toggle:after,
		.social-navigation a,
		.image-navigation,
		.comment-navigation,
		.tagcloud a,
		.entry-content,
		.entry-summary,
		.page-links a,
		.page-links > span,
		.comment-list article,
		.comment-list .pingback,
		.comment-list .trackback,
		.comment-reply-link,
		.no-comments,
		.widecolumn .mu_register .mu_alert {
			border-color: %1$s; /* Fallback for IE7 and IE8 */
			border-color: %2$s;
		}

		hr,
		code {
			background-color: %1$s; /* Fallback for IE7 and IE8 */
			background-color: %2$s;
		}

		@media screen and (min-width: 56.875em) {
			.main-navigation ul ul,
			.main-navigation ul ul li {
				border-color: %2$s;
			}

			.main-navigation ul ul:before {
				border-top-color: %2$s;
				border-bottom-color: %2$s;
			}
		}
	';

	wp_add_inline_style( 'twentysixteen-style', sprintf( $css, $main_text_color, $border_color ) );
}
add_action( 'wp_enqueue_scripts', 'twentysixteen_main_text_color_css', 11 );

/**
 * Enqueues front-end CSS for the secondary text color.
 *
 * @since Twenty Sixteen 1.0
 *
 * @see wp_add_inline_style()
 */
function twentysixteen_secondary_text_color_css() {
	$color_scheme    = twentysixteen_get_color_scheme();
	$default_color   = $color_scheme[4];
	$secondary_text_color = get_theme_mod( 'secondary_text_color', $default_color );

	// Don't do anything if the current color is the default.
	if ( $secondary_text_color === $default_color ) {
		return;
	}

	$css = '
		/* Custom Secondary Text Color */

		/**
		 * IE8 and earlier will drop any block with CSS3 selectors.
		 * Do not combine these styles with the next block.
		 */
		body:not(.search-results) .entry-summary {
			color: %1$s;
		}

		blockquote,
		.post-password-form label,
		a:hover,
		a:focus,
		a:active,
		.post-navigation .meta-nav,
		.image-navigation,
		.comment-navigation,
		.widget_recent_entries .post-date,
		.widget_rss .rss-date,
		.widget_rss cite,
		.site-description,
		.author-bio,
		.entry-footer,
		.entry-footer a,
		.sticky-post,
		.taxonomy-description,
		.entry-caption,
		.comment-metadata,
		.pingback .edit-link,
		.comment-metadata a,
		.pingback .comment-edit-link,
		.comment-form label,
		.comment-notes,
		.comment-awaiting-moderation,
		.logged-in-as,
		.form-allowed-tags,
		.site-info,
		.site-info a,
		.wp-caption .wp-caption-text,
		.gallery-caption,
		.widecolumn label,
		.widecolumn .mu_register label {
			color: %1$s;
		}

		.widget_calendar tbody a:hover,
		.widget_calendar tbody a:focus {
			background-color: %1$s;
		}
	';

	wp_add_inline_style( 'twentysixteen-style', sprintf( $css, $secondary_text_color ) );
}
add_action( 'wp_enqueue_scripts', 'twentysixteen_secondary_text_color_css', 11 );
home/xbodynamge/lebauwcentre/wp-content/themes/twentysixteen/inc/customizer.php000060400000075532151147523010024323 0ustar00<?php
/**
 * Twenty Sixteen Customizer functionality
 *
 * @package WordPress
 * @subpackage Twenty_Sixteen
 * @since Twenty Sixteen 1.0
 */

/**
 * Sets up the WordPress core custom header and custom background features.
 *
 * @since Twenty Sixteen 1.0
 *
 * @see twentysixteen_header_style()
 */
function twentysixteen_custom_header_and_background() {
	$color_scheme             = twentysixteen_get_color_scheme();
	$default_background_color = trim( $color_scheme[0], '#' );
	$default_text_color       = trim( $color_scheme[3], '#' );

	/**
	 * Filter the arguments used when adding 'custom-background' support in Twenty Sixteen.
	 *
	 * @since Twenty Sixteen 1.0
	 *
	 * @param array $args {
	 *     An array of custom-background support arguments.
	 *
	 *     @type string $default-color Default color of the background.
	 * }
	 */
	add_theme_support(
		'custom-background',
		apply_filters(
			'twentysixteen_custom_background_args',
			array(
				'default-color' => $default_background_color,
			)
		)
	);

	/**
	 * Filter the arguments used when adding 'custom-header' support in Twenty Sixteen.
	 *
	 * @since Twenty Sixteen 1.0
	 *
	 * @param array $args {
	 *     An array of custom-header support arguments.
	 *
	 *     @type string $default-text-color Default color of the header text.
	 *     @type int      $width            Width in pixels of the custom header image. Default 1200.
	 *     @type int      $height           Height in pixels of the custom header image. Default 280.
	 *     @type bool     $flex-height      Whether to allow flexible-height header images. Default true.
	 *     @type callable $wp-head-callback Callback function used to style the header image and text
	 *                                      displayed on the blog.
	 * }
	 */
	add_theme_support(
		'custom-header',
		apply_filters(
			'twentysixteen_custom_header_args',
			array(
				'default-text-color' => $default_text_color,
				'width'              => 1200,
				'height'             => 280,
				'flex-height'        => true,
				'wp-head-callback'   => 'twentysixteen_header_style',
			)
		)
	);
}
add_action( 'after_setup_theme', 'twentysixteen_custom_header_and_background' );

if ( ! function_exists( 'twentysixteen_header_style' ) ) :
	/**
	 * Styles the header text displayed on the site.
	 *
	 * Create your own twentysixteen_header_style() function to override in a child theme.
	 *
	 * @since Twenty Sixteen 1.0
	 *
	 * @see twentysixteen_custom_header_and_background().
	 */
	function twentysixteen_header_style() {
		// If the header text option is untouched, let's bail.
		if ( display_header_text() ) {
			return;
		}

		// If the header text has been hidden.
		?>
		<style type="text/css" id="twentysixteen-header-css">
		.site-branding {
			margin: 0 auto 0 0;
		}

		.site-branding .site-title,
		.site-description {
			clip: rect(1px, 1px, 1px, 1px);
			position: absolute;
		}
		</style>
		<?php
	}
endif; // twentysixteen_header_style

/**
 * Adds postMessage support for site title and description for the Customizer.
 *
 * @since Twenty Sixteen 1.0
 *
 * @param WP_Customize_Manager $wp_customize The Customizer object.
 */
function twentysixteen_customize_register( $wp_customize ) {
	$color_scheme = twentysixteen_get_color_scheme();

	$wp_customize->get_setting( 'blogname' )->transport        = 'postMessage';
	$wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage';

	if ( isset( $wp_customize->selective_refresh ) ) {
		$wp_customize->selective_refresh->add_partial(
			'blogname',
			array(
				'selector'            => '.site-title a',
				'container_inclusive' => false,
				'render_callback'     => 'twentysixteen_customize_partial_blogname',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'blogdescription',
			array(
				'selector'            => '.site-description',
				'container_inclusive' => false,
				'render_callback'     => 'twentysixteen_customize_partial_blogdescription',
			)
		);
	}

	// Add color scheme setting and control.
	$wp_customize->add_setting(
		'color_scheme',
		array(
			'default'           => 'default',
			'sanitize_callback' => 'twentysixteen_sanitize_color_scheme',
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		'color_scheme',
		array(
			'label'    => __( 'Base Color Scheme', 'twentysixteen' ),
			'section'  => 'colors',
			'type'     => 'select',
			'choices'  => twentysixteen_get_color_scheme_choices(),
			'priority' => 1,
		)
	);

	// Add page background color setting and control.
	$wp_customize->add_setting(
		'page_background_color',
		array(
			'default'           => $color_scheme[1],
			'sanitize_callback' => 'sanitize_hex_color',
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		new WP_Customize_Color_Control(
			$wp_customize,
			'page_background_color',
			array(
				'label'   => __( 'Page Background Color', 'twentysixteen' ),
				'section' => 'colors',
			)
		)
	);

	// Remove the core header textcolor control, as it shares the main text color.
	$wp_customize->remove_control( 'header_textcolor' );

	// Add link color setting and control.
	$wp_customize->add_setting(
		'link_color',
		array(
			'default'           => $color_scheme[2],
			'sanitize_callback' => 'sanitize_hex_color',
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		new WP_Customize_Color_Control(
			$wp_customize,
			'link_color',
			array(
				'label'   => __( 'Link Color', 'twentysixteen' ),
				'section' => 'colors',
			)
		)
	);

	// Add main text color setting and control.
	$wp_customize->add_setting(
		'main_text_color',
		array(
			'default'           => $color_scheme[3],
			'sanitize_callback' => 'sanitize_hex_color',
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		new WP_Customize_Color_Control(
			$wp_customize,
			'main_text_color',
			array(
				'label'   => __( 'Main Text Color', 'twentysixteen' ),
				'section' => 'colors',
			)
		)
	);

	// Add secondary text color setting and control.
	$wp_customize->add_setting(
		'secondary_text_color',
		array(
			'default'           => $color_scheme[4],
			'sanitize_callback' => 'sanitize_hex_color',
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		new WP_Customize_Color_Control(
			$wp_customize,
			'secondary_text_color',
			array(
				'label'   => __( 'Secondary Text Color', 'twentysixteen' ),
				'section' => 'colors',
			)
		)
	);
}
add_action( 'customize_register', 'twentysixteen_customize_register', 11 );

/**
 * Render the site title for the selective refresh partial.
 *
 * @since Twenty Sixteen 1.2
 * @see twentysixteen_customize_register()
 *
 * @return void
 */
function twentysixteen_customize_partial_blogname() {
	bloginfo( 'name' );
}

/**
 * Render the site tagline for the selective refresh partial.
 *
 * @since Twenty Sixteen 1.2
 * @see twentysixteen_customize_register()
 *
 * @return void
 */
function twentysixteen_customize_partial_blogdescription() {
	bloginfo( 'description' );
}

/**
 * Registers color schemes for Twenty Sixteen.
 *
 * Can be filtered with {@see 'twentysixteen_color_schemes'}.
 *
 * The order of colors in a colors array:
 * 1. Main Background Color.
 * 2. Page Background Color.
 * 3. Link Color.
 * 4. Main Text Color.
 * 5. Secondary Text Color.
 *
 * @since Twenty Sixteen 1.0
 *
 * @return array An associative array of color scheme options.
 */
function twentysixteen_get_color_schemes() {
	/**
	 * Filter the color schemes registered for use with Twenty Sixteen.
	 *
	 * The default schemes include 'default', 'dark', 'gray', 'red', and 'yellow'.
	 *
	 * @since Twenty Sixteen 1.0
	 *
	 * @param array $schemes {
	 *     Associative array of color schemes data.
	 *
	 *     @type array $slug {
	 *         Associative array of information for setting up the color scheme.
	 *
	 *         @type string $label  Color scheme label.
	 *         @type array  $colors HEX codes for default colors prepended with a hash symbol ('#').
	 *                              Colors are defined in the following order: Main background, page
	 *                              background, link, main text, secondary text.
	 *     }
	 * }
	 */
	return apply_filters(
		'twentysixteen_color_schemes',
		array(
			'default' => array(
				'label'  => __( 'Default', 'twentysixteen' ),
				'colors' => array(
					'#1a1a1a',
					'#ffffff',
					'#007acc',
					'#1a1a1a',
					'#686868',
				),
			),
			'dark'    => array(
				'label'  => __( 'Dark', 'twentysixteen' ),
				'colors' => array(
					'#262626',
					'#1a1a1a',
					'#9adffd',
					'#e5e5e5',
					'#c1c1c1',
				),
			),
			'gray'    => array(
				'label'  => __( 'Gray', 'twentysixteen' ),
				'colors' => array(
					'#616a73',
					'#4d545c',
					'#c7c7c7',
					'#f2f2f2',
					'#f2f2f2',
				),
			),
			'red'     => array(
				'label'  => __( 'Red', 'twentysixteen' ),
				'colors' => array(
					'#ffffff',
					'#ff675f',
					'#640c1f',
					'#402b30',
					'#402b30',
				),
			),
			'yellow'  => array(
				'label'  => __( 'Yellow', 'twentysixteen' ),
				'colors' => array(
					'#3b3721',
					'#ffef8e',
					'#774e24',
					'#3b3721',
					'#5b4d3e',
				),
			),
		)
	);
}

if ( ! function_exists( 'twentysixteen_get_color_scheme' ) ) :
	/**
	 * Retrieves the current Twenty Sixteen color scheme.
	 *
	 * Create your own twentysixteen_get_color_scheme() function to override in a child theme.
	 *
	 * @since Twenty Sixteen 1.0
	 *
	 * @return array An associative array of either the current or default color scheme HEX values.
	 */
	function twentysixteen_get_color_scheme() {
		$color_scheme_option = get_theme_mod( 'color_scheme', 'default' );
		$color_schemes       = twentysixteen_get_color_schemes();

		if ( array_key_exists( $color_scheme_option, $color_schemes ) ) {
			return $color_schemes[ $color_scheme_option ]['colors'];
		}

		return $color_schemes['default']['colors'];
	}
endif; // twentysixteen_get_color_scheme

if ( ! function_exists( 'twentysixteen_get_color_scheme_choices' ) ) :
	/**
	 * Retrieves an array of color scheme choices registered for Twenty Sixteen.
	 *
	 * Create your own twentysixteen_get_color_scheme_choices() function to override
	 * in a child theme.
	 *
	 * @since Twenty Sixteen 1.0
	 *
	 * @return array Array of color schemes.
	 */
	function twentysixteen_get_color_scheme_choices() {
		$color_schemes                = twentysixteen_get_color_schemes();
		$color_scheme_control_options = array();

		foreach ( $color_schemes as $color_scheme => $value ) {
			$color_scheme_control_options[ $color_scheme ] = $value['label'];
		}

		return $color_scheme_control_options;
	}
endif; // twentysixteen_get_color_scheme_choices


if ( ! function_exists( 'twentysixteen_sanitize_color_scheme' ) ) :
	/**
	 * Handles sanitization for Twenty Sixteen color schemes.
	 *
	 * Create your own twentysixteen_sanitize_color_scheme() function to override
	 * in a child theme.
	 *
	 * @since Twenty Sixteen 1.0
	 *
	 * @param string $value Color scheme name value.
	 * @return string Color scheme name.
	 */
	function twentysixteen_sanitize_color_scheme( $value ) {
		$color_schemes = twentysixteen_get_color_scheme_choices();

		if ( ! array_key_exists( $value, $color_schemes ) ) {
			return 'default';
		}

		return $value;
	}
endif; // twentysixteen_sanitize_color_scheme

/**
 * Enqueues front-end CSS for color scheme.
 *
 * @since Twenty Sixteen 1.0
 *
 * @see wp_add_inline_style()
 */
function twentysixteen_color_scheme_css() {
	$color_scheme_option = get_theme_mod( 'color_scheme', 'default' );

	// Don't do anything if the default color scheme is selected.
	if ( 'default' === $color_scheme_option ) {
		return;
	}

	$color_scheme = twentysixteen_get_color_scheme();

	// Convert main text hex color to rgba.
	$color_textcolor_rgb = twentysixteen_hex2rgb( $color_scheme[3] );

	// If the rgba values are empty return early.
	if ( empty( $color_textcolor_rgb ) ) {
		return;
	}

	// If we get this far, we have a custom color scheme.
	$colors = array(
		'background_color'      => $color_scheme[0],
		'page_background_color' => $color_scheme[1],
		'link_color'            => $color_scheme[2],
		'main_text_color'       => $color_scheme[3],
		'secondary_text_color'  => $color_scheme[4],
		'border_color'          => vsprintf( 'rgba( %1$s, %2$s, %3$s, 0.2)', $color_textcolor_rgb ),

	);

	$color_scheme_css = twentysixteen_get_color_scheme_css( $colors );

	wp_add_inline_style( 'twentysixteen-style', $color_scheme_css );
}
add_action( 'wp_enqueue_scripts', 'twentysixteen_color_scheme_css' );

/**
 * Binds the JS listener to make Customizer color_scheme control.
 *
 * Passes color scheme data as colorScheme global.
 *
 * @since Twenty Sixteen 1.0
 */
function twentysixteen_customize_control_js() {
	wp_enqueue_script( 'color-scheme-control', get_template_directory_uri() . '/js/color-scheme-control.js', array( 'customize-controls', 'iris', 'underscore', 'wp-util' ), '20160816', true );
	wp_localize_script( 'color-scheme-control', 'colorScheme', twentysixteen_get_color_schemes() );
}
add_action( 'customize_controls_enqueue_scripts', 'twentysixteen_customize_control_js' );

/**
 * Binds JS handlers to make the Customizer preview reload changes asynchronously.
 *
 * @since Twenty Sixteen 1.0
 */
function twentysixteen_customize_preview_js() {
	wp_enqueue_script( 'twentysixteen-customize-preview', get_template_directory_uri() . '/js/customize-preview.js', array( 'customize-preview' ), '20160816', true );
}
add_action( 'customize_preview_init', 'twentysixteen_customize_preview_js' );

/**
 * Returns CSS for the color schemes.
 *
 * @since Twenty Sixteen 1.0
 *
 * @param array $colors Color scheme colors.
 * @return string Color scheme CSS.
 */
function twentysixteen_get_color_scheme_css( $colors ) {
	$colors = wp_parse_args(
		$colors,
		array(
			'background_color'      => '',
			'page_background_color' => '',
			'link_color'            => '',
			'main_text_color'       => '',
			'secondary_text_color'  => '',
			'border_color'          => '',
		)
	);

	return <<<CSS
	/* Color Scheme */

	/* Background Color */
	body {
		background-color: {$colors['background_color']};
	}

	/* Page Background Color */
	.site {
		background-color: {$colors['page_background_color']};
	}

	mark,
	ins,
	button,
	button[disabled]:hover,
	button[disabled]:focus,
	input[type="button"],
	input[type="button"][disabled]:hover,
	input[type="button"][disabled]:focus,
	input[type="reset"],
	input[type="reset"][disabled]:hover,
	input[type="reset"][disabled]:focus,
	input[type="submit"],
	input[type="submit"][disabled]:hover,
	input[type="submit"][disabled]:focus,
	.menu-toggle.toggled-on,
	.menu-toggle.toggled-on:hover,
	.menu-toggle.toggled-on:focus,
	.pagination .prev,
	.pagination .next,
	.pagination .prev:hover,
	.pagination .prev:focus,
	.pagination .next:hover,
	.pagination .next:focus,
	.pagination .nav-links:before,
	.pagination .nav-links:after,
	.widget_calendar tbody a,
	.widget_calendar tbody a:hover,
	.widget_calendar tbody a:focus,
	.page-links a,
	.page-links a:hover,
	.page-links a:focus {
		color: {$colors['page_background_color']};
	}

	/* Link Color */
	.menu-toggle:hover,
	.menu-toggle:focus,
	a,
	.main-navigation a:hover,
	.main-navigation a:focus,
	.dropdown-toggle:hover,
	.dropdown-toggle:focus,
	.social-navigation a:hover:before,
	.social-navigation a:focus:before,
	.post-navigation a:hover .post-title,
	.post-navigation a:focus .post-title,
	.tagcloud a:hover,
	.tagcloud a:focus,
	.site-branding .site-title a:hover,
	.site-branding .site-title a:focus,
	.entry-title a:hover,
	.entry-title a:focus,
	.entry-footer a:hover,
	.entry-footer a:focus,
	.comment-metadata a:hover,
	.comment-metadata a:focus,
	.pingback .comment-edit-link:hover,
	.pingback .comment-edit-link:focus,
	.comment-reply-link,
	.comment-reply-link:hover,
	.comment-reply-link:focus,
	.required,
	.site-info a:hover,
	.site-info a:focus {
		color: {$colors['link_color']};
	}

	mark,
	ins,
	button:hover,
	button:focus,
	input[type="button"]:hover,
	input[type="button"]:focus,
	input[type="reset"]:hover,
	input[type="reset"]:focus,
	input[type="submit"]:hover,
	input[type="submit"]:focus,
	.pagination .prev:hover,
	.pagination .prev:focus,
	.pagination .next:hover,
	.pagination .next:focus,
	.widget_calendar tbody a,
	.page-links a:hover,
	.page-links a:focus {
		background-color: {$colors['link_color']};
	}

	input[type="date"]:focus,
	input[type="time"]:focus,
	input[type="datetime-local"]:focus,
	input[type="week"]:focus,
	input[type="month"]:focus,
	input[type="text"]:focus,
	input[type="email"]:focus,
	input[type="url"]:focus,
	input[type="password"]:focus,
	input[type="search"]:focus,
	input[type="tel"]:focus,
	input[type="number"]:focus,
	textarea:focus,
	.tagcloud a:hover,
	.tagcloud a:focus,
	.menu-toggle:hover,
	.menu-toggle:focus {
		border-color: {$colors['link_color']};
	}

	/* Main Text Color */
	body,
	blockquote cite,
	blockquote small,
	.main-navigation a,
	.menu-toggle,
	.dropdown-toggle,
	.social-navigation a,
	.post-navigation a,
	.pagination a:hover,
	.pagination a:focus,
	.widget-title a,
	.site-branding .site-title a,
	.entry-title a,
	.page-links > .page-links-title,
	.comment-author,
	.comment-reply-title small a:hover,
	.comment-reply-title small a:focus {
		color: {$colors['main_text_color']};
	}

	blockquote,
	.menu-toggle.toggled-on,
	.menu-toggle.toggled-on:hover,
	.menu-toggle.toggled-on:focus,
	.post-navigation,
	.post-navigation div + div,
	.pagination,
	.widget,
	.page-header,
	.page-links a,
	.comments-title,
	.comment-reply-title {
		border-color: {$colors['main_text_color']};
	}

	button,
	button[disabled]:hover,
	button[disabled]:focus,
	input[type="button"],
	input[type="button"][disabled]:hover,
	input[type="button"][disabled]:focus,
	input[type="reset"],
	input[type="reset"][disabled]:hover,
	input[type="reset"][disabled]:focus,
	input[type="submit"],
	input[type="submit"][disabled]:hover,
	input[type="submit"][disabled]:focus,
	.menu-toggle.toggled-on,
	.menu-toggle.toggled-on:hover,
	.menu-toggle.toggled-on:focus,
	.pagination:before,
	.pagination:after,
	.pagination .prev,
	.pagination .next,
	.page-links a {
		background-color: {$colors['main_text_color']};
	}

	/* Secondary Text Color */

	/**
	 * IE8 and earlier will drop any block with CSS3 selectors.
	 * Do not combine these styles with the next block.
	 */
	body:not(.search-results) .entry-summary {
		color: {$colors['secondary_text_color']};
	}

	blockquote,
	.post-password-form label,
	a:hover,
	a:focus,
	a:active,
	.post-navigation .meta-nav,
	.image-navigation,
	.comment-navigation,
	.widget_recent_entries .post-date,
	.widget_rss .rss-date,
	.widget_rss cite,
	.site-description,
	.author-bio,
	.entry-footer,
	.entry-footer a,
	.sticky-post,
	.taxonomy-description,
	.entry-caption,
	.comment-metadata,
	.pingback .edit-link,
	.comment-metadata a,
	.pingback .comment-edit-link,
	.comment-form label,
	.comment-notes,
	.comment-awaiting-moderation,
	.logged-in-as,
	.form-allowed-tags,
	.site-info,
	.site-info a,
	.wp-caption .wp-caption-text,
	.gallery-caption,
	.widecolumn label,
	.widecolumn .mu_register label {
		color: {$colors['secondary_text_color']};
	}

	.widget_calendar tbody a:hover,
	.widget_calendar tbody a:focus {
		background-color: {$colors['secondary_text_color']};
	}

	/* Border Color */
	fieldset,
	pre,
	abbr,
	acronym,
	table,
	th,
	td,
	input[type="date"],
	input[type="time"],
	input[type="datetime-local"],
	input[type="week"],
	input[type="month"],
	input[type="text"],
	input[type="email"],
	input[type="url"],
	input[type="password"],
	input[type="search"],
	input[type="tel"],
	input[type="number"],
	textarea,
	.main-navigation li,
	.main-navigation .primary-menu,
	.menu-toggle,
	.dropdown-toggle:after,
	.social-navigation a,
	.image-navigation,
	.comment-navigation,
	.tagcloud a,
	.entry-content,
	.entry-summary,
	.page-links a,
	.page-links > span,
	.comment-list article,
	.comment-list .pingback,
	.comment-list .trackback,
	.comment-reply-link,
	.no-comments,
	.widecolumn .mu_register .mu_alert {
		border-color: {$colors['main_text_color']}; /* Fallback for IE7 and IE8 */
		border-color: {$colors['border_color']};
	}

	hr,
	code {
		background-color: {$colors['main_text_color']}; /* Fallback for IE7 and IE8 */
		background-color: {$colors['border_color']};
	}

	@media screen and (min-width: 56.875em) {
		.main-navigation li:hover > a,
		.main-navigation li.focus > a {
			color: {$colors['link_color']};
		}

		.main-navigation ul ul,
		.main-navigation ul ul li {
			border-color: {$colors['border_color']};
		}

		.main-navigation ul ul:before {
			border-top-color: {$colors['border_color']};
			border-bottom-color: {$colors['border_color']};
		}

		.main-navigation ul ul li {
			background-color: {$colors['page_background_color']};
		}

		.main-navigation ul ul:after {
			border-top-color: {$colors['page_background_color']};
			border-bottom-color: {$colors['page_background_color']};
		}
	}

CSS;
}


/**
 * Outputs an Underscore template for generating CSS for the color scheme.
 *
 * The template generates the css dynamically for instant display in the
 * Customizer preview.
 *
 * @since Twenty Sixteen 1.0
 */
function twentysixteen_color_scheme_css_template() {
	$colors = array(
		'background_color'      => '{{ data.background_color }}',
		'page_background_color' => '{{ data.page_background_color }}',
		'link_color'            => '{{ data.link_color }}',
		'main_text_color'       => '{{ data.main_text_color }}',
		'secondary_text_color'  => '{{ data.secondary_text_color }}',
		'border_color'          => '{{ data.border_color }}',
	);
	?>
	<script type="text/html" id="tmpl-twentysixteen-color-scheme">
		<?php echo twentysixteen_get_color_scheme_css( $colors ); ?>
	</script>
	<?php
}
add_action( 'customize_controls_print_footer_scripts', 'twentysixteen_color_scheme_css_template' );

/**
 * Enqueues front-end CSS for the page background color.
 *
 * @since Twenty Sixteen 1.0
 *
 * @see wp_add_inline_style()
 */
function twentysixteen_page_background_color_css() {
	$color_scheme          = twentysixteen_get_color_scheme();
	$default_color         = $color_scheme[1];
	$page_background_color = get_theme_mod( 'page_background_color', $default_color );

	// Don't do anything if the current color is the default.
	if ( $page_background_color === $default_color ) {
		return;
	}

	$css = '
		/* Custom Page Background Color */
		.site {
			background-color: %1$s;
		}

		mark,
		ins,
		button,
		button[disabled]:hover,
		button[disabled]:focus,
		input[type="button"],
		input[type="button"][disabled]:hover,
		input[type="button"][disabled]:focus,
		input[type="reset"],
		input[type="reset"][disabled]:hover,
		input[type="reset"][disabled]:focus,
		input[type="submit"],
		input[type="submit"][disabled]:hover,
		input[type="submit"][disabled]:focus,
		.menu-toggle.toggled-on,
		.menu-toggle.toggled-on:hover,
		.menu-toggle.toggled-on:focus,
		.pagination .prev,
		.pagination .next,
		.pagination .prev:hover,
		.pagination .prev:focus,
		.pagination .next:hover,
		.pagination .next:focus,
		.pagination .nav-links:before,
		.pagination .nav-links:after,
		.widget_calendar tbody a,
		.widget_calendar tbody a:hover,
		.widget_calendar tbody a:focus,
		.page-links a,
		.page-links a:hover,
		.page-links a:focus {
			color: %1$s;
		}

		@media screen and (min-width: 56.875em) {
			.main-navigation ul ul li {
				background-color: %1$s;
			}

			.main-navigation ul ul:after {
				border-top-color: %1$s;
				border-bottom-color: %1$s;
			}
		}
	';

	wp_add_inline_style( 'twentysixteen-style', sprintf( $css, $page_background_color ) );
}
add_action( 'wp_enqueue_scripts', 'twentysixteen_page_background_color_css', 11 );

/**
 * Enqueues front-end CSS for the link color.
 *
 * @since Twenty Sixteen 1.0
 *
 * @see wp_add_inline_style()
 */
function twentysixteen_link_color_css() {
	$color_scheme  = twentysixteen_get_color_scheme();
	$default_color = $color_scheme[2];
	$link_color    = get_theme_mod( 'link_color', $default_color );

	// Don't do anything if the current color is the default.
	if ( $link_color === $default_color ) {
		return;
	}

	$css = '
		/* Custom Link Color */
		.menu-toggle:hover,
		.menu-toggle:focus,
		a,
		.main-navigation a:hover,
		.main-navigation a:focus,
		.dropdown-toggle:hover,
		.dropdown-toggle:focus,
		.social-navigation a:hover:before,
		.social-navigation a:focus:before,
		.post-navigation a:hover .post-title,
		.post-navigation a:focus .post-title,
		.tagcloud a:hover,
		.tagcloud a:focus,
		.site-branding .site-title a:hover,
		.site-branding .site-title a:focus,
		.entry-title a:hover,
		.entry-title a:focus,
		.entry-footer a:hover,
		.entry-footer a:focus,
		.comment-metadata a:hover,
		.comment-metadata a:focus,
		.pingback .comment-edit-link:hover,
		.pingback .comment-edit-link:focus,
		.comment-reply-link,
		.comment-reply-link:hover,
		.comment-reply-link:focus,
		.required,
		.site-info a:hover,
		.site-info a:focus {
			color: %1$s;
		}

		mark,
		ins,
		button:hover,
		button:focus,
		input[type="button"]:hover,
		input[type="button"]:focus,
		input[type="reset"]:hover,
		input[type="reset"]:focus,
		input[type="submit"]:hover,
		input[type="submit"]:focus,
		.pagination .prev:hover,
		.pagination .prev:focus,
		.pagination .next:hover,
		.pagination .next:focus,
		.widget_calendar tbody a,
		.page-links a:hover,
		.page-links a:focus {
			background-color: %1$s;
		}

		input[type="date"]:focus,
		input[type="time"]:focus,
		input[type="datetime-local"]:focus,
		input[type="week"]:focus,
		input[type="month"]:focus,
		input[type="text"]:focus,
		input[type="email"]:focus,
		input[type="url"]:focus,
		input[type="password"]:focus,
		input[type="search"]:focus,
		input[type="tel"]:focus,
		input[type="number"]:focus,
		textarea:focus,
		.tagcloud a:hover,
		.tagcloud a:focus,
		.menu-toggle:hover,
		.menu-toggle:focus {
			border-color: %1$s;
		}

		@media screen and (min-width: 56.875em) {
			.main-navigation li:hover > a,
			.main-navigation li.focus > a {
				color: %1$s;
			}
		}
	';

	wp_add_inline_style( 'twentysixteen-style', sprintf( $css, $link_color ) );
}
add_action( 'wp_enqueue_scripts', 'twentysixteen_link_color_css', 11 );

/**
 * Enqueues front-end CSS for the main text color.
 *
 * @since Twenty Sixteen 1.0
 *
 * @see wp_add_inline_style()
 */
function twentysixteen_main_text_color_css() {
	$color_scheme    = twentysixteen_get_color_scheme();
	$default_color   = $color_scheme[3];
	$main_text_color = get_theme_mod( 'main_text_color', $default_color );

	// Don't do anything if the current color is the default.
	if ( $main_text_color === $default_color ) {
		return;
	}

	// Convert main text hex color to rgba.
	$main_text_color_rgb = twentysixteen_hex2rgb( $main_text_color );

	// If the rgba values are empty return early.
	if ( empty( $main_text_color_rgb ) ) {
		return;
	}

	// If we get this far, we have a custom color scheme.
	$border_color = vsprintf( 'rgba( %1$s, %2$s, %3$s, 0.2)', $main_text_color_rgb );

	$css = '
		/* Custom Main Text Color */
		body,
		blockquote cite,
		blockquote small,
		.main-navigation a,
		.menu-toggle,
		.dropdown-toggle,
		.social-navigation a,
		.post-navigation a,
		.pagination a:hover,
		.pagination a:focus,
		.widget-title a,
		.site-branding .site-title a,
		.entry-title a,
		.page-links > .page-links-title,
		.comment-author,
		.comment-reply-title small a:hover,
		.comment-reply-title small a:focus {
			color: %1$s
		}

		blockquote,
		.menu-toggle.toggled-on,
		.menu-toggle.toggled-on:hover,
		.menu-toggle.toggled-on:focus,
		.post-navigation,
		.post-navigation div + div,
		.pagination,
		.widget,
		.page-header,
		.page-links a,
		.comments-title,
		.comment-reply-title {
			border-color: %1$s;
		}

		button,
		button[disabled]:hover,
		button[disabled]:focus,
		input[type="button"],
		input[type="button"][disabled]:hover,
		input[type="button"][disabled]:focus,
		input[type="reset"],
		input[type="reset"][disabled]:hover,
		input[type="reset"][disabled]:focus,
		input[type="submit"],
		input[type="submit"][disabled]:hover,
		input[type="submit"][disabled]:focus,
		.menu-toggle.toggled-on,
		.menu-toggle.toggled-on:hover,
		.menu-toggle.toggled-on:focus,
		.pagination:before,
		.pagination:after,
		.pagination .prev,
		.pagination .next,
		.page-links a {
			background-color: %1$s;
		}

		/* Border Color */
		fieldset,
		pre,
		abbr,
		acronym,
		table,
		th,
		td,
		input[type="date"],
		input[type="time"],
		input[type="datetime-local"],
		input[type="week"],
		input[type="month"],
		input[type="text"],
		input[type="email"],
		input[type="url"],
		input[type="password"],
		input[type="search"],
		input[type="tel"],
		input[type="number"],
		textarea,
		.main-navigation li,
		.main-navigation .primary-menu,
		.menu-toggle,
		.dropdown-toggle:after,
		.social-navigation a,
		.image-navigation,
		.comment-navigation,
		.tagcloud a,
		.entry-content,
		.entry-summary,
		.page-links a,
		.page-links > span,
		.comment-list article,
		.comment-list .pingback,
		.comment-list .trackback,
		.comment-reply-link,
		.no-comments,
		.widecolumn .mu_register .mu_alert {
			border-color: %1$s; /* Fallback for IE7 and IE8 */
			border-color: %2$s;
		}

		hr,
		code {
			background-color: %1$s; /* Fallback for IE7 and IE8 */
			background-color: %2$s;
		}

		@media screen and (min-width: 56.875em) {
			.main-navigation ul ul,
			.main-navigation ul ul li {
				border-color: %2$s;
			}

			.main-navigation ul ul:before {
				border-top-color: %2$s;
				border-bottom-color: %2$s;
			}
		}
	';

	wp_add_inline_style( 'twentysixteen-style', sprintf( $css, $main_text_color, $border_color ) );
}
add_action( 'wp_enqueue_scripts', 'twentysixteen_main_text_color_css', 11 );

/**
 * Enqueues front-end CSS for the secondary text color.
 *
 * @since Twenty Sixteen 1.0
 *
 * @see wp_add_inline_style()
 */
function twentysixteen_secondary_text_color_css() {
	$color_scheme         = twentysixteen_get_color_scheme();
	$default_color        = $color_scheme[4];
	$secondary_text_color = get_theme_mod( 'secondary_text_color', $default_color );

	// Don't do anything if the current color is the default.
	if ( $secondary_text_color === $default_color ) {
		return;
	}

	$css = '
		/* Custom Secondary Text Color */

		/**
		 * IE8 and earlier will drop any block with CSS3 selectors.
		 * Do not combine these styles with the next block.
		 */
		body:not(.search-results) .entry-summary {
			color: %1$s;
		}

		blockquote,
		.post-password-form label,
		a:hover,
		a:focus,
		a:active,
		.post-navigation .meta-nav,
		.image-navigation,
		.comment-navigation,
		.widget_recent_entries .post-date,
		.widget_rss .rss-date,
		.widget_rss cite,
		.site-description,
		.author-bio,
		.entry-footer,
		.entry-footer a,
		.sticky-post,
		.taxonomy-description,
		.entry-caption,
		.comment-metadata,
		.pingback .edit-link,
		.comment-metadata a,
		.pingback .comment-edit-link,
		.comment-form label,
		.comment-notes,
		.comment-awaiting-moderation,
		.logged-in-as,
		.form-allowed-tags,
		.site-info,
		.site-info a,
		.wp-caption .wp-caption-text,
		.gallery-caption,
		.widecolumn label,
		.widecolumn .mu_register label {
			color: %1$s;
		}

		.widget_calendar tbody a:hover,
		.widget_calendar tbody a:focus {
			background-color: %1$s;
		}
	';

	wp_add_inline_style( 'twentysixteen-style', sprintf( $css, $secondary_text_color ) );
}
add_action( 'wp_enqueue_scripts', 'twentysixteen_secondary_text_color_css', 11 );
home/xbodynamge/lebauwcentre/wp-content/themes/integral/inc/customizer.php000064400000017407151150327430023201 0ustar00<?php
/**
 * integral Theme Customizer
 */

/**
 * Add postMessage support for site title and description for the Theme Customizer.
 *
 * @param WP_Customize_Manager $wp_customize Theme Customizer object.
 */
function integral_customize_register( $wp_customize ) {
	$wp_customize->get_section('title_tagline')->priority = 100;
    $wp_customize->remove_section( 'header_image' );
    $wp_customize->remove_section( 'background_image' );
    $wp_customize->remove_section( 'colors' );

}
add_action( 'customize_register', 'integral_customize_register' );

function integral_theme_customize_register( $wp_customize ) {
    
    // Custom Logo //
    $wp_customize->add_setting( 'integral_logo', array(
		'sanitize_callback' => 'esc_url_raw',
	) );
    
	$wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'integral_logo', array(
		'label'    => __( 'Logo', 'integral' ),
		'section'  => 'title_tagline',
		'settings' => 'integral_logo',
        'description' => __( 'Upload a logo to replace the default site name and description in the header. Recommended size of 250px in width by 40px in height. However, if you upload a larger logo the header will adjust.', 'integral' ),
	) ) );
    
    // Default Header //
    $wp_customize->add_section( 'integral_default_header_section' , array(
            'title'       => __( 'Homepage Default Header', 'integral' ),
            'priority'    => 120,
            'description' => __( 'This section controls the default header on the homepage of your website when the One-Page Template has NOT been setup. For instructions on how to setup the One-Page Template go to <a href="themes.php?page=integral-welcome#getting_started">APPEARANCE > Setup Integral</a>.', 'integral' ),
	) );
    
	$wp_customize->add_setting( 'integral_default_header_background', array(
            'sanitize_callback' => 'esc_url_raw',
            'default' => get_template_directory_uri() . '/images/bg-welcome.jpg'
	) );
    
	$wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'integral_default_header_background', array(
            'label'    => __( 'Background Image', 'integral' ),
            'section'  => 'integral_default_header_section',
            'settings' => 'integral_default_header_background',
	) ) );
    
    $wp_customize->add_setting( 'integral_default_header_title1', array(
            'default' => __( 'Elegant', 'integral' ),
            'sanitize_callback'	=> 'sanitize_text'
    ) );
    
	$wp_customize->add_control( 'integral_default_header_title1', array(
            'label'    => __( 'Title Line 1', 'integral' ),
            'type'      => 'text',
            'section'  => 'integral_default_header_section',
            'settings' => 'integral_default_header_title1',
	) );
    
    $wp_customize->add_setting( 'integral_default_header_title2', array(
            'default' => __( 'Business Theme', 'integral' ),
            'sanitize_callback'	=> 'sanitize_text'
    ) );
    
	$wp_customize->add_control( 'integral_default_header_title2', array(
            'label'    => __( 'Title Line 2', 'integral' ),
            'type'      => 'text',
            'section'  => 'integral_default_header_section',
            'settings' => 'integral_default_header_title2',
	) );
    
    $wp_customize->add_setting( 'integral_default_header_tagline', array(
            'default' => __( 'A one page theme for professionals, agencies and businesses.<br />Create a stunning website in minutes.', 'integral' ),
            'sanitize_callback'	=> 'esc_html',
    ) );
    
	$wp_customize->add_control( 'integral_default_header_tagline', array(
            'label'    => __( 'Title Line 1', 'integral' ),
            'type'      => 'textarea',
            'section'  => 'integral_default_header_section',
            'settings' => 'integral_default_header_tagline',
	) );
    
    $wp_customize->add_setting( 'integral_default_header_btn1', array(
            'default' => __( 'View Features', 'integral' ),
            'sanitize_callback'	=> 'sanitize_text'
    ) );
    
	$wp_customize->add_control( 'integral_default_header_btn1', array(
            'label'    => __( 'Button 1 Text', 'integral' ),
            'type'      => 'text',
            'section'  => 'integral_default_header_section',
            'settings' => 'integral_default_header_btn1',
	) );
    
    $wp_customize->add_setting( 'integral_default_header_btn1url', array(
            'sanitize_callback' => 'esc_url_raw',
            'default' => '#',
    ) );
    
	$wp_customize->add_control( 'integral_default_header_btn1url', array(
            'label'    => __( 'Button 1 Link', 'integral' ),
            'type'      => 'text',
            'section'  => 'integral_default_header_section',
            'settings' => 'integral_default_header_btn1url',
	) );
    
    $wp_customize->add_setting( 'integral_default_header_btn1_toggle', array( 
        'sanitize_callback'	=> 'esc_attr',
	) );
    
	$wp_customize->add_control( new WP_Customize_Control( $wp_customize,
        'integral_default_header_btn1_toggle',
        array(
            'label'     => __('Disable Button 1', 'integral'),
            'description' => __('Check the box to disable this button.', 'integral'),
            'section'   => 'integral_default_header_section',
            'settings'  => 'integral_default_header_btn1_toggle',
            'type'      => 'checkbox',
        )
    ) );
    
    $wp_customize->add_setting( 'integral_default_header_btn2', array(
            'default' => __( 'Download Now', 'integral' ),
            'sanitize_callback'	=> 'sanitize_text'
    ) );
    
	$wp_customize->add_control( 'integral_default_header_btn2', array(
            'label'    => __( 'Button 2 Text', 'integral' ),
            'type'      => 'text',
            'section'  => 'integral_default_header_section',
            'settings' => 'integral_default_header_btn2',
	) );
    
    
    $wp_customize->add_setting( 'integral_default_header_btn2url', array(
            'sanitize_callback' => 'esc_url_raw',
            'default' => '#',
    ) );
    
	$wp_customize->add_control( 'integral_default_header_btn2url', array(
            'label'    => __( 'Button 2 Link', 'integral' ),
            'type'      => 'text',
            'section'  => 'integral_default_header_section',
            'settings' => 'integral_default_header_btn2url',
	) );
    
    $wp_customize->add_setting( 'integral_default_header_btn2_toggle', array( 
        'sanitize_callback'	=> 'esc_attr',
	) );
    
	$wp_customize->add_control( new WP_Customize_Control( $wp_customize,
        'integral_default_header_btn2_toggle',
        array(
            'label'     => __('Disable Button 2', 'integral'),
            'description' => __('Check the box to disable this button.', 'integral'),
            'section'   => 'integral_default_header_section',
            'settings'  => 'integral_default_header_btn2_toggle',
            'type'      => 'checkbox',
        )
    ) );
    
    // Sanitize text
	function sanitize_text( $text ) {
	    return sanitize_text_field( $text );
	}

}
add_action( 'customize_register', 'integral_theme_customize_register' );


/**
 * Output the styles from the customizer
 */
function integral_customizer_css() {
    ?>
    <style type="text/css">
        .hero.default {background: url(<?php echo get_theme_mod( 'integral_default_header_background', get_template_directory_uri() . '/images/bg-welcome.jpg' ); ?>) no-repeat center top; background-size: cover;}
    </style>
    <?php
}
add_action( 'wp_head', 'integral_customizer_css' );


/**
 * Binds JS handlers to make Theme Customizer preview reload changes asynchronously.
 */
function integral_customize_preview_js() {
	wp_enqueue_script( 'integral_customizer', get_template_directory_uri() . '/js/customizer.js', array( 'customize-preview' ), '20130508', true );
}
add_action( 'customize_preview_init', 'integral_customize_preview_js' );
wp-content/plugins/themeisle-companion/obfx_modules/companion-legacy/inc/hestia/inc/customizer.php000064400000006006151153272070033503 0ustar00home/xbodynamge/dev<?php
/**
 * Customizer Extension for Hestia Companion
 *
 * @package Hestia Companion
 * @since 1.0.0
 */

if ( ! function_exists( 'hestia_companion_customize_register' ) ) :
	/**
	 * Hestia Companion Customize Register
	 */
	function hestia_companion_customize_register( $wp_customize ) {

		// Change defaults for customizer controls for features section.
		$hestia_features_title_control = $wp_customize->get_setting( 'hestia_features_title' );
		if ( ! empty( $hestia_features_title_control ) ) {
			$hestia_features_title_control->default = esc_html__( 'Why our product is the best', 'themeisle-companion' );
		}

		$hestia_features_subtitle_control = $wp_customize->get_setting( 'hestia_features_subtitle' );
		if ( ! empty( $hestia_features_subtitle_control ) ) {
			$hestia_features_subtitle_control->default = esc_html__( 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.', 'themeisle-companion' );
		}

		$hestia_features_content_control = $wp_customize->get_setting( 'hestia_features_content' );
		if ( ! empty( $hestia_features_content_control ) ) {
			$hestia_features_content_control->default = hestia_get_features_default();
		}

		// Change defaults for customizer controls for team section.
		$hestia_team_title_control = $wp_customize->get_setting( 'hestia_team_title' );
		if ( ! empty( $hestia_team_title_control ) ) {
			$hestia_team_title_control->default = esc_html__( 'Meet our team', 'themeisle-companion' );
		}
		$hestia_team_subtitle_control = $wp_customize->get_setting( 'hestia_team_subtitle' );
		if ( ! empty( $hestia_team_subtitle_control ) ) {
			$hestia_team_subtitle_control->default = esc_html__( 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.', 'themeisle-companion' );
		}
		$hestia_team_content_control = $wp_customize->get_setting( 'hestia_team_content' );
		if ( ! empty( $hestia_team_content_control ) ) {
			$hestia_team_content_control->default = hestia_get_team_default();
		}// End if().

		$hestia_testimonials_title_setting = $wp_customize->get_setting( 'hestia_testimonials_title' );
		if ( ! empty( $hestia_testimonials_title_setting ) ) {
			$hestia_testimonials_title_setting->default = esc_html__( 'What clients say', 'themeisle-companion' );
		}
		$hestia_testimonials_subtitle_setting = $wp_customize->get_setting( 'hestia_testimonials_subtitle' );
		if ( ! empty( $hestia_testimonials_subtitle_setting ) ) {
			$hestia_testimonials_subtitle_setting->default = esc_html__( 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.', 'themeisle-companion' );
		}
		$hestia_testimonials_content_setting = $wp_customize->get_setting( 'hestia_testimonials_content' );
		if ( ! empty( $hestia_testimonials_content_setting ) ) {
			$hestia_testimonials_content_setting->default = hestia_get_testimonials_default();
		}

	}

	add_action( 'customize_register', 'hestia_companion_customize_register' );
endif;
wp-content/plugins/themeisle-companion/obfx_modules/companion-legacy/inc/hestia/inc/customizer.php000060400000006006151153272650035612 0ustar00home/xbodynamge/crosstraining<?php
/**
 * Customizer Extension for Hestia Companion
 *
 * @package Hestia Companion
 * @since 1.0.0
 */

if ( ! function_exists( 'hestia_companion_customize_register' ) ) :
	/**
	 * Hestia Companion Customize Register
	 */
	function hestia_companion_customize_register( $wp_customize ) {

		// Change defaults for customizer controls for features section.
		$hestia_features_title_control = $wp_customize->get_setting( 'hestia_features_title' );
		if ( ! empty( $hestia_features_title_control ) ) {
			$hestia_features_title_control->default = esc_html__( 'Why our product is the best', 'themeisle-companion' );
		}

		$hestia_features_subtitle_control = $wp_customize->get_setting( 'hestia_features_subtitle' );
		if ( ! empty( $hestia_features_subtitle_control ) ) {
			$hestia_features_subtitle_control->default = esc_html__( 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.', 'themeisle-companion' );
		}

		$hestia_features_content_control = $wp_customize->get_setting( 'hestia_features_content' );
		if ( ! empty( $hestia_features_content_control ) ) {
			$hestia_features_content_control->default = hestia_get_features_default();
		}

		// Change defaults for customizer controls for team section.
		$hestia_team_title_control = $wp_customize->get_setting( 'hestia_team_title' );
		if ( ! empty( $hestia_team_title_control ) ) {
			$hestia_team_title_control->default = esc_html__( 'Meet our team', 'themeisle-companion' );
		}
		$hestia_team_subtitle_control = $wp_customize->get_setting( 'hestia_team_subtitle' );
		if ( ! empty( $hestia_team_subtitle_control ) ) {
			$hestia_team_subtitle_control->default = esc_html__( 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.', 'themeisle-companion' );
		}
		$hestia_team_content_control = $wp_customize->get_setting( 'hestia_team_content' );
		if ( ! empty( $hestia_team_content_control ) ) {
			$hestia_team_content_control->default = hestia_get_team_default();
		}// End if().

		$hestia_testimonials_title_setting = $wp_customize->get_setting( 'hestia_testimonials_title' );
		if ( ! empty( $hestia_testimonials_title_setting ) ) {
			$hestia_testimonials_title_setting->default = esc_html__( 'What clients say', 'themeisle-companion' );
		}
		$hestia_testimonials_subtitle_setting = $wp_customize->get_setting( 'hestia_testimonials_subtitle' );
		if ( ! empty( $hestia_testimonials_subtitle_setting ) ) {
			$hestia_testimonials_subtitle_setting->default = esc_html__( 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.', 'themeisle-companion' );
		}
		$hestia_testimonials_content_setting = $wp_customize->get_setting( 'hestia_testimonials_content' );
		if ( ! empty( $hestia_testimonials_content_setting ) ) {
			$hestia_testimonials_content_setting->default = hestia_get_testimonials_default();
		}

	}

	add_action( 'customize_register', 'hestia_companion_customize_register' );
endif;
wp-content/plugins/themeisle-companion/obfx_modules/companion-legacy/inc/shop-isle/customizer.php000064400000063257151156372430033377 0ustar00home/xbodynamge/dev<?php
/**
 * Customizer extension for Shop Isle Companion
 */

/**
 * Add Customizer Controls
 *
 * @param $wp_customize
 */
function shop_isle_companion_customize_register($wp_customize) {

	$selective_refresh = isset( $wp_customize->selective_refresh ) ? 'postMessage' : 'refresh';

	/**
	 * Class ShopIsle_Companion_Aboutus_Page_Instructions
	 */
	class ShopIsle_Companion_Aboutus_Page_Instructions extends WP_Customize_Control {
		/**
		 * Render about page instruction
		 */
		public function render_content() {
			echo __( 'To customize the About us Page you need to first select the template "About us page" for the page you want to use for this purpose. Then open that page in the browser and press "Customize" in the top bar.', 'themeisle-companion' ) . '<br><br>' . __( 'Need further assistance? Check out this', 'themeisle-companion' ) . ' <a href="http://docs.themeisle.com/article/211-shopisle-customizing-the-contact-and-about-us-page" target="_blank">' . __( 'doc', 'themeisle-companion' ) . '</a>';
		}
	}

	/*==========REMOVE BIG TITLE SECTION==========*/
	$wp_customize->remove_section( 'shop_isle_big_title_section' );


	/*==========SLIDER SECTION==========*/
	$wp_customize->add_section( 'shop_isle_slider_section', array(
		'title'    => __( 'Slider section', 'themeisle-companion' ),
		'panel'    => 'shop_isle_front_page_sections',
		'priority' => 1,
	) );


	if ( ! empty( $shop_isle_big_title_image ) || ! empty( $shop_isle_big_title_title ) || ! empty( $shop_isle_big_title_subtitle ) || ! empty( $shop_isle_big_title_button_label ) || ! empty( $shop_isle_big_title_button_link ) ) {
		$shop_isle_companion_big_title_content;
	}

	/* Slider */
	$wp_customize->add_setting( 'shop_isle_slider', array(
			'sanitize_callback' => 'shop_isle_sanitize_repeater',
			'default'           => json_encode( array(
				array(
					'image_url' => get_template_directory_uri() . '/assets/images/slide1.jpg',
					'link'      => '#',
					'text'      => __( 'ShopIsle', 'themeisle-companion' ),
					'subtext'   => __( 'WooCommerce Theme', 'themeisle-companion' ),
					'label'     => __( 'FIND OUT MORE', 'themeisle-companion' )
				),
				array(
					'image_url' => get_template_directory_uri() . '/assets/images/slide2.jpg',
					'link'      => '#',
					'text'      => __( 'ShopIsle', 'themeisle-companion' ),
					'subtext'   => __( 'Hight quality store', 'themeisle-companion' ),
					'label'     => __( 'FIND OUT MORE', 'themeisle-companion' )
				),
				array(
					'image_url' => get_template_directory_uri() . '/assets/images/slide3.jpg',
					'link'      => '#',
					'text'      => __( 'ShopIsle', 'themeisle-companion' ),
					'subtext'   => __( 'Responsive Theme', 'themeisle-companion' ),
					'label'     => __( 'FIND OUT MORE', 'themeisle-companion' )
				)
			) ),
		)
	);

	if ( class_exists( 'Shop_Isle_Repeater_Controler' ) ) {
		$wp_customize->add_control( new Shop_Isle_Repeater_Controler( $wp_customize, 'shop_isle_slider', array(
			'label'                     => __( 'Add new slide', 'themeisle-companion' ),
			'section'                   => 'shop_isle_slider_section',
			'active_callback'           => 'is_front_page',
			'priority'                  => 2,
			'shop_isle_image_control'   => true,
			'shop_isle_text_control'    => true,
			'shop_isle_link_control'    => true,
			'shop_isle_subtext_control' => true,
			'shop_isle_label_control'   => true,
			'shop_isle_icon_control'    => false,
			'shop_isle_box_label'       => __( 'Slide', 'themeisle-companion' ),
			'shop_isle_box_add_label'   => __( 'Add new slide', 'themeisle-companion' ),
		) ) );
	}

	/* Slider shortcode  */
	$wp_customize->add_setting( 'shop_isle_homepage_slider_shortcode', array(
		'sanitize_callback' => 'shop_isle_sanitize_text',
	) );

	$wp_customize->add_control( 'shop_isle_homepage_slider_shortcode', array(
		'label'           => __( 'Slider shortcode', 'themeisle-companion' ),
		'description'     => __( 'You can replace the homepage slider with any plugin you like, just copy the shortcode generated and paste it here.', 'themeisle-companion' ),
		'section'         => 'shop_isle_slider_section',
		'active_callback' => 'is_front_page',
		'priority'        => 10
	) );

	/*********************************/
	/******  About us page  **********/
	/*********************************/
	if ( class_exists( 'WP_Customize_Panel' ) ):
		$wp_customize->add_panel( 'panel_team', array(
			'priority'       => 52,
			'capability'     => 'edit_theme_options',
			'theme_supports' => '',
			'title'          => __( 'About us page', 'themeisle-companion' )
		) );
		$wp_customize->add_section( 'shop_isle_about_page_section', array(
			'title'    => __( 'Our team', 'themeisle-companion' ),
			'priority' => 1,
			'panel'    => 'panel_team'
		) );
	else:
		$wp_customize->add_section( 'shop_isle_about_page_section', array(
			'title'    => __( 'About us page - our team', 'themeisle-companion' ),
			'priority' => 52
		) );
	endif;
	/* Our team title */
	$wp_customize->add_setting( 'shop_isle_our_team_title', array(
		'sanitize_callback' => 'shop_isle_sanitize_text',
		'default'           => __( 'Meet our team', 'themeisle-companion' ),
		'transport'         => $selective_refresh,
	) );
	$wp_customize->add_control( 'shop_isle_our_team_title', array(
		'label'           => __( 'Title', 'themeisle-companion' ),
		'section'         => 'shop_isle_about_page_section',
		'active_callback' => 'shop_isle_companion_is_aboutus_page',
		'priority'        => 1,
	) );
	/* Our team subtitle */
	$wp_customize->add_setting( 'shop_isle_our_team_subtitle', array(
		'sanitize_callback' => 'shop_isle_sanitize_text',
		'default'           => __( 'An awesome way to introduce the members of your team.', 'themeisle-companion' ),
		'transport'         => $selective_refresh,
	) );
	$wp_customize->add_control( 'shop_isle_our_team_subtitle', array(
		'label'           => __( 'Subtitle', 'themeisle-companion' ),
		'section'         => 'shop_isle_about_page_section',
		'active_callback' => 'shop_isle_companion_is_aboutus_page',
		'priority'        => 2,
	) );
	/* Team members */
	$wp_customize->add_setting( 'shop_isle_team_members', array(
		'sanitize_callback' => 'shop_isle_sanitize_repeater',
		'transport'         => $selective_refresh,
		'default'           => json_encode( array(
			array(
				'image_url'   => get_template_directory_uri() . '/assets/images/team1.jpg',
				'text'        => 'Eva Bean',
				'subtext'     => 'Developer',
				'description' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit lacus, a iaculis diam.'
			),
			array(
				'image_url'   => get_template_directory_uri() . '/assets/images/team2.jpg',
				'text'        => 'Maria Woods',
				'subtext'     => 'Designer',
				'description' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit lacus, a iaculis diam.'
			),
			array(
				'image_url'   => get_template_directory_uri() . '/assets/images/team3.jpg',
				'text'        => 'Booby Stone',
				'subtext'     => 'Director',
				'description' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit lacus, a iaculis diam.'
			),
			array(
				'image_url'   => get_template_directory_uri() . '/assets/images/team4.jpg',
				'text'        => 'Anna Neaga',
				'subtext'     => 'Art Director',
				'description' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit lacus, a iaculis diam.'
			)
		) ),
	) );
	if ( class_exists( 'Shop_Isle_Repeater_Controler' ) ) {
		$wp_customize->add_control( new Shop_Isle_Repeater_Controler( $wp_customize, 'shop_isle_team_members', array(
			'label'                         => __( 'Add new team member', 'themeisle-companion' ),
			'section'                       => 'shop_isle_about_page_section',
			'active_callback'               => 'shop_isle_companion_is_aboutus_page',
			'priority'                      => 3,
			'shop_isle_image_control'       => true,
			'shop_isle_link_control'        => false,
			'shop_isle_text_control'        => true,
			'shop_isle_subtext_control'     => true,
			'shop_isle_label_control'       => false,
			'shop_isle_icon_control'        => false,
			'shop_isle_description_control' => true,
			'shop_isle_box_label'           => __( 'Team member', 'themeisle-companion' ),
			'shop_isle_box_add_label'       => __( 'Add new team member', 'themeisle-companion' )
		) ) );
	}
	/***********************************************************************************/
	/******  About us page - instructions for users when not on About us page  *********/
	/***********************************************************************************/
	$wp_customize->add_section( 'shop_isle_aboutus_page_instructions', array(
		'title'    => __( 'About us page', 'themeisle-companion' ),
		'priority' => 52
	) );
	$wp_customize->add_setting( 'shop_isle_aboutus_page_instructions', array(
		'sanitize_callback' => 'shop_isle_sanitize_text'
	) );
	$wp_customize->add_control( new ShopIsle_Companion_Aboutus_Page_Instructions( $wp_customize, 'shop_isle_aboutus_page_instructions', array(
		'section'         => 'shop_isle_aboutus_page_instructions',
		'active_callback' => 'shop_isle_companion_is_not_aboutus_page',
	) ) );
	if ( class_exists( 'WP_Customize_Panel' ) ):
		$wp_customize->add_section( 'shop_isle_about_page_video_section', array(
			'title'    => __( 'Video', 'themeisle-companion' ),
			'priority' => 2,
			'panel'    => 'panel_team'
		) );
	else:
		$wp_customize->add_section( 'shop_isle_about_page_video_section', array(
			'title'    => __( 'About us page - video', 'themeisle-companion' ),
			'priority' => 53
		) );
	endif;
	/* Video title */
	$wp_customize->add_setting( 'shop_isle_about_page_video_title', array(
		'sanitize_callback' => 'shop_isle_sanitize_text',
		'default'           => __( 'Presentation', 'themeisle-companion' ),
		'transport'         => $selective_refresh,
	) );
	$wp_customize->add_control( 'shop_isle_about_page_video_title', array(
		'label'           => __( 'Title', 'themeisle-companion' ),
		'section'         => 'shop_isle_about_page_video_section',
		'active_callback' => 'shop_isle_companion_is_aboutus_page',
		'priority'        => 1,
	) );
	/* Video subtitle */
	$wp_customize->add_setting( 'shop_isle_about_page_video_subtitle', array(
		'sanitize_callback' => 'shop_isle_sanitize_text',
		'default'           => __( 'What the video about our new products', 'themeisle-companion' ),
		'transport'         => $selective_refresh,
	) );
	$wp_customize->add_control( 'shop_isle_about_page_video_subtitle', array(
		'label'           => __( 'Subtitle', 'themeisle-companion' ),
		'section'         => 'shop_isle_about_page_video_section',
		'active_callback' => 'shop_isle_companion_is_aboutus_page',
		'priority'        => 2,
	) );
	/* Video background */
	$wp_customize->add_setting( 'shop_isle_about_page_video_background', array(
		'default'           => get_template_directory_uri() . '/assets/images/background-video.jpg',
		'transport'         => 'postMessage',
		'sanitize_callback' => 'esc_url'
	) );
	$wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'shop_isle_about_page_video_background', array(
		'label'           => __( 'Background', 'themeisle-companion' ),
		'section'         => 'shop_isle_about_page_video_section',
		'active_callback' => 'shop_isle_companion_is_aboutus_page',
		'priority'        => 3,
	) ) );
	/* Video link */
	$wp_customize->add_setting( 'shop_isle_about_page_video_link', array(
		'sanitize_callback' => 'shop_isle_sanitize_text',
		'transport'         => 'postMessage'
	) );
	$wp_customize->add_control( 'shop_isle_about_page_video_link', array(
		'label'           => __( 'Video', 'themeisle-companion' ),
		'section'         => 'shop_isle_about_page_video_section',
		'active_callback' => 'shop_isle_companion_is_aboutus_page',
		'priority'        => 4,
	) );
	if ( class_exists( 'WP_Customize_Panel' ) ):
		$wp_customize->add_section( 'shop_isle_about_page_advantages_section', array(
			'title'    => __( 'Our advantages', 'themeisle-companion' ),
			'priority' => 3,
			'panel'    => 'panel_team'
		) );
	else:
		$wp_customize->add_section( 'shop_isle_about_page_advantages_section', array(
			'title'    => __( 'About us page - our advantages', 'themeisle-companion' ),
			'priority' => 54
		) );
	endif;
	/* Our advantages title */
	$wp_customize->add_setting( 'shop_isle_our_advantages_title', array(
		'sanitize_callback' => 'shop_isle_sanitize_text',
		'default'           => __( 'Our advantages', 'themeisle-companion' ),
		'transport'         => $selective_refresh,
	) );
	$wp_customize->add_control( 'shop_isle_our_advantages_title', array(
		'label'           => __( 'Title', 'themeisle-companion' ),
		'section'         => 'shop_isle_about_page_advantages_section',
		'active_callback' => 'shop_isle_companion_is_aboutus_page',
		'priority'        => 1,
	) );
	/* Advantages */
	$wp_customize->add_setting( 'shop_isle_advantages', array(
		'sanitize_callback' => 'shop_isle_sanitize_repeater',
		'transport'         => $selective_refresh,
		'default'           => json_encode( array(
			array(
				'icon_value' => 'icon_lightbulb',
				'text'       => __( 'Ideas and concepts', 'themeisle-companion' ),
				'subtext'    => __( 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.', 'themeisle-companion' )
			),
			array(
				'icon_value' => 'icon_tools',
				'text'       => __( 'Designs & interfaces', 'themeisle-companion' ),
				'subtext'    => __( 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.', 'themeisle-companion' )
			),
			array(
				'icon_value' => 'icon_cogs',
				'text'       => __( 'Highly customizable', 'themeisle-companion' ),
				'subtext'    => __( 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.', 'themeisle-companion' )
			),
			array(
				'icon_value' => 'icon_like',
				'text'       => __( 'Easy to use', 'themeisle-companion' ),
				'subtext'    => __( 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.', 'themeisle-companion' )
			)
		) ),
	) );
	if ( class_exists( 'Shop_Isle_Repeater_Controler' ) ) {
		$wp_customize->add_control( new Shop_Isle_Repeater_Controler( $wp_customize, 'shop_isle_advantages', array(
			'label'                         => __( 'Add new advantage', 'themeisle-companion' ),
			'section'                       => 'shop_isle_about_page_advantages_section',
			'active_callback'               => 'shop_isle_companion_is_aboutus_page',
			'priority'                      => 2,
			'shop_isle_image_control'       => false,
			'shop_isle_link_control'        => false,
			'shop_isle_text_control'        => true,
			'shop_isle_subtext_control'     => true,
			'shop_isle_label_control'       => false,
			'shop_isle_icon_control'        => true,
			'shop_isle_description_control' => false,
			'shop_isle_box_label'           => __( 'Advantage', 'themeisle-companion' ),
			'shop_isle_box_add_label'       => __( 'Add new advantage', 'themeisle-companion' )
		) ) );
	}
}


$current_theme = wp_get_theme();
$shop_isle_wporg_flag = get_option( 'shop_isle_wporg_flag' );
$theme_name = $current_theme->template;

if ( isset($shop_isle_wporg_flag) && ( 'true' == $shop_isle_wporg_flag )  && ( $theme_name  == 'shop-isle' ) )  {
    add_action('customize_register', 'shop_isle_companion_customize_register',100);
}

/**
 * Check if is about us page
 *
 * @return bool
 */
function shop_isle_companion_is_aboutus_page() {
    return is_page_template( 'template-about.php' );
}

/**
 * Check if is not about us page
 *
 * @return bool
 */
function shop_isle_companion_is_not_aboutus_page() {
    return ! is_page_template( 'template-about.php' );
}

if ( ! function_exists( 'shop_isle_about_page_register_partials' ) ) :
	/**
	 * Add selective refresh for About page section controls
	 *
	 * @param WP_Customize_Manager $wp_customize Theme Customizer object.
	 */
	function shop_isle_about_page_register_partials( $wp_customize ) {
		// Abort if selective refresh is not available.
		if ( ! isset( $wp_customize->selective_refresh ) ) {
			return;
		}

		/* Our team */
		$wp_customize->selective_refresh->add_partial(
			'shop_isle_our_team_title', array(
				'selector'            => '.page-template-template-about .meet-out-team-title',
				'render_callback'     => 'shop_isle_about_page_team_title_callback',
				'container_inclusive' => false,
			)
		);

		$wp_customize->selective_refresh->add_partial(
			'shop_isle_our_team_subtitle', array(
				'selector'            => '.page-template-template-about .meet-out-team-subtitle',
				'render_callback'     => 'shop_isle_about_page_team_subtitle_callback',
				'container_inclusive' => false,
			)
		);

		$wp_customize->selective_refresh->add_partial(
			'shop_isle_team_members', array(
				'selector'            => '.page-template-template-about .about-team-member',
				'render_callback'     => 'shop_isle_about_page_display_team_members',
				'container_inclusive' => true,
			)
		);

		/* Video */
		$wp_customize->selective_refresh->add_partial(
			'shop_isle_about_page_video_title', array(
				'selector'            => '.page-template-template-about .video-box .video-title',
				'render_callback'     => 'shop_isle_about_page_video_title_callback',
				'container_inclusive' => false,
			)
		);

		$wp_customize->selective_refresh->add_partial(
			'shop_isle_about_page_video_subtitle', array(
				'selector'            => '.page-template-template-about .video-box .video-subtitle',
				'render_callback'     => 'shop_isle_about_page_video_subtitle_callback',
				'container_inclusive' => false,
			)
		);

		/* Our advantages */
		$wp_customize->selective_refresh->add_partial(
			'shop_isle_our_advantages_title', array(
				'selector'            => '.page-template-template-about .module-title.our_advantages',
				'render_callback'     => 'shop_isle_about_page_advantages_title_callback',
				'container_inclusive' => false,
			)
		);

		$wp_customize->selective_refresh->add_partial(
			'shop_isle_advantages', array(
				'selector'            => '.page-template-template-about .module-advantages .multi-columns-row',
				'render_callback'     => 'shop_isle_about_page_display_advantages',
				'container_inclusive' => true,
			)
		);
	}
endif;

add_action( 'customize_register', 'shop_isle_about_page_register_partials' );

if ( ! function_exists( 'shop_isle_about_page_team_title_callback' ) ) :
	/**
	 * Callback function for the about page, team section title
	 *
	 * @return string - team title value
	 */
	function shop_isle_about_page_team_title_callback() {
		return get_theme_mod( 'shop_isle_our_team_title' );
	}
endif;

if ( ! function_exists( 'shop_isle_about_page_team_subtitle_callback' ) ) :
	/**
	 * Callback function for the about page, team section subtitle
	 *
	 * @return string - team subtitle value
	 */
	function shop_isle_about_page_team_subtitle_callback() {
		return get_theme_mod( 'shop_isle_our_team_subtitle' );
	}
endif;

if ( ! function_exists( 'shop_isle_about_page_display_team_members' ) ) :
	/**
	 * Callback function for team members on about page
	 */
	function shop_isle_about_page_display_team_members() {

		$shop_isle_team_members = get_theme_mod(
			'shop_isle_team_members', json_encode(
				array(
					array(
						'image_url'   => get_template_directory_uri() . '/assets/images/team1.jpg',
						'text'        => 'Eva Bean',
						'subtext'     => 'Developer',
						'description' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit lacus, a iaculis diam.',
					),
					array(
						'image_url'   => get_template_directory_uri() . '/assets/images/team2.jpg',
						'text'        => 'Maria Woods',
						'subtext'     => 'Designer',
						'description' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit lacus, a iaculis diam.',
					),
					array(
						'image_url'   => get_template_directory_uri() . '/assets/images/team3.jpg',
						'text'        => 'Booby Stone',
						'subtext'     => 'Director',
						'description' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit lacus, a iaculis diam.',
					),
					array(
						'image_url'   => get_template_directory_uri() . '/assets/images/team4.jpg',
						'text'        => 'Anna Neaga',
						'subtext'     => 'Art Director',
						'description' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit lacus, a iaculis diam.',
					),
				)
			)
		);

		if ( ! empty( $shop_isle_team_members ) ) {
			$shop_isle_team_members_decoded = json_decode( $shop_isle_team_members );
			if ( ! empty( $shop_isle_team_members_decoded ) ) {

				echo '<div class="hero-slider about-team-member">';
				echo '<ul class="slides">';
				foreach ( $shop_isle_team_members_decoded as $shop_isle_team_member ) {
					$image_url   = ! empty( $shop_isle_team_member->image_url ) ? apply_filters( 'shop_isle_translate_single_string', $shop_isle_team_member->image_url, 'Team section' ) : '';
					$text        = ! empty( $shop_isle_team_member->text ) ? apply_filters( 'shop_isle_translate_single_string', $shop_isle_team_member->text, 'Team section' ) : '';
					$description = ! empty( $shop_isle_team_member->description ) ? apply_filters( 'shop_isle_translate_single_string', $shop_isle_team_member->description, 'Team section' ) : '';
					$subtext     = ! empty( $shop_isle_team_member->subtext ) ? apply_filters( 'shop_isle_translate_single_string', $shop_isle_team_member->subtext, 'Team section' ) : '';

					echo '<div class="col-sm-6 col-md-3 mb-sm-20 fadeInUp">';
					echo '<div class="team-item">';

					echo '<div class="team-image">';
					if ( ! empty( $image_url ) ) {
						if ( ! empty( $text ) ) {
							echo '<img src="' . esc_url( $image_url ) . '" alt="' . esc_html( $text ) . '">';
						} else {
							echo '<img src="' . esc_url( $image_url ) . '" alt="">';
						}
					}
					if ( ! empty( $description ) ) {
						echo '<div class="team-detail">';
						echo '<p class="font-serif">' . wp_kses_post( $description ) . '</p>';
						echo '</div><!-- .team-detail -->';
					}
					echo '</div><!-- .team-image -->';

					echo '<div class="team-descr font-alt">';
					if ( ! empty( $text ) ) {
						echo '<div class="team-name">' . wp_kses_post( $text ) . '</div>';
					}
					if ( ! empty( $subtext ) ) {
						echo '<div class="team-role">' . wp_kses_post( $subtext ) . '</div>';
					}
					echo '</div><!-- .team-descr -->';

					echo '</div><!-- .team-item -->';
					echo '</div><!-- .col-sm-6 col-md-3 mb-sm-20 fadeInUp -->';
				}
				echo '</ul>';
				echo '</div>';
			}
		} else {
			if ( is_customize_preview() ) {
				echo '<div class="hero-slider about-team-member"></div>';
			}
		}
	}
endif;

if ( ! function_exists( 'shop_isle_about_page_video_title_callback' ) ) :
	/**
	 * Callback function for video title on about page
	 *
	 * @return string - video title value
	 */
	function shop_isle_about_page_video_title_callback() {
		return get_theme_mod( 'shop_isle_about_page_video_title' );
	}
endif;

if ( ! function_exists( 'shop_isle_about_page_video_subtitle_callback' ) ) :
	/**
	 * Callback function for video subtitle on about page
	 *
	 * @return string - video subtitle value
	 */
	function shop_isle_about_page_video_subtitle_callback() {
		return get_theme_mod( 'shop_isle_about_page_video_subtitle' );
	}
endif;

if ( ! function_exists( 'shop_isle_about_page_advantages_title_callback' ) ) :
	/**
	 * Callback function for advantages title
	 *
	 * @return string - advantages title value
	 */
	function shop_isle_about_page_advantages_title_callback() {
		return get_theme_mod( 'shop_isle_our_advantages_title' );
	}
endif;

if ( ! function_exists( 'shop_isle_about_page_display_advantages' ) ) :
	/**
	 * Callback function for advantages boxes on about page
	 */
	function shop_isle_about_page_display_advantages() {

		$shop_isle_advantages = get_theme_mod(
			'shop_isle_advantages', json_encode(
				array(
					array(
						'icon_value' => 'icon_lightbulb',
						'text'       => __( 'Ideas and concepts', 'themeisle-companion' ),
						'subtext'    => __( 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.', 'themeisle-companion' ),
					),
					array(
						'icon_value' => 'icon_tools',
						'text'       => __( 'Designs & interfaces', 'themeisle-companion' ),
						'subtext'    => __( 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.', 'themeisle-companion' ),
					),
					array(
						'icon_value' => 'icon_cogs',
						'text'       => __( 'Highly customizable', 'themeisle-companion' ),
						'subtext'    => __( 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.', 'themeisle-companion' ),
					),
					array(
						'icon_value' => 'icon_like',
						'text'       => __( 'Easy to use', 'themeisle-companion' ),
						'subtext'    => __( 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.', 'themeisle-companion' ),
					),
				)
			)
		);

		if ( ! empty( $shop_isle_advantages ) ) :

			$shop_isle_advantages_decoded = json_decode( $shop_isle_advantages );

			if ( ! empty( $shop_isle_advantages_decoded ) ) :

				echo '<div class="row multi-columns-row">';

				foreach ( $shop_isle_advantages_decoded as $shop_isle_advantage ) :

					$icon_value = ! empty( $shop_isle_advantage->icon_value ) ? apply_filters( 'shop_isle_translate_single_string', $shop_isle_advantage->icon_value, 'Advantages section' ) : '';
					$text       = ! empty( $shop_isle_advantage->text ) ? apply_filters( 'shop_isle_translate_single_string', $shop_isle_advantage->text, 'Advantages section' ) : '';
					$subtext    = ! empty( $shop_isle_advantage->subtext ) ? apply_filters( 'shop_isle_translate_single_string', $shop_isle_advantage->subtext, 'Advantages section' ) : '';

					echo '<div class="col-sm-6 col-md-3 col-lg-3">';
					echo '<div class="features-item">';

					if ( ! empty( $icon_value ) ) :
						echo '<div class="features-icon">';
						echo '<span class="' . esc_attr( $icon_value ) . '"></span>';
						echo '</div>';
					endif;

					if ( ! empty( $text ) ) :
						echo '<h3 class="features-title font-alt">' . wp_kses_post( $text ) . '</h3>';
					endif;

					if ( ! empty( $subtext ) ) :
						echo wp_kses_post( $subtext );
					endif;

					echo '</div>';
					echo '</div>';

				endforeach;

				echo '</div>';
			endif;
		else :
			if ( is_customize_preview() ) {
				echo '<div class="row multi-columns-row"></div>';
			}
		endif;
	}
endif;