<?php
/**
 * Customizer active callbacks
 *
 * @package Theme Palace
 * @subpackage Raise Charity Pro
 * @since Raise Charity Pro 1.0.0
 */

if ( ! function_exists( 'raise_charity_pro_is_loader_enable' ) ) :
	/**
	 * Check if loader is enabled.
	 *
	 * @since Raise Charity Pro 1.0.0
	 * @param WP_Customize_Control $control WP_Customize_Control instance.
	 * @return bool Whether the control is active to the current preview.
	 */
	function raise_charity_pro_is_loader_enable( $control ) {
		return $control->manager->get_setting( 'raise_charity_pro_theme_options[loader_enable]' )->value();
	}
endif;

if ( ! function_exists( 'raise_charity_pro_is_breadcrumb_enable' ) ) :
	/**
	 * Check if breadcrumb is enabled.
	 *
	 * @since Raise Charity Pro 1.0.0
	 * @param WP_Customize_Control $control WP_Customize_Control instance.
	 * @return bool Whether the control is active to the current preview.
	 */
	function raise_charity_pro_is_breadcrumb_enable( $control ) {
		return $control->manager->get_setting( 'raise_charity_pro_theme_options[breadcrumb_enable]' )->value();
	}
endif;

if ( ! function_exists( 'raise_charity_pro_is_pagination_enable' ) ) :
	/**
	 * Check if pagination is enabled.
	 *
	 * @since Raise Charity Pro 1.0.0
	 * @param WP_Customize_Control $control WP_Customize_Control instance.
	 * @return bool Whether the control is active to the current preview.
	 */
	function raise_charity_pro_is_pagination_enable( $control ) {
		return $control->manager->get_setting( 'raise_charity_pro_theme_options[pagination_enable]' )->value();
	}
endif;

if ( ! function_exists( 'raise_charity_pro_is_static_homepage_enable' ) ) :
	/**
	 * Check if static homepage is enabled.
	 *
	 * @since Raise Charity Pro 1.0.0
	 * @param WP_Customize_Control $control WP_Customize_Control instance.
	 * @return bool Whether the control is active to the current preview.
	 */
	function raise_charity_pro_is_static_homepage_enable( $control ) {
		return ( 'page' == $control->manager->get_setting( 'show_on_front' )->value() );
	}
endif;

if ( ! function_exists( 'raise_charity_pro_is_nav_btn_enable' ) ) :
	
	function raise_charity_pro_is_nav_btn_enable( $control ) {
	return ( $control->manager->get_setting( 'raise_charity_pro_theme_options[nav_btn]' )->value() );
}
endif;

if ( ! function_exists( 'raise_charity_pro_is_footer_Section_enable' ) ) :
	
	function raise_charity_pro_is_footer_Section_enable( $control ) {
	return ( $control->manager->get_setting( 'raise_charity_pro_theme_options[footer_section]' )->value() );
}
endif;

/**
 * Front Page Active Callbacks
 */
/*=================Topbar====================*/
/**
 * Check if topbar menu is enabled.
 *
 * @since Raise Charity Pro 1.0.0
 * @param WP_Customize_Control $control WP_Customize_Control instance.
 * @return bool Whether the control is active to the current preview.
 */
function raise_charity_pro_is_topbar_section_enable( $control ) {
	return ( $control->manager->get_setting( 'raise_charity_pro_theme_options[topbar_section_enable]' )->value() );
}


/*==================Slider===============*/

/**
 * Check if slider section is enabled.
 *
 * @since Raise Charity Pro 1.0.0
 * @param WP_Customize_Control $control WP_Customize_Control instance.
 * @return bool Whether the control is active to the current preview.
 */
function raise_charity_pro_is_slider_section_enable( $control ) {
	return ( $control->manager->get_setting( 'raise_charity_pro_theme_options[slider_section_enable]' )->value() );
}

/**
 * Check if slider section content type is page.
 *
 * @since Raise Charity Pro 1.0.0
 * @param WP_Customize_Control $control WP_Customize_Control instance.
 * @return bool Whether the control is active to the current preview.
 */
function raise_charity_pro_is_slider_section_content_page_enable( $control ) {
	$content_type = $control->manager->get_setting( 'raise_charity_pro_theme_options[slider_content_type]' )->value();
	return raise_charity_pro_is_slider_section_enable( $control ) && ( 'page' == $content_type );
}

/**
 * Check if slider section content type is post.
 *
 * @since Raise Charity Pro 1.0.0
 * @param WP_Customize_Control $control WP_Customize_Control instance.
 * @return bool Whether the control is active to the current preview.
 */
function raise_charity_pro_is_slider_section_content_post_enable( $control ) {
	$content_type = $control->manager->get_setting( 'raise_charity_pro_theme_options[slider_content_type]' )->value();
	return raise_charity_pro_is_slider_section_enable( $control ) && ( 'post' == $content_type );
}

/**
 * Check if slider section content type is category.
 *
 * @since Raise Charity Pro 1.0.0
 * @param WP_Customize_Control $control WP_Customize_Control instance.
 * @return bool Whether the control is active to the current preview.
 */
function raise_charity_pro_is_slider_section_content_category_enable( $control ) {
	$content_type = $control->manager->get_setting( 'raise_charity_pro_theme_options[slider_content_type]' )->value();
	return raise_charity_pro_is_slider_section_enable( $control ) && ( 'category' == $content_type );
}

/*==================About=====================*/

