b0y-101 Mini Shell


Current Path : E:/www2/tcas/wp-content/themes/businesszen/inc/customizer/
File Upload :
Current File : E:/www2/tcas/wp-content/themes/businesszen/inc/customizer/active-callback.php

<?php
/**
 * Customizer active callbacks
 *
 * @package Theme Palace
 * @subpackage Businesszen
 * @since Businesszen 1.0.0
 */

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

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

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

//topbar
/**
 * Check if topbar section is enabled.
 *
 * @since Businesszen 1.0.0
 * @param WP_Customize_Control $control WP_Customize_Control instance.
 * @return bool Whether the control is active to the current preview.
 */
function businesszen_is_topbar_section_enable( $control ) {
	return ( $control->manager->get_setting( 'businesszen_theme_options[topbar_section_enable]' )->value() );
}



/**
 * Front Page Active Callbacks
 */

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

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

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

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

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

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

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

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

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

/*==================Features===============*/

/**
 * Check if features section is enabled.
 *
 * @since Businesszen 1.0.0
 * @param WP_Customize_Control $control WP_Customize_Control instance.
 * @return bool Whether the control is active to the current preview.
 */
function businesszen_is_features_section_enable( $control ) {
	return ( $control->manager->get_setting( 'businesszen_theme_options[features_section_enable]' )->value() );
}

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

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

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

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

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

/////////////////////////

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

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

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

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

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

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

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

Copyright © 2019 by b0y-101