Esempio n. 1
0
    $current_options['afterclose_message_text'] = ESSBOptionsHelper::optionsValue($options, 'afterclose_message_text');
    $current_options['afterclose_code_text'] = ESSBOptionsHelper::optionsValue($options, 'afterclose_code_text');
    $current_options['afterclose_popup_width'] = ESSBOptionsHelper::optionsValue($options, 'afterclose_popup_width');
    $current_options['essb_cache_static_js'] = ESSBOptionsHelper::optionsBoolValueAsText($options, 'essb_cache_static_js');
    $current_options['afterclose_like_cols'] = ESSBOptionsHelper::optionsValue($options, 'afterclose_like_cols');
    $current_options['deactivate_fa'] = ESSBOptionsHelper::optionsBoolValueAsText($options, 'deactivate_fa');
    $current_options['whatsapp_shareshort'] = ESSBOptionsHelper::optionsBoolValueAsText($options, 'whatsapp_shareshort');
    $current_options['whatsapp_shareshort_service'] = ESSBOptionsHelper::optionsBoolValue($options, 'whatsapp_shareshort_service');
    $current_options['fixed_width_align'] = ESSBOptionsHelper::optionsValue($options, 'fixed_width_align');
    //essb_cache_static_js
    $current_options['advanced_share'] = $as;
    update_option(EasySocialShareButtons::$plugin_settings_name, $current_options);
    $msg = __("Settings are saved", ESSB_TEXT_DOMAIN);
    ESSBCache::flush();
    if ($current_options['stats_active'] == 'true') {
        EasySocialShareButtons_Stats_Admin::install();
    }
    // update social fans counter
    if (isset($essb_fans)) {
        $essb_fans->options['social'] = $_POST['social'];
        $essb_fans->options['sort'] = $_POST['sort'];
        $essb_fans->options['cache'] = (int) $_POST['cache'];
        // $essb_fans->options['data'] = '';
        update_option($essb_fans->options_text, $essb_fans->options);
        delete_transient($essb_fans->transient_text);
    }
    if (function_exists('purge_essb_cache_static_cache')) {
        purge_essb_cache_static_cache();
    }
}
function essb_settings_native_rearrange()