<?php
/**
 * Active callback functions.
 *
 * @package Memory Blog
 */

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

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

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

function memory_blog_featured_slider_category( $control ) {
    $content_type = $control->manager->get_setting( 'theme_options[featured_slider_content_type]' )->value();
    return ( memory_blog_featured_slider_active( $control ) && ( 'featured_slider_category' == $content_type ) );
}

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

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