Esempio n. 1
0
    $current_options['force_counters_admin'] = get_options_field_value($options, 'force_counters_admin', 'false');
    $current_options['force_hide_total_count'] = get_options_field_value($options, 'force_hide_total_count', 'false');
    $current_options['facebooktotal'] = get_options_field_value($options, 'facebooktotal', 'false');
    $current_options['more_button_func'] = get_options_field_value($options, 'more_button_func', '');
    $current_options['twitter_shareshort_service'] = get_options_field_value($options, 'twitter_shareshort_service', '');
    $current_options['display_excerpt_pos'] = get_options_field_value($options, 'display_excerpt_pos', '');
    $current_options['display_excerpt'] = get_options_field_value($options, 'display_excerpt', 'false');
    $current_options['display_position_mobile_sidebar'] = get_options_field_value($options, 'display_position_mobile_sidebar', '');
    $current_options['force_hide_buttons_on_all_mobile'] = get_options_field_value($options, 'force_hide_buttons_on_all_mobile', 'false');
    $current_options['always_hide_names_mobile'] = get_options_field_value($options, 'always_hide_names_mobile', 'false');
    $current_options['admin_ajax_cache'] = get_options_field_value($options, 'admin_ajax_cache', '');
    $current_options['activate_total_counter_text'] = get_options_field_value($options, 'activate_total_counter_text', 'false');
    $current_options['total_counter_hidden_till'] = get_options_field_value($options, 'total_counter_hidden_till', '');
    //$current_options['use_minified_css'] = get_options_field_value($options, 'use_minified_css', 'true');
    //$current_options['use_minified_js'] = get_options_field_value($options, 'use_minified_js', 'true');
    $current_options['using_yoast_ga'] = get_options_field_value($options, 'using_yoast_ga', 'true');
    //$current_options['apply_clean_buttons'] = get_options_field_value($options, 'apply_clean_buttons', 'true');
    update_option(EasySocialShareButtons::$plugin_settings_name, $current_options);
    ESSBCache::flush();
    if (function_exists('purge_essb_cache_static_cache')) {
        purge_essb_cache_static_cache();
    }
    echo "<script type='text/javascript'>window.location='" . admin_url() . "admin.php?page=essb_settings&tab=general#wizard';</script>";
}
function get_options_field_value($options, $key, $default)
{
    $value = '';
    if (!isset($options[$key])) {
        $value = $default;
    } else {
        $value = $options[$key];
Esempio n. 2
0
        $current_options['use_minified_css'] = 'false';
        $current_options['use_minified_js'] = 'false';
    }
    $current_options['load_js_async'] = get_options_field_value($options, 'load_js_async', 'false');
    $current_options['load_js_defer'] = get_options_field_value($options, 'load_js_defer', 'false');
    $current_options['remove_ver_resource'] = get_options_field_value($options, 'remove_ver_resource', 'false');
    $current_options['essb_cache'] = get_options_field_value($options, 'essb_cache', 'false');
    $current_options['essb_cache_mode'] = get_options_field_value($options, 'essb_cache_mode', '');
    $current_options['essb_cache_static'] = get_options_field_value($options, 'essb_cache_static', 'false');
    $current_options['another_display_sidebar'] = get_options_field_value($options, 'another_display_sidebar', 'false');
    $current_options['another_display_popup'] = get_options_field_value($options, 'another_display_popup', 'false');
    $current_options['another_display_flyin'] = get_options_field_value($options, 'another_display_flyin', 'false');
    $current_options['another_display_postfloat'] = get_options_field_value($options, 'another_display_postfloat', 'false');
    $current_options['active_internal_counters'] = get_options_field_value($options, 'active_internal_counters', 'false');
    $current_options['admin_ajax_cache_internal'] = get_options_field_value($options, 'admin_ajax_cache_internal', 'false');
    $current_options['opengraph_tags'] = get_options_field_value($options, 'opengraph_tags', 'false');
    if ($current_options['admin_ajax_cache_internal'] == 'true') {
        $current_options['admin_ajax_cache'] = '600';
        $current_options['admin_ajax_cache_internal_time'] = '600';
    } else {
        $current_options['admin_ajax_cache'] = '';
        $current_options['admin_ajax_cache_internal_time'] = '';
    }
    update_option(EasySocialShareButtons::$plugin_settings_name, $current_options);
    ESSBCache::flush();
    if (function_exists('purge_essb_cache_static_cache')) {
        purge_essb_cache_static_cache();
    }
    echo "<script type='text/javascript'>window.location='" . admin_url() . "admin.php?page=essb_settings&tab=general#wizard';</script>";
}
// wizard display functions