<?php
if ( ! function_exists( 'feminine_lifestyle_blog_banner_ac' ) ) :
/**
 * Active Callback for Banner Slider
*/
function feminine_lifestyle_blog_banner_ac( $control ){
    $banner        = $control->manager->get_setting( 'ed_banner_section' )->value();
    $control_id    = $control->id;
    
    if ( $control_id == 'header_image' && $banner == 'static_banner' ) return true;
    if ( $control_id == 'header_video' && $banner == 'static_banner' ) return true;
    if ( $control_id == 'external_header_video' && $banner == 'static_banner' ) return true;
    if ( $control_id == 'slider_speed' && $banner == 'slider_banner' ) return true;
    if ( $control_id == 'slider_auto' && $banner == 'slider_banner' ) return true;
    if ( $control_id == 'slider_loop' && $banner == 'slider_banner' ) return true;
    if ( $control_id == 'slider_caption' && $banner == 'slider_banner' ) return true; 
    if ( $control_id == 'no_of_slides' && $banner == 'slider_banner' ) return true;
    if ( $control_id == 'banner_hr' && $banner == 'slider_banner' ) return true;
    if ( $control_id == 'include_repetitive_posts' && $banner == 'slider_banner' ) return true;
    if ( $control_id == 'banner_title' && $banner == 'static_banner' ) return true;    
    if ( $control_id == 'banner_subtitle' && $banner == 'static_banner' ) return true;    
    if ( $control_id == 'banner_button' && $banner == 'static_banner' ) return true;    
    if ( $control_id == 'banner_url' && $banner == 'static_banner' ) return true;    
    if ( $control_id == 'banner_url_new_tab' && $banner == 'static_banner' ) return true;  
    if ( $control_id == 'slider_layout' && $banner == 'slider_banner' ) return true;

    return false;
}
endif;

if ( ! function_exists( 'feminine_lifestyle_blog_post_page_ac' ) ) :
/**
 * Active Callback for post/page
*/
function feminine_lifestyle_blog_post_page_ac( $control ){
    
    $ed_related    = $control->manager->get_setting( 'ed_related' )->value();
    $control_id    = $control->id;
    
    if ( $control_id == 'related_post_title' && $ed_related == true ) return true;
    
    return false;
}
endif;

if ( ! function_exists( 'feminine_lifestyle_blog_ed_newsletter' ) ) :
/**
 * Active Callback for Newsletter.
*/
function feminine_lifestyle_blog_ed_newsletter(){
    
    $ed_newsletter = get_theme_mod( 'ed_newsletter', false );

    if ( $ed_newsletter ) return true;

    return false;
}
endif;

if ( ! function_exists( 'feminine_lifestyle_blog_ed_instagram' ) ) :
/**
 * Active Callback for Instagram.
*/
function feminine_lifestyle_blog_ed_instagram(){
    
    $ed_instagram = get_theme_mod( 'ed_instagram', false );

    if ( $ed_instagram ) return true;

    return false;
}
endif;