Пример #1
0
function wpv_save_options_callback()
{
    $page_str = str_replace('wpv_', '', $_POST['page']);
    $options = array();
    $tabs = (include WPV_THEME_OPTIONS . $page_str . '/list.php');
    foreach ($tabs as $tab) {
        $tab_contents = (include WPV_THEME_OPTIONS . $page_str . "/{$tab}.php");
        $options = array_merge($options, $tab_contents);
    }
    $status = '';
    if (!isset($_POST['cacheonly'])) {
        $status = wpv_save_config($options);
    } else {
        $status = wpv_finalize_custom_css();
    }
    wpv_update_option('css-cache-timestamp', time());
    do_action('wpv_after_save_theme_options');
    echo $status;
    exit;
}
 /**
  * Save the current page config
  */
 private function save_config()
 {
     wpv_save_config($this->options);
     global $wpv_config_messages;
     $wpv_config_messages .= '<div class="message updated fade"><p><strong>Updated Successfully</strong></p></div>';
 }