/**
 * Check if about section is enabled.
 *
 * @since Raise Charity Pro 1.0.0
 * @param WP_Customize_Control $control WP_Customize_Control instance.
 * @return bool Whether the control is active to the current preview.
 */
function raise_charity_pro_is_about_section_enable( $control ) {
	return ( $control->manager->get_setting( 'raise_charity_pro_theme_options[about_section_enable]' )->value() );
}

/**
 * Check if about section content type is post.
 *
 * @since Raise Charity Pro 1.0.0
 * @param WP_Customize_Control $control WP_Customize_Control instance.
 * @return bool Whether the control is active to the current preview.
 */
function raise_charity_pro_is_about_section_content_post_enable( $control ) {
	$content_type = $control->manager->get_setting( 'raise_charity_pro_theme_options[about_content_type]' )->value();
	return raise_charity_pro_is_about_section_enable( $control ) && ( 'post' == $content_type );
}

/**
 * Check if about section content type is page.
 *
 * @since Raise Charity Pro 1.0.0
 * @param WP_Customize_Control $control WP_Customize_Control instance.
 * @return bool Whether the control is active to the current preview.
 */
function raise_charity_pro_is_about_section_content_page_enable( $control ) {
	$content_type = $control->manager->get_setting( 'raise_charity_pro_theme_options[about_content_type]' )->value();
	return raise_charity_pro_is_about_section_enable( $control ) && ( 'page' == $content_type );
}

/**
 * Check if about section content type is custom.
 *
 * @since Raise Charity Pro 1.0.0
 * @param WP_Customize_Control $control WP_Customize_Control instance.
 * @return bool Whether the control is active to the current preview.
 */
function raise_charity_pro_is_about_section_content_custom_enable( $control ) {
	$content_type = $control->manager->get_setting( 'raise_charity_pro_theme_options[about_content_type]' )->value();
	return raise_charity_pro_is_about_section_enable( $control ) && ( 'custom' == $content_type );
}

/*==================Recent Causes===============*/

/**
 * Check if recent_cause section is enabled.
 *
 * @since Raise Charity Pro 1.0.0
 * @param WP_Customize_Control $control WP_Customize_Control instance.
 * @return bool Whether the control is active to the current preview.
 */
function raise_charity_pro_is_recent_cause_section_enable( $control ) {
	return ( $control->manager->get_setting( 'raise_charity_pro_theme_options[recent_cause_section_enable]' )->value() );
}

/**
 * Check if recent_cause section content type is page.
 *
 * @since Raise Charity Pro 1.0.0
 * @param WP_Customize_Control $control WP_Customize_Control instance.
 * @return bool Whether the control is active to the current preview.
 */
function raise_charity_pro_is_recent_cause_section_content_page_enable( $control ) {
	$content_type = $control->manager->get_setting( 'raise_charity_pro_theme_options[recent_cause_content_type]' )->value();
	return raise_charity_pro_is_recent_cause_section_enable( $control ) && ( 'page' == $content_type );
}

/**
 * Check if recent_cause section content type is post.
 *
 * @since Raise Charity Pro 1.0.0
 * @param WP_Customize_Control $control WP_Customize_Control instance.
 * @return bool Whether the control is active to the current preview.
 */
function raise_charity_pro_is_recent_cause_section_content_post_enable( $control ) {
	$content_type = $control->manager->get_setting( 'raise_charity_pro_theme_options[recent_cause_content_type]' )->value();
	return raise_charity_pro_is_recent_cause_section_enable( $control ) && ( 'post' == $content_type );
}

/**
 * Check if recent_cause section content type is category.
 *
 * @since Raise Charity Pro 1.0.0
 * @param WP_Customize_Control $control WP_Customize_Control instance.
 * @return bool Whether the control is active to the current preview.
 */
function raise_charity_pro_is_recent_cause_section_content_category_enable( $control ) {
	$content_type = $control->manager->get_setting( 'raise_charity_pro_theme_options[recent_cause_content_type]' )->value();
	return raise_charity_pro_is_recent_cause_section_enable( $control ) && ( 'category' == $content_type );
}

/*=====================Service====================*/

/**
* Check if service section is enabled.
*
* @since Raise Charity Pro 1.0.0
* @param WP_Customize_Control $control WP_Customize_Control instance.
* @return bool Whether the control is active to the current preview.
*/
function raise_charity_pro_is_service_section_enable( $control ) {
	return ( $control->manager->get_setting( 'raise_charity_pro_theme_options[service_section_enable]' )->value() );
}

/**
* Check if service section content type is post.
*
* @since Raise Charity Pro 1.0.0
* @param WP_Customize_Control $control WP_Customize_Control instance.
* @return bool Whether the control is active to the current preview.
*/
function raise_charity_pro_is_service_section_content_post_enable( $control ) {
	$content_type = $control->manager->get_setting( 'raise_charity_pro_theme_options[service_content_type]' )->value();
	return raise_charity_pro_is_service_section_enable( $control ) && ( 'post' == $content_type );
}

/**
* Check if service section content type is page.
*
* @since Raise Charity Pro 1.0.0
* @param WP_Customize_Control $control WP_Customize_Control instance.
* @return bool Whether the control is active to the current preview.
*/
function raise_charity_pro_is_service_section_content_page_enable( $control ) {
	$content_type = $control->manager->get_setting( 'raise_charity_pro_theme_options[service_content_type]' )->value();
	return raise_charity_pro_is_service_section_enable( $control ) && ( 'page' == $content_type );
}

