<?php
/**
 * Callbacks functions
 *
 * @package kingston
 */

if ( ! function_exists( 'kingston_slider_section_enable' ) ) :
	/**
	 * Check if slider_section section enabled.
	 *
	 * @param WP_Customize_Control $control WP_Customize_Control instance.
	 * @return bool Whether the control is active to the current preview.
	 */
	function kingston_slider_section_enable( $control ) {
		return $control->manager->get_setting( 'kingston_theme_options[enable_slider]' )->value() ? true : false;
	}
endif;

if ( ! function_exists( 'kingston_introduction_section_enable' ) ) :
	/**
	 * Check if introduction_section section enabled.
	 *
	 * @param WP_Customize_Control $control WP_Customize_Control instance.
	 * @return bool Whether the control is active to the current preview.
	 */
	function kingston_introduction_section_enable( $control ) {
		return $control->manager->get_setting( 'kingston_theme_options[enable_introduction]' )->value() ? true : false;
	}
endif;

if ( ! function_exists( 'kingston_service_section_enable' ) ) :
	/**
	 * Check if service_section section enabled.
	 *
	 * @param WP_Customize_Control $control WP_Customize_Control instance.
	 * @return bool Whether the control is active to the current preview.
	 */
	function kingston_service_section_enable( $control ) {
		return $control->manager->get_setting( 'kingston_theme_options[enable_service]' )->value() ? true : false;
	}
endif;

if ( ! function_exists( 'kingston_portfolio_section_enable' ) ) :
	/**
	 * Check if portfolio_section section enabled.
	 *
	 * @param WP_Customize_Control $control WP_Customize_Control instance.
	 * @return bool Whether the control is active to the current preview.
	 */
	function kingston_portfolio_section_enable( $control ) {
		return $control->manager->get_setting( 'kingston_theme_options[enable_portfolio]' )->value() ? true : false;
	}
endif;

if ( ! function_exists( 'kingston_testimonial_section_enable' ) ) :
	/**
	 * Check if testimonial_section section enabled.
	 *
	 * @param WP_Customize_Control $control WP_Customize_Control instance.
	 * @return bool Whether the control is active to the current preview.
	 */
	function kingston_testimonial_section_enable( $control ) {
		return $control->manager->get_setting( 'kingston_theme_options[enable_testimonial]' )->value() ? true : false;
	}
endif;

if ( ! function_exists( 'kingston_recent_section_enable' ) ) :
	/**
	 * Check if recent_section section enabled.
	 *
	 * @param WP_Customize_Control $control WP_Customize_Control instance.
	 * @return bool Whether the control is active to the current preview.
	 */
	function kingston_recent_section_enable( $control ) {
		return $control->manager->get_setting( 'kingston_theme_options[enable_recent]' )->value() ? true : false;
	}
endif;

