<?php
/**
 * Active callback functions.
 *
 * @package Equestrian Club
 */

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

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

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


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

function equestrian_club_featured_courses_page( $control ) {
    $content_type = $control->manager->get_setting( 'theme_options[featured_courses_content_type]' )->value();
    return ( equestrian_club_featured_courses_active( $control ) && ( 'featured_courses_page' == $content_type ) );
}

function equestrian_club_featured_courses_post( $control ) {
    $content_type = $control->manager->get_setting( 'theme_options[featured_courses_content_type]' )->value();
    return ( equestrian_club_featured_courses_active( $control ) && ( 'featured_courses_post' == $content_type ) );
}

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

/**
 * Active Callback for top bar section
 */

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