/**
* Check if service section content type is category.
*
* @since Raise Charity Pro 1.0.0
* @param WP_Customize_Control $control WP_Customize_Control instance.
* @return bool Whether the control is active to the current preview.
*/
function raise_charity_pro_is_service_section_content_category_enable( $control ) {
	$content_type = $control->manager->get_setting( 'raise_charity_pro_theme_options[service_content_type]' )->value();
	return raise_charity_pro_is_service_section_enable( $control ) && ( 'category' == $content_type );
}

/*=====================Event====================*/

/**
* Check if event section is enabled.
*
* @since Raise Charity Pro 1.0.0
* @param WP_Customize_Control $control WP_Customize_Control instance.
* @return bool Whether the control is active to the current preview.
*/
function raise_charity_pro_is_event_section_enable( $control ) {
	return ( $control->manager->get_setting( 'raise_charity_pro_theme_options[event_section_enable]' )->value() );
}

/**
* Check if event section content type is post.
*
* @since Raise Charity Pro 1.0.0
* @param WP_Customize_Control $control WP_Customize_Control instance.
* @return bool Whether the control is active to the current preview.
*/
function raise_charity_pro_is_event_section_content_post_enable( $control ) {
	$content_type = $control->manager->get_setting( 'raise_charity_pro_theme_options[event_content_type]' )->value();
	return raise_charity_pro_is_event_section_enable( $control ) && ( 'post' == $content_type );
}

/**
* Check if event section content type is page.
*
* @since Raise Charity Pro 1.0.0
* @param WP_Customize_Control $control WP_Customize_Control instance.
* @return bool Whether the control is active to the current preview.
*/
function raise_charity_pro_is_event_section_content_page_enable( $control ) {
	$content_type = $control->manager->get_setting( 'raise_charity_pro_theme_options[event_content_type]' )->value();
	return raise_charity_pro_is_event_section_enable( $control ) && ( 'page' == $content_type );
}

/**
* Check if event section content type is category.
*
* @since Raise Charity Pro 1.0.0
* @param WP_Customize_Control $control WP_Customize_Control instance.
* @return bool Whether the control is active to the current preview.
*/
function raise_charity_pro_is_event_section_content_category_enable( $control ) {
	$content_type = $control->manager->get_setting( 'raise_charity_pro_theme_options[event_content_type]' )->value();
	return raise_charity_pro_is_event_section_enable( $control ) && ( 'category' == $content_type );
}

/*=======================Promotion========================*/
/**
 * Check if promotion section is enabled.
 *
 * @since raise_charity_pro 1.0.0
 * @param WP_Customize_Control $control WP_Customize_Control instance.
 * @return bool Whether the control is active to the current preview.
 */
function raise_charity_pro_is_promotion_section_enable( $control ) {
	return ( $control->manager->get_setting( 'raise_charity_pro_theme_options[promotion_section_enable]' )->value() );
}

/**
 * Check if promotion section content type is post.
 *
 * @since raise_charity_pro 1.0.0
 * @param WP_Customize_Control $control WP_Customize_Control instance.
 * @return bool Whether the control is active to the current preview.
 */
function raise_charity_pro_is_promotion_section_content_post_enable( $control ) {
	$content_type = $control->manager->get_setting( 'raise_charity_pro_theme_options[promotion_content_type]' )->value();
	return raise_charity_pro_is_promotion_section_enable( $control ) && ( 'post' == $content_type );
}

/**
 * Check if promotion section content type is page.
 *
 * @since raise_charity_pro 1.0.0
 * @param WP_Customize_Control $control WP_Customize_Control instance.
 * @return bool Whether the control is active to the current preview.
 */
function raise_charity_pro_is_promotion_section_content_page_enable( $control ) {
	$content_type = $control->manager->get_setting( 'raise_charity_pro_theme_options[promotion_content_type]' )->value();
	return raise_charity_pro_is_promotion_section_enable( $control ) && ( 'page' == $content_type );
}

/**
 * Check if promotion section content type is page.
 *
 * @since raise_charity_pro 1.0.0
 * @param WP_Customize_Control $control WP_Customize_Control instance.
 * @return bool Whether the control is active to the current preview.
 */
function raise_charity_pro_is_promotion_section_content_custom_enable( $control ) {
	$content_type = $control->manager->get_setting( 'raise_charity_pro_theme_options[promotion_content_type]' )->value();
	return raise_charity_pro_is_promotion_section_enable( $control ) && ( 'custom' == $content_type );
}

/*========================Gallery====================*/

/**
 * Check if gallery section is enabled.
 *
 * @since Raise Charity Pro 1.0.0
 * @param WP_Customize_Control $control WP_Customize_Control instance.
 * @return bool Whether the control is active to the current preview.
 */
function raise_charity_pro_is_gallery_section_enable( $control ) {
	return ( $control->manager->get_setting( 'raise_charity_pro_theme_options[gallery_section_enable]' )->value() );
}

/**
 * Check if gallery section content type is category.
 *
 * @since Raise Charity Pro 1.0.0
 * @param WP_Customize_Control $control WP_Customize_Control instance.
 * @return bool Whether the control is active to the current preview.
 */
function raise_charity_pro_is_gallery_section_content_category_enable( $control ) {
	$content_type = $control->manager->get_setting( 'raise_charity_pro_theme_options[gallery_content_type]' )->value();
	return raise_charity_pro_is_gallery_section_enable( $control ) && ( 'category' == $content_type );
}

