function __construct()
 {
     // initialize options
     $essb_options = EasySocialShareButtons_Options::get_instance();
     $this->options = $essb_options->options;
     $this->active = ESSBOptionsHelper::optionsBoolValue($this->options, 'native_privacy_active');
     if (ESSB_DEMO_MODE) {
         $is_active_option = isset($_REQUEST['native-privacy']) ? $_REQUEST['native-privacy'] : '';
         if ($is_active_option == 'true') {
             $this->active = true;
         }
     }
     if ($this->active) {
         $this->get_state();
         add_action('wp_enqueue_scripts', array($this, 'registerCSS'), 10);
     }
 }
 public static function getPostMetaOptions($post_id)
 {
     // getting post meta
     $metaboxContainer = get_post_custom($post_id);
     // $essb_position = isset ( $custom ["essb_position"] ) ? $custom
     // ["essb_position"] [0] : "";
     $optionsFromPost = array();
     $optionsFromPost['essb_off'] = ESSBOptionsHelper::metaboxValue($metaboxContainer, 'essb_off', 'false');
     $optionsFromPost['essb_position'] = ESSBOptionsHelper::metaboxValue($metaboxContainer, 'essb_position');
     $optionsFromPost['essb_names'] = ESSBOptionsHelper::metaboxValue($metaboxContainer, 'essb_names');
     $optionsFromPost['essb_hidefb'] = ESSBOptionsHelper::metaboxValue($metaboxContainer, 'essb_hidefb');
     $optionsFromPost['essb_hideplusone'] = ESSBOptionsHelper::metaboxValue($metaboxContainer, 'essb_hideplusone');
     $optionsFromPost['essb_hidevk'] = ESSBOptionsHelper::metaboxValue($metaboxContainer, 'essb_hidevk');
     $optionsFromPost['essb_hidetwitter'] = ESSBOptionsHelper::metaboxValue($metaboxContainer, 'essb_hidetwitter');
     $optionsFromPost['essb_hideyoutube'] = ESSBOptionsHelper::metaboxValue($metaboxContainer, 'essb_hideyoutube');
     $optionsFromPost['essb_hidepinfollow'] = ESSBOptionsHelper::metaboxValue($metaboxContainer, 'essb_hidepinfollow');
     $optionsFromPost['essb_sidebar_pos'] = ESSBOptionsHelper::metaboxValue($metaboxContainer, 'essb_sidebar_pos');
     $optionsFromPost['essb_counter_pos'] = ESSBOptionsHelper::metaboxValue($metaboxContainer, 'essb_counter_pos');
     $optionsFromPost['essb_total_counter_pos'] = ESSBOptionsHelper::metaboxValue($metaboxContainer, 'essb_total_counter_pos');
     $optionsFromPost['essb_hidepinfollow'] = ESSBOptionsHelper::metaboxValue($metaboxContainer, 'essb_hidepinfollow');
     $optionsFromPost['essb_post_share_message'] = ESSBOptionsHelper::metaboxValue($metaboxContainer, 'essb_post_share_message');
     $optionsFromPost['essb_post_share_url'] = ESSBOptionsHelper::metaboxValue($metaboxContainer, 'essb_post_share_url');
     $optionsFromPost['essb_post_share_image'] = ESSBOptionsHelper::metaboxValue($metaboxContainer, 'essb_post_share_image');
     $optionsFromPost['essb_post_share_text'] = ESSBOptionsHelper::metaboxValue($metaboxContainer, 'essb_post_share_text');
     $optionsFromPost['essb_post_fb_url'] = ESSBOptionsHelper::metaboxValue($metaboxContainer, 'essb_post_fb_url');
     $optionsFromPost['essb_post_plusone_url'] = ESSBOptionsHelper::metaboxValue($metaboxContainer, 'essb_post_plusone_url');
     $optionsFromPost['essb_post_twitter_username'] = ESSBOptionsHelper::metaboxValue($metaboxContainer, 'essb_post_twitter_username');
     $optionsFromPost['essb_post_twitter_hashtags'] = ESSBOptionsHelper::metaboxValue($metaboxContainer, 'essb_post_twitter_hashtags');
     $optionsFromPost['essb_post_twitter_tweet'] = ESSBOptionsHelper::metaboxValue($metaboxContainer, 'essb_post_twitter_tweet');
     $optionsFromPost['essb_as'] = ESSBOptionsHelper::metaboxValue($metaboxContainer, 'essb_as');
     if ($optionsFromPost['essb_as'] != '') {
         $optionsFromPost['essb_as'] = unserialize($optionsFromPost['essb_as']);
     }
     $optionsFromPost['essb_theme'] = ESSBOptionsHelper::metaboxValue($metaboxContainer, 'essb_theme');
     $optionsFromPost['essb_activate_fullwidth'] = ESSBOptionsHelper::metaboxValue($metaboxContainer, 'essb_activate_fullwidth');
     $optionsFromPost['essb_counter'] = ESSBOptionsHelper::metaboxValue($metaboxContainer, 'essb_counter');
     $optionsFromPost['essb_shorturl_bitly'] = ESSBOptionsHelper::metaboxValue($metaboxContainer, 'essb_shorturl_bitly');
     $optionsFromPost['essb_shorturl_googl'] = ESSBOptionsHelper::metaboxValue($metaboxContainer, 'essb_shorturl_googl');
     //print_r($optionsFromPost);
     return $optionsFromPost;
 }
