<?php

/**
 * Active Callbacks
 *
 * @package Charity_Elite
 */

// Theme Options.
function charity_elite_is_pagination_enabled( $control ) {
	return ( $control->manager->get_setting( 'charity_elite_enable_pagination' )->value() );
}
function charity_elite_is_breadcrumb_enabled( $control ) {
	return ( $control->manager->get_setting( 'charity_elite_enable_breadcrumb' )->value() );
}

// Header Options.
function charity_elite_is_topbar_enabled( $control ) {
	return ( $control->manager->get_Setting( 'charity_elite_enable_topbar' )->value() );
}

// Banner Slider Section.
function charity_elite_is_banner_slider_section_enabled( $control ) {
	return ( $control->manager->get_setting( 'charity_elite_enable_banner_section' )->value() );
}
function charity_elite_is_banner_slider_section_and_content_type_post_enabled( $control ) {
	$content_type = $control->manager->get_setting( 'charity_elite_banner_slider_content_type' )->value();
	return ( charity_elite_is_banner_slider_section_enabled( $control ) && ( 'post' === $content_type ) );
}
function charity_elite_is_banner_slider_section_and_content_type_page_enabled( $control ) {
	$content_type = $control->manager->get_setting( 'charity_elite_banner_slider_content_type' )->value();
	return ( charity_elite_is_banner_slider_section_enabled( $control ) && ( 'page' === $content_type ) );
}

// About section.
function charity_elite_is_about_section_enabled( $control ) {
	return ( $control->manager->get_setting( 'charity_elite_enable_about_section' )->value() );
}
function charity_elite_is_about_section_and_content_type_post_enabled( $control ) {
	$content_type = $control->manager->get_setting( 'charity_elite_about_content_type' )->value();
	return ( charity_elite_is_about_section_enabled( $control ) && ( 'post' === $content_type ) );
}
function charity_elite_is_about_section_and_content_type_page_enabled( $control ) {
	$content_type = $control->manager->get_setting( 'charity_elite_about_content_type' )->value();
	return ( charity_elite_is_about_section_enabled( $control ) && ( 'page' === $content_type ) );
}

// Service section.
function charity_elite_is_service_section_enabled( $control ) {
	return ( $control->manager->get_setting( 'charity_elite_enable_service_section' )->value() );
}
function charity_elite_is_service_section_and_content_type_post_enabled( $control ) {
	$content_type = $control->manager->get_setting( 'charity_elite_service_content_type' )->value();
	return ( charity_elite_is_service_section_enabled( $control ) && ( 'post' === $content_type ) );
}
function charity_elite_is_service_section_and_content_type_page_enabled( $control ) {
	$content_type = $control->manager->get_setting( 'charity_elite_service_content_type' )->value();
	return ( charity_elite_is_service_section_enabled( $control ) && ( 'page' === $content_type ) );
}

// Causes section.
function charity_elite_is_causes_section_enabled( $control ) {
	return ( $control->manager->get_setting( 'charity_elite_enable_causes_section' )->value() );
}

// Blog section.
function charity_elite_is_blog_section_enabled( $control ) {
	return ( $control->manager->get_setting( 'charity_elite_enable_blog_section' )->value() );
}
function charity_elite_is_blog_section_and_content_type_post_enabled( $control ) {
	$content_type = $control->manager->get_setting( 'charity_elite_blog_content_type' )->value();
	return ( charity_elite_is_blog_section_enabled( $control ) && ( 'post' === $content_type ) );
}
function charity_elite_is_blog_section_and_content_type_category_enabled( $control ) {
	$content_type = $control->manager->get_setting( 'charity_elite_blog_content_type' )->value();
	return ( charity_elite_is_blog_section_enabled( $control ) && ( 'category' === $content_type ) );
}

// Counter section.
function charity_elite_is_counter_section_enabled( $control ) {
	return ( $control->manager->get_setting( 'charity_elite_enable_counter_section' )->value() );
}

// Mission section.
function charity_elite_is_mission_section_enabled( $control ) {
	return ( $control->manager->get_setting( 'charity_elite_enable_mission_section' )->value() );
}
function charity_elite_is_mission_section_and_content_type_post_enabled( $control ) {
	$content_type = $control->manager->get_setting( 'charity_elite_mission_content_type' )->value();
	return ( charity_elite_is_mission_section_enabled( $control ) && ( 'post' === $content_type ) );
}
function charity_elite_is_mission_section_and_content_type_page_enabled( $control ) {
	$content_type = $control->manager->get_setting( 'charity_elite_mission_content_type' )->value();
	return ( charity_elite_is_mission_section_enabled( $control ) && ( 'page' === $content_type ) );
}

// Video section.
function charity_elite_is_video_section_enabled( $control ) {
	return ( $control->manager->get_setting( 'charity_elite_enable_video_section' )->value() );
}