/**
 * Check if gallery section content type is page.
 *
 * @since Raise Charity Pro 1.0.0
 * @param WP_Customize_Control $control WP_Customize_Control instance.
 * @return bool Whether the control is active to the current preview.
 */
function raise_charity_pro_is_gallery_section_content_page_enable( $control ) {
	$content_type = $control->manager->get_setting( 'raise_charity_pro_theme_options[gallery_content_type]' )->value();
	return raise_charity_pro_is_gallery_section_enable( $control ) && ( 'page' == $content_type );
}

/**
 * Check if gallery section content type is post.
 *
 * @since Raise Charity Pro 1.0.0
 * @param WP_Customize_Control $control WP_Customize_Control instance.
 * @return bool Whether the control is active to the current preview.
 */
function raise_charity_pro_is_gallery_section_content_post_enable( $control ) {
	$content_type = $control->manager->get_setting( 'raise_charity_pro_theme_options[gallery_content_type]' )->value();
	return raise_charity_pro_is_gallery_section_enable( $control ) && ( 'post' == $content_type );
}

/*===================Counter====================*/

/**
 * Check if counter section is enabled.
 *
 * @since Raise Charity Pro 1.0.0
 * @param WP_Customize_Control $control WP_Customize_Control instance.
 * @return bool Whether the control is active to the current preview.
 */
function raise_charity_pro_is_counter_section_enable( $control ) {
	return ( $control->manager->get_setting( 'raise_charity_pro_theme_options[counter_section_enable]' )->value() );
}

/*===============Team======================*/


/**
 * Check if team section is enabled.
 *
 * @since Raise Charity Pro 1.0.0
 * @param WP_Customize_Control $control WP_Customize_Control instance.
 * @return bool Whether the control is active to the current preview.
 */
function raise_charity_pro_is_team_section_enable( $control ) {
	return ( $control->manager->get_setting( 'raise_charity_pro_theme_options[team_section_enable]' )->value() );
}

/**
 * Check if team section content type is category.
 *
 * @since Raise Charity Pro 1.0.0
 * @param WP_Customize_Control $control WP_Customize_Control instance.
 * @return bool Whether the control is active to the current preview.
 */
function raise_charity_pro_is_team_section_content_category_enable( $control ) {
	$content_type = $control->manager->get_setting( 'raise_charity_pro_theme_options[team_content_type]' )->value();
	return raise_charity_pro_is_team_section_enable( $control ) && ( 'category' == $content_type );
}

/**
 * Check if team section content type is page.
 *
 * @since Raise Charity Pro 1.0.0
 * @param WP_Customize_Control $control WP_Customize_Control instance.
 * @return bool Whether the control is active to the current preview.
 */
function raise_charity_pro_is_team_section_content_page_enable( $control ) {
	$content_type = $control->manager->get_setting( 'raise_charity_pro_theme_options[team_content_type]' )->value();
	return raise_charity_pro_is_team_section_enable( $control ) && ( 'page' == $content_type );
}

/**
 * Check if team section content type is post.
 *
 * @since Raise Charity Pro 1.0.0
 * @param WP_Customize_Control $control WP_Customize_Control instance.
 * @return bool Whether the control is active to the current preview.
 */
function raise_charity_pro_is_team_section_content_post_enable( $control ) {
	$content_type = $control->manager->get_setting( 'raise_charity_pro_theme_options[team_content_type]' )->value();
	return raise_charity_pro_is_team_section_enable( $control ) && ( 'post' == $content_type );
}

/*==================Testimonial===================*/

/**
 * Check if testimonial section is enabled.
 *
 * @since Raise Charity Pro 1.0.0
 * @param WP_Customize_Control $control WP_Customize_Control instance.
 * @return bool Whether the control is active to the current preview.
 */
function raise_charity_pro_is_testimonial_section_enable( $control ) {
	return ( $control->manager->get_setting( 'raise_charity_pro_theme_options[testimonial_section_enable]' )->value() );
}

/**
 * Check if testimonial section content type is post.
 *
 * @since Raise Charity Pro 1.0.0
 * @param WP_Customize_Control $control WP_Customize_Control instance.
 * @return bool Whether the control is active to the current preview.
 */
function raise_charity_pro_is_testimonial_section_content_post_enable( $control ) {
	$content_type = $control->manager->get_setting( 'raise_charity_pro_theme_options[testimonial_content_type]' )->value();
	return raise_charity_pro_is_testimonial_section_enable( $control ) && ( 'post' == $content_type );
}

/**
 * Check if testimonial section content type is page.
 *
 * @since Raise Charity Pro 1.0.0
 * @param WP_Customize_Control $control WP_Customize_Control instance.
 * @return bool Whether the control is active to the current preview.
 */
function raise_charity_pro_is_testimonial_section_content_page_enable( $control ) {
	$content_type = $control->manager->get_setting( 'raise_charity_pro_theme_options[testimonial_content_type]' )->value();
	return raise_charity_pro_is_testimonial_section_enable( $control ) && ( 'page' == $content_type );
}

/**
 * Check if testimonial section content type is category.
 *
 * @since Raise Charity Pro 1.0.0
 * @param WP_Customize_Control $control WP_Customize_Control instance.
 * @return bool Whether the control is active to the current preview.
 */
function raise_charity_pro_is_testimonial_section_content_category_enable( $control ) {
	$content_type = $control->manager->get_setting( 'raise_charity_pro_theme_options[testimonial_content_type]' )->value();
	return raise_charity_pro_is_testimonial_section_enable( $control ) && ( 'category' == $content_type );
}