Beispiel #3
0
    if ($welcome_option == "true") {
        $welcome_active = false;
    }
}
if ($current_tab == "wizard") {
    include ESSB_PLUGIN_ROOT . '/lib/admin/pages/essb-settings-wizard2.php';
}
if ($current_tab == "wizard2") {
    include ESSB_PLUGIN_ROOT . '/lib/admin/pages/essb-settings-wizard.php';
}
// check for cache activated
$current_options = get_option(EasySocialShareButtons::$plugin_settings_name);
$general_cache_active = ESSBOptionsHelper::optionsBoolValue($current_options, 'essb_cache');
$general_cache_active_static = ESSBOptionsHelper::optionsBoolValue($current_options, 'essb_cache_static');
$general_cache_active_static_js = ESSBOptionsHelper::optionsBoolValue($current_options, 'essb_cache_static_js');
$general_cache_mode = ESSBOptionsHelper::optionsValue($current_options, 'essb_cache_mode');
$display_cache_mode = "";
if ($general_cache_active) {
    if ($general_cache_mode == "full") {
        $display_cache_mode = "Cache button render and dynamic resources";
    } else {
        $display_cache_mode = "Cache only dynamic resources";
    }
}
if ($general_cache_active_static || $general_cache_active_static_js) {
    if ($display_cache_mode != '') {
        $display_cache_mode .= ", ";
    }
    $display_cache_mode .= "Combine into sigle file all plugin static CSS files";
}
if ($essb_cache == 'clear') {
Beispiel #4
0
 function customizer_compile_css($skinedSocial = false)
 {
     global $post;
     $options = get_option(EasySocialShareButtons::$plugin_settings_name);
     $is_active = isset($options['customizer_is_active']) ? $options['customizer_is_active'] : 'false';
     if (isset($post)) {
         $post_activate_customizer = get_post_meta($post->ID, 'essb_activate_customizer', true);
         if ($post_activate_customizer != '') {
             if ($post_activate_customizer == "yes") {
                 $is_active = "true";
             } else {
                 $is_active = "false";
             }
         }
     }
     if ($is_active == "true") {
         $this->custom_css_builder_executed = true;
         $global_bgcolor = isset($options['customizer_bgcolor']) ? $options['customizer_bgcolor'] : '';
         $global_textcolor = isset($options['customizer_textcolor']) ? $options['customizer_textcolor'] : '';
         $global_hovercolor = isset($options['customizer_hovercolor']) ? $options['customizer_hovercolor'] : '';
         $global_hovertextcolor = isset($options['customizer_hovertextcolor']) ? $options['customizer_hovertextcolor'] : '';
         $global_remove_bg_effects = isset($options['customizer_remove_bg_hover_effects']) ? $options['customizer_remove_bg_hover_effects'] : '';
         $css = "";
         // @since 2.0
         $customizer_totalbgcolor = ESSBOptionsHelper::optionsValue($options, 'customizer_totalbgcolor');
         $customizer_totalcolor = ESSBOptionsHelper::optionsValue($options, 'customizer_totalcolor');
         $customizer_totalnobgcolor = ESSBOptionsHelper::optionsValue($options, 'customizer_totalnobgcolor');
         $customizer_totalfontsize = ESSBOptionsHelper::optionsValue($options, 'customizer_totalfontsize');
         $customizer_totalfontsize_after = ESSBOptionsHelper::optionsValue($options, 'customizer_totalfontsize_after');
         if ($customizer_totalbgcolor != '') {
             $this->add_rule('.essb_totalcount { background: ' . $customizer_totalbgcolor . ' !important;} ');
         }
         if ($customizer_totalnobgcolor == "true") {
             $this->add_rule('.essb_totalcount { background: none !important;} ');
         }
         if ($customizer_totalcolor != '') {
             $this->add_rule('.essb_totalcount, .essb_totalcount .essb_t_nb:after { color: ' . $customizer_totalcolor . ' !important;} ');
         }
         if ($customizer_totalfontsize != '') {
             $this->add_rule('.essb_totalcount .essb_t_nb { font-size: ' . $customizer_totalfontsize . '!important; line-height:' . $customizer_totalfontsize . '!important;}');
         }
         if ($customizer_totalfontsize_after != '') {
             $this->add_rule('.essb_totalcount .essb_t_nb:after { font-size: ' . $customizer_totalfontsize_after . '!important; }');
         }
         if ($global_remove_bg_effects == "true") {
             $this->add_rule('.essb_links a:hover, .essb_links a:focus { background: none !important; }');
         }
         $essb_networks = $options['networks'];
         if ($global_bgcolor != '' || $global_textcolor != '' || $global_hovercolor != '' || $global_hovertextcolor != '') {
             foreach ($essb_networks as $k => $v) {
                 if ($v[0] == 1 || $v[0] == 0) {
                     $singleCss = "";
                     if ($global_bgcolor != '' || $global_textcolor != '') {
                         $singleCss .= '.essb_links .essb_link_' . $k . ' a { ';
                         if ($global_bgcolor != '') {
                             $singleCss .= 'background-color:' . $global_bgcolor . '!important;';
                         }
                         if ($global_textcolor != '') {
                             $singleCss .= 'color:' . $global_bgcolor . '!important;';
                         }
                         $singleCss .= '}';
                     }
                     if ($global_hovercolor != '' || $global_hovertextcolor != '') {
                         $singleCss .= '.essb_links .essb_link_' . $k . ' a:hover, .essb_links .essb_link_' . $k . ' a:focus { ';
                         if ($global_hovercolor != '') {
                             $singleCss .= 'background-color:' . $global_hovercolor . '!important;';
                         }
                         if ($global_hovertextcolor != '') {
                             $singleCss .= 'color:' . $global_hovertextcolor . '!important;';
                         }
                         $singleCss .= '}';
                     }
                     $this->add_rule($singleCss);
                 }
             }
         }
         // single network color customization
         foreach ($essb_networks as $k => $v) {
             if ($v[0] == 1) {
                 $network_bgcolor = isset($options['customizer_' . $k . '_bgcolor']) ? $options['customizer_' . $k . '_bgcolor'] : '';
                 $network_textcolor = isset($options['customizer_' . $k . '_textcolor']) ? $options['customizer_' . $k . '_textcolor'] : '';
                 $network_hovercolor = isset($options['customizer_' . $k . '_hovercolor']) ? $options['customizer_' . $k . '_hovercolor'] : '';
                 $network_hovertextcolor = isset($options['customizer_' . $k . '_hovertextcolor']) ? $options['customizer_' . $k . '_hovertextcolor'] : '';
                 $network_icon = isset($options['customizer_' . $k . '_icon']) ? $options['customizer_' . $k . '_icon'] : '';
                 $network_hovericon = isset($options['customizer_' . $k . '_hovericon']) ? $options['customizer_' . $k . '_hovericon'] : '';
                 $network_iconbgsize = isset($options['customizer_' . $k . '_iconbgsize']) ? $options['customizer_' . $k . '_iconbgsize'] : '';
                 $network_hovericonbgsize = isset($options['customizer_' . $k . '_hovericonbgsize']) ? $options['customizer_' . $k . '_hovericonbgsize'] : '';
                 $sigleCss = "";
                 if ($network_bgcolor != '' || $network_textcolor != '') {
                     $sigleCss .= '.essb_links .essb_link_' . $k . ' a { ';
                     if ($network_bgcolor != '') {
                         $sigleCss .= 'background-color:' . $network_bgcolor . '!important;';
                     }
                     if ($network_textcolor != '') {
                         $sigleCss .= 'color:' . $network_textcolor . '!important;';
                     }
                     $sigleCss .= '}';
                 }
                 if ($network_hovercolor != '' || $network_hovertextcolor != '') {
                     $sigleCss .= '.essb_links .essb_link_' . $k . ' a:hover, .essb_links .essb_link_' . $k . ' a:focus { ';
                     if ($network_hovercolor != '') {
                         $sigleCss .= 'background-color:' . $network_hovercolor . '!important;';
                     }
                     if ($network_hovertextcolor != '') {
                         $sigleCss .= 'color:' . $network_hovertextcolor . '!important;';
                     }
                     $sigleCss .= '}';
                 }
                 if ($network_icon != '') {
                     $sigleCss .= '.essb_links .essb_link_' . $k . ' .essb_icon { background: url("' . $network_icon . '") !important; }';
                     if ($network_iconbgsize != '') {
                         $sigleCss .= '.essb_links .essb_link_' . $k . ' .essb_icon { background-size: ' . $network_iconbgsize . '!important; }';
                     }
                 }
                 if ($network_hovericon != '') {
                     $sigleCss .= '.essb_links .essb_link_' . $k . ' a:hover .essb_icon { background: url("' . $network_hovericon . '") !important; }';
                     if ($network_hovericonbgsize != '') {
                         $sigleCss .= '.essb_links .essb_link_' . $k . ' a:hover .essb_icon { background-size: ' . $network_hovericonbgsize . '!important; }';
                     }
                 }
                 $this->add_rule($sigleCss);
             }
         }
     }
     $global_user_defined_css = isset($options['customizer_css']) ? $options['customizer_css'] : '';
     $global_user_defined_css = stripslashes($global_user_defined_css);
     if ($global_user_defined_css != '') {
         //$css .= $global_user_defined_css;
         $this->add_rule($global_user_defined_css);
     }
     if ($skinedSocial) {
         //$css .= ESSB_Skinned_Native_Button::generateStyleCustomizerCSS ( $options );
         $this->add_rule(ESSB_Skinned_Native_Button::generateStyleCustomizerCSS($options), 'essb_native_skin');
     }
 }
Beispiel #5
0
 public function register_admin_assets($hook)
 {
     wp_register_style('essb-admin', ESSB_PLUGIN_URL . '/assets/css/essb-admin.css', array(), $this->version);
     wp_enqueue_style('essb-admin');
     wp_enqueue_script('essb-admin', ESSB_PLUGIN_URL . '/assets/js/essb-admin.js', array('jquery'), $this->version, true);
     $deactivate_fa = ESSBOptionsHelper::optionsBoolValue($this->options, 'deactivate_fa');
     if (!$deactivate_fa) {
         wp_register_style('essb-fontawsome', ESSB_PLUGIN_URL . '/assets/css/font-awesome.min.css', array(), $this->version);
         wp_enqueue_style('essb-fontawsome');
     }
     wp_enqueue_script('jquery-ui-sortable');
     wp_enqueue_style('wp-color-picker');
     wp_enqueue_script('wp-color-picker');
     wp_enqueue_style('essb-morris-styles', ESSB_PLUGIN_URL . '/assets/css/morris.min.css', array(), $this->version);
     wp_enqueue_script('essb-morris', ESSB_PLUGIN_URL . '/assets/js/morris.min.js', array('jquery'), $this->version);
     wp_enqueue_script('essb-raphael', ESSB_PLUGIN_URL . '/assets/js/raphael-min.js', array('jquery'), $this->version);
     wp_enqueue_style('essb-wizard-styles', ESSB_PLUGIN_URL . '/assets/css/essb-jquery.steps.css', array(), $this->version);
     wp_enqueue_script('essb-wizard', ESSB_PLUGIN_URL . '/assets/js/jquery.steps.js', array('jquery'), $this->version);
     //if ($hook == "toplevel_page_essb_settings") {
     //	wp_enqueue_script( 'ace_code_highlighter_js', ESSB_PLUGIN_URL . '/assets/js/ace/ace.js', '', '1.0.0', true );
     //	wp_enqueue_script( 'ace_mode_js', ESSB_PLUGIN_URL . '/assets/js/ace/mode-css.js', array( 'ace_code_highlighter_js' ), '1.0.0', true );
     //	wp_enqueue_script( 'custom_css_js', ESSB_PLUGIN_URL . '/assets/js/worker-css.js', array( 'jquery', 'ace_code_highlighter_js' ), '1.0.0', true );
     //}
 }
 public function popupWindowGenerate($html, $force_width = '')
 {
     $popup_width = ESSBOptionsHelper::optionsValue($this->options, 'afterclose_popup_width', '400');
     if (trim($popup_width) == '') {
         $popup_width = '400';
     }
     if ($force_width != '') {
         $popup_width = $force_width;
     }
     echo '<div class="essbasc-popup" data-popup-width="' . $popup_width . '">';
     echo '<div class="essbasc-popup-content">';
     echo $html;
     echo '</div>';
     echo '<a href="#" class="essbasc-popup-close" onclick="essbasc_popup_close(); return false;"></a>';
     echo '</div>';
     echo '<div class="essbasc-popup-shadow"></div>';
 }
 $current_options['afterclose_like_fb_follow_url'] = ESSBOptionsHelper::optionsValue($options, 'afterclose_like_fb_follow_url');
 $current_options['afterclose_like_google_url'] = ESSBOptionsHelper::optionsValue($options, 'afterclose_like_google_url');
 $current_options['afterclose_like_google_follow_url'] = ESSBOptionsHelper::optionsValue($options, 'afterclose_like_google_follow_url');
 $current_options['afterclose_like_twitter_profile'] = ESSBOptionsHelper::optionsValue($options, 'afterclose_like_twitter_profile');
 $current_options['afterclose_like_pin_follow_url'] = ESSBOptionsHelper::optionsValue($options, 'afterclose_like_pin_follow_url');
 $current_options['afterclose_like_youtube_channel'] = ESSBOptionsHelper::optionsValue($options, 'afterclose_like_youtube_channel');
 $current_options['afterclose_like_linkedin_company'] = ESSBOptionsHelper::optionsValue($options, 'afterclose_like_linkedin_company');
 $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);
