<?php
/**
 * Active callback functions.
 *
 * @package Spirit Business
 */

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

function spirit_business_featured_slider_page( $control ) {
    $spirit_business_content_type = $control->manager->get_setting( 'theme_options[featured_slider_content_type]' )->value();
    return ( spirit_business_featured_slider_active( $control ) && ( 'featured_slider_page' == $spirit_business_content_type ) );
}

function spirit_business_featured_slider_post( $control ) {
    $spirit_business_content_type = $control->manager->get_setting( 'theme_options[featured_slider_content_type]' )->value();
    return ( spirit_business_featured_slider_active( $control ) && ( 'featured_slider_post' == $spirit_business_content_type ) );
}

function spirit_business_featured_slider_category( $control ) {
    $spirit_business_content_type = $control->manager->get_setting( 'theme_options[featured_slider_content_type]' )->value();
    return ( spirit_business_featured_slider_active( $control ) && ( 'featured_slider_category' == $spirit_business_content_type ) );
}

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

function spirit_business_our_services_page( $control ) {
    $spirit_business_content_type = $control->manager->get_setting( 'theme_options[our_services_content_type]' )->value();
    return ( spirit_business_our_services_active( $control ) && ( 'our_services_page' == $spirit_business_content_type ) );
}

function spirit_business_our_services_post( $control ) {
    $spirit_business_content_type = $control->manager->get_setting( 'theme_options[our_services_content_type]' )->value();
    return ( spirit_business_our_services_active( $control ) && ( 'our_services_post' == $spirit_business_content_type ) );
}

function spirit_business_our_services_category( $control ) {
    $spirit_business_content_type = $control->manager->get_setting( 'theme_options[our_services_content_type]' )->value();
    return ( spirit_business_our_services_active( $control ) && ( 'our_services_category' == $spirit_business_content_type ) );
}

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