/*=========================Latest Posts==================*/

/**
 * Check if latest_posts section is enabled.
 *
 * @since Raise Charity Pro 1.0.0
 * @param WP_Customize_Control $control WP_Customize_Control instance.
 * @return bool Whether the control is active to the current preview.
 */
function raise_charity_pro_is_latest_posts_section_enable( $control ) {
	return ( $control->manager->get_setting( 'raise_charity_pro_theme_options[latest_posts_section_enable]' )->value() );
}

/**
 * Check if latest_posts section content type is category.
 *
 * @since Raise Charity Pro 1.0.0
 * @param WP_Customize_Control $control WP_Customize_Control instance.
 * @return bool Whether the control is active to the current preview.
 */
function raise_charity_pro_is_latest_posts_section_content_category_enable( $control ) {
	$content_type = $control->manager->get_setting( 'raise_charity_pro_theme_options[latest_posts_content_type]' )->value();
	return raise_charity_pro_is_latest_posts_section_enable( $control ) && ( 'category' == $content_type );
}

/**
 * Check if latest_posts section content type is page.
 *
 * @since Raise Charity Pro 1.0.0
 * @param WP_Customize_Control $control WP_Customize_Control instance.
 * @return bool Whether the control is active to the current preview.
 */
function raise_charity_pro_is_latest_posts_section_content_page_enable( $control ) {
	$content_type = $control->manager->get_setting( 'raise_charity_pro_theme_options[latest_posts_content_type]' )->value();
	return raise_charity_pro_is_latest_posts_section_enable( $control ) && ( 'page' == $content_type );
}

/**
 * Check if latest_posts section content type is post.
 *
 * @since Raise Charity Pro 1.0.0
 * @param WP_Customize_Control $control WP_Customize_Control instance.
 * @return bool Whether the control is active to the current preview.
 */
function raise_charity_pro_is_latest_posts_section_content_post_enable( $control ) {
	$content_type = $control->manager->get_setting( 'raise_charity_pro_theme_options[latest_posts_content_type]' )->value();
	return raise_charity_pro_is_latest_posts_section_enable( $control ) && ( 'post' == $content_type );
}

/*==================Contact Us===============*/

/**
 * Check if contact section is enabled.
 *
 * @since Raise Charity Pro 1.0.0
 * @param WP_Customize_Control $control WP_Customize_Control instance.
 * @return bool Whether the control is active to the current preview.
 */
function raise_charity_pro_is_contact_section_enable( $control ) {
	return ( $control->manager->get_setting( 'raise_charity_pro_theme_options[contact_section_enable]' )->value() );
}

/*==================Sponser===============*/

/**
 * Check if sponsor section is enabled.
 *
 * @since Raise Charity Pro 1.0.0
 * @param WP_Customize_Control $control WP_Customize_Control instance.
 * @return bool Whether the control is active to the current preview.
 */
function raise_charity_pro_is_sponsor_section_enable( $control ) {
	return ( $control->manager->get_setting( 'raise_charity_pro_theme_options[sponsor_section_enable]' )->value() );
}

/*==================CTA=====================*/

/**
 * Check if cta section is enabled.
 *
 * @since Raise Charity Pro 1.0.0
 * @param WP_Customize_Control $control WP_Customize_Control instance.
 * @return bool Whether the control is active to the current preview.
 */
function raise_charity_pro_is_cta_section_enable( $control ) {
	return ( $control->manager->get_setting( 'raise_charity_pro_theme_options[cta_section_enable]' )->value() );
}

/**
 * Check if cta section content type is post.
 *
 * @since Raise Charity Pro 1.0.0
 * @param WP_Customize_Control $control WP_Customize_Control instance.
 * @return bool Whether the control is active to the current preview.
 */
function raise_charity_pro_is_cta_section_content_post_enable( $control ) {
	$content_type = $control->manager->get_setting( 'raise_charity_pro_theme_options[cta_content_type]' )->value();
	return raise_charity_pro_is_cta_section_enable( $control ) && ( 'post' == $content_type );
}

/**
 * Check if cta section content type is page.
 *
 * @since Raise Charity Pro 1.0.0
 * @param WP_Customize_Control $control WP_Customize_Control instance.
 * @return bool Whether the control is active to the current preview.
 */
function raise_charity_pro_is_cta_section_content_page_enable( $control ) {
	$content_type = $control->manager->get_setting( 'raise_charity_pro_theme_options[cta_content_type]' )->value();
	return raise_charity_pro_is_cta_section_enable( $control ) && ( 'page' == $content_type );
}

/**
 * Check if cta section content type is custom.
 *
 * @since Raise Charity Pro 1.0.0
 * @param WP_Customize_Control $control WP_Customize_Control instance.
 * @return bool Whether the control is active to the current preview.
 */
function raise_charity_pro_is_cta_section_content_custom_enable( $control ) {
	$content_type = $control->manager->get_setting( 'raise_charity_pro_theme_options[cta_content_type]' )->value();
	return raise_charity_pro_is_cta_section_enable( $control ) && ( 'custom' == $content_type );
}

/*===================Skills====================*/

/**
 * Check if skills section is enabled.
 *
 * @since Raise Charity Pro 1.0.0
 * @param WP_Customize_Control $control WP_Customize_Control instance.
 * @return bool Whether the control is active to the current preview.
 */
