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

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

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

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

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

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

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


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

function ice_hockey_club_featured_blog_page( $control ) {
    $content_type = $control->manager->get_setting( 'theme_options[featured_blog_content_type]' )->value();
    return ( ice_hockey_club_featured_blog_active( $control ) && ( 'featured_blog_page' == $content_type ) );
}

function ice_hockey_club_featured_blog_post( $control ) {
    $content_type = $control->manager->get_setting( 'theme_options[featured_blog_content_type]' )->value();
    return ( ice_hockey_club_featured_blog_active( $control ) && ( 'featured_blog_post' == $content_type ) );
}


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