<?php
/**
 * Active Callbacks
 *
 * @package online_school_courses
 */

// Theme Options.
function online_school_courses_is_pagination_enabled( $online_school_courses_control ) {
	return ( $online_school_courses_control->manager->get_setting( 'online_school_courses_enable_pagination' )->value() );
}
function online_school_courses_is_breadcrumb_enabled( $online_school_courses_control ) {
	return ( $online_school_courses_control->manager->get_setting( 'online_school_courses_enable_breadcrumb' )->value() );
}
function online_school_courses_is_layout_enabled( $online_school_courses_control ) {
	return ( $online_school_courses_control->manager->get_setting( 'online_school_courses_website_layout' )->value() );
}
function online_school_courses_is_pagetitle_bcakground_image_enabled( $online_school_courses_control ) {
	return ( $online_school_courses_control->manager->get_setting( 'online_school_courses_page_header_style' )->value() );
}
function online_school_courses_is_preloader_style( $online_school_courses_control ) {
	return ( $online_school_courses_control->manager->get_setting( 'online_school_courses_enable_preloader' )->value() );
}

// Header Options.
function online_school_courses_is_topbar_enabled( $online_school_courses_control ) {
	return ( $online_school_courses_control->manager->get_Setting( 'online_school_courses_enable_topbar' )->value() );
}

// Banner Slider Section.
function online_school_courses_is_banner_slider_section_enabled( $online_school_courses_control ) {
	return ( $online_school_courses_control->manager->get_setting( 'online_school_courses_enable_banner_section' )->value() );
}
function online_school_courses_is_banner_slider_section_and_content_type_post_enabled( $online_school_courses_control ) {
	$online_school_courses_content_type = $online_school_courses_control->manager->get_setting( 'online_school_courses_banner_slider_content_type' )->value();
	return ( online_school_courses_is_banner_slider_section_enabled( $online_school_courses_control ) && ( 'post' === $online_school_courses_content_type ) );
}
function online_school_courses_is_banner_slider_section_and_content_type_page_enabled( $online_school_courses_control ) {
	$online_school_courses_content_type = $online_school_courses_control->manager->get_setting( 'online_school_courses_banner_slider_content_type' )->value();
	return ( online_school_courses_is_banner_slider_section_enabled( $online_school_courses_control ) && ( 'page' === $online_school_courses_content_type ) );
}

// Service section.
function online_school_courses_is_post_tab_section_and_content_type_page_enabled( $online_school_courses_control ) {
	$online_school_courses_content_type = $online_school_courses_control->manager->get_setting( 'online_school_courses_banner_slider_content_type' )->value();
	return ( online_school_courses_is_banner_slider_section_enabled( $online_school_courses_control ) && ( 'page' === $online_school_courses_content_type ) );
}
function online_school_courses_is_post_tab_section_and_content_type_post_enabled( $online_school_courses_control ) {
	$online_school_courses_content_type = $online_school_courses_control->manager->get_setting( 'online_school_courses_banner_slider_content_type' )->value();
	return ( online_school_courses_is_banner_slider_section_enabled( $online_school_courses_control ) && ( 'post' === $online_school_courses_content_type ) );
}
function online_school_courses_is_service_section_enabled( $online_school_courses_control ) {
	return ( $online_school_courses_control->manager->get_setting( 'online_school_courses_enable_service_section' )->value() );
}
function online_school_courses_is_service_section_and_content_type_post_enabled( $online_school_courses_control ) {
	$online_school_courses_content_type = $online_school_courses_control->manager->get_setting( 'online_school_courses_service_content_type' )->value();
	return ( online_school_courses_is_service_section_enabled( $online_school_courses_control ) && ( 'post' === $online_school_courses_content_type ) );
}
function online_school_courses_is_service_section_and_content_type_page_enabled( $online_school_courses_control ) {
	$online_school_courses_content_type = $online_school_courses_control->manager->get_setting( 'online_school_courses_service_content_type' )->value();
	return ( online_school_courses_is_service_section_enabled( $online_school_courses_control ) && ( 'page' === $online_school_courses_content_type ) );
}