function raise_charity_pro_is_skills_section_enable( $control ) {
	return ( $control->manager->get_setting( 'raise_charity_pro_theme_options[skills_section_enable]' )->value() );
}

/*=========================Courses==================*/

/**
 * Check if courses section is enabled.
 *
 * @since Raise Charity Pro 1.0.0
 * @param WP_Customize_Control $control WP_Customize_Control instance.
 * @return bool Whether the control is active to the current preview.
 */
function raise_charity_pro_is_courses_section_enable( $control ) {
	return ( $control->manager->get_setting( 'raise_charity_pro_theme_options[courses_section_enable]' )->value() );
}

/**
 * Check if courses section content type is category.
 *
 * @since Raise Charity Pro 1.0.0
 * @param WP_Customize_Control $control WP_Customize_Control instance.
 * @return bool Whether the control is active to the current preview.
 */
function raise_charity_pro_is_courses_section_content_category_enable( $control ) {
	$content_type = $control->manager->get_setting( 'raise_charity_pro_theme_options[courses_content_type]' )->value();
	return raise_charity_pro_is_courses_section_enable( $control ) && ( 'category' == $content_type );
}

/**
 * Check if courses section content type is page.
 *
 * @since Raise Charity Pro 1.0.0
 * @param WP_Customize_Control $control WP_Customize_Control instance.
 * @return bool Whether the control is active to the current preview.
 */
function raise_charity_pro_is_courses_section_content_page_enable( $control ) {
	$content_type = $control->manager->get_setting( 'raise_charity_pro_theme_options[courses_content_type]' )->value();
	return raise_charity_pro_is_courses_section_enable( $control ) && ( 'page' == $content_type );
}

/**
 * Check if courses section content type is post.
 *
 * @since Raise Charity Pro 1.0.0
 * @param WP_Customize_Control $control WP_Customize_Control instance.
 * @return bool Whether the control is active to the current preview.
 */
function raise_charity_pro_is_courses_section_content_post_enable( $control ) {
	$content_type = $control->manager->get_setting( 'raise_charity_pro_theme_options[courses_content_type]' )->value();
	return raise_charity_pro_is_courses_section_enable( $control ) && ( 'post' == $content_type );
}

/*=========================Featured Posts==================*/

/**
 * Check if featured_posts section is enabled.
 *
 * @since Raise Charity Pro 1.0.0
 * @param WP_Customize_Control $control WP_Customize_Control instance.
 * @return bool Whether the control is active to the current preview.
 */
function raise_charity_pro_is_featured_posts_section_enable( $control ) {
	return ( $control->manager->get_setting( 'raise_charity_pro_theme_options[featured_posts_section_enable]' )->value() );
}

/**
 * Check if featured_posts section content type is category.
 *
 * @since Raise Charity Pro 1.0.0
 * @param WP_Customize_Control $control WP_Customize_Control instance.
 * @return bool Whether the control is active to the current preview.
 */
function raise_charity_pro_is_featured_posts_section_content_category_enable( $control ) {
	$content_type = $control->manager->get_setting( 'raise_charity_pro_theme_options[featured_posts_content_type]' )->value();
	return raise_charity_pro_is_featured_posts_section_enable( $control ) && ( 'category' == $content_type );
}

/**
 * Check if featured_posts section content type is page.
 *
 * @since Raise Charity Pro 1.0.0
 * @param WP_Customize_Control $control WP_Customize_Control instance.
 * @return bool Whether the control is active to the current preview.
 */
function raise_charity_pro_is_featured_posts_section_content_page_enable( $control ) {
	$content_type = $control->manager->get_setting( 'raise_charity_pro_theme_options[featured_posts_content_type]' )->value();
	return raise_charity_pro_is_featured_posts_section_enable( $control ) && ( 'page' == $content_type );
}

/**
 * Check if featured_posts section content type is post.
 *
 * @since Raise Charity Pro 1.0.0
 * @param WP_Customize_Control $control WP_Customize_Control instance.
 * @return bool Whether the control is active to the current preview.
 */
function raise_charity_pro_is_featured_posts_section_content_post_enable( $control ) {
	$content_type = $control->manager->get_setting( 'raise_charity_pro_theme_options[featured_posts_content_type]' )->value();
	return raise_charity_pro_is_featured_posts_section_enable( $control ) && ( 'post' == $content_type );
}

/*=========================Popular Posts==================*/

/**
 * Check if popular_posts section is enabled.
 *
 * @since Raise Charity Pro 1.0.0
 * @param WP_Customize_Control $control WP_Customize_Control instance.
 * @return bool Whether the control is active to the current preview.
 */
function raise_charity_pro_is_popular_posts_section_enable( $control ) {
	return ( $control->manager->get_setting( 'raise_charity_pro_theme_options[popular_posts_section_enable]' )->value() );
}

/**
 * Check if popular_posts section content type is category.
 *
 * @since Raise Charity Pro 1.0.0
 * @param WP_Customize_Control $control WP_Customize_Control instance.
 * @return bool Whether the control is active to the current preview.
 */
function raise_charity_pro_is_popular_posts_section_content_category_enable( $control ) {
	$content_type = $control->manager->get_setting( 'raise_charity_pro_theme_options[popular_posts_content_type]' )->value();
	return raise_charity_pro_is_popular_posts_section_enable( $control ) && ( 'category' == $content_type );
}

/**
 * Check if popular_posts section content type is page.
 *
 * @since Raise Charity Pro 1.0.0
 * @param WP_Customize_Control $control WP_Customize_Control instance.
 * @return bool Whether the control is active to the current preview.
 */
