id; // ========================================================================================== // 1. CALLBACK SECTION - GET DEPENDENT VALUES // ========================================================================================== // General Settings $astronomy_general_layout = $control->manager->get_setting('astronomy_redux_variables[astronomy_general_layout]')->value(); $astronomy_general_breadcrumbswitch = $control->manager->get_setting('astronomy_redux_variables[astronomy_general_breadcrumbswitch]')->value(); // Homepage $astronomy_homepage_layout = $control->manager->get_setting('astronomy_redux_variables[astronomy_homepage_layout]')->value(); $astronomy_homepage_sliderswitch = $control->manager->get_setting('astronomy_redux_variables[astronomy_homepage_sliderswitch]')->value(); $astronomy_homepage_introactionlink1 = $control->manager->get_setting('astronomy_redux_variables[astronomy_homepage_introactionlink1]')->value(); // Social Media $astronomy_header_facebookswitch = $control->manager->get_setting('astronomy_redux_variables[astronomy_header_facebookswitch]')->value(); $astronomy_header_twitterswitch = $control->manager->get_setting('astronomy_redux_variables[astronomy_header_twitterswitch]')->value(); $astronomy_header_googleswitch = $control->manager->get_setting('astronomy_redux_variables[astronomy_header_googleswitch]')->value(); $astronomy_header_linkedinswitch = $control->manager->get_setting('astronomy_redux_variables[astronomy_header_linkedinswitch]')->value(); $astronomy_header_flickrswitch = $control->manager->get_setting('astronomy_redux_variables[astronomy_header_flickrswitch]')->value(); $astronomy_header_youtubeswitch = $control->manager->get_setting('astronomy_redux_variables[astronomy_header_youtubeswitch]')->value(); $astronomy_header_rssswitch = $control->manager->get_setting('astronomy_redux_variables[astronomy_header_rssswitch]')->value(); // Blog $astronomy_blog_layout = $control->manager->get_setting('astronomy_redux_variables[astronomy_blog_layout]')->value(); $astronomy_post_layout = $control->manager->get_setting('astronomy_redux_variables[astronomy_post_layout]')->value(); // ========================================================================================== // 2. CALLBACK CONTROLS - SHOW / HIDE CONTROLS // ========================================================================================== // General Settings - Page Layout if ( ( $astronomy_general_layout == 'option2' or $astronomy_general_layout == 'option3' ) and $control_id == 'astronomy_general_sidebars' ) { return true; } // General Settings - Enable Breadcrumbs if ( $astronomy_general_breadcrumbswitch == '1' and $control_id == 'astronomy_general_breadcrumbdelimeter' ) { return true; } // Homepage - Homepage Layout if ( ( $astronomy_homepage_layout == 'option2' or $astronomy_homepage_layout == 'option3' ) and $control_id == 'astronomy_homepage_sidebars' ) { return true; } // Homepage - Choose Homepage Slider if ( $astronomy_homepage_sliderswitch == 'option4' and ( $control_id == 'astronomy_homepage_sliderimage1_info' or $control_id == 'astronomy_homepage_sliderimage1_image' or $control_id == 'astronomy_homepage_sliderimage1_title' or $control_id == 'astronomy_homepage_sliderimage1_desc' or $control_id == 'astronomy_homepage_sliderimage1_link' or $control_id == 'astronomy_homepage_sliderimage2_info' or $control_id == 'astronomy_homepage_sliderimage2_image' or $control_id == 'astronomy_homepage_sliderimage2_title' or $control_id == 'astronomy_homepage_sliderimage2_desc' or $control_id == 'astronomy_homepage_sliderimage2_link' or $control_id == 'astronomy_homepage_sliderimage3_info' or $control_id == 'astronomy_homepage_sliderimage3_image' or $control_id == 'astronomy_homepage_sliderimage3_title' or $control_id == 'astronomy_homepage_sliderimage3_desc' or $control_id == 'astronomy_homepage_sliderimage3_link' or $control_id == 'astronomy_homepage_sliderpageinfo' or $control_id == 'astronomy_homepage_sliderpresetheight' or $control_id == 'astronomy_homepage_sliderpresetwidth' ) ) { return true; } // Homepage - Call To Action - Intro if ( $astronomy_homepage_introactionlink1 == 'option1' and $control_id == 'astronomy_homepage_introactionpage1' ) { return true; } else if ( $astronomy_homepage_introactionlink1 == 'option2' and $control_id == 'astronomy_homepage_introactioncustom1' ) { return true; } // Social Media - Facebook if ( $astronomy_header_facebookswitch == '1' and ( $control_id == 'astronomy_header_facebooklink' or $control_id == 'astronomy_header_facebookiconswitch' or $control_id == 'astronomy_header_facebookcustomicon' ) ) { return true; } // Social Media - Twitter if ( $astronomy_header_twitterswitch == '1' and ( $control_id == 'astronomy_header_twitterlink' or $control_id == 'astronomy_header_twittericonswitch' or $control_id == 'astronomy_header_twittercustomicon' ) ) { return true; } // Social Media - Google if ( $astronomy_header_googleswitch == '1' and ( $control_id == 'astronomy_header_googlelink' or $control_id == 'astronomy_header_googleiconswitch' or $control_id == 'astronomy_header_googlecustomicon' ) ) { return true; } // Social Media - LinkedIn if ( $astronomy_header_linkedinswitch == '1' and ( $control_id == 'astronomy_header_linkedinlink' or $control_id == 'astronomy_header_linkediniconswitch' or $control_id == 'astronomy_header_linkedincustomicon' ) ) { return true; } // Social Media - Flickr if ( $astronomy_header_flickrswitch == '1' and ( $control_id == 'astronomy_header_flickrlink' or $control_id == 'astronomy_header_flickriconswitch' or $control_id == 'astronomy_header_flickrcustomicon' ) ) { return true; } // Social Media - YouTube if ( $astronomy_header_youtubeswitch == '1' and ( $control_id == 'astronomy_header_youtubelink' or $control_id == 'astronomy_header_youtubeiconswitch' or $control_id == 'astronomy_header_youtubecustomicon' ) ) { return true; } // Social Media - RSS if ( $astronomy_header_rssswitch == '1' and ( $control_id == 'astronomy_header_rsslink' or $control_id == 'astronomy_header_rssiconswitch' or $control_id == 'astronomy_header_rsscustomicon' ) ) { return true; } // Blog - Blog Layout if ( ( $astronomy_blog_layout == 'option2' or $astronomy_blog_layout == 'option3' ) and $control_id == 'astronomy_blog_sidebars' ) { return true; } // Blog - Post Layout if ( ( $astronomy_post_layout == 'option2' or $astronomy_post_layout == 'option3' ) and $control_id == 'astronomy_post_sidebars' ) { return true; } return false; }