<?php

/**
 * Active Callbacks
 *
 * @package Fuzion_Blog
 */

// Theme Options.
function fuzion_blog_is_pagination_enabled( $control ) {
	return ( $control->manager->get_setting( 'fuzion_blog_enable_pagination' )->value() );
}
function fuzion_blog_is_breadcrumb_enabled( $control ) {
	return ( $control->manager->get_setting( 'fuzion_blog_enable_breadcrumb' )->value() );
}

// Banner Slider Section.
function fuzion_blog_is_slider_section_enabled( $control ) {
	return ( $control->manager->get_setting( 'fuzion_blog_enable_slider_section' )->value() );
}
function fuzion_blog_is_slider_section_and_content_type_post_enabled( $control ) {
	$content_type = $control->manager->get_setting( 'fuzion_blog_slider_content_type' )->value();
	return ( fuzion_blog_is_slider_section_enabled( $control ) && ( 'post' === $content_type ) );
}
function fuzion_blog_is_slider_section_and_content_type_page_enabled( $control ) {
	$content_type = $control->manager->get_setting( 'fuzion_blog_slider_content_type' )->value();
	return ( fuzion_blog_is_slider_section_enabled( $control ) && ( 'page' === $content_type ) );
}

// Grid Carousel Section.
function fuzion_blog_is_grid_carousel_section_enabled( $control ) {
	return ( $control->manager->get_setting( 'fuzion_blog_enable_grid_carousel_section' )->value() );
}
function fuzion_blog_is_grid_carousel_section_and_content_type_post_enabled( $control ) {
	$content_type = $control->manager->get_setting( 'fuzion_blog_grid_carousel_content_type' )->value();
	return ( fuzion_blog_is_grid_carousel_section_enabled( $control ) && ( 'post' === $content_type ) );
}
function fuzion_blog_is_grid_carousel_section_and_content_type_category_enabled( $control ) {
	$content_type = $control->manager->get_setting( 'fuzion_blog_grid_carousel_content_type' )->value();
	return ( fuzion_blog_is_grid_carousel_section_enabled( $control ) && ( 'category' === $content_type ) );
}