function raise_charity_pro_is_popular_posts_section_content_page_enable( $control ) {
	$content_type = $control->manager->get_setting( 'raise_charity_pro_theme_options[popular_posts_content_type]' )->value();
	return raise_charity_pro_is_popular_posts_section_enable( $control ) && ( 'page' == $content_type );
}

/**
 * Check if popular_posts section content type is post.
 *
 * @since Raise Charity Pro 1.0.0
 * @param WP_Customize_Control $control WP_Customize_Control instance.
 * @return bool Whether the control is active to the current preview.
 */
function raise_charity_pro_is_popular_posts_section_content_post_enable( $control ) {
	$content_type = $control->manager->get_setting( 'raise_charity_pro_theme_options[popular_posts_content_type]' )->value();
	return raise_charity_pro_is_popular_posts_section_enable( $control ) && ( 'post' == $content_type );
}

/*=========================Recent Posts==================*/

/**
 * Check if recent_posts section is enabled.
 *
 * @since Raise Charity Pro 1.0.0
 * @param WP_Customize_Control $control WP_Customize_Control instance.
 * @return bool Whether the control is active to the current preview.
 */
function raise_charity_pro_is_recent_posts_section_enable( $control ) {
	return ( $control->manager->get_setting( 'raise_charity_pro_theme_options[recent_posts_section_enable]' )->value() );
}

/**
 * Check if recent_posts section content type is category.
 *
 * @since Raise Charity Pro 1.0.0
 * @param WP_Customize_Control $control WP_Customize_Control instance.
 * @return bool Whether the control is active to the current preview.
 */
function raise_charity_pro_is_recent_posts_section_content_category_enable( $control ) {
	$content_type = $control->manager->get_setting( 'raise_charity_pro_theme_options[recent_posts_content_type]' )->value();
	return raise_charity_pro_is_recent_posts_section_enable( $control ) && ( 'category' == $content_type );
}

/**
 * Check if recent_posts section content type is page.
 *
 * @since Raise Charity Pro 1.0.0
 * @param WP_Customize_Control $control WP_Customize_Control instance.
 * @return bool Whether the control is active to the current preview.
 */
function raise_charity_pro_is_recent_posts_section_content_page_enable( $control ) {
	$content_type = $control->manager->get_setting( 'raise_charity_pro_theme_options[recent_posts_content_type]' )->value();
	return raise_charity_pro_is_recent_posts_section_enable( $control ) && ( 'page' == $content_type );
}

/**
 * Check if recent_posts section content type is post.
 *
 * @since Raise Charity Pro 1.0.0
 * @param WP_Customize_Control $control WP_Customize_Control instance.
 * @return bool Whether the control is active to the current preview.
 */
function raise_charity_pro_is_recent_posts_section_content_post_enable( $control ) {
	$content_type = $control->manager->get_setting( 'raise_charity_pro_theme_options[recent_posts_content_type]' )->value();
	return raise_charity_pro_is_recent_posts_section_enable( $control ) && ( 'post' == $content_type );
}

/*=================Latest Products====================*/

/**
 * Check if product section is enabled.
 *
 * @since Raise Charity Pro 1.0.0
 * @param WP_Customize_Control $control WP_Customize_Control instance.
 * @return bool Whether the control is active to the current preview.
 */
function raise_charity_pro_is_latest_products_section_enable( $control ) {
	return ( $control->manager->get_setting( 'raise_charity_pro_theme_options[latest_products_section_enable]' )->value() ) && class_exists( 'WooCommerce' );
}

/*=================Popular Products================*/

/**
 * Check if popular_products section is enabled.
 *
 * @since Raise Charity Pro 1.0.0
 * @param WP_Customize_Control $control WP_Customize_Control instance.
 * @return bool Whether the control is active to the current preview.
 */
function raise_charity_pro_is_popular_products_section_enable( $control ) {
	return ( $control->manager->get_setting( 'raise_charity_pro_theme_options[popular_products_section_enable]' )->value() );
}

function raise_charity_pro_is_popular_products_section_content_product_enable( $control ) {
	$content_type = $control->manager->get_setting( 'raise_charity_pro_theme_options[popular_products_content_type]' )->value();
	return raise_charity_pro_is_popular_products_section_enable( $control ) && ( 'product' == $content_type );
}

function raise_charity_pro_is_popular_products_section_content_product_category_enable( $control ) {
	$content_type = $control->manager->get_setting( 'raise_charity_pro_theme_options[popular_products_content_type]' )->value();
	return raise_charity_pro_is_popular_products_section_enable( $control ) && ( 'product-category' == $content_type );
}

/*=================Products Collection================*/

/**
 * Check if product collection section is enabled.
 *
 * @since Raise Charity Pro 1.0.0
 * @param WP_Customize_Control $control WP_Customize_Control instance.
 * @return bool Whether the control is active to the current preview.
 */
function raise_charity_pro_is_collection_section_enable( $control ) {
	return ( $control->manager->get_setting( 'raise_charity_pro_theme_options[collection_section_enable]' )->value() ) && class_exists( 'WooCommerce' );
}

/*=================recent product================*/
/**
 * Check if recent_products section is enabled.
 *
 * @since Raise Charity Pro 1.0.0
 * @param WP_Customize_Control $control WP_Customize_Control instance.
 * @return bool Whether the control is active to the current preview.
 */