Beispiel #8
0
 function handle_essb_like_buttons_shortcode($atts)
 {
     global $post;
     $atts = shortcode_atts(array('facebook' => 'false', 'facebook_url' => '', 'facebook_width' => '', 'facebook_skinned_text' => '', 'facebook_skinned_width' => '', 'facebook_follow' => 'false', 'facebook_follow_url' => '', 'facebook_follow_width' => '', 'facebook_follow_skinned_text' => '', 'facebook_follow_skinned_width' => '', 'twitter_follow' => 'false', 'twitter_follow_user' => '', 'twitter_follow_skinned_text' => '', 'twitter_follow_skinned_width' => '', 'twitter_tweet' => 'false', 'twitter_tweet_message' => '', 'twitter_tweet_skinned_text' => '', 'twitter_tweet_skinned_width' => '', 'google' => 'false', 'google_url' => '', 'google_skinned_text' => '', 'google_skinned_width' => '', 'google_follow' => 'false', 'google_follow_url' => '', 'google_follow_skinned_text' => '', 'google_follow_skinned_width' => '', 'vk' => 'false', 'vk_skinned_text' => '', 'vk_skinned_width' => '', 'youtube' => 'false', 'youtube_chanel' => '', 'youtube_skinned_text' => '', 'youtube_skinned_width' => '', 'linkedin' => 'false', 'linkedin_company' => '', 'linkedin_skinned_text' => '', 'linkedin_skinned_width' => '', 'pinterest_pin' => 'false', 'pinterest_pin_skinned_text' => '', 'pinterest_pin_skinned_width' => '', 'pinterest_follow' => 'false', 'pinterest_follow_display' => '', 'pinterest_follow_url' => '', 'pinterest_follow_skinned_text' => '', 'pinterest_follow_skinned_width' => '', 'skinned' => 'false', 'skin' => 'flat', 'message' => '', 'align' => '', 'counters' => 'false', 'hide_mobile' => 'false', 'order' => ''), $atts);
     $hide_mobile = isset($atts['hide_mobile']) ? $atts['hide_mobile'] : '';
     $hide_mobile = EasySocialShareButtons_ShortcodeHelper::unified_true($hide_mobile);
     if ($hide_mobile == "true" && $this->isMobile()) {
         return "";
     }
     $order = isset($atts['order']) ? $atts['order'] : '';
     // @ since 2.0 order of buttons
     if ($order == '') {
         $order = 'facebook,facebook_follow,twitter_follow,twitter_tweet,google,google_follow,vk,youtube,linkedin,pinterest_pin,pinterest_follow';
     }
     $align = isset($atts['align']) ? $atts['align'] : '';
     $facebook = isset($atts['facebook']) ? $atts['facebook'] : '';
     $facebook_url = isset($atts['facebook_url']) ? $atts['facebook_url'] : '';
     $facebook_width = isset($atts['facebook_width']) ? $atts['facebook_width'] : '';
     $facebook_skinned_text = isset($atts['facebook_skinned_text']) ? $atts['facebook_skinned_text'] : '';
     $facebook_skinned_width = isset($atts['facebook_skinned_width']) ? $atts['facebook_skinned_width'] : '';
     $facebook_follow = isset($atts['facebook_follow']) ? $atts['facebook_follow'] : '';
     $facebook_follow_url = isset($atts['facebook_follow_url']) ? $atts['facebook_follow_url'] : '';
     $facebook_follow_width = isset($atts['facebook_follow_width']) ? $atts['facebook_follow_width'] : '';
     $facebook_follow_skinned_text = isset($atts['facebook_follow_skinned_text']) ? $atts['facebook_follow_skinned_text'] : '';
     $facebook_follow_skinned_width = isset($atts['facebook_follow_skinned_width']) ? $atts['facebook_follow_skinned_width'] : '';
     $twitter_follow = isset($atts['twitter_follow']) ? $atts['twitter_follow'] : '';
     $twitter_follow_user = isset($atts['twitter_follow_user']) ? $atts['twitter_follow_user'] : '';
     $twitter_follow_skinned_text = isset($atts['twitter_follow_skinned_text']) ? $atts['twitter_follow_skinned_text'] : '';
     $twitter_follow_skinned_width = isset($atts['twitter_follow_skinned_width']) ? $atts['twitter_follow_skinned_width'] : '';
     $twitter_tweet = isset($atts['twitter_tweet']) ? $atts['twitter_tweet'] : '';
     $twitter_tweet_message = isset($atts['twitter_tweet_message']) ? $atts['twitter_tweet_message'] : '';
     $twitter_tweet_skinned_text = isset($atts['twitter_tweet_skinned_text']) ? $atts['twitter_tweet_skinned_text'] : '';
     $twitter_tweet_skinned_width = isset($atts['twitter_tweet_skinned_width']) ? $atts['twitter_tweet_skinned_width'] : '';
     $google = isset($atts['google']) ? $atts['google'] : '';
     $google_url = isset($atts['google_url']) ? $atts['google_url'] : '';
     $google_skinned_text = isset($atts['google_skinned_text']) ? $atts['google_skinned_text'] : '';
     $google_skinned_width = isset($atts['google_skinned_width']) ? $atts['google_skinned_width'] : '';
     $google_follow = isset($atts['google_follow']) ? $atts['google_follow'] : '';
     $google_follow_url = isset($atts['google_follow_url']) ? $atts['google_follow_url'] : '';
     $google_follow_skinned_text = isset($atts['google_follow_skinned_text']) ? $atts['google_follow_skinned_text'] : '';
     $google_follow_skinned_width = isset($atts['google_follow_skinned_width']) ? $atts['google_follow_skinned_width'] : '';
     $vk = isset($atts['vk']) ? $atts['vk'] : '';
     $vk_skinned_text = isset($atts['vk_skinned_text']) ? $atts['vk_skinned_text'] : '';
     $vk_skinned_width = isset($atts['vk_skinned_width']) ? $atts['vk_skinned_width'] : '';
     $youtube = isset($atts['youtube']) ? $atts['youtube'] : '';
     $youtube_chanel = isset($atts['youtube_chanel']) ? $atts['youtube_chanel'] : '';
     $youtube_skinned_text = isset($atts['youtube_skinned_text']) ? $atts['youtube_skinned_text'] : '';
     $youtube_skinned_width = isset($atts['youtube_skinned_width']) ? $atts['youtube_skinned_width'] : '';
     $linkedin = isset($atts['linkedin']) ? $atts['linkedin'] : '';
     $linkedin_comapny = isset($atts['linkedin_company']) ? $atts['linkedin_company'] : '';
     $linkedin_skinned_text = isset($atts['linkedin_skinned_text']) ? $atts['linkedin_skinned_text'] : '';
     $linkedin_skinned_width = isset($atts['linkedin_skinned_width']) ? $atts['linkedin_skinned_width'] : '';
     $pinterest_pin = isset($atts['pinterest_pin']) ? $atts['pinterest_pin'] : '';
     $pinterest_pin_skinned_text = isset($atts['pinterest_pin_skinned_text']) ? $atts['pinterest_pin_skinned_text'] : '';
     $pinterest_pin_skinned_width = isset($atts['pinterest_pin_skinned_width']) ? $atts['pinterest_pin_skinned_width'] : '';
     $pinterest_follow = isset($atts['pinterest_follow']) ? $atts['pinterest_follow'] : '';
     $pinterest_follow_display = isset($atts['pinterest_follow_display']) ? $atts['pinterest_follow_display'] : '';
     $pinterest_follow_url = isset($atts['pinterest_follow_url']) ? $atts['pinterest_follow_url'] : '';
     $pinterest_follow_skinned_text = isset($atts['pinterest_follow_skinned_text']) ? $atts['pinterest_follow_skinned_text'] : '';
     $pinterest_follow_skinned_width = isset($atts['pinterest_follow_skinned_width']) ? $atts['pinterest_follow_skinned_width'] : '';
     $skinned = isset($atts['skinned']) ? $atts['skinned'] : 'false';
     $skin = isset($atts['skin']) ? $atts['skin'] : '';
     $message = isset($atts['message']) ? $atts['message'] : '';
     $counters = isset($atts['counters']) ? $atts['counters'] : 'false';
     // init global options
     $options = $this->options;
     $native_lang = isset($options['native_social_language']) ? $options['native_social_language'] : "en";
     $css_class_align = "";
     $css_class_noskin = $skinned != 'true' ? ' essb-noskin' : '';
     $current_state_skinned = $this->skinned_social;
     $current_state_selected_skin = $this->skinned_social_selected_skin;
     if ($skinned != 'true') {
         $this->skinned_social = false;
     } else {
         $this->skinned_social = true;
         $this->skinned_social_selected_skin = $skin;
     }
     if (!$current_state_skinned && $skinned == 'true') {
         ESSB_Skinned_Native_Button::registerCSS();
     }
     $text = esc_attr(urlencode($post->post_title));
     $url = $post ? get_permalink() : ESSBOptionsHelper::get_current_url('raw');
     if ($this->avoid_next_page) {
         $url = $post ? get_permalink($post->ID) : ESSBOptionsHelper::get_current_url('raw');
     }
     if ($align == "right" || $align == "center") {
         $css_class_align = $align;
     }
     if (!$this->shortcode_like_css_included) {
         $this->shortcode_like_css_included = true;
         wp_enqueue_style('essb-social-like', ESSB_PLUGIN_URL . '/assets/css/essb-social-like-buttons.css', false, $this->version, 'all');
     }
     $output = "";
     $output .= '<div class="essb-like ' . $css_class_align . '">';
     if ($message != '') {
         $output .= '<div class="essb-message">' . $message . '</div>';
     }
     $networks = preg_split('#[\\s+,\\s+]#', $order);
     foreach ($networks as $network) {
         if ($network == "facebook") {
             if (EasySocialShareButtons_ShortcodeHelper::unified_true($facebook) == 'true') {
                 if ($facebook_url == "") {
                     $facebook_url = $url;
                 }
                 $output .= '<div class="essb-like-facebook essb-block' . $css_class_noskin . '">';
                 $output .= $this->print_fb_likebutton($facebook_url, $counters, $facebook_width, $facebook_skinned_text, $facebook_skinned_width);
                 $output .= '</div>';
             }
         }
         if ($network == "facebook_follow") {
             if (EasySocialShareButtons_ShortcodeHelper::unified_true($facebook_follow) == 'true') {
                 $output .= '<div class="essb-like-facebook essb-block' . $css_class_noskin . '">';
                 $output .= $this->print_fb_followbutton($facebook_follow_url, $counters, $facebook_follow_width, $facebook_follow_skinned_text, $facebook_follow_skinned_width);
                 $output .= '</div>';
             }
         }
         if ($network == "twitter_tweet") {
             if (EasySocialShareButtons_ShortcodeHelper::unified_true($twitter_tweet) == 'true') {
                 $output .= '<div class="essb-like-twitter essb-block' . $css_class_noskin . '">';
                 $output .= $this->print_twitter_tweet_button($twitter_follow_user, $counters, $native_lang, $twitter_tweet_message, $twitter_tweet_skinned_text, $twitter_tweet_skinned_width);
                 $output .= '</div>';
             }
         }
         if ($network == "twitter_follow") {
             if (EasySocialShareButtons_ShortcodeHelper::unified_true($twitter_follow) == 'true') {
                 $output .= '<div class="essb-like-twitter-follow essb-block' . $css_class_noskin . '">';
                 $output .= $this->print_twitter_follow_button($twitter_follow_user, $counters, $native_lang, $twitter_follow_skinned_text, $twitter_follow_skinned_width);
                 $output .= '</div>';
             }
         }
         if ($network == "google") {
             if (EasySocialShareButtons_ShortcodeHelper::unified_true($google) == 'true') {
                 if ($google_url == "") {
                     $google_url = $url;
                 }
                 $output .= '<div class="essb-like-google essb-block' . $css_class_noskin . '">';
                 $output .= $this->print_plusone_button($google_url, $counters, $native_lang, $google_skinned_text, $google_skinned_width);
                 $output .= '</div>';
             }
         }
         if ($network == "google_follow") {
             if (EasySocialShareButtons_ShortcodeHelper::unified_true($google_follow) == 'true') {
                 $output .= '<div class="essb-like-google essb-block' . $css_class_noskin . '">';
                 $output .= $this->print_plusfollow_button($google_follow_url, $counters, $native_lang, $google_follow_skinned_text, $google_follow_skinned_width);
                 $output .= '</div>';
             }
         }
         if ($network == "vk") {
             if (EasySocialShareButtons_ShortcodeHelper::unified_true($vk) == 'true') {
                 $output .= '<div class="essb-like-vk essb-block' . $css_class_noskin . '">';
                 $output .= $this->print_vklike_button($url, $counters, $vk_skinned_text, $vk_skinned_width);
                 $output .= '</div>';
             }
         }
         if ($network == "youtube") {
             if (EasySocialShareButtons_ShortcodeHelper::unified_true($youtube) == 'true') {
                 $output .= '<div class="essb-like-youtube essb-block' . $css_class_noskin . '">';
                 $output .= $this->print_youtube_button($youtube_chanel, $counters, $youtube_skinned_text, $youtube_skinned_width);
                 $output .= '</div>';
             }
         }
         if ($network == "pinterest_pin") {
             if (EasySocialShareButtons_ShortcodeHelper::unified_true($pinterest_pin) == 'true') {
                 $output .= '<div class="essb-like-pin essb-block' . $css_class_noskin . '">';
                 $output .= $this->print_pinterest_follow($pinterest_follow_display, $pinterest_follow_url, 'pin', $pinterest_pin_skinned_text, $pinterest_pin_skinned_width);
                 $output .= '</div>';
             }
         }
         if ($network == "pinterest_follow") {
             if (EasySocialShareButtons_ShortcodeHelper::unified_true($pinterest_follow) == 'true') {
                 $output .= '<div class="essb-like-pin-follow essb-block' . $css_class_noskin . '">';
                 $output .= $this->print_pinterest_follow($pinterest_follow_display, $pinterest_follow_url, 'follow', $pinterest_follow_skinned_text, $pinterest_follow_skinned_width);
                 $output .= '</div>';
             }
         }
     }
     $output .= '</div>';
     $this->skinned_social = $current_state_skinned;
     $this->skinned_social_selected_skin = $current_state_selected_skin;
     return $output;
 }
    $current_options['native_deactivate_mobile'] = $options['native_deactivate_mobile'];
    $current_options['jigoshop_top'] = $options['jigoshop_top'];
    $current_options['jigoshop_bottom'] = $options['jigoshop_bottom'];
    $current_options['mobile_exclude_tablet'] = $options['mobile_exclude_tablet'];
    $current_options['deactivate_homepage'] = $options['deactivate_homepage'];
    $current_options['deactivate_resource_homepage'] = $options['deactivate_resource_homepage'];
    $current_options['active_internal_counters'] = $options['active_internal_counters'];
    $current_options['postfloat_percent'] = $options['postfloat_percent'];
    $current_options['force_hide_icons'] = $options['force_hide_icons'];
    $current_options['button_counter_hidden_till'] = $options['button_counter_hidden_till'];
    $current_options['message_share_before_buttons'] = $options['message_share_before_buttons'];
    $current_options['sidebar_top_message'] = $options['sidebar_top_message'];
    $current_options['sidebar_bottom_message'] = $options['sidebar_bottom_message'];
    $current_options['display_position_home'] = ESSBOptionsHelper::optionsValue($options, 'display_position_home');
    $current_options['popup_user_notshow_onclose_all'] = ESSBOptionsHelper::optionsBoolValueAsText($options, 'popup_user_notshow_onclose_all');
    $current_options['float_onsingle_only'] = ESSBOptionsHelper::optionsBoolValueAsText($options, 'float_onsingle_only');
    $current_options['network_message'] = $mm;
    // @since 1.1.4
    // update network names
    foreach ($nn as $k => $v) {
        $current_options['networks'][$k][1] = $v;
    }
    update_option(EasySocialShareButtons::$plugin_settings_name, $current_options);
    ESSBCache::flush();
    $msg = "Settings are saved.";
    if (function_exists('purge_essb_cache_static_cache')) {
        purge_essb_cache_static_cache();
    }
}
function essb_facebook_total_count()
{