<?php
/**
 * Active callback functions.
 *
 * @package Universal Preschool
 */

function universal_preschool_featured_slider_active( $control ) {
    if( $control->manager->get_setting( 'theme_options[enable_featured_slider_section]' )->value() == true ) {
        return true;
    }else{
        return false;
    }
}

function universal_preschool_featured_slider_page( $control ) {
    $content_type = $control->manager->get_setting( 'theme_options[featured_slider_content_type]' )->value();
    return ( universal_preschool_featured_slider_active( $control ) && ( 'featured_slider_page' == $content_type ) );
}

function universal_preschool_featured_slider_post( $control ) {
    $content_type = $control->manager->get_setting( 'theme_options[featured_slider_content_type]' )->value();
    return ( universal_preschool_featured_slider_active( $control ) && ( 'featured_slider_post' == $content_type ) );
}

function universal_preschool_featured_services_active( $control ) {
    if( $control->manager->get_setting( 'theme_options[enable_featured_services_section]' )->value() == true ) {
        return true;
    }else{
        return false;
    }
}

function universal_preschool_featured_services_page( $control ) {
    $content_type = $control->manager->get_setting( 'theme_options[featured_services_content_type]' )->value();
    return ( universal_preschool_featured_services_active( $control ) && ( 'featured_services_page' == $content_type ) );
}

function universal_preschool_featured_services_post( $control ) {
    $content_type = $control->manager->get_setting( 'theme_options[featured_services_content_type]' )->value();
    return ( universal_preschool_featured_services_active( $control ) && ( 'featured_services_post' == $content_type ) );
}

function universal_preschool_featured_gallery_active( $control ) {
    if( $control->manager->get_setting( 'theme_options[enable_featured_gallery_section]' )->value() == true ) {
        return true;
    }else{
        return false;
    }
}

function universal_preschool_featured_gallery_page( $control ) {
    $content_type = $control->manager->get_setting( 'theme_options[featured_gallery_content_type]' )->value();
    return ( universal_preschool_featured_gallery_active( $control ) && ( 'featured_gallery_page' == $content_type ) );
}

function universal_preschool_featured_gallery_post( $control ) {
    $content_type = $control->manager->get_setting( 'theme_options[featured_gallery_content_type]' )->value();
    return ( universal_preschool_featured_gallery_active( $control ) && ( 'featured_gallery_post' == $content_type ) );
}

function universal_preschool_featured_classes_active( $control ) {
    if( $control->manager->get_setting( 'theme_options[enable_featured_classes_section]' )->value() == true ) {
        return true;
    }else{
        return false;
    }
}

function universal_preschool_featured_classes_page( $control ) {
    $content_type = $control->manager->get_setting( 'theme_options[featured_classes_content_type]' )->value();
    return ( universal_preschool_featured_classes_active( $control ) && ( 'featured_classes_page' == $content_type ) );
}

function universal_preschool_featured_classes_post( $control ) {
    $content_type = $control->manager->get_setting( 'theme_options[featured_classes_content_type]' )->value();
    return ( universal_preschool_featured_classes_active( $control ) && ( 'featured_classes_post' == $content_type ) );
}

function universal_preschool_featured_team_active( $control ) {
    if( $control->manager->get_setting( 'theme_options[enable_featured_team_section]' )->value() == true ) {
        return true;
    }else{
        return false;
    }
}

function universal_preschool_featured_team_page( $control ) {
    $content_type = $control->manager->get_setting( 'theme_options[featured_team_content_type]' )->value();
    return ( universal_preschool_featured_team_active( $control ) && ( 'featured_team_page' == $content_type ) );
}

function universal_preschool_featured_team_post( $control ) {
    $content_type = $control->manager->get_setting( 'theme_options[featured_team_content_type]' )->value();
    return ( universal_preschool_featured_team_active( $control ) && ( 'featured_team_post' == $content_type ) );
}

function universal_preschool_blog_active( $control ) {
    if( $control->manager->get_setting( 'theme_options[enable_blog_section]' )->value() == true ) {
        return true;
    }else{
        return false;
    }
}