function raise_charity_pro_is_recent_products_section_enable( $control ) {
	return ( $control->manager->get_setting( 'raise_charity_pro_theme_options[recent_products_section_enable]' )->value() );
}

function raise_charity_pro_is_recent_products_section_content_product_enable( $control ) {
	$content_type = $control->manager->get_setting( 'raise_charity_pro_theme_options[recent_products_content_type]' )->value();
	return raise_charity_pro_is_recent_products_section_enable( $control ) && ( 'product' == $content_type );
}

function raise_charity_pro_is_recent_products_section_content_product_category_enable( $control ) {
	$content_type = $control->manager->get_setting( 'raise_charity_pro_theme_options[recent_products_content_type]' )->value();
	return raise_charity_pro_is_recent_products_section_enable( $control ) && ( 'product-category' == $content_type );
}

/*=================Featured Products================*/

/**
 * Check if featured_products section is enabled.
 *
 * @since Raise Charity Pro 1.0.0
 * @param WP_Customize_Control $control WP_Customize_Control instance.
 * @return bool Whether the control is active to the current preview.
 */
function raise_charity_pro_is_featured_products_section_enable( $control ) {
	return ( $control->manager->get_setting( 'raise_charity_pro_theme_options[featured_products_section_enable]' )->value() ) && class_exists( 'WooCommerce' );
}

/*=================Trending Product================*/

function raise_charity_pro_is_trending_product_section_enable( $control ) {
	return ( $control->manager->get_setting( 'raise_charity_pro_theme_options[trending_product_section_enable]' )->value() );
}

/**
 * Check if trending_product section content type is post.
 *
 * @since musicsong Pro 1.0.0
 * @param WP_Customize_Control $control WP_Customize_Control instance.
 * @return bool Whether the control is active to the current preview.
 */

function raise_charity_pro_is_trending_product_section_content_category_enable_1( $control ) {
	$content_type = $control->manager->get_setting( 'raise_charity_pro_theme_options[trending_content_type_1]' )->value();
	return raise_charity_pro_is_trending_product_section_enable( $control ) && ( 'product_cat' == $content_type );
}

function raise_charity_pro_is_trending_product_section_content_category_enable_2( $control ) {
	$content_type = $control->manager->get_setting( 'raise_charity_pro_theme_options[trending_content_type_2]' )->value();
	return raise_charity_pro_is_trending_product_section_enable( $control ) && ( 'product_cat' == $content_type );
}

function raise_charity_pro_is_trending_product_section_content_category_enable_3( $control ) {
	$content_type = $control->manager->get_setting( 'raise_charity_pro_theme_options[trending_content_type_3]' )->value();
	return raise_charity_pro_is_trending_product_section_enable( $control ) && ( 'product_cat' == $content_type );
}

function raise_charity_pro_is_trending_product_section_content_product_enable_1( $control ) {
		$content_type = $control->manager->get_setting( 'raise_charity_pro_theme_options[trending_content_type_1]' )->value();
	return raise_charity_pro_is_trending_product_section_enable( $control ) && ( 'product' == $content_type );
}

function raise_charity_pro_is_trending_product_section_content_product_enable_2( $control ) {
	$content_type = $control->manager->get_setting( 'raise_charity_pro_theme_options[trending_content_type_2]' )->value();
	return raise_charity_pro_is_trending_product_section_enable( $control ) && ( 'product' == $content_type );
}

function raise_charity_pro_is_trending_product_section_content_product_enable_3( $control ) {
	$content_type = $control->manager->get_setting( 'raise_charity_pro_theme_options[trending_content_type_3]' )->value();
	return raise_charity_pro_is_trending_product_section_enable( $control ) && ( 'product' == $content_type );
}

//all layout 
function raise_charity_pro_is_all_layout( $control ) {
	$design = $control->manager->get_setting( 'raise_charity_pro_theme_options[home_layout]' )->value();
	return ( 'all-design' == $design );
}

//pro layout 
function raise_charity_pro_is_default_layout( $control ) {
	$design = $control->manager->get_setting( 'raise_charity_pro_theme_options[home_layout]' )->value();
	return ( 'default-design' == $design );
}

//second layout 
function raise_charity_pro_is_second_layout( $control ) {
	$design = $control->manager->get_setting( 'raise_charity_pro_theme_options[home_layout]' )->value();
	return ( 'second-design' == $design );
}

//third layout 
function raise_charity_pro_is_third_layout( $control ) {
	$design = $control->manager->get_setting( 'raise_charity_pro_theme_options[home_layout]' )->value();
	return ( 'third-design' == $design );
}


//fourth layout 
function raise_charity_pro_is_fourth_layout( $control ) {
	$design = $control->manager->get_setting( 'raise_charity_pro_theme_options[home_layout]' )->value();
	return ( 'fourth-design' == $design );
}

//fifth layout 
function raise_charity_pro_is_fifth_layout( $control ) {
	$design = $control->manager->get_setting( 'raise_charity_pro_theme_options[home_layout]' )->value();
	return ( 'fifth-design' == $design );
}

//sixth layout 
function raise_charity_pro_is_sixth_layout( $control ) {
	$design = $control->manager->get_setting( 'raise_charity_pro_theme_options[home_layout]' )->value();
	return ( 'sixth-design' == $design );
}

//seventh layout 
function raise_charity_pro_is_seventh_layout( $control ) {
	$design = $control->manager->get_setting( 'raise_charity_pro_theme_options[home_layout]' )->value();
	return ( 'seventh-design' == $design );
}
