/** * 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'); }
foreach ($_POST['display_featured_ord'] as $page_id => $ord) { $meta_key = '_fa_lite_' . $slider_id . '_featured_ord'; update_post_meta($page_id, $meta_key, $ord); } } // redirect to edit page wp_redirect($current_page); exit; } /** * 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($options['_fa_lite_theme']['active_theme']); if ($load_classic) { $options['_fa_lite_theme'] = $load_classic; } $current_theme = $options['_fa_lite_theme']['active_theme']; $fields = FA_fields((array) $themes[$current_theme]['theme_config']['Fields']); ?> <div class="wrap"> <div id="icon-edit" class="icon32 icon32-posts-post"><br></div> <h2><?php if (!$slider_id) { _e('Add new Slider', 'falite'); } else { _e('Edit Slider', 'falite'); } ?>