/** * Slider edit - save slider metabox callback */ function fa_lite_save_panel() { $slider_id = isset($_GET['id']) ? (int) $_GET['id'] : false; $options = FA_get_option('_fa_lite_aspect'); $themes = FA_themes(); $theme_options = FA_get_option('_fa_lite_theme'); /** * This is for backwards compatibility. * Prior to V2.4, theme Classic was actually 2 different themes: Light and Dark. * If slideshow was set on either dark or lite theme, those themes should no longer exist. * If user saved them, we'll use them. If not, switch to classic. */ $load_classic = FA_should_load_classic($theme_options['active_theme']); if ($load_classic) { $theme_options = $load_classic; } $current_theme = $theme_options['active_theme']; $fields = FA_fields((array) $themes[$current_theme]['theme_config']['Fields']); $current_page = menu_page_url('featured-articles-lite', false); include FA_dir('displays/panel_slider_save.php'); }
" /></p> </div> </div> </form> </div> <script language="javascript" type="text/javascript"> ;(function($){ $(document).ready(function(){ var cond = {}; var messages = {}; var previews = {}; <?php foreach ($themes as $theme_name => $theme) { // disabled fields $fields = FA_fields((array) $theme['theme_config']['Fields']); $js_cond = array(); foreach ($fields as $field => $value) { $js_cond[] = $field . ':' . $value; } echo 'cond.' . $theme_name . ' ={' . implode(',', $js_cond) . '}' . ";\n"; // theme message for user echo 'messages.' . $theme_name . ' = \'' . addslashes($theme['theme_config']['Message']) . '\'' . ";\n"; // preview images echo 'previews.' . $theme_name . ' = \'' . $theme['preview'] . '\';' . "\n"; } ?> // enable all enabled fields on page load // this is needed because theme fields are created disabled by default var theme = $('#FA_active_theme').val(),