Social Media Share Buttons & Social Sharing Icons - Version 2.5.5

Version Description

  • Fixed claim feed from Q8 popup.
  • Updated new section to show counts.
  • Fixed subscribe form button value.
  • Fixed twitter url space corrected.
  • changed nopin to data-attr.
  • Fixed youtube tooltip alignemnt.
Download this release

Release Info

Developer socialdude
Plugin Icon 128x128 Social Media Share Buttons & Social Sharing Icons
Version 2.5.5
Comparing to
See all releases

Code changes from version 2.5.4 to 2.5.5

css/sfsi-admin-style.css CHANGED
@@ -4646,4 +4646,4 @@ text-decoration:none!important;
4646
  color: #ffffff;
4647
 
4648
  cursor: pointer;
4649
- }
4646
  color: #ffffff;
4647
 
4648
  cursor: pointer;
4649
+ }
css/sfsi-style.css CHANGED
@@ -2844,7 +2844,6 @@ ul.cstmskin_iconlist {
2844
  width: 33px;
2845
  height: 24px;
2846
  z-index: 9;
2847
- float:left;
2848
  }
2849
 
2850
  .sfsi_wicons a.sficn,
@@ -2854,9 +2853,9 @@ ul.cstmskin_iconlist {
2854
  border: none;
2855
  }
2856
 
2857
- .sfsi_Sicons .sf_pinit>span {
2858
  height: 20px !important;
2859
- }
2860
 
2861
  .sfsi_Sicons .sf_pinit>span>span {
2862
  width: 38px !important;
@@ -3529,16 +3528,16 @@ ul.sfsi_icn_listing8 li .tb_4_ck{
3529
  background: rgba(0, 0, 0, 0) url(images/count_left_arow.png) no-repeat scroll 0 0 / 27px auto;
3530
  font-size: 12px !important;
3531
  left: 67px;
3532
- line-height: 17px !important;
3533
  margin-left: 0;
3534
- padding: 1px 0;
3535
  text-align: center;
3536
  white-space: pre;
3537
- width: 33px;
3538
- height: 19px;
3539
  z-index: 9;
3540
  display: inline-block;
3541
- vertical-align:top!important;
3542
  }
3543
 
3544
  .sfsi_icons_container>a {
@@ -3660,4 +3659,8 @@ ul.sfsi_icn_listing8 li .tb_4_ck{
3660
  height: 20px!important;
3661
  text-align: unset!important;
3662
  max-width: 100%!important;
 
 
 
 
3663
  }
2844
  width: 33px;
2845
  height: 24px;
2846
  z-index: 9;
 
2847
  }
2848
 
2849
  .sfsi_wicons a.sficn,
2853
  border: none;
2854
  }
2855
 
2856
+ /* .sfsi_Sicons .sf_pinit>span {
2857
  height: 20px !important;
2858
+ } */
2859
 
2860
  .sfsi_Sicons .sf_pinit>span>span {
2861
  width: 38px !important;
3528
  background: rgba(0, 0, 0, 0) url(images/count_left_arow.png) no-repeat scroll 0 0 / 27px auto;
3529
  font-size: 12px !important;
3530
  left: 67px;
3531
+ line-height: 22px !important;
3532
  margin-left: 0;
3533
+ padding: 1px 3px;
3534
  text-align: center;
3535
  white-space: pre;
3536
+ width: 35px;
3537
+ height: 31px;
3538
  z-index: 9;
3539
  display: inline-block;
3540
+ vertical-align: text-top;
3541
  }
3542
 
3543
  .sfsi_icons_container>a {
3659
  height: 20px!important;
3660
  text-align: unset!important;
3661
  max-width: 100%!important;
3662
+ }
3663
+
3664
+ .sfsi_tool_tip_2.utube_tool_bdr .icon1 {
3665
+ margin-left: 13px!important;
3666
  }
js/custom-admin.js CHANGED
@@ -574,6 +574,13 @@ function sfsi_update_step4() {
574
 
575
  wcc = 1 == SFSI("input[name='sfsi_wechat_countsDisplay']").prop("disabled") ? "" : SFSI("input[name='sfsi_wechat_countsDisplay']:checked").val(),
576
  wcm = SFSI("input[name='sfsi_wechat_manualCounts']").val(),
 
 
 
 
 
 
 
577
  $ = {
578
  action: "updateSrcn4",
579
  sfsi_display_counts: e,
@@ -627,9 +634,12 @@ function sfsi_update_step4() {
627
  sfsi_weibo_manualCounts: wm,
628
  sfsi_wechat_countsDisplay: wcc,
629
  sfsi_wechat_manualCounts: wcm,
 
 
 
630
  nonce: nonce
631
  };
632
- // console.log($);
633
  return SFSI.ajax({
634
  url: sfsi_icon_ajax_object.ajax_url,
635
  type: "post",
@@ -784,7 +794,6 @@ function sfsi_update_step6() {
784
  var s = SFSI("input[name='sfsi_show_Onposts']:checked").val(),
785
  i = SFSI("input[name='sfsi_textBefor_icons']").val(),
786
  e = SFSI("#sfsi_icons_alignment").val(),
787
- t = SFSI("#sfsi_icons_DisplayCounts").val(),
788
  rsub = SFSI("input[name='sfsi_rectsub']:checked").val(),
789
  rfb = SFSI("input[name='sfsi_rectfb']:checked").val(),
790
  rpin = SFSI("input[name='sfsi_rectpinit']:checked").val(),
@@ -792,7 +801,6 @@ function sfsi_update_step6() {
792
  rtwr = SFSI("input[name='sfsi_recttwtr']:checked").val(),
793
  rfbshare = SFSI("input[name='sfsi_rectfbshare']:checked").val(),
794
  a = SFSI("input[name='sfsi_display_button_type']:checked").val();
795
- countshare = SFSI("input[name='sfsi_share_count']:checked").val();
796
  endpost = SFSI("input[name='sfsi_responsive_icons_end_post']:checked").val();
797
 
798
  var responsive_icons = {
@@ -835,14 +843,12 @@ function sfsi_update_step6() {
835
  responsive_icons.settings.counter_color = SFSI('input[name="sfsi_responsive_counter_color"]').val();
836
  responsive_icons.settings.counter_bg_color = SFSI('input[name="sfsi_responsive_counter_bg_color"]').val();
837
  responsive_icons.settings.share_count_text = SFSI('input[name="sfsi_responsive_counter_share_count_text"]').val();
838
- responsive_icons.settings.show_count = countshare;
839
  responsive_icons.settings.margin_above = SFSI('input[name="sfsi_responsive_icons_settings_margin_above"]').val();
840
  responsive_icons.settings.margin_below = SFSI('input[name="sfsi_responsive_icons_settings_margin_below"]').val();
841
 
842
  n = {
843
  action: "updateSrcn6",
844
  sfsi_show_Onposts: s,
845
- sfsi_icons_DisplayCounts: t,
846
  sfsi_icons_alignment: e,
847
  sfsi_textBefor_icons: i,
848
  sfsi_rectsub: rsub,
@@ -854,7 +860,6 @@ function sfsi_update_step6() {
854
  sfsi_responsive_icons: responsive_icons,
855
  sfsi_display_button_type: a,
856
  sfsi_responsive_icons_end_post: endpost,
857
- sfsi_share_count: countshare,
858
  nonce: nonce
859
  };
860
  SFSI.ajax({
@@ -3131,20 +3136,6 @@ function sfsi_responsive_icon_counter_tgl(hide, show, ref = null) {
3131
  }
3132
  }
3133
 
3134
- function sfsi_responsive_toggle_count() {
3135
- var data = jQuery('input[name="sfsi_share_count"]:checked').val();
3136
- var data2 = jQuery('input[name="sfsi_display_counts"]:checked').val();
3137
- /* console.log('toggleer ',data,data2); */
3138
- if (data2 == "yes" && 'yes' == data) {
3139
- jQuery('.sfsi_responsive_icon_preview .sfsi_responsive_icons_count').css('display', 'inline-block');
3140
- jQuery('.sfsi_responsive_icon_preview .sfsi_icons_container').removeClass('sfsi_responsive_without_counter_icons').addClass('sfsi_responsive_with_counter_icons');
3141
- sfsi_resize_icons_container();
3142
- } else {
3143
- jQuery('.sfsi_responsive_icon_preview .sfsi_responsive_icons_count').css('display', 'none');
3144
- jQuery('.sfsi_responsive_icon_preview .sfsi_icons_container').removeClass('sfsi_responsive_with_counter_icons').addClass('sfsi_responsive_without_counter_icons');
3145
- sfsi_resize_icons_container();
3146
- }
3147
- }
3148
 
3149
  function sfsi_responsive_open_url(event) {
3150
  jQuery(event.target).parent().find('.sfsi_responsive_custom_url_hide').show();
574
 
575
  wcc = 1 == SFSI("input[name='sfsi_wechat_countsDisplay']").prop("disabled") ? "" : SFSI("input[name='sfsi_wechat_countsDisplay']:checked").val(),
576
  wcm = SFSI("input[name='sfsi_wechat_manualCounts']").val(),
577
+
578
+ resp = 1 == SFSI("input[name='sfsi_responsive_share_count']").prop("disabled") ? "" : SFSI("input[name='sfsi_responsive_share_count']:checked").val(),
579
+ original = 1 == SFSI("input[name='sfsi_original_counts']").prop("disabled") ? "" : SFSI("input[name='sfsi_original_counts']:checked").val(),
580
+ round = 1 == SFSI("input[name='sfsi_round_counts']").prop("disabled") ? "" : SFSI("input[name='sfsi_round_counts']:checked").val()
581
+
582
+ console.log(resp,original,round);
583
+
584
  $ = {
585
  action: "updateSrcn4",
586
  sfsi_display_counts: e,
634
  sfsi_weibo_manualCounts: wm,
635
  sfsi_wechat_countsDisplay: wcc,
636
  sfsi_wechat_manualCounts: wcm,
637
+ sfsi_responsive_share_count: resp,
638
+ sfsi_original_counts: original,
639
+ sfsi_round_counts: round,
640
  nonce: nonce
641
  };
642
+ console.log($);
643
  return SFSI.ajax({
644
  url: sfsi_icon_ajax_object.ajax_url,
645
  type: "post",
794
  var s = SFSI("input[name='sfsi_show_Onposts']:checked").val(),
795
  i = SFSI("input[name='sfsi_textBefor_icons']").val(),
796
  e = SFSI("#sfsi_icons_alignment").val(),
 
797
  rsub = SFSI("input[name='sfsi_rectsub']:checked").val(),
798
  rfb = SFSI("input[name='sfsi_rectfb']:checked").val(),
799
  rpin = SFSI("input[name='sfsi_rectpinit']:checked").val(),
801
  rtwr = SFSI("input[name='sfsi_recttwtr']:checked").val(),
802
  rfbshare = SFSI("input[name='sfsi_rectfbshare']:checked").val(),
803
  a = SFSI("input[name='sfsi_display_button_type']:checked").val();
 
804
  endpost = SFSI("input[name='sfsi_responsive_icons_end_post']:checked").val();
805
 
806
  var responsive_icons = {
843
  responsive_icons.settings.counter_color = SFSI('input[name="sfsi_responsive_counter_color"]').val();
844
  responsive_icons.settings.counter_bg_color = SFSI('input[name="sfsi_responsive_counter_bg_color"]').val();
845
  responsive_icons.settings.share_count_text = SFSI('input[name="sfsi_responsive_counter_share_count_text"]').val();
 
846
  responsive_icons.settings.margin_above = SFSI('input[name="sfsi_responsive_icons_settings_margin_above"]').val();
847
  responsive_icons.settings.margin_below = SFSI('input[name="sfsi_responsive_icons_settings_margin_below"]').val();
848
 
849
  n = {
850
  action: "updateSrcn6",
851
  sfsi_show_Onposts: s,
 
852
  sfsi_icons_alignment: e,
853
  sfsi_textBefor_icons: i,
854
  sfsi_rectsub: rsub,
860
  sfsi_responsive_icons: responsive_icons,
861
  sfsi_display_button_type: a,
862
  sfsi_responsive_icons_end_post: endpost,
 
863
  nonce: nonce
864
  };
865
  SFSI.ajax({
3136
  }
3137
  }
3138
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3139
 
3140
  function sfsi_responsive_open_url(event) {
3141
  jQuery(event.target).parent().find('.sfsi_responsive_custom_url_hide').show();
libs/controllers/sfsi_buttons_controller.php CHANGED
@@ -336,6 +336,12 @@ function sfsi_options_updater4()
336
 
337
  $sfsi_wechat_countsDisplay = isset($_POST["sfsi_wechat_countsDisplay"]) ? sanitize_text_field($_POST["sfsi_wechat_countsDisplay"]) : 'no';
338
  $sfsi_wechat_manualCounts = isset($_POST["sfsi_wechat_manualCounts"]) ? intval(trim($_POST["sfsi_wechat_manualCounts"])) : '';
 
 
 
 
 
 
339
  $up_option4 = array(
340
  'sfsi_display_counts' => sanitize_text_field($sfsi_display_counts),
341
 
@@ -401,9 +407,16 @@ function sfsi_options_updater4()
401
 
402
  'sfsi_wechat_countsDisplay' => sanitize_text_field($sfsi_wechat_countsDisplay),
403
  'sfsi_wechat_manualCounts' => intval($sfsi_wechat_manualCounts),
 
 
 
 
 
 
 
 
404
  );
405
  update_option('sfsi_section4_options', serialize($up_option4));
406
-
407
  $new_counts = sfsi_getCounts();
408
  header('Content-Type: application/json');
409
  echo json_encode(array("res" => "success", 'counts' => $new_counts));
@@ -553,17 +566,15 @@ function sfsi_options_updater6()
553
  $sfsi_icons_postPositon = isset($_POST["sfsi_icons_postPositon"]) ? sanitize_text_field($_POST["sfsi_icons_postPositon"]) : '';
554
  $sfsi_icons_alignment = isset($_POST["sfsi_icons_alignment"]) ? sanitize_text_field($_POST["sfsi_icons_alignment"]) : 'center-right';
555
  $sfsi_textBefor_icons = isset($_POST["sfsi_textBefor_icons"]) ? sanitize_text_field($_POST["sfsi_textBefor_icons"]) : '';
556
- $sfsi_icons_DisplayCounts = isset($_POST["sfsi_icons_DisplayCounts"]) ? sanitize_text_field($_POST["sfsi_icons_DisplayCounts"]) : 'no';
557
  $sfsi_rectsub = isset($_POST["sfsi_rectsub"]) ? sanitize_text_field($_POST["sfsi_rectsub"]) : 'no';
558
  $sfsi_rectfb = isset($_POST["sfsi_rectfb"]) ? sanitize_text_field($_POST["sfsi_rectfb"]) : 'no';
559
  $sfsi_rectshr = isset($_POST["sfsi_rectshr"]) ? sanitize_text_field($_POST["sfsi_rectshr"]) : 'no';
560
  $sfsi_recttwtr = isset($_POST["sfsi_recttwtr"]) ? sanitize_text_field($_POST["sfsi_recttwtr"]) : 'no';
561
  $sfsi_rectpinit = isset($_POST["sfsi_rectpinit"]) ? sanitize_text_field($_POST["sfsi_rectpinit"]) : 'no';
562
  $sfsi_rectfbshare = isset($_POST["sfsi_rectfbshare"]) ? sanitize_text_field($_POST["sfsi_rectfbshare"]) : 'no';
563
- $sfsi_display_button_type = isset($_POST["sfsi_display_button_type"]) ? sanitize_text_field($_POST["sfsi_display_button_type"]) : 'no';
564
  $sfsi_responsive_icons_end_post = isset($_POST["sfsi_responsive_icons_end_post"]) ? sanitize_text_field($_POST["sfsi_responsive_icons_end_post"]) : 'no';
565
- $sfsi_share_count = isset($_POST["sfsi_share_count"]) ? sanitize_text_field($_POST["sfsi_share_count"]) : 'no';
566
-
567
  $sfsi_responsive_icons_default = array(
568
  "default_icons" => array(
569
  "facebook" => array("active" => "yes", "text" => "Share on Facebook", "url" => ""),
@@ -675,7 +686,6 @@ function sfsi_options_updater6()
675
  'sfsi_icons_postPositon' => sanitize_text_field($sfsi_icons_postPositon),
676
  'sfsi_icons_alignment' => sanitize_text_field($sfsi_icons_alignment),
677
  'sfsi_textBefor_icons' => sanitize_text_field(stripslashes($sfsi_textBefor_icons)),
678
- 'sfsi_icons_DisplayCounts' => sanitize_text_field($sfsi_icons_DisplayCounts),
679
  'sfsi_rectsub' => sanitize_text_field($sfsi_rectsub),
680
  'sfsi_rectfb' => sanitize_text_field($sfsi_rectfb),
681
  'sfsi_rectshr' => sanitize_text_field($sfsi_rectshr),
@@ -683,9 +693,8 @@ function sfsi_options_updater6()
683
  'sfsi_rectpinit' => sanitize_text_field($sfsi_rectpinit),
684
  'sfsi_rectfbshare' => sanitize_text_field($sfsi_rectfbshare),
685
  'sfsi_responsive_icons' => $sfsi_responsive_icons,
686
- 'sfsi_display_button_type' => sanitize_text_field($sfsi_display_button_type),
687
- 'sfsi_share_count' => sanitize_text_field($sfsi_share_count),
688
- 'sfsi_responsive_icons_end_post' => sanitize_text_field($sfsi_responsive_icons_end_post),
689
 
690
  );
691
  update_option('sfsi_section6_options', serialize($up_option6));
@@ -885,7 +894,7 @@ function sfsi_options_updater9()
885
  }
886
  /* upload custom icons images */
887
  /* get counts for admin section */
888
- function sfsi_getCounts($for_resposive=false)
889
  {
890
  $socialObj = new sfsi_SocialHelper();
891
  $sfsi_section4_options = unserialize(get_option('sfsi_section4_options', false));
@@ -907,7 +916,7 @@ function sfsi_getCounts($for_resposive=false)
907
  );
908
 
909
  /* get rss count */
910
- if (isset($sfsi_section4_options['sfsi_rss_manualCounts']) && !empty($sfsi_section4_options['sfsi_rss_manualCounts']) && $for_resposive==false) {
911
  $scounts['rss_count'] = $sfsi_section4_options['sfsi_rss_manualCounts'];
912
  }
913
 
@@ -970,7 +979,7 @@ function sfsi_getCounts($for_resposive=false)
970
  }
971
  /* get linkedIn counts */
972
 
973
- if (isset($sfsi_section4_options['sfsi_linkedIn_countsFrom']) && $for_resposive==false) {
974
 
975
  if ($sfsi_section4_options['sfsi_linkedIn_countsFrom'] == "follower") {
976
  $linkedIn_compay = $sfsi_section2_options['sfsi_linkedin_followCompany'];
@@ -981,13 +990,13 @@ function sfsi_getCounts($for_resposive=false)
981
  'ln_oAuth_user_token' => $sfsi_section4_options['ln_oAuth_user_token']
982
  );
983
  $followers = $socialObj->sfsi_getlinkedin_follower($linkedIn_compay, $ln_settings);
984
- $scounts['linkedIn_count'] = $socialObj->format_num($followers) ;
985
  } else {
986
  $scounts['linkedIn_count'] = $sfsi_section4_options['sfsi_linkedIn_manualCounts'];
987
  }
988
  }
989
 
990
- if (isset($sfsi_section4_options['sfsi_youtube_countsFrom']) && $for_resposive==false) {
991
 
992
  /* get youtube counts */
993
  if ($sfsi_section4_options['sfsi_youtube_countsFrom'] == "subscriber") {
@@ -1003,7 +1012,7 @@ function sfsi_getCounts($for_resposive=false)
1003
  }
1004
  }
1005
 
1006
- if (isset($sfsi_section4_options['sfsi_pinterest_countsFrom']) && $for_resposive==false) {
1007
 
1008
  /* get Pinterest counts */
1009
  if ($sfsi_section4_options['sfsi_pinterest_countsFrom'] == "pins") {
@@ -1014,7 +1023,7 @@ function sfsi_getCounts($for_resposive=false)
1014
  $scounts['pin_count'] = $sfsi_section4_options['sfsi_pinterest_manualCounts'];
1015
  }
1016
  }
1017
- if (isset($sfsi_section4_options['sfsi_instagram_countsFrom'])&& $for_resposive==false) {
1018
  /* get instagram count */
1019
  if ($sfsi_section4_options['sfsi_instagram_countsFrom'] == "followers") {
1020
  $iuser_name = $sfsi_section4_options['sfsi_instagram_User'];
@@ -1032,9 +1041,8 @@ function sfsi_getCounts($for_resposive=false)
1032
  } else {
1033
  $scounts['instagram_count'] = $sfsi_section4_options['sfsi_instagram_manualCounts'];
1034
  }
1035
-
1036
  }
1037
- if($for_resposive==false){
1038
  $scounts['telegram_count'] = isset($sfsi_section4_options['sfsi_telegram_manualCounts']) ? $sfsi_section4_options['sfsi_telegram_manualCounts'] : '0';
1039
  $scounts['vk_count'] = isset($sfsi_section4_options['sfsi_vk_manualCounts']) ? $sfsi_section4_options['sfsi_vk_manualCounts'] : '0';
1040
  $scounts['ok_count'] = isset($sfsi_section4_options['sfsi_ok_manualCounts']) ? $sfsi_section4_options['sfsi_ok_manualCounts'] : '0';
@@ -1355,37 +1363,38 @@ function sfsi_get_feed_id()
1355
  exit;
1356
  }
1357
  if (!current_user_can('manage_options')) {
1358
- echo json_encode(array("res"=>"Failed",'message'=>"You should be admin to take this action"));
1359
  exit;
1360
  }
1361
  $feed_id = sanitize_text_field(get_option('sfsi_feed_id'));
1362
- if(""==$feed_id){
1363
  $sfsiId = SFSI_getFeedUrl();
1364
- update_option('sfsi_feed_id' , sanitize_text_field($sfsiId->feed_id));
1365
- update_option('sfsi_redirect_url' , sanitize_text_field($sfsiId->redirect_url));
1366
- echo json_encode(array("res"=>"success",'feed_id'=>$sfsiId->feed_id));
1367
  sfsi_getverification_code();
1368
  exit;
1369
- }else{
1370
- echo json_encode(array("res"=>"success","feed_id"=>$feed_id));
1371
  exit;
1372
  }
1373
  wp_die();
1374
  }
1375
 
1376
  add_action('wp_ajax_sfsi_save_export', 'sfsi_save_export');
1377
- function sfsi_save_export(){
 
1378
  $option1 = unserialize(get_option('sfsi_section1_options', false));
1379
- $option2 = unserialize(get_option('sfsi_section2_options', false));
1380
- $option3 = unserialize(get_option('sfsi_section3_options', false));
1381
- $option4 = unserialize(get_option('sfsi_section4_options', false));
1382
- $option5 = unserialize(get_option('sfsi_section5_options', false));
1383
- $option6 = unserialize(get_option('sfsi_section6_options', false));
1384
- $option7 = unserialize(get_option('sfsi_section7_options', false));
1385
- $option8 = unserialize(get_option('sfsi_section8_options', false));
1386
  $option9 = unserialize(get_option('sfsi_section9_options', false));
1387
- $sfsi_pluginVersion = get_option("sfsi_installDate");
1388
-
1389
  $save_export_options = array(
1390
  'option1' => $option1,
1391
  'option2' => $option2,
@@ -1403,13 +1412,13 @@ function sfsi_save_export(){
1403
  header('Content-type: application/json');
1404
  echo $json;
1405
  exit;
1406
-
1407
  }
1408
 
1409
  add_action('wp_ajax_sfsi_installDate', 'sfsi_installDate');
1410
- function sfsi_installDate(){
 
1411
  $sfsi_installDate_value = isset($_POST["sfsi_installDate"]) ? $_POST["sfsi_installDate"] : '';
1412
  update_option('sfsi_installDate', $sfsi_installDate_value);
1413
  echo json_encode(array("success"));
1414
  exit;
1415
- }
336
 
337
  $sfsi_wechat_countsDisplay = isset($_POST["sfsi_wechat_countsDisplay"]) ? sanitize_text_field($_POST["sfsi_wechat_countsDisplay"]) : 'no';
338
  $sfsi_wechat_manualCounts = isset($_POST["sfsi_wechat_manualCounts"]) ? intval(trim($_POST["sfsi_wechat_manualCounts"])) : '';
339
+
340
+
341
+ $sfsi_round_counts = isset($_POST["sfsi_round_counts"]) ? sanitize_text_field($_POST["sfsi_round_counts"]) : 'no';
342
+ $sfsi_original_counts = isset($_POST["sfsi_original_counts"]) ? sanitize_text_field($_POST["sfsi_original_counts"]) : 'no';
343
+ $sfsi_responsive_share_count = isset($_POST["sfsi_responsive_share_count"]) ? sanitize_text_field($_POST["sfsi_responsive_share_count"]) : 'no';
344
+
345
  $up_option4 = array(
346
  'sfsi_display_counts' => sanitize_text_field($sfsi_display_counts),
347
 
407
 
408
  'sfsi_wechat_countsDisplay' => sanitize_text_field($sfsi_wechat_countsDisplay),
409
  'sfsi_wechat_manualCounts' => intval($sfsi_wechat_manualCounts),
410
+
411
+ 'sfsi_round_counts' => sanitize_text_field($sfsi_round_counts),
412
+ 'sfsi_original_counts' => sanitize_text_field($sfsi_original_counts),
413
+ 'sfsi_responsive_share_count' => sanitize_text_field($sfsi_responsive_share_count),
414
+
415
+
416
+
417
+
418
  );
419
  update_option('sfsi_section4_options', serialize($up_option4));
 
420
  $new_counts = sfsi_getCounts();
421
  header('Content-Type: application/json');
422
  echo json_encode(array("res" => "success", 'counts' => $new_counts));
566
  $sfsi_icons_postPositon = isset($_POST["sfsi_icons_postPositon"]) ? sanitize_text_field($_POST["sfsi_icons_postPositon"]) : '';
567
  $sfsi_icons_alignment = isset($_POST["sfsi_icons_alignment"]) ? sanitize_text_field($_POST["sfsi_icons_alignment"]) : 'center-right';
568
  $sfsi_textBefor_icons = isset($_POST["sfsi_textBefor_icons"]) ? sanitize_text_field($_POST["sfsi_textBefor_icons"]) : '';
 
569
  $sfsi_rectsub = isset($_POST["sfsi_rectsub"]) ? sanitize_text_field($_POST["sfsi_rectsub"]) : 'no';
570
  $sfsi_rectfb = isset($_POST["sfsi_rectfb"]) ? sanitize_text_field($_POST["sfsi_rectfb"]) : 'no';
571
  $sfsi_rectshr = isset($_POST["sfsi_rectshr"]) ? sanitize_text_field($_POST["sfsi_rectshr"]) : 'no';
572
  $sfsi_recttwtr = isset($_POST["sfsi_recttwtr"]) ? sanitize_text_field($_POST["sfsi_recttwtr"]) : 'no';
573
  $sfsi_rectpinit = isset($_POST["sfsi_rectpinit"]) ? sanitize_text_field($_POST["sfsi_rectpinit"]) : 'no';
574
  $sfsi_rectfbshare = isset($_POST["sfsi_rectfbshare"]) ? sanitize_text_field($_POST["sfsi_rectfbshare"]) : 'no';
575
+ $sfsi_display_button_type = isset($_POST["sfsi_display_button_type"]) ? sanitize_text_field($_POST["sfsi_display_button_type"]) : 'no';
576
  $sfsi_responsive_icons_end_post = isset($_POST["sfsi_responsive_icons_end_post"]) ? sanitize_text_field($_POST["sfsi_responsive_icons_end_post"]) : 'no';
577
+
 
578
  $sfsi_responsive_icons_default = array(
579
  "default_icons" => array(
580
  "facebook" => array("active" => "yes", "text" => "Share on Facebook", "url" => ""),
686
  'sfsi_icons_postPositon' => sanitize_text_field($sfsi_icons_postPositon),
687
  'sfsi_icons_alignment' => sanitize_text_field($sfsi_icons_alignment),
688
  'sfsi_textBefor_icons' => sanitize_text_field(stripslashes($sfsi_textBefor_icons)),
 
689
  'sfsi_rectsub' => sanitize_text_field($sfsi_rectsub),
690
  'sfsi_rectfb' => sanitize_text_field($sfsi_rectfb),
691
  'sfsi_rectshr' => sanitize_text_field($sfsi_rectshr),
693
  'sfsi_rectpinit' => sanitize_text_field($sfsi_rectpinit),
694
  'sfsi_rectfbshare' => sanitize_text_field($sfsi_rectfbshare),
695
  'sfsi_responsive_icons' => $sfsi_responsive_icons,
696
+ 'sfsi_display_button_type' => sanitize_text_field($sfsi_display_button_type),
697
+ 'sfsi_responsive_icons_end_post' => sanitize_text_field($sfsi_responsive_icons_end_post),
 
698
 
699
  );
700
  update_option('sfsi_section6_options', serialize($up_option6));
894
  }
895
  /* upload custom icons images */
896
  /* get counts for admin section */
897
+ function sfsi_getCounts($for_resposive = false)
898
  {
899
  $socialObj = new sfsi_SocialHelper();
900
  $sfsi_section4_options = unserialize(get_option('sfsi_section4_options', false));
916
  );
917
 
918
  /* get rss count */
919
+ if (isset($sfsi_section4_options['sfsi_rss_manualCounts']) && !empty($sfsi_section4_options['sfsi_rss_manualCounts']) && $for_resposive == false) {
920
  $scounts['rss_count'] = $sfsi_section4_options['sfsi_rss_manualCounts'];
921
  }
922
 
979
  }
980
  /* get linkedIn counts */
981
 
982
+ if (isset($sfsi_section4_options['sfsi_linkedIn_countsFrom']) && $for_resposive == false) {
983
 
984
  if ($sfsi_section4_options['sfsi_linkedIn_countsFrom'] == "follower") {
985
  $linkedIn_compay = $sfsi_section2_options['sfsi_linkedin_followCompany'];
990
  'ln_oAuth_user_token' => $sfsi_section4_options['ln_oAuth_user_token']
991
  );
992
  $followers = $socialObj->sfsi_getlinkedin_follower($linkedIn_compay, $ln_settings);
993
+ $scounts['linkedIn_count'] = $socialObj->format_num($followers);
994
  } else {
995
  $scounts['linkedIn_count'] = $sfsi_section4_options['sfsi_linkedIn_manualCounts'];
996
  }
997
  }
998
 
999
+ if (isset($sfsi_section4_options['sfsi_youtube_countsFrom']) && $for_resposive == false) {
1000
 
1001
  /* get youtube counts */
1002
  if ($sfsi_section4_options['sfsi_youtube_countsFrom'] == "subscriber") {
1012
  }
1013
  }
1014
 
1015
+ if (isset($sfsi_section4_options['sfsi_pinterest_countsFrom']) && $for_resposive == false) {
1016
 
1017
  /* get Pinterest counts */
1018
  if ($sfsi_section4_options['sfsi_pinterest_countsFrom'] == "pins") {
1023
  $scounts['pin_count'] = $sfsi_section4_options['sfsi_pinterest_manualCounts'];
1024
  }
1025
  }
1026
+ if (isset($sfsi_section4_options['sfsi_instagram_countsFrom']) && $for_resposive == false) {
1027
  /* get instagram count */
1028
  if ($sfsi_section4_options['sfsi_instagram_countsFrom'] == "followers") {
1029
  $iuser_name = $sfsi_section4_options['sfsi_instagram_User'];
1041
  } else {
1042
  $scounts['instagram_count'] = $sfsi_section4_options['sfsi_instagram_manualCounts'];
1043
  }
 
1044
  }
1045
+ if ($for_resposive == false) {
1046
  $scounts['telegram_count'] = isset($sfsi_section4_options['sfsi_telegram_manualCounts']) ? $sfsi_section4_options['sfsi_telegram_manualCounts'] : '0';
1047
  $scounts['vk_count'] = isset($sfsi_section4_options['sfsi_vk_manualCounts']) ? $sfsi_section4_options['sfsi_vk_manualCounts'] : '0';
1048
  $scounts['ok_count'] = isset($sfsi_section4_options['sfsi_ok_manualCounts']) ? $sfsi_section4_options['sfsi_ok_manualCounts'] : '0';
1363
  exit;
1364
  }
1365
  if (!current_user_can('manage_options')) {
1366
+ echo json_encode(array("res" => "Failed", 'message' => "You should be admin to take this action"));
1367
  exit;
1368
  }
1369
  $feed_id = sanitize_text_field(get_option('sfsi_feed_id'));
1370
+ if ("" == $feed_id) {
1371
  $sfsiId = SFSI_getFeedUrl();
1372
+ update_option('sfsi_feed_id', sanitize_text_field($sfsiId->feed_id));
1373
+ update_option('sfsi_redirect_url', sanitize_text_field($sfsiId->redirect_url));
1374
+ echo json_encode(array("res" => "success", 'feed_id' => $sfsiId->feed_id));
1375
  sfsi_getverification_code();
1376
  exit;
1377
+ } else {
1378
+ echo json_encode(array("res" => "success", "feed_id" => $feed_id));
1379
  exit;
1380
  }
1381
  wp_die();
1382
  }
1383
 
1384
  add_action('wp_ajax_sfsi_save_export', 'sfsi_save_export');
1385
+ function sfsi_save_export()
1386
+ {
1387
  $option1 = unserialize(get_option('sfsi_section1_options', false));
1388
+ $option2 = unserialize(get_option('sfsi_section2_options', false));
1389
+ $option3 = unserialize(get_option('sfsi_section3_options', false));
1390
+ $option4 = unserialize(get_option('sfsi_section4_options', false));
1391
+ $option5 = unserialize(get_option('sfsi_section5_options', false));
1392
+ $option6 = unserialize(get_option('sfsi_section6_options', false));
1393
+ $option7 = unserialize(get_option('sfsi_section7_options', false));
1394
+ $option8 = unserialize(get_option('sfsi_section8_options', false));
1395
  $option9 = unserialize(get_option('sfsi_section9_options', false));
1396
+ $sfsi_pluginVersion = get_option("sfsi_installDate");
1397
+
1398
  $save_export_options = array(
1399
  'option1' => $option1,
1400
  'option2' => $option2,
1412
  header('Content-type: application/json');
1413
  echo $json;
1414
  exit;
 
1415
  }
1416
 
1417
  add_action('wp_ajax_sfsi_installDate', 'sfsi_installDate');
1418
+ function sfsi_installDate()
1419
+ {
1420
  $sfsi_installDate_value = isset($_POST["sfsi_installDate"]) ? $_POST["sfsi_installDate"] : '';
1421
  update_option('sfsi_installDate', $sfsi_installDate_value);
1422
  echo json_encode(array("success"));
1423
  exit;
1424
+ }
libs/controllers/sfsi_socialhelper.php CHANGED
@@ -279,7 +279,7 @@ class sfsi_SocialHelper
279
  public function sfsi_twitterFollow($tw_username)
280
  {
281
  $twitter_html = '<a target="_blank" href="https://twitter.com/intent/user?screen_name='.trim($tw_username).'">
282
- <img nopin="nopin" width="auto" src="'. SFSI_PLUGURL .'images/visit_icons/en_US_Follow.svg" class="sfsi_wicon" alt="Follow Me" title="Follow Me" style="opacity: 1;" />
283
  </a>';
284
 
285
  // $twitter_html = '<a href="https://twitter.com/'.trim($tw_username).'" class="twitter-follow-button" data-show-count="false" data-show-screen-name="false">Follow </a>';
@@ -290,10 +290,9 @@ class sfsi_SocialHelper
290
  public function sfsi_twitterShare($permalink,$tweettext)
291
  {
292
  $tweet_icon = SFSI_PLUGURL . 'images/visit_icons/en_US_Tweet.svg';
293
-
294
  $twitter_html = "<div class='sf_twiter' style='display: inline-block;vertical-align: middle;width: auto;'>
295
- <a " . sfsi_checkNewWindow() . " href='https://twitter.com/intent/tweet?text=" . urlencode($tweettext).' '.$permalink. "'style='display:inline-block' >
296
- <img nopin=nopin width='auto' class='sfsi_wicon' src='" . $tweet_icon . "' alt='Tweet' title='Tweet' >
297
  </a>
298
  </div>";
299
  return $twitter_html;
@@ -330,8 +329,8 @@ class sfsi_SocialHelper
330
  }
331
  }
332
  $twitter_html = "<div class='sf_twiter ".($rectangular_icon?'sf_icon':'')."' style='display: inline-block;vertical-align: middle;width: auto;margin-left: 7px;'>
333
- <a " . sfsi_checkNewWindow() . " href='https://twitter.com/intent/tweet?text=" . urlencode($tweettext) . ' ' . $permalink . "'style='display:inline-block' >
334
- <img nopin=nopin width='auto' class='sfsi_wicon' src='" . $tweet_icon . "' alt='Tweet' title='Tweet' >
335
  </a>".$count_html."
336
  </div>";
337
  // $twitter_html = '<a href="http://twitter.com/share" data-count="none" class="sr-twitter-button twitter-share-button" lang="en" data-url="'.$permalink.'" data-text="'.$tweettext.'" ></a>';
@@ -387,7 +386,7 @@ class sfsi_SocialHelper
387
  $sfsi_instagram_sf_count = $sfsi_instagram_sf_count_option;
388
  }
389
  /*if date is empty (for decrease request count)*/
390
- if(empty($sfsi_instagram_sf_count["date_instagram"]))
391
  {
392
  $sfsi_instagram_sf_count["date_instagram"] = strtotime(date("Y-m-d"));
393
  $counts = $this->sfsi_get_instagramFollowersCount($user_name);
@@ -459,7 +458,7 @@ class sfsi_SocialHelper
459
  public function sfsi_LinkedInShare($url='')
460
  {
461
  $url=(isset($url) && ''!==$url)? $url : home_url();
462
- return '<a ' . sfsi_checkNewWindow() . ' href="https://www.linkedin.com/shareArticle?url='.urlencode($url).'"><img class="sfsi_wicon" nopin="nopin" alt="Share" title="Share" src="'.SFSI_PLUGURL.'images/visit_icons/lnkdin_share_bck.png"></a>';
463
  // return $ifollow='<script type="IN/Share" data-url="'.$url.'"></script>';
464
  }
465
 
279
  public function sfsi_twitterFollow($tw_username)
280
  {
281
  $twitter_html = '<a target="_blank" href="https://twitter.com/intent/user?screen_name='.trim($tw_username).'">
282
+ <img data-pin-nopin= true width="auto" src="'. SFSI_PLUGURL .'images/visit_icons/en_US_Follow.svg" class="sfsi_wicon" alt="Follow Me" title="Follow Me" style="opacity: 1;" />
283
  </a>';
284
 
285
  // $twitter_html = '<a href="https://twitter.com/'.trim($tw_username).'" class="twitter-follow-button" data-show-count="false" data-show-screen-name="false">Follow </a>';
290
  public function sfsi_twitterShare($permalink,$tweettext)
291
  {
292
  $tweet_icon = SFSI_PLUGURL . 'images/visit_icons/en_US_Tweet.svg';
 
293
  $twitter_html = "<div class='sf_twiter' style='display: inline-block;vertical-align: middle;width: auto;'>
294
+ <a " . sfsi_checkNewWindow() . " href='https://twitter.com/intent/tweet?text=" . urlencode($tweettext).'+'.$permalink. "' style='display:inline-block' >
295
+ <img data-pin-nopin= true width='auto' class='sfsi_wicon' src='" . $tweet_icon . "' alt='Tweet' title='Tweet' >
296
  </a>
297
  </div>";
298
  return $twitter_html;
329
  }
330
  }
331
  $twitter_html = "<div class='sf_twiter ".($rectangular_icon?'sf_icon':'')."' style='display: inline-block;vertical-align: middle;width: auto;margin-left: 7px;'>
332
+ <a " . sfsi_checkNewWindow() . " href='https://twitter.com/intent/tweet?text=" . urlencode($tweettext) . '+' . $permalink . "'style='display:inline-block' >
333
+ <img data-pin-nopin= true width='auto' class='sfsi_wicon' src='" . $tweet_icon . "' alt='Tweet' title='Tweet' >
334
  </a>".$count_html."
335
  </div>";
336
  // $twitter_html = '<a href="http://twitter.com/share" data-count="none" class="sr-twitter-button twitter-share-button" lang="en" data-url="'.$permalink.'" data-text="'.$tweettext.'" ></a>';
386
  $sfsi_instagram_sf_count = $sfsi_instagram_sf_count_option;
387
  }
388
  /*if date is empty (for decrease request count)*/
389
+ if(!isset($sfsi_instagram_sf_count["date_instagram"])||empty($sfsi_instagram_sf_count["date_instagram"]))
390
  {
391
  $sfsi_instagram_sf_count["date_instagram"] = strtotime(date("Y-m-d"));
392
  $counts = $this->sfsi_get_instagramFollowersCount($user_name);
458
  public function sfsi_LinkedInShare($url='')
459
  {
460
  $url=(isset($url) && ''!==$url)? $url : home_url();
461
+ return '<a ' . sfsi_checkNewWindow() . ' href="https://www.linkedin.com/shareArticle?url='.urlencode($url).'"><img class="sfsi_wicon" data-pin-nopin= true alt="Share" title="Share" src="'.SFSI_PLUGURL.'images/visit_icons/lnkdin_share_bck.png"></a>';
462
  // return $ifollow='<script type="IN/Share" data-url="'.$url.'"></script>';
463
  }
464
 
libs/controllers/sfsiocns_OnPosts.php CHANGED
@@ -4,6 +4,7 @@
4
  function sfsi_social_buttons_below($content)
5
  {
6
  global $post;
 
7
  $sfsi_section6 = unserialize(get_option('sfsi_section6_options', false));
8
  $sfsi_section9 = unserialize(get_option('sfsi_section9_options', false));
9
  // if($sfsi_section9["sfsi_show_via_afterposts"]!=="yes"){
@@ -37,11 +38,11 @@ function sfsi_social_buttons_below($content)
37
 
38
  /* check if option activated in admin or not */
39
  if ($sfsi_section6['sfsi_show_Onposts'] == "yes") {
40
- $permalink = get_permalink($post->ID);
41
  $title = get_the_title();
42
  $sfsiLikeWith = "45px;";
43
  /* check for counter display */
44
- if ($sfsi_section6['sfsi_icons_DisplayCounts'] == "yes") {
45
  $show_count = 1;
46
  $sfsiLikeWith = "125px;";
47
  } else {
@@ -164,7 +165,7 @@ function sfsi_Subscribelike($permalink, $show_count)
164
  $counts = $sfsi_section4_options['sfsi_email_manualCounts'];
165
  }
166
 
167
- if ($sfsi_section6_options['sfsi_icons_DisplayCounts'] == "yes") {
168
  $icon = '<a href="' . $url . '" target="_blank"><img src="' . SFSI_PLUGURL . 'images/follow_subscribe.png" alt="error" /></a><span class="bot_no">' . $counts . '</span>';
169
  } else {
170
  $icon = '<a href="' . $url . '" target="_blank"><img src="' . SFSI_PLUGURL . 'images/follow_subscribe.png" alt="error" /></a>';
@@ -191,7 +192,7 @@ function sfsi_twitterlike($permalink, $show_count,$rectangular_icon=false)
191
  // $tweet_icon = SFSI_PLUGURL . 'images/share_icons/Twitter_Tweet/en_US_Tweet.svg';
192
  // $icons = "<div class='sf_twiter' style='display: inline-block;vertical-align: middle;width: auto;'>
193
  // <a href='https://twitter.com/intent/tweet?text=" . urlencode($twitter_text).' '.$permalink. "'style='display:inline-block' >
194
- // <img nopin=nopin width='auto' class='sfsi_premium_wicon' src='" . $tweet_icon . "' alt='Tweet' title='Tweet' >
195
  // </a>
196
  // <span class='bot_no'>".$count_html."</span>
197
  // </div>";
@@ -412,7 +413,7 @@ function sfsi_footer_script()
412
  $option4 = unserialize(get_option('sfsi_section4_options', false));
413
  $icons = "";
414
  $sfsi_responsive_icons = (isset($option6["sfsi_responsive_icons"]) ? $option6["sfsi_responsive_icons"] : null);
415
- $current_url = in_the_loop() ? get_permalink() : add_query_arg($wp->query_vars, home_url($wp->request));
416
  if (is_null($sfsi_responsive_icons)) {
417
  if ($server_side) {
418
  $sfsi_responsive_icons = array(
@@ -449,7 +450,7 @@ function sfsi_footer_script()
449
  $icon_width_type = $sfsi_responsive_icons["settings"]["icon_width_type"];
450
  $margin_above = $sfsi_responsive_icons["settings"]["margin_above"];
451
  $margin_below = $sfsi_responsive_icons["settings"]["margin_below"];
452
- if ($option4['sfsi_display_counts'] == 'yes' && isset($sfsi_responsive_icons["settings"]['show_count']) && $sfsi_responsive_icons["settings"]['show_count'] == "yes") :
453
  $counter_class = "sfsi_responsive_with_counter_icons";
454
  $couter_display = "inline-block";
455
  $counts = sfsi_getCounts(true);
4
  function sfsi_social_buttons_below($content)
5
  {
6
  global $post;
7
+ $sfsi_section4 = unserialize(get_option('sfsi_section4_options', false));
8
  $sfsi_section6 = unserialize(get_option('sfsi_section6_options', false));
9
  $sfsi_section9 = unserialize(get_option('sfsi_section9_options', false));
10
  // if($sfsi_section9["sfsi_show_via_afterposts"]!=="yes"){
38
 
39
  /* check if option activated in admin or not */
40
  if ($sfsi_section6['sfsi_show_Onposts'] == "yes") {
41
+ $permalink = add_query_arg($_GET?$_GET:array(),get_permalink($post->ID));
42
  $title = get_the_title();
43
  $sfsiLikeWith = "45px;";
44
  /* check for counter display */
45
+ if ($sfsi_section4['sfsi_display_counts'] == "yes" &&$sfsi_section4['sfsi_original_counts'] == "yes") {
46
  $show_count = 1;
47
  $sfsiLikeWith = "125px;";
48
  } else {
165
  $counts = $sfsi_section4_options['sfsi_email_manualCounts'];
166
  }
167
 
168
+ if ( $show_count) {
169
  $icon = '<a href="' . $url . '" target="_blank"><img src="' . SFSI_PLUGURL . 'images/follow_subscribe.png" alt="error" /></a><span class="bot_no">' . $counts . '</span>';
170
  } else {
171
  $icon = '<a href="' . $url . '" target="_blank"><img src="' . SFSI_PLUGURL . 'images/follow_subscribe.png" alt="error" /></a>';
192
  // $tweet_icon = SFSI_PLUGURL . 'images/share_icons/Twitter_Tweet/en_US_Tweet.svg';
193
  // $icons = "<div class='sf_twiter' style='display: inline-block;vertical-align: middle;width: auto;'>
194
  // <a href='https://twitter.com/intent/tweet?text=" . urlencode($twitter_text).' '.$permalink. "'style='display:inline-block' >
195
+ // <img data-pin-nopin= true width='auto' class='sfsi_premium_wicon' src='" . $tweet_icon . "' alt='Tweet' title='Tweet' >
196
  // </a>
197
  // <span class='bot_no'>".$count_html."</span>
198
  // </div>";
413
  $option4 = unserialize(get_option('sfsi_section4_options', false));
414
  $icons = "";
415
  $sfsi_responsive_icons = (isset($option6["sfsi_responsive_icons"]) ? $option6["sfsi_responsive_icons"] : null);
416
+ $current_url = in_the_loop() ? add_query_arg($_GET?$_GET:array(),get_permalink()) : add_query_arg($wp->query_vars, home_url($wp->request));
417
  if (is_null($sfsi_responsive_icons)) {
418
  if ($server_side) {
419
  $sfsi_responsive_icons = array(
450
  $icon_width_type = $sfsi_responsive_icons["settings"]["icon_width_type"];
451
  $margin_above = $sfsi_responsive_icons["settings"]["margin_above"];
452
  $margin_below = $sfsi_responsive_icons["settings"]["margin_below"];
453
+ if ($option4['sfsi_display_counts'] == 'yes' && $option4['sfsi_responsive_share_count'] == 'yes') :
454
  $counter_class = "sfsi_responsive_with_counter_icons";
455
  $couter_display = "inline-block";
456
  $counts = sfsi_getCounts(true);
libs/sfsi_install_uninstall.php CHANGED
@@ -39,7 +39,7 @@ function sfsi_update_plugin()
39
  update_option("sfsi_custom_icons", "yes");
40
  }
41
  //Install version
42
- update_option("sfsi_pluginVersion", "2.54");
43
 
44
  if (!get_option('sfsi_serverphpVersionnotification')) {
45
  add_option("sfsi_serverphpVersionnotification", "yes");
@@ -145,6 +145,7 @@ function sfsi_update_plugin()
145
  if (!isset($option4['sfsi_wechat_countsDisplay'])) {
146
  $option4['sfsi_wechat_countsDisplay'] = "no";
147
  }
 
148
  if (!isset($option4['sfsi_wechat_countsFrom'])) {
149
  $option4['sfsi_wechat_countsFrom'] = "manual";
150
  }
@@ -490,9 +491,7 @@ function sfsi_update_plugin()
490
  if (!isset($option6['sfsi_display_button_type'])) {
491
  $option6["sfsi_display_button_type"] = 'responsive_button';
492
  }
493
- if (!isset($option6['sfsi_share_count'])) {
494
- $option6["sfsi_share_count"] = 'no';
495
- }
496
  if (!isset($option6['sfsi_responsive_icons_end_post'])) {
497
  $option6["sfsi_responsive_icons_end_post"] = 'no';
498
  }
@@ -762,6 +761,10 @@ function sfsi_activate_plugin()
762
  'sfsi_weibo_countsFrom' => 'manual',
763
  'sfsi_weibo_manualCounts' => '20',
764
 
 
 
 
 
765
  'sfsi_wechat_countsDisplay' => 'no',
766
  'sfsi_wechat_countsFrom' => 'manual',
767
  'sfsi_wechat_manualCounts' => '20',
@@ -789,6 +792,7 @@ function sfsi_activate_plugin()
789
 
790
  'sfsi_instagram_User' => '',
791
 
 
792
  );
793
  add_option('sfsi_section4_options', serialize($options4));
794
  }
@@ -860,7 +864,6 @@ function sfsi_activate_plugin()
860
  'sfsi_icons_alignment' => 'center-right',
861
  'sfsi_rss_countsDisplay' => 'no',
862
  'sfsi_textBefor_icons' => 'Please follow and like us:',
863
- 'sfsi_icons_DisplayCounts' => 'no',
864
  'sfsi_rectsub' => 'yes',
865
  'sfsi_rectfb' => 'yes',
866
  'sfsi_rectshr' => 'no',
@@ -869,7 +872,6 @@ function sfsi_activate_plugin()
869
  'sfsi_rectfbshare' => 'yes',
870
  'sfsi_display_button_type' => 'responsive_button',
871
  'sfsi_responsive_icons_end_post' => 'no',
872
- 'sfsi_share_count' => 'no',
873
  "sfsi_responsive_icons" => $sfsi_responsive_icons_default
874
  );
875
  add_option('sfsi_section6_options', serialize($options6));
39
  update_option("sfsi_custom_icons", "yes");
40
  }
41
  //Install version
42
+ update_option("sfsi_pluginVersion", "2.55");
43
 
44
  if (!get_option('sfsi_serverphpVersionnotification')) {
45
  add_option("sfsi_serverphpVersionnotification", "yes");
145
  if (!isset($option4['sfsi_wechat_countsDisplay'])) {
146
  $option4['sfsi_wechat_countsDisplay'] = "no";
147
  }
148
+
149
  if (!isset($option4['sfsi_wechat_countsFrom'])) {
150
  $option4['sfsi_wechat_countsFrom'] = "manual";
151
  }
491
  if (!isset($option6['sfsi_display_button_type'])) {
492
  $option6["sfsi_display_button_type"] = 'responsive_button';
493
  }
494
+
 
 
495
  if (!isset($option6['sfsi_responsive_icons_end_post'])) {
496
  $option6["sfsi_responsive_icons_end_post"] = 'no';
497
  }
761
  'sfsi_weibo_countsFrom' => 'manual',
762
  'sfsi_weibo_manualCounts' => '20',
763
 
764
+ 'sfsi_round_counts' => 'yes',
765
+ 'sfsi_original_counts' => 'yes',
766
+ 'sfsi_responsive_share_count' => 'yes',
767
+
768
  'sfsi_wechat_countsDisplay' => 'no',
769
  'sfsi_wechat_countsFrom' => 'manual',
770
  'sfsi_wechat_manualCounts' => '20',
792
 
793
  'sfsi_instagram_User' => '',
794
 
795
+
796
  );
797
  add_option('sfsi_section4_options', serialize($options4));
798
  }
864
  'sfsi_icons_alignment' => 'center-right',
865
  'sfsi_rss_countsDisplay' => 'no',
866
  'sfsi_textBefor_icons' => 'Please follow and like us:',
 
867
  'sfsi_rectsub' => 'yes',
868
  'sfsi_rectfb' => 'yes',
869
  'sfsi_rectshr' => 'no',
872
  'sfsi_rectfbshare' => 'yes',
873
  'sfsi_display_button_type' => 'responsive_button',
874
  'sfsi_responsive_icons_end_post' => 'no',
 
875
  "sfsi_responsive_icons" => $sfsi_responsive_icons_default
876
  );
877
  add_option('sfsi_section6_options', serialize($options6));
libs/sfsi_subscribe_widget.php CHANGED
@@ -1,101 +1,96 @@
1
  <?php
2
  // Creating the widget
3
- class subscriber_widget extends WP_Widget {
 
4
 
5
  function __construct()
6
  {
7
  parent::__construct(
8
  // Base ID of your widget
9
- 'subscriber_widget',
10
-
11
  // Widget name will appear in UI
12
- __('Ultimate Social Subscribe Form', 'subscriber_widget_domain'),
13
-
14
  // Widget description
15
- array( 'description' => __( 'Ultimate Social Subscribe Form', 'subscriber_widget_domain' ), )
16
  );
17
  }
18
 
19
- public function widget( $args, $instance )
20
  {
21
- $title = apply_filters( 'widget_title', $instance['title'] );
22
-
23
  // before and after widget arguments are defined by themes
24
  echo $args['before_widget'];
25
 
26
- if ( ! empty( $title ) )
27
- {
28
  echo $args['before_title'] . $title . $args['after_title'];
29
  }
30
 
31
  // Call subscriber form
32
  echo do_shortcode("[USM_form]");
33
-
34
  echo $args['after_widget'];
35
  }
36
-
37
  // Widget Backend
38
- public function form( $instance )
39
  {
40
- if ( isset( $instance[ 'title' ] ))
41
- {
42
- $title = $instance[ 'title' ];
43
- }
44
- else
45
- {
46
  $title = '';
47
  }
48
  ?>
49
- <p>
50
- <label for="<?php echo $this->get_field_id( 'title' ); ?>">Title:</label>
51
- <input class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>"
52
- name="<?php echo $this->get_field_name( 'title' ); ?>" type="text" value="<?php echo esc_attr( $title ); ?>" />
53
- </p>
54
- <?php
55
- }
56
-
57
- // Updating widget replacing old instances with new
58
- public function update( $newInstance, $oldInstance )
59
- {
60
- $instance = array();
61
- $instance['title'] = ( ! empty( $newInstance['title'] ) ) ? strip_tags( $newInstance['title'] ) : '';
62
- return $instance;
63
- }
64
- }
65
- // Class wpb_widget ends here
66
 
67
- // Register and load the widget
68
- function subscriber_load_widget()
69
- {
70
- register_widget( 'subscriber_widget' );
71
- }
72
- add_action( 'widgets_init', 'subscriber_load_widget' );
73
- ?><?php
74
- add_shortcode("USM_form", "sfsi_get_subscriberForm");
75
- function sfsi_get_subscriberForm()
76
- {
77
- $option8 = unserialize(get_option('sfsi_section8_options',false));
78
- $sfsi_feediid = sanitize_text_field(get_option('sfsi_feed_id'));
79
- if($sfsi_feediid == ""){
80
- $url = "https://api.follow.it/subscription-form/";
81
- }else{
82
- $url = "https://api.follow.it/subscription-form/";
83
- $url = $url.$sfsi_feediid.'/8/';
84
 
85
- }
86
- $return = '';
87
- $return .= '<div class="sfsi_subscribe_Popinner">
88
- <form method="post" onsubmit="return sfsi_processfurther(this);" target="popupwindow" action="'.$url.'">
89
- <h5>'.trim(sanitize_text_field($option8['sfsi_form_heading_text'])).'</h5>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
90
  <div class="sfsi_subscription_form_field">
91
  <input type="hidden" name="action" value="followPub">
92
- <input type="email" name="email" value="" placeholder="'.trim($option8['sfsi_form_field_text']).'"/>
93
  </div>
94
  <div class="sfsi_subscription_form_field">
95
- <input type="submit" name="subscribe" />
96
  </div>
97
  </form>
98
  </div>';
99
- return $return;
100
- }
101
- ?>
1
  <?php
2
  // Creating the widget
3
+ class subscriber_widget extends WP_Widget
4
+ {
5
 
6
  function __construct()
7
  {
8
  parent::__construct(
9
  // Base ID of your widget
10
+ 'subscriber_widget',
11
+
12
  // Widget name will appear in UI
13
+ __('Ultimate Social Subscribe Form', 'subscriber_widget_domain'),
14
+
15
  // Widget description
16
+ array('description' => __('Ultimate Social Subscribe Form', 'subscriber_widget_domain'),)
17
  );
18
  }
19
 
20
+ public function widget($args, $instance)
21
  {
22
+ $title = apply_filters('widget_title', $instance['title']);
23
+
24
  // before and after widget arguments are defined by themes
25
  echo $args['before_widget'];
26
 
27
+ if (!empty($title)) {
 
28
  echo $args['before_title'] . $title . $args['after_title'];
29
  }
30
 
31
  // Call subscriber form
32
  echo do_shortcode("[USM_form]");
33
+
34
  echo $args['after_widget'];
35
  }
36
+
37
  // Widget Backend
38
+ public function form($instance)
39
  {
40
+ if (isset($instance['title'])) {
41
+ $title = $instance['title'];
42
+ } else {
 
 
 
43
  $title = '';
44
  }
45
  ?>
46
+ <p>
47
+ <label for="<?php echo $this->get_field_id('title'); ?>">Title:</label>
48
+ <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo esc_attr($title); ?>" />
49
+ </p>
50
+ <?php
51
+ }
 
 
 
 
 
 
 
 
 
 
 
52
 
53
+ // Updating widget replacing old instances with new
54
+ public function update($newInstance, $oldInstance)
55
+ {
56
+ $instance = array();
57
+ $instance['title'] = (!empty($newInstance['title'])) ? strip_tags($newInstance['title']) : '';
58
+ return $instance;
59
+ }
60
+ }
61
+ // Class wpb_widget ends here
 
 
 
 
 
 
 
 
62
 
63
+ // Register and load the widget
64
+ function subscriber_load_widget()
65
+ {
66
+ register_widget('subscriber_widget');
67
+ }
68
+ add_action('widgets_init', 'subscriber_load_widget');
69
+ ?><?php
70
+ add_shortcode("USM_form", "sfsi_get_subscriberForm");
71
+ function sfsi_get_subscriberForm()
72
+ {
73
+ $option8 = unserialize(get_option('sfsi_section8_options', false));
74
+ $sfsi_feediid = sanitize_text_field(get_option('sfsi_feed_id'));
75
+ if ($sfsi_feediid == "") {
76
+ $url = "https://api.follow.it/subscription-form/clUvQVJZazRWeXZkTS9FUGVZU1Nnay9wRzgycTVDV0FqNmpHZUNyc0NJbS9ucnVEbnR6UFJDMnJmTTRBSU45T1RMenl2ZVNBeHIrRTdrdHFNd29hVEU4a3BkVGJsMEdWaDdNZjBDY2dZclFLdFp4NGxRMUwwaWpCOTFxdUFjdUp8a1VGN1FvbVVGcW9MUWFKSU9Rbk5ScFYzZVR3Q1hVdEdtNDUwWmRtYnErZz0=/8/";
77
+ } else {
78
+ $url = "https://api.follow.it/subscription-form/";
79
+ $url = $url . $sfsi_feediid . '/8/';
80
+ }
81
+ $return = '';
82
+ $return .= '<div class="sfsi_subscribe_Popinner">
83
+ <form method="post" onsubmit="return sfsi_processfurther(this);" target="popupwindow" action="' . $url . '">
84
+ <h5>' . trim(sanitize_text_field($option8['sfsi_form_heading_text'])) . '</h5>
85
  <div class="sfsi_subscription_form_field">
86
  <input type="hidden" name="action" value="followPub">
87
+ <input type="email" name="email" value="" placeholder="' . trim($option8['sfsi_form_field_text']) . '"/>
88
  </div>
89
  <div class="sfsi_subscription_form_field">
90
+ <input type="submit" name="subscribe" value="'.sanitize_text_field($option8['sfsi_form_button_text']).'"/>
91
  </div>
92
  </form>
93
  </div>';
94
+ return $return;
95
+ }
96
+ ?>
libs/sfsi_widget.php CHANGED
@@ -439,7 +439,6 @@ class Sfsi_Widget extends WP_Widget
439
  // $current_url = $scheme.'://'.$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'];
440
 
441
  $current_url = sfsi_get_current_page_url();
442
- // var_dump($current_url);
443
 
444
  $url = "#";
445
  $cmcls = '';
@@ -457,7 +456,7 @@ class Sfsi_Widget extends WP_Widget
457
  $arrow_class = "bot_rss_arow";
458
 
459
  /* fecth no of counts if active in admin section */
460
- if ($sfsi_section4_options['sfsi_rss_countsDisplay'] == "yes" && $sfsi_section4_options['sfsi_display_counts'] == "yes") {
461
  $counts = $socialObj->format_num($sfsi_section4_options['sfsi_rss_manualCounts']);
462
  }
463
 
@@ -497,7 +496,8 @@ class Sfsi_Widget extends WP_Widget
497
  /* fecth no of counts if active in admin section */
498
  if (
499
  $sfsi_section4_options['sfsi_email_countsDisplay'] == "yes" &&
500
- $sfsi_section4_options['sfsi_display_counts'] == "yes"
 
501
  ) {
502
  if ($sfsi_section4_options['sfsi_email_countsFrom'] == "manual") {
503
  $counts = $socialObj->format_num($sfsi_section4_options['sfsi_email_manualCounts']);
@@ -581,7 +581,6 @@ class Sfsi_Widget extends WP_Widget
581
  $page_option = isset($sfsi_section2_options['sfsi_facebookPage_option']) && !empty($sfsi_section2_options['sfsi_facebookPage_option']) ? $sfsi_section2_options['sfsi_facebookPage_option'] : false;
582
 
583
  $share_option = isset($sfsi_section2_options['sfsi_facebookShare_option']) && !empty($sfsi_section2_options['sfsi_facebookShare_option']) ? $sfsi_section2_options['sfsi_facebookShare_option'] : false;
584
-
585
  if ((false != $like_option && $like_option == "yes") || (false != $share_option && $share_option == "yes")) {
586
  $url = ($sfsi_section2_options['sfsi_facebookPage_url']) ? $sfsi_section2_options['sfsi_facebookPage_url'] : '';
587
  $hoverSHow = 1;
@@ -602,7 +601,8 @@ class Sfsi_Widget extends WP_Widget
602
  /* fecth no of counts if active in admin section */
603
  if (
604
  $sfsi_section4_options['sfsi_facebook_countsDisplay'] == "yes" &&
605
- $sfsi_section4_options['sfsi_display_counts'] == "yes"
 
606
  ) {
607
  if ($sfsi_section4_options['sfsi_facebook_countsFrom'] == "manual") {
608
  $counts = $socialObj->format_num($sfsi_section4_options['sfsi_facebook_manualCounts']);
@@ -674,7 +674,8 @@ class Sfsi_Widget extends WP_Widget
674
  /* fecth no of counts if active in admin section */
675
  if (
676
  $sfsi_section4_options['sfsi_twitter_countsDisplay'] == "yes" &&
677
- $sfsi_section4_options['sfsi_display_counts'] == "yes"
 
678
  ) {
679
  if ($sfsi_section4_options['sfsi_twitter_countsFrom'] == "manual") {
680
  $counts = $socialObj->format_num($sfsi_section4_options['sfsi_twitter_manualCounts']);
@@ -754,7 +755,8 @@ class Sfsi_Widget extends WP_Widget
754
  /* fecth no of counts if active in admin section */
755
  if (
756
  $sfsi_section4_options['sfsi_youtube_countsDisplay'] == "yes" &&
757
- $sfsi_section4_options['sfsi_display_counts'] == "yes"
 
758
  ) {
759
  if ($sfsi_section4_options['sfsi_youtube_countsFrom'] == "manual") {
760
  $counts = $socialObj->format_num($sfsi_section4_options['sfsi_youtube_manualCounts']);
@@ -814,6 +816,8 @@ class Sfsi_Widget extends WP_Widget
814
  $cDisplay = isset($sfsi_section4_options['sfsi_pinterest_countsDisplay']) && !empty($sfsi_section4_options['sfsi_pinterest_countsDisplay']) ? $sfsi_section4_options['sfsi_pinterest_countsDisplay'] : false;
815
 
816
  $displayC = isset($sfsi_section4_options['sfsi_display_counts']) && !empty($sfsi_section4_options['sfsi_display_counts']) ? $sfsi_section4_options['sfsi_display_counts'] : false;
 
 
817
 
818
  $cFrom = isset($sfsi_section4_options['sfsi_pinterest_countsFrom']) && !empty($sfsi_section4_options['sfsi_pinterest_countsFrom']) ? $sfsi_section4_options['sfsi_pinterest_countsFrom'] : false;
819
  // var_dump($sfsi_section4_options['sfsi_pinterest_countsFrom'],$cFrom);die();
@@ -830,7 +834,7 @@ class Sfsi_Widget extends WP_Widget
830
  }
831
 
832
  /* fecth no of counts if active in admin section */
833
- if ($cDisplay == "yes" && $displayC == "yes") {
834
  if ($cFrom == "manual") {
835
  $counts = $socialObj->format_num($sfsi_section4_options['sfsi_pinterest_manualCounts']);
836
  } else if ($cFrom == "pins") {
@@ -877,10 +881,12 @@ class Sfsi_Widget extends WP_Widget
877
 
878
  $Displayc = isset($sfsi_section4_options['sfsi_display_counts']) && !empty($sfsi_section4_options['sfsi_display_counts']) ? $sfsi_section4_options['sfsi_display_counts'] : false;
879
 
 
 
880
  $cFrom = isset($sfsi_section4_options['sfsi_instagram_countsFrom']) && !empty($sfsi_section4_options['sfsi_instagram_countsFrom']) ? $sfsi_section4_options['sfsi_instagram_countsFrom'] : false;
881
 
882
  /* fecth no of counts if active in admin section */
883
- if ($cDisplay == "yes" && $Displayc == "yes") {
884
  if ($cFrom == "manual") {
885
  $counts = $socialObj->format_num($sfsi_section4_options['sfsi_instagram_manualCounts']);
886
  } else if ($cFrom == "followers") {
@@ -925,8 +931,9 @@ class Sfsi_Widget extends WP_Widget
925
  $cDisplay = isset($sfsi_section4_options['sfsi_telegram_countsDisplay']) && !empty($sfsi_section4_options['sfsi_telegram_countsDisplay']) ? $sfsi_section4_options['sfsi_telegram_countsDisplay'] : false;
926
 
927
  $Displayc = isset($sfsi_section4_options['sfsi_display_counts']) && !empty($sfsi_section4_options['sfsi_display_counts']) ? $sfsi_section4_options['sfsi_display_counts'] : false;
 
928
  /* fecth no of counts if active in admin section */
929
- if ($cDisplay == "yes" && $Displayc == "yes") {
930
 
931
  $counts = $socialObj->format_num($sfsi_section4_options['sfsi_telegram_manualCounts']);
932
  }
@@ -988,9 +995,9 @@ class Sfsi_Widget extends WP_Widget
988
  $cDisplay = isset($sfsi_section4_options['sfsi_vk_countsDisplay']) && !empty($sfsi_section4_options['sfsi_vk_countsDisplay']) ? $sfsi_section4_options['sfsi_vk_countsDisplay'] : false;
989
 
990
  $Displayc = isset($sfsi_section4_options['sfsi_display_counts']) && !empty($sfsi_section4_options['sfsi_display_counts']) ? $sfsi_section4_options['sfsi_display_counts'] : false;
991
-
992
  /* fecth no of counts if active in admin section */
993
- if ($cDisplay == "yes" && $Displayc == "yes") {
994
  $counts = $socialObj->format_num($sfsi_section4_options['sfsi_vk_manualCounts']);
995
  }
996
 
@@ -1030,8 +1037,10 @@ class Sfsi_Widget extends WP_Widget
1030
  $cDisplay = isset($sfsi_section4_options['sfsi_ok_countsDisplay']) && !empty($sfsi_section4_options['sfsi_ok_countsDisplay']) ? $sfsi_section4_options['sfsi_ok_countsDisplay'] : false;
1031
 
1032
  $Displayc = isset($sfsi_section4_options['sfsi_display_counts']) && !empty($sfsi_section4_options['sfsi_display_counts']) ? $sfsi_section4_options['sfsi_display_counts'] : false;
 
 
1033
  /* fecth no of counts if active in admin section */
1034
- if ($cDisplay == "yes" && $Displayc == "yes") {
1035
  $counts = $socialObj->format_num($sfsi_section4_options['sfsi_ok_manualCounts']);
1036
  }
1037
 
@@ -1072,9 +1081,9 @@ class Sfsi_Widget extends WP_Widget
1072
  $cDisplay = isset($sfsi_section4_options['sfsi_weibo_countsDisplay']) && !empty($sfsi_section4_options['sfsi_weibo_countsDisplay']) ? $sfsi_section4_options['sfsi_weibo_countsDisplay'] : false;
1073
 
1074
  $Displayc = isset($sfsi_section4_options['sfsi_display_counts']) && !empty($sfsi_section4_options['sfsi_display_counts']) ? $sfsi_section4_options['sfsi_display_counts'] : false;
1075
-
1076
  /* fecth no of counts if active in admin section */
1077
- if ($cDisplay == "yes" && $Displayc == "yes") {
1078
  $counts = $socialObj->format_num($sfsi_section4_options['sfsi_weibo_manualCounts']);
1079
  }
1080
 
@@ -1115,9 +1124,9 @@ class Sfsi_Widget extends WP_Widget
1115
  $cDisplay = isset($sfsi_section4_options['sfsi_wechat_countsDisplay']) && !empty($sfsi_section4_options['sfsi_wechat_countsDisplay']) ? $sfsi_section4_options['sfsi_wechat_countsDisplay'] : false;
1116
 
1117
  $Displayc = isset($sfsi_section4_options['sfsi_display_counts']) && !empty($sfsi_section4_options['sfsi_display_counts']) ? $sfsi_section4_options['sfsi_display_counts'] : false;
1118
-
1119
  /* fecth no of counts if active in admin section */
1120
- if ($cDisplay == "yes" && $Displayc == "yes") {
1121
  $counts = $socialObj->format_num($sfsi_section4_options['sfsi_wechat_manualCounts']);
1122
  }
1123
  $url = "weixin://dl/chat";
@@ -1236,9 +1245,9 @@ class Sfsi_Widget extends WP_Widget
1236
  $disp = isset($sfsi_section4_options['sfsi_linkedIn_countsDisplay']) && !empty($sfsi_section4_options['sfsi_linkedIn_countsDisplay']) ? $sfsi_section4_options['sfsi_linkedIn_countsDisplay'] : false;
1237
 
1238
  $dcount = isset($sfsi_section4_options['sfsi_display_counts']) && !empty($sfsi_section4_options['sfsi_display_counts']) ? $sfsi_section4_options['sfsi_display_counts'] : false;
1239
-
1240
  /* fecth no of counts if active in admin section */
1241
- if ($disp == "yes" && $dcount == "yes") {
1242
  if ($cFrom == "manual") {
1243
  $counts = $socialObj->format_num($sfsi_section4_options['sfsi_linkedIn_manualCounts']);
1244
  } else if ($cFrom == "follower") {
439
  // $current_url = $scheme.'://'.$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'];
440
 
441
  $current_url = sfsi_get_current_page_url();
 
442
 
443
  $url = "#";
444
  $cmcls = '';
456
  $arrow_class = "bot_rss_arow";
457
 
458
  /* fecth no of counts if active in admin section */
459
+ if ($sfsi_section4_options['sfsi_rss_countsDisplay'] == "yes" && $sfsi_section4_options['sfsi_display_counts'] == "yes" && $sfsi_section4_options['sfsi_round_counts'] == "yes") {
460
  $counts = $socialObj->format_num($sfsi_section4_options['sfsi_rss_manualCounts']);
461
  }
462
 
496
  /* fecth no of counts if active in admin section */
497
  if (
498
  $sfsi_section4_options['sfsi_email_countsDisplay'] == "yes" &&
499
+ $sfsi_section4_options['sfsi_display_counts'] == "yes" &&
500
+ $sfsi_section4_options['sfsi_round_counts'] == "yes"
501
  ) {
502
  if ($sfsi_section4_options['sfsi_email_countsFrom'] == "manual") {
503
  $counts = $socialObj->format_num($sfsi_section4_options['sfsi_email_manualCounts']);
581
  $page_option = isset($sfsi_section2_options['sfsi_facebookPage_option']) && !empty($sfsi_section2_options['sfsi_facebookPage_option']) ? $sfsi_section2_options['sfsi_facebookPage_option'] : false;
582
 
583
  $share_option = isset($sfsi_section2_options['sfsi_facebookShare_option']) && !empty($sfsi_section2_options['sfsi_facebookShare_option']) ? $sfsi_section2_options['sfsi_facebookShare_option'] : false;
 
584
  if ((false != $like_option && $like_option == "yes") || (false != $share_option && $share_option == "yes")) {
585
  $url = ($sfsi_section2_options['sfsi_facebookPage_url']) ? $sfsi_section2_options['sfsi_facebookPage_url'] : '';
586
  $hoverSHow = 1;
601
  /* fecth no of counts if active in admin section */
602
  if (
603
  $sfsi_section4_options['sfsi_facebook_countsDisplay'] == "yes" &&
604
+ $sfsi_section4_options['sfsi_display_counts'] == "yes" &&
605
+ $sfsi_section4_options['sfsi_round_counts'] == "yes"
606
  ) {
607
  if ($sfsi_section4_options['sfsi_facebook_countsFrom'] == "manual") {
608
  $counts = $socialObj->format_num($sfsi_section4_options['sfsi_facebook_manualCounts']);
674
  /* fecth no of counts if active in admin section */
675
  if (
676
  $sfsi_section4_options['sfsi_twitter_countsDisplay'] == "yes" &&
677
+ $sfsi_section4_options['sfsi_display_counts'] == "yes" &&
678
+ $sfsi_section4_options['sfsi_round_counts'] == "yes"
679
  ) {
680
  if ($sfsi_section4_options['sfsi_twitter_countsFrom'] == "manual") {
681
  $counts = $socialObj->format_num($sfsi_section4_options['sfsi_twitter_manualCounts']);
755
  /* fecth no of counts if active in admin section */
756
  if (
757
  $sfsi_section4_options['sfsi_youtube_countsDisplay'] == "yes" &&
758
+ $sfsi_section4_options['sfsi_display_counts'] == "yes" &&
759
+ $sfsi_section4_options['sfsi_round_counts'] == "yes"
760
  ) {
761
  if ($sfsi_section4_options['sfsi_youtube_countsFrom'] == "manual") {
762
  $counts = $socialObj->format_num($sfsi_section4_options['sfsi_youtube_manualCounts']);
816
  $cDisplay = isset($sfsi_section4_options['sfsi_pinterest_countsDisplay']) && !empty($sfsi_section4_options['sfsi_pinterest_countsDisplay']) ? $sfsi_section4_options['sfsi_pinterest_countsDisplay'] : false;
817
 
818
  $displayC = isset($sfsi_section4_options['sfsi_display_counts']) && !empty($sfsi_section4_options['sfsi_display_counts']) ? $sfsi_section4_options['sfsi_display_counts'] : false;
819
+
820
+ $display_round_counts = isset($sfsi_section4_options['sfsi_round_counts']) && !empty($sfsi_section4_options['sfsi_round_counts']) ? $sfsi_section4_options['sfsi_round_counts'] : false;
821
 
822
  $cFrom = isset($sfsi_section4_options['sfsi_pinterest_countsFrom']) && !empty($sfsi_section4_options['sfsi_pinterest_countsFrom']) ? $sfsi_section4_options['sfsi_pinterest_countsFrom'] : false;
823
  // var_dump($sfsi_section4_options['sfsi_pinterest_countsFrom'],$cFrom);die();
834
  }
835
 
836
  /* fecth no of counts if active in admin section */
837
+ if ($cDisplay == "yes" && $displayC == "yes" && $display_round_counts =="yes") {
838
  if ($cFrom == "manual") {
839
  $counts = $socialObj->format_num($sfsi_section4_options['sfsi_pinterest_manualCounts']);
840
  } else if ($cFrom == "pins") {
881
 
882
  $Displayc = isset($sfsi_section4_options['sfsi_display_counts']) && !empty($sfsi_section4_options['sfsi_display_counts']) ? $sfsi_section4_options['sfsi_display_counts'] : false;
883
 
884
+ $display_round_counts = isset($sfsi_section4_options['sfsi_round_counts']) && !empty($sfsi_section4_options['sfsi_round_counts']) ? $sfsi_section4_options['sfsi_round_counts'] : false;
885
+
886
  $cFrom = isset($sfsi_section4_options['sfsi_instagram_countsFrom']) && !empty($sfsi_section4_options['sfsi_instagram_countsFrom']) ? $sfsi_section4_options['sfsi_instagram_countsFrom'] : false;
887
 
888
  /* fecth no of counts if active in admin section */
889
+ if ($cDisplay == "yes" && $Displayc == "yes" && $display_round_counts =="yes") {
890
  if ($cFrom == "manual") {
891
  $counts = $socialObj->format_num($sfsi_section4_options['sfsi_instagram_manualCounts']);
892
  } else if ($cFrom == "followers") {
931
  $cDisplay = isset($sfsi_section4_options['sfsi_telegram_countsDisplay']) && !empty($sfsi_section4_options['sfsi_telegram_countsDisplay']) ? $sfsi_section4_options['sfsi_telegram_countsDisplay'] : false;
932
 
933
  $Displayc = isset($sfsi_section4_options['sfsi_display_counts']) && !empty($sfsi_section4_options['sfsi_display_counts']) ? $sfsi_section4_options['sfsi_display_counts'] : false;
934
+ $display_round_counts = isset($sfsi_section4_options['sfsi_round_counts']) && !empty($sfsi_section4_options['sfsi_round_counts']) ? $sfsi_section4_options['sfsi_round_counts'] : false;
935
  /* fecth no of counts if active in admin section */
936
+ if ($cDisplay == "yes" && $Displayc == "yes" && $display_round_counts =="yes") {
937
 
938
  $counts = $socialObj->format_num($sfsi_section4_options['sfsi_telegram_manualCounts']);
939
  }
995
  $cDisplay = isset($sfsi_section4_options['sfsi_vk_countsDisplay']) && !empty($sfsi_section4_options['sfsi_vk_countsDisplay']) ? $sfsi_section4_options['sfsi_vk_countsDisplay'] : false;
996
 
997
  $Displayc = isset($sfsi_section4_options['sfsi_display_counts']) && !empty($sfsi_section4_options['sfsi_display_counts']) ? $sfsi_section4_options['sfsi_display_counts'] : false;
998
+ $display_round_counts = isset($sfsi_section4_options['sfsi_round_counts']) && !empty($sfsi_section4_options['sfsi_round_counts']) ? $sfsi_section4_options['sfsi_round_counts'] : false;
999
  /* fecth no of counts if active in admin section */
1000
+ if ($cDisplay == "yes" && $Displayc == "yes" && $display_round_counts =="yes") {
1001
  $counts = $socialObj->format_num($sfsi_section4_options['sfsi_vk_manualCounts']);
1002
  }
1003
 
1037
  $cDisplay = isset($sfsi_section4_options['sfsi_ok_countsDisplay']) && !empty($sfsi_section4_options['sfsi_ok_countsDisplay']) ? $sfsi_section4_options['sfsi_ok_countsDisplay'] : false;
1038
 
1039
  $Displayc = isset($sfsi_section4_options['sfsi_display_counts']) && !empty($sfsi_section4_options['sfsi_display_counts']) ? $sfsi_section4_options['sfsi_display_counts'] : false;
1040
+ $display_round_counts = isset($sfsi_section4_options['sfsi_round_counts']) && !empty($sfsi_section4_options['sfsi_round_counts']) ? $sfsi_section4_options['sfsi_round_counts'] : false;
1041
+
1042
  /* fecth no of counts if active in admin section */
1043
+ if ($cDisplay == "yes" && $Displayc == "yes" && $display_round_counts =="yes") {
1044
  $counts = $socialObj->format_num($sfsi_section4_options['sfsi_ok_manualCounts']);
1045
  }
1046
 
1081
  $cDisplay = isset($sfsi_section4_options['sfsi_weibo_countsDisplay']) && !empty($sfsi_section4_options['sfsi_weibo_countsDisplay']) ? $sfsi_section4_options['sfsi_weibo_countsDisplay'] : false;
1082
 
1083
  $Displayc = isset($sfsi_section4_options['sfsi_display_counts']) && !empty($sfsi_section4_options['sfsi_display_counts']) ? $sfsi_section4_options['sfsi_display_counts'] : false;
1084
+ $display_round_counts = isset($sfsi_section4_options['sfsi_round_counts']) && !empty($sfsi_section4_options['sfsi_round_counts']) ? $sfsi_section4_options['sfsi_round_counts'] : false;
1085
  /* fecth no of counts if active in admin section */
1086
+ if ($cDisplay == "yes" && $Displayc == "yes" && $display_round_counts =="yes") {
1087
  $counts = $socialObj->format_num($sfsi_section4_options['sfsi_weibo_manualCounts']);
1088
  }
1089
 
1124
  $cDisplay = isset($sfsi_section4_options['sfsi_wechat_countsDisplay']) && !empty($sfsi_section4_options['sfsi_wechat_countsDisplay']) ? $sfsi_section4_options['sfsi_wechat_countsDisplay'] : false;
1125
 
1126
  $Displayc = isset($sfsi_section4_options['sfsi_display_counts']) && !empty($sfsi_section4_options['sfsi_display_counts']) ? $sfsi_section4_options['sfsi_display_counts'] : false;
1127
+ $display_round_counts = isset($sfsi_section4_options['sfsi_round_counts']) && !empty($sfsi_section4_options['sfsi_round_counts']) ? $sfsi_section4_options['sfsi_round_counts'] : false;
1128
  /* fecth no of counts if active in admin section */
1129
+ if ($cDisplay == "yes" && $Displayc == "yes" && $display_round_counts =="yes") {
1130
  $counts = $socialObj->format_num($sfsi_section4_options['sfsi_wechat_manualCounts']);
1131
  }
1132
  $url = "weixin://dl/chat";
1245
  $disp = isset($sfsi_section4_options['sfsi_linkedIn_countsDisplay']) && !empty($sfsi_section4_options['sfsi_linkedIn_countsDisplay']) ? $sfsi_section4_options['sfsi_linkedIn_countsDisplay'] : false;
1246
 
1247
  $dcount = isset($sfsi_section4_options['sfsi_display_counts']) && !empty($sfsi_section4_options['sfsi_display_counts']) ? $sfsi_section4_options['sfsi_display_counts'] : false;
1248
+ $display_round_counts = isset($sfsi_section4_options['sfsi_round_counts']) && !empty($sfsi_section4_options['sfsi_round_counts']) ? $sfsi_section4_options['sfsi_round_counts'] : false;
1249
  /* fecth no of counts if active in admin section */
1250
+ if ($disp == "yes" && $dcount == "yes" && $display_round_counts =="yes") {
1251
  if ($cFrom == "manual") {
1252
  $counts = $socialObj->format_num($sfsi_section4_options['sfsi_linkedIn_manualCounts']);
1253
  } else if ($cFrom == "follower") {
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: socialdude, socialtech
3
  Tags: social media, share, buttons, social widget, icons, share icons, share buttons, sharing icons, sharing buttons, social share, sharing, social sharing
4
  Requires at least: 3.5
5
  Tested up to: 5.4
6
- Stable tag: 2.5.4
7
  License: GPLv2
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -270,10 +270,18 @@ You cannot use the same plugin twice, however you can install both the USM as we
270
 
271
 
272
  == Changelog ==
 
 
 
 
 
 
 
 
273
  = 2.5.4 =
274
- * Fixed syntax errors
275
- * Fixed open in a new window icons
276
- * Removed automatic scroll
277
 
278
  = 2.5.3 =
279
  * Fixed UI issues.
@@ -920,5 +928,5 @@ You cannot use the same plugin twice, however you can install both the USM as we
920
 
921
  == Upgrade Notice ==
922
 
923
- = 2.5.4 =
924
  Please upgrade
3
  Tags: social media, share, buttons, social widget, icons, share icons, share buttons, sharing icons, sharing buttons, social share, sharing, social sharing
4
  Requires at least: 3.5
5
  Tested up to: 5.4
6
+ Stable tag: 2.5.5
7
  License: GPLv2
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
270
 
271
 
272
  == Changelog ==
273
+ = 2.5.5 =
274
+ * Fixed claim feed from Q8 popup.
275
+ * Updated new section to show counts.
276
+ * Fixed subscribe form button value.
277
+ * Fixed twitter url space corrected.
278
+ * changed nopin to data-attr.
279
+ * Fixed youtube tooltip alignemnt.
280
+
281
  = 2.5.4 =
282
+ * Fixed syntax errors.
283
+ * Fixed open in a new window icons.
284
+ * Removed automatic scroll.
285
 
286
  = 2.5.3 =
287
  * Fixed UI issues.
928
 
929
  == Upgrade Notice ==
930
 
931
+ = 2.5.5 =
932
  Please upgrade
ultimate_social_media_icons.php CHANGED
@@ -6,7 +6,7 @@ Description: Easy to use and 100% FREE social media plugin which adds social med
6
 
7
  Author: UltimatelySocial
8
  Author URI: http://ultimatelysocial.com
9
- Version: 2.5.4
10
  License: GPLv2 or later
11
  */
12
  require_once 'analyst/main.php';
@@ -42,11 +42,15 @@ function sfsi_get_current_page_url()
42
  {
43
  global $post, $wp;
44
  if (!empty($wp->request)) {
45
- return home_url(add_query_arg(array(), $wp->request));
46
  } elseif (is_home()) {
47
  return site_url();
48
  } elseif (!empty($post->ID)) {
49
- return get_permalink($post->ID);
 
 
 
 
50
  } else {
51
  return site_url();
52
  }
@@ -86,7 +90,7 @@ register_deactivation_hook(__FILE__, 'sfsi_deactivate_plugin');
86
 
87
  register_uninstall_hook(__FILE__, 'sfsi_Unistall_plugin');
88
 
89
- if (!get_option('sfsi_pluginVersion') || get_option('sfsi_pluginVersion') < 2.54) {
90
 
91
  add_action("init", "sfsi_update_plugin");
92
  }
@@ -380,43 +384,20 @@ function addStyleFunction()
380
  });
381
 
382
  function sfsi_processfurther(ref) {
383
-
384
  var feed_id = '<?php echo $sfsi_feediid ?>';
385
  var feedtype = 8;
386
-
387
  var email = jQuery(ref).find('input[name="email"]').val();
388
-
389
  var filter = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
390
-
391
  if ((email != "Enter your email") && (filter.test(email))) {
392
- if (feed_id != "") {
393
-
394
- if (feedtype == "8") {
395
-
396
- var url = "<?php echo $url; ?>" + feed_id + "/" + feedtype;
397
-
398
- window.open('', "popupwindow", "scrollbars=yes,width=1080,height=760");
399
-
400
- ref.action = url;
401
-
402
- ref.target = "popupwindow";
403
-
404
- return true;
405
-
406
- } else {
407
-
408
- return false
409
-
410
- }
411
-
412
- } else {
413
-
414
- alert("Please enter email address");
415
-
416
- jQuery(ref).find('input[name="email"]').focus();
417
-
418
- return false;
419
  }
 
 
 
 
420
  }
421
  }
422
  </script>
@@ -819,7 +800,7 @@ function sfsi_admin_notice()
819
  }
820
  }
821
  $screen = get_current_screen();
822
- if (get_option("show_premium_notification") == "yes" && ($screen->id != "toplevel_page_sfsi-options")) {
823
 
824
  ?>
825
 
6
 
7
  Author: UltimatelySocial
8
  Author URI: http://ultimatelysocial.com
9
+ Version: 2.5.5
10
  License: GPLv2 or later
11
  */
12
  require_once 'analyst/main.php';
42
  {
43
  global $post, $wp;
44
  if (!empty($wp->request)) {
45
+ return home_url(add_query_arg($_GET ? $_GET : array(), $wp->request));
46
  } elseif (is_home()) {
47
  return site_url();
48
  } elseif (!empty($post->ID)) {
49
+ if ($_GET) {
50
+ return add_query_arg($_GET, get_permalink($post->ID));
51
+ } else {
52
+ return get_permalink($post->ID);
53
+ }
54
  } else {
55
  return site_url();
56
  }
90
 
91
  register_uninstall_hook(__FILE__, 'sfsi_Unistall_plugin');
92
 
93
+ if (!get_option('sfsi_pluginVersion') || get_option('sfsi_pluginVersion') < 2.55) {
94
 
95
  add_action("init", "sfsi_update_plugin");
96
  }
384
  });
385
 
386
  function sfsi_processfurther(ref) {
 
387
  var feed_id = '<?php echo $sfsi_feediid ?>';
388
  var feedtype = 8;
 
389
  var email = jQuery(ref).find('input[name="email"]').val();
 
390
  var filter = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
 
391
  if ((email != "Enter your email") && (filter.test(email))) {
392
+ if (feedtype == "8") {
393
+ var url = "<?php echo $url; ?>" + feed_id + "/" + feedtype;
394
+ window.open(url, "popupwindow", "scrollbars=yes,width=1080,height=760");
395
+ return true;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
396
  }
397
+ } else {
398
+ alert("Please enter email address");
399
+ jQuery(ref).find('input[name="email"]').focus();
400
+ return false;
401
  }
402
  }
403
  </script>
800
  }
801
  }
802
  $screen = get_current_screen();
803
+ if (get_option("show_premium_notification") == "yes" && ($screen->id != "toplevel_page_sfsi-options")) {
804
 
805
  ?>
806
 
views/sfsi_option_view4.php CHANGED
@@ -1,143 +1,147 @@
1
  <?php
2
  /* unserialize all saved option for section 4 options */
3
- $option4 = unserialize(get_option('sfsi_section4_options',false));
4
- $option2 = unserialize(get_option('sfsi_section2_options',false));
5
- if(!isset($option4['sfsi_facebook_mypageCounts']))
6
- {
7
- $option4['sfsi_facebook_mypageCounts'] = '';
8
  }
9
 
10
  /*
11
  * Sanitize, escape and validate values
12
  */
13
- $option4['sfsi_display_counts'] = (isset($option4['sfsi_display_counts'])) ? sanitize_text_field($option4['sfsi_display_counts']) : '';
14
- $option4['sfsi_email_countsFrom'] = (isset($option4['sfsi_email_countsFrom'])) ? sanitize_text_field($option4['sfsi_email_countsFrom']) : '';
15
- $option4['sfsi_email_manualCounts'] = (isset($option4['sfsi_email_manualCounts'])) ? intval($option4['sfsi_email_manualCounts']) : '';
16
- $option4['sfsi_rss_countsDisplay'] = (isset($option4['sfsi_rss_countsDisplay'])) ? sanitize_text_field($option4['sfsi_rss_countsDisplay']) : '';
17
- $option4['sfsi_rss_manualCounts'] = (isset($option4['sfsi_rss_manualCounts'])) ? intval($option4['sfsi_rss_manualCounts']) : '';
18
- $option4['sfsi_email_countsDisplay'] = (isset($option4['sfsi_email_countsDisplay'])) ? sanitize_text_field($option4['sfsi_email_countsDisplay']):'';
19
-
20
- $option4['sfsi_facebook_countsDisplay'] = (isset($option4['sfsi_facebook_countsDisplay']))
21
- ? sanitize_text_field($option4['sfsi_facebook_countsDisplay'])
22
- : '';
23
- $option4['sfsi_facebook_countsFrom'] = (isset($option4['sfsi_facebook_countsFrom']))
24
- ? sanitize_text_field($option4['sfsi_facebook_countsFrom'])
25
- : '';
26
- $option4['sfsi_facebook_mypageCounts'] = (isset($option4['sfsi_facebook_mypageCounts']))
27
- ? sfsi_sanitize_field($option4['sfsi_facebook_mypageCounts'])
28
- : '';
29
- $option4['sfsi_facebook_manualCounts'] = (isset($option4['sfsi_facebook_manualCounts']))
30
- ? intval($option4['sfsi_facebook_manualCounts'])
31
- : '';$option4['sfsi_twitter_countsDisplay'] = (isset($option4['sfsi_twitter_countsDisplay']))
32
- ? sanitize_text_field($option4['sfsi_twitter_countsDisplay'])
33
- : '';
34
- $option4['sfsi_twitter_countsFrom'] = (isset($option4['sfsi_twitter_countsFrom']))
35
- ? sanitize_text_field($option4['sfsi_twitter_countsFrom'])
36
- : '';
37
- $option4['sfsi_twitter_manualCounts'] = (isset($option4['sfsi_twitter_manualCounts']))
38
- ? intval($option4['sfsi_twitter_manualCounts'])
39
- : '';
40
- $option4['tw_consumer_key'] = (isset($option4['tw_consumer_key']))
41
- ? sfsi_sanitize_field($option4['tw_consumer_key'])
42
- : '';
43
- $option4['tw_consumer_secret'] = (isset($option4['tw_consumer_secret']))
44
- ? sfsi_sanitize_field($option4['tw_consumer_secret'])
45
- : '';
46
- $option4['tw_oauth_access_token'] = (isset($option4['tw_oauth_access_token']))
47
- ? sfsi_sanitize_field($option4['tw_oauth_access_token'])
48
- : '';
49
- $option4['tw_oauth_access_token_secret']= (isset($option4['tw_oauth_access_token_secret']))
50
- ? sfsi_sanitize_field($option4['tw_oauth_access_token_secret'])
51
- : '';
52
- $option4['sfsi_youtube_countsDisplay'] = (isset($option4['sfsi_youtube_countsDisplay']))
53
- ? sanitize_text_field($option4['sfsi_youtube_countsDisplay'])
54
- : '';
55
- $option4['sfsi_youtube_countsFrom'] = (isset($option4['sfsi_youtube_countsFrom']))
56
- ? sanitize_text_field($option4['sfsi_youtube_countsFrom'])
57
- : '';
 
58
  // $option4['sfsi_youtubeusernameorid'] = (isset($option4['sfsi_youtubeusernameorid']))
59
  // ? sanitize_text_field($option4['sfsi_youtubeusernameorid'])
60
  // : '';
61
- $option4['sfsi_youtube_manualCounts'] = (isset($option4['sfsi_youtube_manualCounts']))
62
- ? intval($option4['sfsi_youtube_manualCounts'])
63
- : '';
64
-
65
- $option4['sfsi_instagram_manualCounts'] = (isset($option4['sfsi_instagram_manualCounts']))
66
- ? intval($option4['sfsi_instagram_manualCounts'])
67
- : '';
68
- $option4['sfsi_instagram_User'] = (isset($option4['sfsi_instagram_User']))
69
- ? sfsi_sanitize_field($option4['sfsi_instagram_User'])
70
- : '';
71
- $option4['sfsi_instagram_clientid'] = (isset($option4['sfsi_instagram_clientid']))
72
- ? sfsi_sanitize_field($option4['sfsi_instagram_clientid'])
73
- : '';
74
- $option4['sfsi_instagram_appurl'] = (isset($option4['sfsi_instagram_appurl']))
75
- ? sfsi_sanitize_field($option4['sfsi_instagram_appurl'])
76
- : '';
77
- $option4['sfsi_instagram_token'] = (isset($option4['sfsi_instagram_token']))
78
- ? sfsi_sanitize_field($option4['sfsi_instagram_token'])
79
- : '';
80
- $option4['sfsi_instagram_countsFrom'] = (isset($option4['sfsi_instagram_countsFrom']))
81
- ? sanitize_text_field($option4['sfsi_instagram_countsFrom'])
82
- : '';
83
- $option4['sfsi_instagram_countsDisplay']= (isset($option4['sfsi_instagram_countsDisplay']))
84
- ? sanitize_text_field($option4['sfsi_instagram_countsDisplay'])
85
- : '';$option4['sfsi_pinterest_manualCounts'] = (isset($option4['sfsi_pinterest_manualCounts']))
86
- ? intval($option4['sfsi_pinterest_manualCounts'])
87
- : '';
88
- $option4['sfsi_linkedIn_manualCounts'] = (isset($option4['sfsi_linkedIn_manualCounts']))
89
- ? intval($option4['sfsi_linkedIn_manualCounts'])
90
- : '';
91
-
92
- $option4['sfsi_telegram_countsDisplay'] = (isset($option4['sfsi_telegram_countsDisplay'])) ? sanitize_text_field($option4['sfsi_telegram_countsDisplay']) : '';
93
- $option4['sfsi_telegram_manualCounts'] = (isset($option4['sfsi_telegram_manualCounts'])) ? intval($option4['sfsi_telegram_manualCounts']) : '';
94
-
95
- $option4['sfsi_vk_countsDisplay'] = (isset($option4['sfsi_vk_countsDisplay'])) ? sanitize_text_field($option4['sfsi_vk_countsDisplay']) : '';
96
- $option4['sfsi_vk_manualCounts'] = (isset($option4['sfsi_vk_manualCounts'])) ? intval($option4['sfsi_vk_manualCounts']) : '';
97
-
98
- $option4['sfsi_ok_countsDisplay'] = (isset($option4['sfsi_ok_countsDisplay'])) ? sanitize_text_field($option4['sfsi_ok_countsDisplay']) : '';
99
- $option4['sfsi_ok_manualCounts'] = (isset($option4['sfsi_ok_manualCounts'])) ? intval($option4['sfsi_ok_manualCounts']) : '';
100
-
101
- $option4['sfsi_weibo_countsDisplay'] = (isset($option4['sfsi_weibo_countsDisplay'])) ? sanitize_text_field($option4['sfsi_weibo_countsDisplay']) : '';
102
- $option4['sfsi_weibo_manualCounts'] = (isset($option4['sfsi_weibo_manualCounts'])) ? intval($option4['sfsi_weibo_manualCounts']) : '';
103
-
104
- $option4['sfsi_wechat_countsDisplay'] = (isset($option4['sfsi_wechat_countsDisplay'])) ? sanitize_text_field($option4['sfsi_wechat_countsDisplay']) : '';
105
- $option4['sfsi_wechat_manualCounts'] = (isset($option4['sfsi_wechat_manualCounts'])) ? intval($option4['sfsi_wechat_manualCounts']) : '';if(isset($option4['sfsi_youtube_user']) && !empty($option4['sfsi_youtube_user'])){
 
 
 
 
 
 
106
  $option4['sfsi_youtube_user'] = sfsi_sanitize_field($option4['sfsi_youtube_user']);
107
- }
108
- else{
109
- if("name"== $option2['sfsi_youtubeusernameorid'] && isset($option2['sfsi_youtubeusernameorid']) && !empty($option2['sfsi_youtubeusernameorid'])){
110
- $option4['sfsi_youtube_user'] = isset($option2['sfsi_ytube_user']) && !empty($option2['sfsi_ytube_user']) ? $option2['sfsi_ytube_user']: '';
111
  }
112
  }
113
 
114
- if(isset($option4['sfsi_youtube_channelId']) && !empty($option4['sfsi_youtube_channelId'])){
115
- $option4['sfsi_youtube_channelId'] = sfsi_sanitize_field($option4['sfsi_youtube_channelId']);
116
- }
117
- else{
118
- if("id"== $option2['sfsi_youtubeusernameorid'] && isset($option2['sfsi_youtubeusernameorid']) && !empty($option2['sfsi_youtubeusernameorid'])){
119
- $option4['sfsi_youtube_channelId'] = isset($option2['sfsi_ytube_chnlid']) && !empty($option2['sfsi_ytube_chnlid']) ? $option2['sfsi_ytube_chnlid']: '';
120
  }
121
  }
122
 
123
  /* fetch counts for admin sections */
124
  $counts = sfsi_getCounts();
125
  /* check for email icon display */
126
- $email_image="email.png";
127
 
128
- if(isset($option2['sfsi_rss_icons']) && !empty($option2['sfsi_rss_icons']) && $option2['sfsi_rss_icons']=="sfsi")
129
- {
130
- $email_image="sf_arow_icn.png";
131
- }
132
- $hide="display:none;";
133
 
134
  ?>
135
 
136
  <!-- Section 4 "Do you want to display "counts" next to your icons?" main div Start -->
137
  <div class="tab4">
138
  <p>It’s a psychological fact that people like to follow other people (as explained well in Robert Cialdini’s book “<a href="http://www.amazon.com/Influence-Psychology-Persuasion-Revised-Edition/dp/006124189X" target="_blank" class="lit_txt">Influence</a>”), so when they see that your site has already a good number of Facebook likes, it’s more likely that they will subscribe/like/share your site than if it had 0.</p>
139
- <p>Therefore, you can select to display the count next to your main icons, which will look like this:</p>
140
-
141
  <!-- sample icons -->
142
  <ul class="like_icon">
143
  <li class="rss_section">
@@ -164,9 +168,10 @@ $hide="display:none;";
164
  </a>
165
  <span>12k</span>
166
  </li>
167
- <!-- <li class="share_section">
168
  <a href="#" title="Share">
169
- <img src="<?php //echo SFSI_PLUGURL ?>images/share.png" alt="Share" />
 
170
  </a>
171
  <span>12k</span>
172
  </li> -->
@@ -187,7 +192,7 @@ $hide="display:none;";
187
  <img src="<?php echo SFSI_PLUGURL ?>images/linked_in.png" alt="Linked In" />
188
  </a>
189
  <span>12k</span>
190
- </li>
191
  <li class="instagram_section">
192
  <a href="#" title="Instagram">
193
  <img src="<?php echo SFSI_PLUGURL ?>images/instagram.png" alt="instagram" />
@@ -226,29 +231,29 @@ $hide="display:none;";
226
  </li>
227
  </ul>
228
  <!-- END sample icons -->
229
-
230
- <p>Of course, if you start at 0, you shoot yourself in the foot with that. So we suggest that you only turn this feature on once you have a good number of followers/likes/shares (min. of 20 – no worries if it’s not too many, it should just not be 0). <b>New:</b> In the Premium Plugin you can define a threshold (min. number of counts) when it will automatically switch to showing the counts. <a style="cursor:pointer" class="pop-up" data-id="sfsi_quickpay-overlay" onclick="sfsi_open_quick_checkout(event)" class="sfisi_font_bold" target="_blank">Go Premium</a>.</p>
231
  <h4>Enough waffling. So do you want to display counts?</h4>
232
-
233
- <!-- show/hide counts for icons section START -->
234
  <ul class="enough_waffling">
235
- <li>
236
- <input name="sfsi_display_counts" <?php echo ($option4['sfsi_display_counts']=='yes') ? 'checked="true"' : '' ;?> type="radio" value="yes" class="styled" /><label>Yes</label>
237
  </li>
238
- <li>
239
- <input name="sfsi_display_counts" <?php echo ($option4['sfsi_display_counts']=='no') ? 'checked="true"' : '' ;?> type="radio" value="no" class="styled" /><label>No</label>
240
  </li>
241
  </ul>
242
- <!-- END show/hide counts for icons section -->
243
-
244
- <!-- show/hide counts for all icons section START -->
245
  <div class="count_sections" style="display:none">
246
- <h4>Please specify which counts should be shown:</h4>
247
 
248
  <!-- RSS ICON COUNT SECTION-->
249
  <div class="specify_counts rss_section">
250
  <div class="radio_section">
251
- <input name="sfsi_rss_countsDisplay" <?php echo ($option4['sfsi_rss_countsDisplay']=='yes') ? 'checked="true"' : '' ;?> type="checkbox" value="yes" class="styled" />
252
  </div>
253
  <div class="social_icon_like">
254
  <ul class="like_icon">
@@ -262,16 +267,16 @@ $hide="display:none;";
262
  </div>
263
  <div class="listing">
264
  <ul>
265
- <li>We cannot track this. So enter the figure here: <input name="sfsi_rss_manualCounts" type="text" class="input" value="<?php echo ($option4['sfsi_rss_manualCounts']!='') ? $option4['sfsi_rss_manualCounts'] : '' ;?>" /></li>
266
  </ul>
267
- </div>
268
  </div>
269
  <!-- END RSS ICON COUNT SECTION-->
270
-
271
  <!-- EMAIL ICON COUNT SECTION-->
272
  <div class="specify_counts email_section">
273
  <div class="radio_section">
274
- <input name="sfsi_email_countsDisplay" <?php echo ($option4['sfsi_email_countsDisplay']=='yes') ? 'checked="true"' : '' ;?> type="checkbox" value="yes" class="styled" />
275
  </div>
276
  <div class="social_icon_like">
277
  <ul class="like_icon">
@@ -285,17 +290,17 @@ $hide="display:none;";
285
  </div>
286
  <div class="listing">
287
  <ul>
288
- <li><input name="sfsi_email_countsFrom" <?php echo ($option4['sfsi_email_countsFrom']=='source') ? 'checked="true"' : '' ;?> type="radio" value="source" class="styled" />Retrieve the number of subscribers automatically</li>
289
- <li><input name="sfsi_email_countsFrom" <?php echo ($option4['sfsi_email_countsFrom']=='manual') ? 'checked="true"' : '' ;?> type="radio" value="manual" class="styled" />Enter the figure manually:<input name="sfsi_email_manualCounts" type="text" class="input" value="<?php echo ($option4['sfsi_email_manualCounts']!='') ? $option4['sfsi_email_manualCounts'] : '' ;?>" style="<?php echo ($option4['sfsi_email_countsFrom']=='source') ? 'display:none;' : '' ;?>" /></li>
290
  </ul>
291
- </div>
292
  </div>
293
- <!--END EMAIL ICON COUNT SECTION-->
294
-
295
  <!-- FACEBOOK ICON COUNT SECTION-->
296
  <div class="specify_counts facebook_section">
297
  <div class="radio_section">
298
- <input name="sfsi_facebook_countsDisplay" <?php echo ($option4['sfsi_facebook_countsDisplay']=='yes') ? 'checked="true"' : '' ;?> type="checkbox" value="yes" class="styled" />
299
  </div>
300
  <div class="social_icon_like">
301
  <ul class="like_icon">
@@ -305,38 +310,40 @@ $hide="display:none;";
305
  <div class="listing">
306
  <ul class="sfsi_fb_popup_contain">
307
  <li>
308
- <input name="sfsi_facebook_countsFrom" <?php echo ($option4['sfsi_facebook_countsFrom']=='likes') ? 'checked="true"' : '' ;?> type="radio" value="likes" class="styled" />Retrieve the number of likes <strong>of your blog</strong>
309
- <div class = "sfsi_prem_fbpgiddesc">
310
- <div class ="sfsi_prem_fbpgidwpr" style="<?php echo ($option4['sfsi_facebook_countsFrom']=='likes' || $option4['sfsi_facebook_countsFrom']=='followers' || $option4['sfsi_facebook_countsFrom']=='manual') ? 'display:none;' : '' ;?>"></div>
311
-
312
- </div>
313
  </li>
314
  <li>
315
- <input name="sfsi_facebook_countsFrom" <?php echo ($option4['sfsi_facebook_countsFrom']=='mypage') ? 'checked="true"' : '' ;?> type="radio" value="mypage" class="styled" />
316
  Retrieve the number of likes <strong>of your Facebook page</strong><br>
317
- <div class="sfsi_fbpgiddesc sfsi_fbpaget">
318
- <div class="sfsi_fbpgidwpr sfsi_count" style="<?php echo ($option4['sfsi_facebook_countsFrom']=='likes' || $option4['sfsi_facebook_countsFrom']=='followers' || $option4['sfsi_facebook_countsFrom']=='manual') ? 'display:none;' : '' ;?>">Facebook page ID:</div>
319
- <input name="sfsi_facebook_mypageCounts" type="text" class="input mypginpt" value="<?php echo ($option4['sfsi_facebook_mypageCounts']!='') ? $option4['sfsi_facebook_mypageCounts'] : '' ;?>" style="<?php echo ($option4['sfsi_facebook_countsFrom']=='likes' || $option4['sfsi_facebook_countsFrom']=='followers' || $option4['sfsi_facebook_countsFrom']=='manual') ? 'display:none;' : '' ;?>" />
320
- <div class="sfsi_fbpgidwpr sfsi_fbpgiddesc sfsi_facebook_count" style="<?php echo ($option4['sfsi_facebook_countsFrom']=='likes' || $option4['sfsi_facebook_countsFrom']=='followers' || $option4['sfsi_facebook_countsFrom']=='manual') ? 'display:none;' : '' ;?>">(You'll find it at the bottom of the <code><<</code>About<code>>></code>-tab on your facebook page)</div>
 
 
321
  </div>
322
  </li>
323
  <li>
324
- <input name="sfsi_facebook_countsFrom" <?php echo ($option4['sfsi_facebook_countsFrom']=='manual') ? 'checked="true"' : '' ;?> type="radio" value="manual" class="styled" />Enter the figure manually:<input name="sfsi_facebook_manualCounts" type="text" class="input" value="<?php echo ($option4['sfsi_facebook_manualCounts']!='') ? $option4['sfsi_facebook_manualCounts'] : '' ;?>" style="<?php echo ($option4['sfsi_facebook_countsFrom']=='likes' || $option4['sfsi_facebook_countsFrom']=='followers' || $option4['sfsi_facebook_countsFrom']=='mypage') ? 'display:none;' : '' ;?>" />
325
  </li>
326
  </ul>
327
- <div class="sfsi_facebook_pagedeasc" style="<?php echo (isset($option4['sfsi_facebook_countsFrom']) && $option4['sfsi_facebook_countsFrom'] =='manual') ? 'display:none;' : '' ;?>">
328
- <p class="sfsi_shared_premium"><b>Note:</b> This plugin uses <u>one</u> API shared by all users of this plugin. There is a limit (set by Facebook) how often this API can get the counts per day, so it may happen that it returns “0 counts” later in the day.<br><br>Therefore we implemented a solution as part of our Premium Plugin where you can <b>easily</b> set up your own API in a few steps, which will fix this problem.<br><br><a style="cursor:pointer;border-bottom: 1px solid #12a252;color: #12a252 !important" class="pop-up" data-id="sfsi_quickpay-overlay" onclick="sfsi_open_quick_checkout(event)" style="border-bottom: 1px solid #12a252;color: #12a252 !important" class="sfisi_font_bold" target="_blank">Go premium now<a href="https://www.ultimatelysocial.com/usm-premium/?utm_source=usmi_settings_page&utm_campaign=facebook_counts&utm_medium=banner" class="sfsi_font_inherit" style="color: #12a252 !important" target="_blank"> or learn more</a>
329
  </p>
330
  </div>
331
-
332
- </div>
333
  </div>
334
  <!-- END FACEBOOK ICON COUNT SECTION-->
335
-
336
  <!-- TWITTER ICON COUNT SECTION-->
337
  <div class="specify_counts twitter_section">
338
  <div class="radio_section">
339
- <input name="sfsi_twitter_countsDisplay" <?php echo ($option4['sfsi_twitter_countsDisplay']=='yes') ? 'checked="true"' : '' ;?> type="checkbox" value="yes" class="styled" />
340
  </div>
341
  <div class="social_icon_like">
342
  <ul class="like_icon">
@@ -351,47 +358,50 @@ $hide="display:none;";
351
  <div class="listing">
352
  <ul>
353
  <li>
354
- <input name="sfsi_twitter_countsFrom" <?php echo ($option4['sfsi_twitter_countsFrom']=='source') ? 'checked="true"' : '' ;?> type="radio" value="source" class="styled" />Retrieve the number of Twitter followers
355
  </li>
356
-
357
  <li class="SFSI_tglli">
358
  <ul class="SFSI_lsngfrm">
359
- <li class="tw_follow_options" style="<?php echo ($option4['sfsi_twitter_countsFrom']=='manual') ? 'display:none;' : '' ;?>">
360
  <label>Enter Consumer Key:</label>
361
- <input name="tw_consumer_key" class="input_facebook" type="text" value="<?php echo (isset($option4['tw_consumer_key']) && $option4['tw_consumer_key']!='') ? $option4['tw_consumer_key'] : '' ;?>" />
362
  </li>
363
- <li class="tw_follow_options" style="<?php echo ($option4['sfsi_twitter_countsFrom']=='manual') ? 'display:none;' : '' ;?>">
364
  <label>Enter Consumer Secret:</label>
365
- <input name="tw_consumer_secret" class="input_facebook" type="text" value="<?php echo (isset($option4['tw_consumer_secret']) && $option4['tw_consumer_secret']!='') ? $option4['tw_consumer_secret'] : '' ;?>" />
366
  </li>
367
- <li class="tw_follow_options" style="<?php echo ($option4['sfsi_twitter_countsFrom']=='manual') ? 'display:none;' : '' ;?>">
368
  <label>Enter Access Token:</label>
369
- <input name="tw_oauth_access_token" class="input_facebook" type="text" value="<?php echo (isset($option4['tw_oauth_access_token']) && $option4['tw_oauth_access_token']!='') ? $option4['tw_oauth_access_token'] : '' ;?>"/>
370
  </li>
371
- <li class="tw_follow_options" style="<?php echo ($option4['sfsi_twitter_countsFrom']=='manual') ? 'display:none;' : '' ;?>">
372
  <label>Enter Access Token Secret:</label>
373
- <input name="tw_oauth_access_token_secret" class="input_facebook" type="text" value="<?php echo (isset($option4['tw_oauth_access_token_secret']) && $option4['tw_oauth_access_token_secret']!='') ? $option4['tw_oauth_access_token_secret'] : '' ;?>" />
374
  </li>
375
  </ul>
376
  <ul class="SFSI_instructions">
377
- <li class="tw_follow_options" style="<?php echo ($option4['sfsi_twitter_countsFrom']=='manual') ? 'display:none;' : '' ;?>">Please make sure you have entered the <b>Username</b> for <b>"Follow me on Twitter:"</b> in twitter settings under question number 2.</li>
378
- <li class="tw_follow_options" style="<?php echo ($option4['sfsi_twitter_countsFrom']=='manual') ? 'display:none;' : '' ;?>"><!-- <h3> --><b>To get this information : </b><!-- </h3> --></li>
379
- <li class="tw_follow_options" style="<?php echo ($option4['sfsi_twitter_countsFrom']=='manual') ? 'display:none;' : '' ;?>">1: Go to <a href="http://apps.twitter.com" target="_blank">apps.twitter.com</a></li>
380
- <li class="tw_follow_options" style="<?php echo ($option4['sfsi_twitter_countsFrom']=='manual') ? 'display:none;' : '' ;?>">2: Click on "Create new app"</li>
381
- <li class="tw_follow_options" style="<?php echo ($option4['sfsi_twitter_countsFrom']=='manual') ? 'display:none;' : '' ;?>">3: Enter a random Name , Descriptions and Website URL (including the "http://", e.g. http://dummysitename.com)</li>
382
- <li class="tw_follow_options" style="<?php echo ($option4['sfsi_twitter_countsFrom']=='manual') ? 'display:none;' : '' ;?>">4: Go to "Keys and Access Tokens" tab and click on "Generate Token" in the "Token actions" section at the bottom</li>
383
- <li class="tw_follow_options" style="<?php echo ($option4['sfsi_twitter_countsFrom']=='manual') ? 'display:none;' : '' ;?>">5: Then click on "Test OAuth" at the top right and you will see the 4 token key</li>
 
 
384
  </ul>
385
  </li>
386
  <li>
387
- <input name="sfsi_twitter_countsFrom" <?php echo ($option4['sfsi_twitter_countsFrom']=='manual') ? 'checked="true"' : '' ;?> type="radio" value="manual" class="styled" />Enter the figure manually:<input name="sfsi_twitter_manualCounts" type="text" class="input" value="<?php echo ($option4['sfsi_twitter_manualCounts']!='') ? $option4['sfsi_twitter_manualCounts'] : '' ;?>" style="<?php echo ($option4['sfsi_twitter_countsFrom']=='source') ? 'display:none;' : '' ;?>" />
388
  </li>
389
  </ul>
390
- </div>
391
  </div>
392
- <!--END TWITTER ICON COUNT SECTION--> <!-- LINKEDIN ICON COUNT SECTION-->
393
- <div class="specify_counts linkedin_section">
394
- <div class="radio_section"><input name="sfsi_linkedIn_countsDisplay" <?php echo ($option4['sfsi_linkedIn_countsDisplay']=='yes') ? 'checked="true"' : '' ;?> type="checkbox" value="yes" class="styled" /></div>
 
395
  <div class="social_icon_like">
396
  <ul class="like_icon">
397
  <li>
@@ -404,8 +414,8 @@ $hide="display:none;";
404
  </div>
405
  <div class="listing">
406
  <ul>
407
-
408
- <?php /*?><li><input name="sfsi_linkedIn_countsFrom" <?php echo ($option4['sfsi_linkedIn_countsFrom']=='follower') ? 'checked="true"' : '' ;?> type="radio" value="follower" class="styled" />Retrieve the number of Linkedin followers</li>
409
  <li class="SFSI_tglli">
410
  <ul class="SFSI_lsngfrm">
411
 
@@ -422,130 +432,131 @@ $hide="display:none;";
422
  <li class="linkedIn_options" style="<?php echo ($option4['sfsi_linkedIn_countsFrom']=='manual') ? 'display:none;' : '' ;?>">4: In the next step you will see the required API information</li>
423
  <li class="linkedIn_options" style="<?php echo ($option4['sfsi_linkedIn_countsFrom']=='manual') ? 'display:none;' : '' ;?>">When you enter this key into the plugin for the first time, it may take some time until the correct follower count is displayed on your website.</li>
424
  </ul>
425
- </li><?php */?>
426
-
427
-
428
- <li><input name="sfsi_linkedIn_countsFrom" <?php echo ($option4['sfsi_linkedIn_countsFrom']=='manual' || $option4['sfsi_linkedIn_countsFrom']=='follower') ? 'checked="true"' : '' ;?> type="radio" value="manual" class="styled" />Enter the figure manually:<input name="sfsi_linkedIn_manualCounts" type="text" class="input" value="<?php echo ($option4['sfsi_linkedIn_manualCounts']!='') ? $option4['sfsi_linkedIn_manualCounts'] : '' ;?>" style="<?php echo ($option4['sfsi_linkedIn_countsFrom']=='follower') ? 'display:none;' : '' ;?>" /></li>
429
- </ul>
430
- </div>
431
- </div>
432
- <!-- END LINKEDIN ICON COUNT SECTION-->
433
-
434
- <!-- YOUTUBE ICON COUNT SECTION-->
435
- <div class="specify_counts youtube_section">
436
- <div class="radio_section"><input name="sfsi_youtube_countsDisplay" <?php echo ($option4['sfsi_youtube_countsDisplay']=='yes') ? 'checked="true"' : '' ;?> type="checkbox" value="yes" class="styled" /></div>
437
- <div class="social_icon_like">
438
- <ul class="like_icon">
439
- <li><a title="YouTube"><img src="<?php echo SFSI_PLUGURL ?>images/youtube.png" alt="YouTube" /><span><?php echo $counts['youtube_count']; ?></span></a></li>
440
- </ul>
441
  </div>
442
- <div class="listing">
443
- <ul>
444
- <li><input name="sfsi_youtube_countsFrom" type="radio" value="subscriber" <?php echo ($option4['sfsi_youtube_countsFrom']=='subscriber') ? 'checked="true"' : '' ;?> class="styled" />Retrieve the number of Subscribers</li>
445
- <li class="youtube_options" style="<?php echo (!isset($option4['sfsi_youtube_countsFrom']) || empty($option4['sfsi_youtube_countsFrom']) || $option4['sfsi_youtube_countsFrom']=='manual') ? 'display:none;' : '' ;?>">
 
 
 
 
 
 
 
 
 
 
446
  <div>
447
  <label>Enter Youtube User name:</label>
448
- <input name="sfsi_youtube_user" class="input_facebook" type="text" value="<?php echo (isset($option4['sfsi_youtube_user']) && $option4['sfsi_youtube_user']!='') ? $option4['sfsi_youtube_user'] : '' ;?>" />
449
  </div>
450
  <div>
451
  <label>Enter Youtube Channel Id:</label>
452
- <input name="sfsi_youtube_channelId" class="input_facebook" type="text" value="<?php echo (isset($option4['sfsi_youtube_channelId']) && $option4['sfsi_youtube_channelId']!='') ? $option4['sfsi_youtube_channelId'] : '' ;?>" />
453
  </div>
454
-
455
  </li>
456
  <li>
457
- <input name="sfsi_youtube_countsFrom" type="radio" value="manual" <?php echo ($option4['sfsi_youtube_countsFrom']=='manual') ? 'checked="true"' : '' ;?> class="styled" />Enter the figure manually:<input name="sfsi_youtube_manualCounts" type="text" class="input" value="<?php echo ($option4['sfsi_youtube_manualCounts']!='') ? $option4['sfsi_youtube_manualCounts'] : '' ;?>" style="<?php echo ($option4['sfsi_youtube_countsFrom']=='subscriber') ? 'display:none;' : '' ;?>" />
458
  </li>
459
- </ul>
460
- </div>
461
- </div>
462
- <!-- END YOUTUBE ICON COUNT SECTION-->
463
-
464
- <!-- PINIT ICON COUNT SECTION-->
465
- <div class="specify_counts pinterest_section">
466
- <div class="radio_section"><input name="sfsi_pinterest_countsDisplay" <?php echo ($option4['sfsi_pinterest_countsDisplay']=='yes') ? 'checked="true"' : '' ;?> type="checkbox" value="yes" class="styled" /></div>
467
- <div class="social_icon_like">
468
- <ul class="like_icon">
469
- <li><a title="Pinterest"><img src="<?php echo SFSI_PLUGURL ?>images/pinterest.png" alt="Pinterest" /><span><?php echo $counts['pin_count']; ?></span></a></li>
470
- </ul>
471
- </div>
472
- <div class="listing">
473
- <ul>
474
- <li><input name="sfsi_pinterest_countsFrom" <?php echo ($option4['sfsi_pinterest_countsFrom']=='pins') ? 'checked="true"' : '' ;?> type="radio" value="pins" class="styled" />Retrieve the number of Pins</li>
475
- <li><input name="sfsi_pinterest_countsFrom" <?php echo ($option4['sfsi_pinterest_countsFrom']=='manual') ? 'checked="true"' : '' ;?> type="radio" value="manual" class="styled" /><label class="high_prb">Enter the figure manually:</label><input name="sfsi_pinterest_manualCounts" type="text" class="input" value="<?php echo ($option4['sfsi_pinterest_manualCounts']!='') ? $option4['sfsi_pinterest_manualCounts'] : '' ;?>" style="<?php echo ($option4['sfsi_pinterest_countsFrom']=='pins') ? 'display:none;' : '' ;?>" /></li>
476
- </ul>
477
- </div> <div class="sfsi_new_prmium_follw" style="margin-top: 38px;">
478
- <p><b>New: </b>In the Premium Plugin you can also automatically show the number of PINs from your Pinterest account, or of a specific board, or the number of your Pinterest followers. <a style="cursor:pointer" class="pop-up" data-id="sfsi_quickpay-overlay" onclick="sfsi_open_quick_checkout(event)" class="sfisi_font_bold" target="_blank">Go premium now</a><a href="https://www.ultimatelysocial.com/usm-premium/?utm_source=usmi_settings_page&utm_campaign=more_pinterest_counts&utm_medium=banner" class="sfsi_font_inherit" target="_blank"> or learn more.</a></p>
479
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
480
 
481
- </div>
482
- <!-- END PINIT ICON COUNT SECTION-->
483
-
484
- <!-- INSTAGRAM ICON COUNT SECTION-->
485
- <div class="specify_counts instagram_section">
486
- <div class="radio_section"><input name="sfsi_instagram_countsDisplay" <?php echo ($option4['sfsi_instagram_countsDisplay']=='yes') ? 'checked="true"' : '' ;?> type="checkbox" value="yes" class="styled" /></div>
487
- <div class="social_icon_like">
488
- <ul class="like_icon">
489
- <li><a title="Instagram"><img src="<?php echo SFSI_PLUGURL ?>images/instagram.png" alt="instagram" /><span><?php echo $counts['instagram_count']; ?></span></a></li>
490
- </ul>
491
  </div>
492
- <div class="listing">
493
- <ul>
494
- <li>
495
- <input name="sfsi_instagram_countsFrom" <?php echo ($option4['sfsi_instagram_countsFrom']=='followers') ? 'checked="true"' : '' ;?> type="radio" value="followers" class="styled" />Retrieve the number of Instagram followers
496
- </li>
497
- <li class="instagram_userLi" style="<?php echo ($option4['sfsi_instagram_countsFrom']=='manual') ? 'display:none;' : '' ;?>">
498
- <div class="sfsi_instagramFields">
499
- <div>
500
- <label>Enter Instagram User name:</label>
501
- <input name="sfsi_instagram_User" class="input_facebook" type="text" value="<?php echo (isset($option4['sfsi_instagram_User']) && $option4['sfsi_instagram_User']!='') ? $option4['sfsi_instagram_User'] : '' ;?>"/>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
502
  </div>
503
- <div>
504
- <label>Enter Instagram Client Id:</label>
505
- <input name="sfsi_instagram_clientid" class="input_facebook" type="text" value="<?php echo (isset($option4['sfsi_instagram_clientid']) && $option4['sfsi_instagram_clientid']!='') ? $option4['sfsi_instagram_clientid'] : '' ;?>"/>
 
 
 
 
 
 
 
 
 
506
  </div>
507
- <div>
508
- <label>Enter Instagram Redirect Url:</label>
509
- <input name="sfsi_instagram_appurl" class="input_facebook" type="text" value="<?php echo (isset($option4['sfsi_instagram_appurl']) && $option4['sfsi_instagram_appurl']!='') ? $option4['sfsi_instagram_appurl'] : '' ;?>"/>
510
- </div>
511
- <div class="sfsi_tokenGenerateButton">
512
- <p>For generate your app token you need to enter your "Client Id" and "Redirect Url".</p>
513
- <a href="javascript:">
514
- Generate Token
515
- </a>
516
- </div>
517
- <div>
518
- <label>Enter Instagram Token:</label>
519
- <input name="sfsi_instagram_token" class="input_facebook" type="text" value="<?php echo (isset($option4['sfsi_instagram_token']) && $option4['sfsi_instagram_token']!='') ? $option4['sfsi_instagram_token'] : '' ;?>"/>
520
- </div>
521
- </div>
522
- <div class="sfsi_instagramInstruction">
523
- <p>To complete the process please follow these steps:</p>
524
- <ol>
525
- <li>Go to <a href="https://www.instagram.com/developer" target="_blank">https://www.instagram.com/developer</a></li>
526
- <li>Login and then click on “Register Your Application” to get to the “Manage Clients” section. On there click on the “Register a new client” button</li>
527
- <li>Fill out the form and make sure that the “Redirect url” is valid and uncheck the “Disable Implicit oAuth” under the security tab.</li>
528
- <li>Then click on “Register” button.</li>
529
- <li>Copy the “Client id” and “Redirect url” you entered into the plugin. Also enter your Instagram User name. After that click on the “Generate token” button.</li>
530
- <li>Authorize your app to access your account info by clicking the “Authorize” button'.</li>
531
- <li>Now you will be redirected to the redirect url (which you entered during app creation) and find your access token at the end of this url(For example: http://your-website.com/#access_token=< your access token >)</li>
532
- <li>Copy the access token, paste it into the plugin and click on “Save”.</li>
533
- </ol>
534
- </div>
535
- </li>
536
- <li>
537
- <input name="sfsi_instagram_countsFrom" <?php echo ($option4['sfsi_instagram_countsFrom']=='manual') ? 'checked="true"' : '' ;?> type="radio" value="manual" class="styled" /><label class="high_prb">Enter the figure manually:</label><input name="sfsi_instagram_manualCounts" type="text" class="input" value="<?php echo ($option4['sfsi_instagram_manualCounts']!='') ? $option4['sfsi_instagram_manualCounts'] : '' ;?>" style="<?php echo ($option4['sfsi_instagram_countsFrom']=='followers') ? 'display:none;' : '' ;?>" />
538
- </li>
539
-
540
- </ul>
541
- </div>
542
- </div>
543
- <!-- END INSTAGRAM ICON COUNT SECTION-->
544
-
545
- <!-- telegram ICON COUNT SECTION-->
546
- <div class="specify_counts telegram_section">
547
  <div class="radio_section">
548
- <input name="sfsi_telegram_countsDisplay" <?php echo ($option4['sfsi_telegram_countsDisplay']=='yes') ? 'checked="true"' : '' ;?> type="checkbox" value="yes" class="styled" />
549
  </div>
550
  <div class="social_icon_like">
551
  <ul class="like_icon">
@@ -559,16 +570,16 @@ $hide="display:none;";
559
  </div>
560
  <div class="listing">
561
  <ul>
562
- <li>We cannot track this. So enter the figure here: <input name="sfsi_telegram_manualCounts" type="text" class="input" value="<?php echo ($option4['sfsi_telegram_manualCounts']!='') ? $option4['sfsi_telegram_manualCounts'] : '' ;?>" /></li>
563
  </ul>
564
- </div>
565
  </div>
566
  <!-- END telegram ICON COUNT SECTION-->
567
 
568
  <!-- vk ICON COUNT SECTION-->
569
  <div class="specify_counts vk_section">
570
  <div class="radio_section">
571
- <input name="sfsi_vk_countsDisplay" <?php echo ($option4['sfsi_vk_countsDisplay']=='yes') ? 'checked="true"' : '' ;?> type="checkbox" value="yes" class="styled" />
572
  </div>
573
  <div class="social_icon_like">
574
  <ul class="like_icon">
@@ -582,16 +593,16 @@ $hide="display:none;";
582
  </div>
583
  <div class="listing">
584
  <ul>
585
- <li>We cannot track this. So enter the figure here: <input name="sfsi_vk_manualCounts" type="text" class="input" value="<?php echo ($option4['sfsi_vk_manualCounts']!='') ? $option4['sfsi_vk_manualCounts'] : '' ;?>" /></li>
586
  </ul>
587
- </div>
588
  </div>
589
  <!-- END vk ICON COUNT SECTION-->
590
 
591
  <!-- ok ICON COUNT SECTION-->
592
  <div class="specify_counts ok_section">
593
  <div class="radio_section">
594
- <input name="sfsi_ok_countsDisplay" <?php echo ($option4['sfsi_ok_countsDisplay']=='yes') ? 'checked="true"' : '' ;?> type="checkbox" value="yes" class="styled" />
595
  </div>
596
  <div class="social_icon_like">
597
  <ul class="like_icon">
@@ -605,16 +616,16 @@ $hide="display:none;";
605
  </div>
606
  <div class="listing">
607
  <ul>
608
- <li>We cannot track this. So enter the figure here: <input name="sfsi_ok_manualCounts" type="text" class="input" value="<?php echo ($option4['sfsi_ok_manualCounts']!='') ? $option4['sfsi_ok_manualCounts'] : '' ;?>" /></li>
609
  </ul>
610
- </div>
611
  </div>
612
  <!-- END ok ICON COUNT SECTION-->
613
 
614
  <!-- weibo ICON COUNT SECTION-->
615
  <div class="specify_counts weibo_section">
616
  <div class="radio_section">
617
- <input name="sfsi_weibo_countsDisplay" <?php echo ($option4['sfsi_weibo_countsDisplay']=='yes') ? 'checked="true"' : '' ;?> type="checkbox" value="yes" class="styled" />
618
  </div>
619
  <div class="social_icon_like">
620
  <ul class="like_icon">
@@ -628,16 +639,16 @@ $hide="display:none;";
628
  </div>
629
  <div class="listing">
630
  <ul>
631
- <li>We cannot track this. So enter the figure here: <input name="sfsi_weibo_manualCounts" type="text" class="input" value="<?php echo ($option4['sfsi_weibo_manualCounts']!='') ? $option4['sfsi_weibo_manualCounts'] : '' ;?>" /></li>
632
  </ul>
633
- </div>
634
  </div>
635
  <!-- END weibo ICON COUNT SECTION-->
636
 
637
  <!-- wechat ICON COUNT SECTION-->
638
  <div class="specify_counts wechat_section">
639
  <div class="radio_section">
640
- <input name="sfsi_wechat_countsDisplay" <?php echo ($option4['sfsi_wechat_countsDisplay']=='yes') ? 'checked="true"' : '' ;?> type="checkbox" value="yes" class="styled" />
641
  </div>
642
  <div class="social_icon_like">
643
  <ul class="like_icon">
@@ -651,19 +662,57 @@ $hide="display:none;";
651
  </div>
652
  <div class="listing">
653
  <ul>
654
- <li>We cannot track this. So enter the figure here: <input name="sfsi_wechat_manualCounts" type="text" class="input" value="<?php echo ($option4['sfsi_wechat_manualCounts']!='') ? $option4['sfsi_wechat_manualCounts'] : '' ;?>" /></li>
655
  </ul>
656
- </div>
657
  </div>
658
  <!-- END wechat ICON COUNT SECTION-->
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
659
  </div>
660
  <!-- END show/hide counts for all icons section -->
661
-
662
- <?php sfsi_ask_for_help(4); ?> <!-- SAVE BUTTON SECTION -->
 
 
 
663
  <div class="save_button">
664
- <img src="<?php echo SFSI_PLUGURL ?>images/ajax-loader.gif" class="loader-img" />
665
- <?php $nonce = wp_create_nonce("update_step4"); ?>
666
- <a href="javascript:;" id="sfsi_save4" title="Save" data-nonce="<?php echo $nonce;?>">Save</a>
667
  </div>
668
  <!-- END SAVE BUTTON SECTION -->
669
 
@@ -675,4 +724,4 @@ $hide="display:none;";
675
  <p class="green_txt sucMsg" style="display:none"> </p>
676
  <div class="clear"></div>
677
  </div>
678
- <!-- END Section 4 "Do you want to display "counts" next to your icons?" -->
1
  <?php
2
  /* unserialize all saved option for section 4 options */
3
+ $option6 = unserialize(get_option('sfsi_section6_options', false));
4
+ $option4 = unserialize(get_option('sfsi_section4_options', false));
5
+ $option2 = unserialize(get_option('sfsi_section2_options', false));
6
+ if (!isset($option4['sfsi_facebook_mypageCounts'])) {
7
+ $option4['sfsi_facebook_mypageCounts'] = '';
8
  }
9
 
10
  /*
11
  * Sanitize, escape and validate values
12
  */
13
+ $option4['sfsi_display_counts'] = (isset($option4['sfsi_display_counts'])) ? sanitize_text_field($option4['sfsi_display_counts']) : '';
14
+ $option4['sfsi_email_countsFrom'] = (isset($option4['sfsi_email_countsFrom'])) ? sanitize_text_field($option4['sfsi_email_countsFrom']) : '';
15
+ $option4['sfsi_email_manualCounts'] = (isset($option4['sfsi_email_manualCounts'])) ? intval($option4['sfsi_email_manualCounts']) : '';
16
+ $option4['sfsi_rss_countsDisplay'] = (isset($option4['sfsi_rss_countsDisplay'])) ? sanitize_text_field($option4['sfsi_rss_countsDisplay']) : '';
17
+ $option4['sfsi_rss_manualCounts'] = (isset($option4['sfsi_rss_manualCounts'])) ? intval($option4['sfsi_rss_manualCounts']) : '';
18
+ $option4['sfsi_email_countsDisplay'] = (isset($option4['sfsi_email_countsDisplay'])) ? sanitize_text_field($option4['sfsi_email_countsDisplay']) : '';
19
+
20
+ $option4['sfsi_facebook_countsDisplay'] = (isset($option4['sfsi_facebook_countsDisplay']))
21
+ ? sanitize_text_field($option4['sfsi_facebook_countsDisplay'])
22
+ : '';
23
+ $option4['sfsi_facebook_countsFrom'] = (isset($option4['sfsi_facebook_countsFrom']))
24
+ ? sanitize_text_field($option4['sfsi_facebook_countsFrom'])
25
+ : '';
26
+ $option4['sfsi_facebook_mypageCounts'] = (isset($option4['sfsi_facebook_mypageCounts']))
27
+ ? sfsi_sanitize_field($option4['sfsi_facebook_mypageCounts'])
28
+ : '';
29
+ $option4['sfsi_facebook_manualCounts'] = (isset($option4['sfsi_facebook_manualCounts']))
30
+ ? intval($option4['sfsi_facebook_manualCounts'])
31
+ : '';
32
+ $option4['sfsi_twitter_countsDisplay'] = (isset($option4['sfsi_twitter_countsDisplay']))
33
+ ? sanitize_text_field($option4['sfsi_twitter_countsDisplay'])
34
+ : '';
35
+ $option4['sfsi_twitter_countsFrom'] = (isset($option4['sfsi_twitter_countsFrom']))
36
+ ? sanitize_text_field($option4['sfsi_twitter_countsFrom'])
37
+ : '';
38
+ $option4['sfsi_twitter_manualCounts'] = (isset($option4['sfsi_twitter_manualCounts']))
39
+ ? intval($option4['sfsi_twitter_manualCounts'])
40
+ : '';
41
+ $option4['tw_consumer_key'] = (isset($option4['tw_consumer_key']))
42
+ ? sfsi_sanitize_field($option4['tw_consumer_key'])
43
+ : '';
44
+ $option4['tw_consumer_secret'] = (isset($option4['tw_consumer_secret']))
45
+ ? sfsi_sanitize_field($option4['tw_consumer_secret'])
46
+ : '';
47
+ $option4['tw_oauth_access_token'] = (isset($option4['tw_oauth_access_token']))
48
+ ? sfsi_sanitize_field($option4['tw_oauth_access_token'])
49
+ : '';
50
+ $option4['tw_oauth_access_token_secret'] = (isset($option4['tw_oauth_access_token_secret']))
51
+ ? sfsi_sanitize_field($option4['tw_oauth_access_token_secret'])
52
+ : '';
53
+ $option4['sfsi_youtube_countsDisplay'] = (isset($option4['sfsi_youtube_countsDisplay']))
54
+ ? sanitize_text_field($option4['sfsi_youtube_countsDisplay'])
55
+ : '';
56
+ $option4['sfsi_youtube_countsFrom'] = (isset($option4['sfsi_youtube_countsFrom']))
57
+ ? sanitize_text_field($option4['sfsi_youtube_countsFrom'])
58
+ : '';
59
  // $option4['sfsi_youtubeusernameorid'] = (isset($option4['sfsi_youtubeusernameorid']))
60
  // ? sanitize_text_field($option4['sfsi_youtubeusernameorid'])
61
  // : '';
62
+ $option4['sfsi_youtube_manualCounts'] = (isset($option4['sfsi_youtube_manualCounts']))
63
+ ? intval($option4['sfsi_youtube_manualCounts'])
64
+ : '';
65
+
66
+ $option4['sfsi_instagram_manualCounts'] = (isset($option4['sfsi_instagram_manualCounts']))
67
+ ? intval($option4['sfsi_instagram_manualCounts'])
68
+ : '';
69
+ $option4['sfsi_instagram_User'] = (isset($option4['sfsi_instagram_User']))
70
+ ? sfsi_sanitize_field($option4['sfsi_instagram_User'])
71
+ : '';
72
+ $option4['sfsi_instagram_clientid'] = (isset($option4['sfsi_instagram_clientid']))
73
+ ? sfsi_sanitize_field($option4['sfsi_instagram_clientid'])
74
+ : '';
75
+ $option4['sfsi_instagram_appurl'] = (isset($option4['sfsi_instagram_appurl']))
76
+ ? sfsi_sanitize_field($option4['sfsi_instagram_appurl'])
77
+ : '';
78
+ $option4['sfsi_instagram_token'] = (isset($option4['sfsi_instagram_token']))
79
+ ? sfsi_sanitize_field($option4['sfsi_instagram_token'])
80
+ : '';
81
+ $option4['sfsi_instagram_countsFrom'] = (isset($option4['sfsi_instagram_countsFrom']))
82
+ ? sanitize_text_field($option4['sfsi_instagram_countsFrom'])
83
+ : '';
84
+ $option4['sfsi_instagram_countsDisplay'] = (isset($option4['sfsi_instagram_countsDisplay']))
85
+ ? sanitize_text_field($option4['sfsi_instagram_countsDisplay'])
86
+ : '';
87
+ $option4['sfsi_pinterest_manualCounts'] = (isset($option4['sfsi_pinterest_manualCounts']))
88
+ ? intval($option4['sfsi_pinterest_manualCounts'])
89
+ : '';
90
+ $option4['sfsi_linkedIn_manualCounts'] = (isset($option4['sfsi_linkedIn_manualCounts']))
91
+ ? intval($option4['sfsi_linkedIn_manualCounts'])
92
+ : '';
93
+
94
+ $option4['sfsi_telegram_countsDisplay'] = (isset($option4['sfsi_telegram_countsDisplay'])) ? sanitize_text_field($option4['sfsi_telegram_countsDisplay']) : '';
95
+ $option4['sfsi_telegram_manualCounts'] = (isset($option4['sfsi_telegram_manualCounts'])) ? intval($option4['sfsi_telegram_manualCounts']) : '';
96
+
97
+ $option4['sfsi_vk_countsDisplay'] = (isset($option4['sfsi_vk_countsDisplay'])) ? sanitize_text_field($option4['sfsi_vk_countsDisplay']) : '';
98
+ $option4['sfsi_vk_manualCounts'] = (isset($option4['sfsi_vk_manualCounts'])) ? intval($option4['sfsi_vk_manualCounts']) : '';
99
+
100
+ $option4['sfsi_ok_countsDisplay'] = (isset($option4['sfsi_ok_countsDisplay'])) ? sanitize_text_field($option4['sfsi_ok_countsDisplay']) : '';
101
+ $option4['sfsi_ok_manualCounts'] = (isset($option4['sfsi_ok_manualCounts'])) ? intval($option4['sfsi_ok_manualCounts']) : '';
102
+
103
+ $option4['sfsi_weibo_countsDisplay'] = (isset($option4['sfsi_weibo_countsDisplay'])) ? sanitize_text_field($option4['sfsi_weibo_countsDisplay']) : '';
104
+ $option4['sfsi_weibo_manualCounts'] = (isset($option4['sfsi_weibo_manualCounts'])) ? intval($option4['sfsi_weibo_manualCounts']) : '';
105
+
106
+ $option4['sfsi_wechat_countsDisplay'] = (isset($option4['sfsi_wechat_countsDisplay'])) ? sanitize_text_field($option4['sfsi_wechat_countsDisplay']) : '';
107
+ $option4['sfsi_wechat_manualCounts'] = (isset($option4['sfsi_wechat_manualCounts'])) ? intval($option4['sfsi_wechat_manualCounts']) : '';
108
+ $option4['sfsi_round_counts'] = (isset($option4['sfsi_round_counts'])) ? sanitize_text_field($option4['sfsi_round_counts']) : '';
109
+ $option4['sfsi_original_counts'] = (isset($option4['sfsi_original_counts'])) ? sanitize_text_field($option4['sfsi_original_counts']) : '';
110
+ $option4['sfsi_responsive_share_count'] = (isset($option4['sfsi_responsive_share_count'])) ? sanitize_text_field($option4['sfsi_responsive_share_count']) : '';
111
+
112
+ if (isset($option4['sfsi_youtube_user']) && !empty($option4['sfsi_youtube_user'])) {
113
  $option4['sfsi_youtube_user'] = sfsi_sanitize_field($option4['sfsi_youtube_user']);
114
+ } else {
115
+ if ("name" == $option2['sfsi_youtubeusernameorid'] && isset($option2['sfsi_youtubeusernameorid']) && !empty($option2['sfsi_youtubeusernameorid'])) {
116
+ $option4['sfsi_youtube_user'] = isset($option2['sfsi_ytube_user']) && !empty($option2['sfsi_ytube_user']) ? $option2['sfsi_ytube_user'] : '';
 
117
  }
118
  }
119
 
120
+ if (isset($option4['sfsi_youtube_channelId']) && !empty($option4['sfsi_youtube_channelId'])) {
121
+ $option4['sfsi_youtube_channelId'] = sfsi_sanitize_field($option4['sfsi_youtube_channelId']);
122
+ } else {
123
+ if ("id" == $option2['sfsi_youtubeusernameorid'] && isset($option2['sfsi_youtubeusernameorid']) && !empty($option2['sfsi_youtubeusernameorid'])) {
124
+ $option4['sfsi_youtube_channelId'] = isset($option2['sfsi_ytube_chnlid']) && !empty($option2['sfsi_ytube_chnlid']) ? $option2['sfsi_ytube_chnlid'] : '';
 
125
  }
126
  }
127
 
128
  /* fetch counts for admin sections */
129
  $counts = sfsi_getCounts();
130
  /* check for email icon display */
131
+ $email_image = "email.png";
132
 
133
+ if (isset($option2['sfsi_rss_icons']) && !empty($option2['sfsi_rss_icons']) && $option2['sfsi_rss_icons'] == "sfsi") {
134
+ $email_image = "sf_arow_icn.png";
135
+ }
136
+ $hide = "display:none;";
 
137
 
138
  ?>
139
 
140
  <!-- Section 4 "Do you want to display "counts" next to your icons?" main div Start -->
141
  <div class="tab4">
142
  <p>It’s a psychological fact that people like to follow other people (as explained well in Robert Cialdini’s book “<a href="http://www.amazon.com/Influence-Psychology-Persuasion-Revised-Edition/dp/006124189X" target="_blank" class="lit_txt">Influence</a>”), so when they see that your site has already a good number of Facebook likes, it’s more likely that they will subscribe/like/share your site than if it had 0.</p>
143
+ <p>Therefore, you can select to display the count next to your main icons, which will look like this (example for round icons):</p>
144
+
145
  <!-- sample icons -->
146
  <ul class="like_icon">
147
  <li class="rss_section">
168
  </a>
169
  <span>12k</span>
170
  </li>
171
+ <!-- <li class="share_section">
172
  <a href="#" title="Share">
173
+ <img src="<?php //echo SFSI_PLUGURL
174
+ ?>images/share.png" alt="Share" />
175
  </a>
176
  <span>12k</span>
177
  </li> -->
192
  <img src="<?php echo SFSI_PLUGURL ?>images/linked_in.png" alt="Linked In" />
193
  </a>
194
  <span>12k</span>
195
+ </li>
196
  <li class="instagram_section">
197
  <a href="#" title="Instagram">
198
  <img src="<?php echo SFSI_PLUGURL ?>images/instagram.png" alt="instagram" />
231
  </li>
232
  </ul>
233
  <!-- END sample icons -->
234
+
235
+ <p>Of course, if you start at 0, you shoot yourself in the foot with that. So we suggest that you only turn this feature on once you have a good number of followers/likes/shares (min. of 20 – no worries if it’s not too many, it should just not be 0). <b>New:</b> In the Premium Plugin you can define a threshold (min. number of counts) when it will automatically switch to showing the counts. <a style="cursor:pointer" class="pop-up" data-id="sfsi_quickpay-overlay" onclick="sfsi_open_quick_checkout(event)" class="sfisi_font_bold" target="_blank">Go Premium</a>.</p>
236
  <h4>Enough waffling. So do you want to display counts?</h4>
237
+
238
+ <!-- show/hide counts for icons section START -->
239
  <ul class="enough_waffling">
240
+ <li>
241
+ <input name="sfsi_display_counts" <?php echo ($option4['sfsi_display_counts'] == 'yes') ? 'checked="true"' : ''; ?> type="radio" value="yes" class="styled" /><label>Yes</label>
242
  </li>
243
+ <li>
244
+ <input name="sfsi_display_counts" <?php echo ($option4['sfsi_display_counts'] == 'no') ? 'checked="true"' : ''; ?> type="radio" value="no" class="styled" /><label>No</label>
245
  </li>
246
  </ul>
247
+ <!-- END show/hide counts for icons section -->
248
+
249
+ <!-- show/hide counts for all icons section START -->
250
  <div class="count_sections" style="display:none">
251
+ <h4>Please specify which counts should be shown:</h4>
252
 
253
  <!-- RSS ICON COUNT SECTION-->
254
  <div class="specify_counts rss_section">
255
  <div class="radio_section">
256
+ <input name="sfsi_rss_countsDisplay" <?php echo ($option4['sfsi_rss_countsDisplay'] == 'yes') ? 'checked="true"' : ''; ?> type="checkbox" value="yes" class="styled" />
257
  </div>
258
  <div class="social_icon_like">
259
  <ul class="like_icon">
267
  </div>
268
  <div class="listing">
269
  <ul>
270
+ <li>We cannot track this. So enter the figure here: <input name="sfsi_rss_manualCounts" type="text" class="input" value="<?php echo ($option4['sfsi_rss_manualCounts'] != '') ? $option4['sfsi_rss_manualCounts'] : ''; ?>" /></li>
271
  </ul>
272
+ </div>
273
  </div>
274
  <!-- END RSS ICON COUNT SECTION-->
275
+
276
  <!-- EMAIL ICON COUNT SECTION-->
277
  <div class="specify_counts email_section">
278
  <div class="radio_section">
279
+ <input name="sfsi_email_countsDisplay" <?php echo ($option4['sfsi_email_countsDisplay'] == 'yes') ? 'checked="true"' : ''; ?> type="checkbox" value="yes" class="styled" />
280
  </div>
281
  <div class="social_icon_like">
282
  <ul class="like_icon">
290
  </div>
291
  <div class="listing">
292
  <ul>
293
+ <li><input name="sfsi_email_countsFrom" <?php echo ($option4['sfsi_email_countsFrom'] == 'source') ? 'checked="true"' : ''; ?> type="radio" value="source" class="styled" />Retrieve the number of subscribers automatically</li>
294
+ <li><input name="sfsi_email_countsFrom" <?php echo ($option4['sfsi_email_countsFrom'] == 'manual') ? 'checked="true"' : ''; ?> type="radio" value="manual" class="styled" />Enter the figure manually:<input name="sfsi_email_manualCounts" type="text" class="input" value="<?php echo ($option4['sfsi_email_manualCounts'] != '') ? $option4['sfsi_email_manualCounts'] : ''; ?>" style="<?php echo ($option4['sfsi_email_countsFrom'] == 'source') ? 'display:none;' : ''; ?>" /></li>
295
  </ul>
296
+ </div>
297
  </div>
298
+ <!--END EMAIL ICON COUNT SECTION-->
299
+
300
  <!-- FACEBOOK ICON COUNT SECTION-->
301
  <div class="specify_counts facebook_section">
302
  <div class="radio_section">
303
+ <input name="sfsi_facebook_countsDisplay" <?php echo ($option4['sfsi_facebook_countsDisplay'] == 'yes') ? 'checked="true"' : ''; ?> type="checkbox" value="yes" class="styled" />
304
  </div>
305
  <div class="social_icon_like">
306
  <ul class="like_icon">
310
  <div class="listing">
311
  <ul class="sfsi_fb_popup_contain">
312
  <li>
313
+ <input name="sfsi_facebook_countsFrom" <?php echo ($option4['sfsi_facebook_countsFrom'] == 'likes') ? 'checked="true"' : ''; ?> type="radio" value="likes" class="styled" />Retrieve the number of likes <strong>of your blog</strong>
314
+ <div class="sfsi_prem_fbpgiddesc">
315
+ <div class="sfsi_prem_fbpgidwpr" style="<?php echo ($option4['sfsi_facebook_countsFrom'] == 'likes' || $option4['sfsi_facebook_countsFrom'] == 'followers' || $option4['sfsi_facebook_countsFrom'] == 'manual') ? 'display:none;' : ''; ?>"></div>
316
+
317
+ </div>
318
  </li>
319
  <li>
320
+ <input name="sfsi_facebook_countsFrom" <?php echo ($option4['sfsi_facebook_countsFrom'] == 'mypage') ? 'checked="true"' : ''; ?> type="radio" value="mypage" class="styled" />
321
  Retrieve the number of likes <strong>of your Facebook page</strong><br>
322
+ <div class="sfsi_fbpgiddesc sfsi_fbpaget">
323
+ <div class="sfsi_fbpgidwpr sfsi_count" style="<?php echo ($option4['sfsi_facebook_countsFrom'] == 'likes' || $option4['sfsi_facebook_countsFrom'] == 'followers' || $option4['sfsi_facebook_countsFrom'] == 'manual') ? 'display:none;' : ''; ?>">Facebook page ID:</div>
324
+ <input name="sfsi_facebook_mypageCounts" type="text" class="input mypginpt" value="<?php echo ($option4['sfsi_facebook_mypageCounts'] != '') ? $option4['sfsi_facebook_mypageCounts'] : ''; ?>" style="<?php echo ($option4['sfsi_facebook_countsFrom'] == 'likes' || $option4['sfsi_facebook_countsFrom'] == 'followers' || $option4['sfsi_facebook_countsFrom'] == 'manual') ? 'display:none;' : ''; ?>" />
325
+ <div class="sfsi_fbpgidwpr sfsi_fbpgiddesc sfsi_facebook_count" style="<?php echo ($option4['sfsi_facebook_countsFrom'] == 'likes' || $option4['sfsi_facebook_countsFrom'] == 'followers' || $option4['sfsi_facebook_countsFrom'] == 'manual') ? 'display:none;' : ''; ?>">(You'll find it at the bottom of the <code>
326
+ <<</code>About <code>>>
327
+ </code>-tab on your facebook page)</div>
328
  </div>
329
  </li>
330
  <li>
331
+ <input name="sfsi_facebook_countsFrom" <?php echo ($option4['sfsi_facebook_countsFrom'] == 'manual') ? 'checked="true"' : ''; ?> type="radio" value="manual" class="styled" />Enter the figure manually:<input name="sfsi_facebook_manualCounts" type="text" class="input" value="<?php echo ($option4['sfsi_facebook_manualCounts'] != '') ? $option4['sfsi_facebook_manualCounts'] : ''; ?>" style="<?php echo ($option4['sfsi_facebook_countsFrom'] == 'likes' || $option4['sfsi_facebook_countsFrom'] == 'followers' || $option4['sfsi_facebook_countsFrom'] == 'mypage') ? 'display:none;' : ''; ?>" />
332
  </li>
333
  </ul>
334
+ <div class="sfsi_facebook_pagedeasc" style="<?php echo (isset($option4['sfsi_facebook_countsFrom']) && $option4['sfsi_facebook_countsFrom'] == 'manual') ? 'display:none;' : ''; ?>">
335
+ <p class="sfsi_shared_premium"><b>Note:</b> This plugin uses <u>one</u> API shared by all users of this plugin. There is a limit (set by Facebook) how often this API can get the counts per day, so it may happen that it returns “0 counts” later in the day.<br><br>Therefore we implemented a solution as part of our Premium Plugin where you can <b>easily</b> set up your own API in a few steps, which will fix this problem.<br><br><a style="cursor:pointer;border-bottom: 1px solid #12a252;color: #12a252 !important" class="pop-up" data-id="sfsi_quickpay-overlay" onclick="sfsi_open_quick_checkout(event)" style="border-bottom: 1px solid #12a252;color: #12a252 !important" class="sfisi_font_bold" target="_blank">Go premium now<a href="https://www.ultimatelysocial.com/usm-premium/?utm_source=usmi_settings_page&utm_campaign=facebook_counts&utm_medium=banner" class="sfsi_font_inherit" style="color: #12a252 !important" target="_blank"> or learn more</a>
336
  </p>
337
  </div>
338
+
339
+ </div>
340
  </div>
341
  <!-- END FACEBOOK ICON COUNT SECTION-->
342
+
343
  <!-- TWITTER ICON COUNT SECTION-->
344
  <div class="specify_counts twitter_section">
345
  <div class="radio_section">
346
+ <input name="sfsi_twitter_countsDisplay" <?php echo ($option4['sfsi_twitter_countsDisplay'] == 'yes') ? 'checked="true"' : ''; ?> type="checkbox" value="yes" class="styled" />
347
  </div>
348
  <div class="social_icon_like">
349
  <ul class="like_icon">
358
  <div class="listing">
359
  <ul>
360
  <li>
361
+ <input name="sfsi_twitter_countsFrom" <?php echo ($option4['sfsi_twitter_countsFrom'] == 'source') ? 'checked="true"' : ''; ?> type="radio" value="source" class="styled" />Retrieve the number of Twitter followers
362
  </li>
363
+
364
  <li class="SFSI_tglli">
365
  <ul class="SFSI_lsngfrm">
366
+ <li class="tw_follow_options" style="<?php echo ($option4['sfsi_twitter_countsFrom'] == 'manual') ? 'display:none;' : ''; ?>">
367
  <label>Enter Consumer Key:</label>
368
+ <input name="tw_consumer_key" class="input_facebook" type="text" value="<?php echo (isset($option4['tw_consumer_key']) && $option4['tw_consumer_key'] != '') ? $option4['tw_consumer_key'] : ''; ?>" />
369
  </li>
370
+ <li class="tw_follow_options" style="<?php echo ($option4['sfsi_twitter_countsFrom'] == 'manual') ? 'display:none;' : ''; ?>">
371
  <label>Enter Consumer Secret:</label>
372
+ <input name="tw_consumer_secret" class="input_facebook" type="text" value="<?php echo (isset($option4['tw_consumer_secret']) && $option4['tw_consumer_secret'] != '') ? $option4['tw_consumer_secret'] : ''; ?>" />
373
  </li>
374
+ <li class="tw_follow_options" style="<?php echo ($option4['sfsi_twitter_countsFrom'] == 'manual') ? 'display:none;' : ''; ?>">
375
  <label>Enter Access Token:</label>
376
+ <input name="tw_oauth_access_token" class="input_facebook" type="text" value="<?php echo (isset($option4['tw_oauth_access_token']) && $option4['tw_oauth_access_token'] != '') ? $option4['tw_oauth_access_token'] : ''; ?>" />
377
  </li>
378
+ <li class="tw_follow_options" style="<?php echo ($option4['sfsi_twitter_countsFrom'] == 'manual') ? 'display:none;' : ''; ?>">
379
  <label>Enter Access Token Secret:</label>
380
+ <input name="tw_oauth_access_token_secret" class="input_facebook" type="text" value="<?php echo (isset($option4['tw_oauth_access_token_secret']) && $option4['tw_oauth_access_token_secret'] != '') ? $option4['tw_oauth_access_token_secret'] : ''; ?>" />
381
  </li>
382
  </ul>
383
  <ul class="SFSI_instructions">
384
+ <li class="tw_follow_options" style="<?php echo ($option4['sfsi_twitter_countsFrom'] == 'manual') ? 'display:none;' : ''; ?>">Please make sure you have entered the <b>Username</b> for <b>"Follow me on Twitter:"</b> in twitter settings under question number 2.</li>
385
+ <li class="tw_follow_options" style="<?php echo ($option4['sfsi_twitter_countsFrom'] == 'manual') ? 'display:none;' : ''; ?>">
386
+ <!-- <h3> --><b>To get this information : </b><!-- </h3> -->
387
+ </li>
388
+ <li class="tw_follow_options" style="<?php echo ($option4['sfsi_twitter_countsFrom'] == 'manual') ? 'display:none;' : ''; ?>">1: Go to <a href="http://apps.twitter.com" target="_blank">apps.twitter.com</a></li>
389
+ <li class="tw_follow_options" style="<?php echo ($option4['sfsi_twitter_countsFrom'] == 'manual') ? 'display:none;' : ''; ?>">2: Click on "Create new app"</li>
390
+ <li class="tw_follow_options" style="<?php echo ($option4['sfsi_twitter_countsFrom'] == 'manual') ? 'display:none;' : ''; ?>">3: Enter a random Name , Descriptions and Website URL (including the "http://", e.g. http://dummysitename.com)</li>
391
+ <li class="tw_follow_options" style="<?php echo ($option4['sfsi_twitter_countsFrom'] == 'manual') ? 'display:none;' : ''; ?>">4: Go to "Keys and Access Tokens" tab and click on "Generate Token" in the "Token actions" section at the bottom</li>
392
+ <li class="tw_follow_options" style="<?php echo ($option4['sfsi_twitter_countsFrom'] == 'manual') ? 'display:none;' : ''; ?>">5: Then click on "Test OAuth" at the top right and you will see the 4 token key</li>
393
  </ul>
394
  </li>
395
  <li>
396
+ <input name="sfsi_twitter_countsFrom" <?php echo ($option4['sfsi_twitter_countsFrom'] == 'manual') ? 'checked="true"' : ''; ?> type="radio" value="manual" class="styled" />Enter the figure manually:<input name="sfsi_twitter_manualCounts" type="text" class="input" value="<?php echo ($option4['sfsi_twitter_manualCounts'] != '') ? $option4['sfsi_twitter_manualCounts'] : ''; ?>" style="<?php echo ($option4['sfsi_twitter_countsFrom'] == 'source') ? 'display:none;' : ''; ?>" />
397
  </li>
398
  </ul>
399
+ </div>
400
  </div>
401
+ <!--END TWITTER ICON COUNT SECTION-->
402
+ <!-- LINKEDIN ICON COUNT SECTION-->
403
+ <div class="specify_counts linkedin_section">
404
+ <div class="radio_section"><input name="sfsi_linkedIn_countsDisplay" <?php echo ($option4['sfsi_linkedIn_countsDisplay'] == 'yes') ? 'checked="true"' : ''; ?> type="checkbox" value="yes" class="styled" /></div>
405
  <div class="social_icon_like">
406
  <ul class="like_icon">
407
  <li>
414
  </div>
415
  <div class="listing">
416
  <ul>
417
+
418
+ <?php /*?><li><input name="sfsi_linkedIn_countsFrom" <?php echo ($option4['sfsi_linkedIn_countsFrom']=='follower') ? 'checked="true"' : '' ;?> type="radio" value="follower" class="styled" />Retrieve the number of Linkedin followers</li>
419
  <li class="SFSI_tglli">
420
  <ul class="SFSI_lsngfrm">
421
 
432
  <li class="linkedIn_options" style="<?php echo ($option4['sfsi_linkedIn_countsFrom']=='manual') ? 'display:none;' : '' ;?>">4: In the next step you will see the required API information</li>
433
  <li class="linkedIn_options" style="<?php echo ($option4['sfsi_linkedIn_countsFrom']=='manual') ? 'display:none;' : '' ;?>">When you enter this key into the plugin for the first time, it may take some time until the correct follower count is displayed on your website.</li>
434
  </ul>
435
+ </li><?php */ ?>
436
+
437
+
438
+ <li><input name="sfsi_linkedIn_countsFrom" <?php echo ($option4['sfsi_linkedIn_countsFrom'] == 'manual' || $option4['sfsi_linkedIn_countsFrom'] == 'follower') ? 'checked="true"' : ''; ?> type="radio" value="manual" class="styled" />Enter the figure manually:<input name="sfsi_linkedIn_manualCounts" type="text" class="input" value="<?php echo ($option4['sfsi_linkedIn_manualCounts'] != '') ? $option4['sfsi_linkedIn_manualCounts'] : ''; ?>" style="<?php echo ($option4['sfsi_linkedIn_countsFrom'] == 'follower') ? 'display:none;' : ''; ?>" /></li>
439
+ </ul>
440
+ </div>
 
 
 
 
 
 
 
 
 
 
441
  </div>
442
+ <!-- END LINKEDIN ICON COUNT SECTION-->
443
+
444
+ <!-- YOUTUBE ICON COUNT SECTION-->
445
+ <div class="specify_counts youtube_section">
446
+ <div class="radio_section"><input name="sfsi_youtube_countsDisplay" <?php echo ($option4['sfsi_youtube_countsDisplay'] == 'yes') ? 'checked="true"' : ''; ?> type="checkbox" value="yes" class="styled" /></div>
447
+ <div class="social_icon_like">
448
+ <ul class="like_icon">
449
+ <li><a title="YouTube"><img src="<?php echo SFSI_PLUGURL ?>images/youtube.png" alt="YouTube" /><span><?php echo $counts['youtube_count']; ?></span></a></li>
450
+ </ul>
451
+ </div>
452
+ <div class="listing">
453
+ <ul>
454
+ <li><input name="sfsi_youtube_countsFrom" type="radio" value="subscriber" <?php echo ($option4['sfsi_youtube_countsFrom'] == 'subscriber') ? 'checked="true"' : ''; ?> class="styled" />Retrieve the number of Subscribers</li>
455
+ <li class="youtube_options" style="<?php echo (!isset($option4['sfsi_youtube_countsFrom']) || empty($option4['sfsi_youtube_countsFrom']) || $option4['sfsi_youtube_countsFrom'] == 'manual') ? 'display:none;' : ''; ?>">
456
  <div>
457
  <label>Enter Youtube User name:</label>
458
+ <input name="sfsi_youtube_user" class="input_facebook" type="text" value="<?php echo (isset($option4['sfsi_youtube_user']) && $option4['sfsi_youtube_user'] != '') ? $option4['sfsi_youtube_user'] : ''; ?>" />
459
  </div>
460
  <div>
461
  <label>Enter Youtube Channel Id:</label>
462
+ <input name="sfsi_youtube_channelId" class="input_facebook" type="text" value="<?php echo (isset($option4['sfsi_youtube_channelId']) && $option4['sfsi_youtube_channelId'] != '') ? $option4['sfsi_youtube_channelId'] : ''; ?>" />
463
  </div>
464
+
465
  </li>
466
  <li>
467
+ <input name="sfsi_youtube_countsFrom" type="radio" value="manual" <?php echo ($option4['sfsi_youtube_countsFrom'] == 'manual') ? 'checked="true"' : ''; ?> class="styled" />Enter the figure manually:<input name="sfsi_youtube_manualCounts" type="text" class="input" value="<?php echo ($option4['sfsi_youtube_manualCounts'] != '') ? $option4['sfsi_youtube_manualCounts'] : ''; ?>" style="<?php echo ($option4['sfsi_youtube_countsFrom'] == 'subscriber') ? 'display:none;' : ''; ?>" />
468
  </li>
469
+ </ul>
470
+ </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
471
  </div>
472
+ <!-- END YOUTUBE ICON COUNT SECTION-->
473
+
474
+ <!-- PINIT ICON COUNT SECTION-->
475
+ <div class="specify_counts pinterest_section">
476
+ <div class="radio_section"><input name="sfsi_pinterest_countsDisplay" <?php echo ($option4['sfsi_pinterest_countsDisplay'] == 'yes') ? 'checked="true"' : ''; ?> type="checkbox" value="yes" class="styled" /></div>
477
+ <div class="social_icon_like">
478
+ <ul class="like_icon">
479
+ <li><a title="Pinterest"><img src="<?php echo SFSI_PLUGURL ?>images/pinterest.png" alt="Pinterest" /><span><?php echo $counts['pin_count']; ?></span></a></li>
480
+ </ul>
481
+ </div>
482
+ <div class="listing">
483
+ <ul>
484
+ <li><input name="sfsi_pinterest_countsFrom" <?php echo ($option4['sfsi_pinterest_countsFrom'] == 'pins') ? 'checked="true"' : ''; ?> type="radio" value="pins" class="styled" />Retrieve the number of Pins</li>
485
+ <li><input name="sfsi_pinterest_countsFrom" <?php echo ($option4['sfsi_pinterest_countsFrom'] == 'manual') ? 'checked="true"' : ''; ?> type="radio" value="manual" class="styled" /><label class="high_prb">Enter the figure manually:</label><input name="sfsi_pinterest_manualCounts" type="text" class="input" value="<?php echo ($option4['sfsi_pinterest_manualCounts'] != '') ? $option4['sfsi_pinterest_manualCounts'] : ''; ?>" style="<?php echo ($option4['sfsi_pinterest_countsFrom'] == 'pins') ? 'display:none;' : ''; ?>" /></li>
486
+ </ul>
487
+ </div>
488
+ <div class="sfsi_new_prmium_follw" style="margin-top: 38px;">
489
+ <p><b>New: </b>In the Premium Plugin you can also automatically show the number of PINs from your Pinterest account, or of a specific board, or the number of your Pinterest followers. <a style="cursor:pointer" class="pop-up" data-id="sfsi_quickpay-overlay" onclick="sfsi_open_quick_checkout(event)" class="sfisi_font_bold" target="_blank">Go premium now</a><a href="https://www.ultimatelysocial.com/usm-premium/?utm_source=usmi_settings_page&utm_campaign=more_pinterest_counts&utm_medium=banner" class="sfsi_font_inherit" target="_blank"> or learn more.</a></p>
490
+ </div>
491
 
 
 
 
 
 
 
 
 
 
 
492
  </div>
493
+ <!-- END PINIT ICON COUNT SECTION-->
494
+
495
+ <!-- INSTAGRAM ICON COUNT SECTION-->
496
+ <div class="specify_counts instagram_section">
497
+ <div class="radio_section"><input name="sfsi_instagram_countsDisplay" <?php echo ($option4['sfsi_instagram_countsDisplay'] == 'yes') ? 'checked="true"' : ''; ?> type="checkbox" value="yes" class="styled" /></div>
498
+ <div class="social_icon_like">
499
+ <ul class="like_icon">
500
+ <li><a title="Instagram"><img src="<?php echo SFSI_PLUGURL ?>images/instagram.png" alt="instagram" /><span><?php echo $counts['instagram_count']; ?></span></a></li>
501
+ </ul>
502
+ </div>
503
+ <div class="listing">
504
+ <ul>
505
+ <li>
506
+ <input name="sfsi_instagram_countsFrom" <?php echo ($option4['sfsi_instagram_countsFrom'] == 'followers') ? 'checked="true"' : ''; ?> type="radio" value="followers" class="styled" />Retrieve the number of Instagram followers
507
+ </li>
508
+ <li class="instagram_userLi" style="<?php echo ($option4['sfsi_instagram_countsFrom'] == 'manual') ? 'display:none;' : ''; ?>">
509
+ <div class="sfsi_instagramFields">
510
+ <div>
511
+ <label>Enter Instagram User name:</label>
512
+ <input name="sfsi_instagram_User" class="input_facebook" type="text" value="<?php echo (isset($option4['sfsi_instagram_User']) && $option4['sfsi_instagram_User'] != '') ? $option4['sfsi_instagram_User'] : ''; ?>" />
513
+ </div>
514
+ <div>
515
+ <label>Enter Instagram Client Id:</label>
516
+ <input name="sfsi_instagram_clientid" class="input_facebook" type="text" value="<?php echo (isset($option4['sfsi_instagram_clientid']) && $option4['sfsi_instagram_clientid'] != '') ? $option4['sfsi_instagram_clientid'] : ''; ?>" />
517
+ </div>
518
+ <div>
519
+ <label>Enter Instagram Redirect Url:</label>
520
+ <input name="sfsi_instagram_appurl" class="input_facebook" type="text" value="<?php echo (isset($option4['sfsi_instagram_appurl']) && $option4['sfsi_instagram_appurl'] != '') ? $option4['sfsi_instagram_appurl'] : ''; ?>" />
521
+ </div>
522
+ <div class="sfsi_tokenGenerateButton">
523
+ <p>For generate your app token you need to enter your "Client Id" and "Redirect Url".</p>
524
+ <a href="javascript:">
525
+ Generate Token
526
+ </a>
527
+ </div>
528
+ <div>
529
+ <label>Enter Instagram Token:</label>
530
+ <input name="sfsi_instagram_token" class="input_facebook" type="text" value="<?php echo (isset($option4['sfsi_instagram_token']) && $option4['sfsi_instagram_token'] != '') ? $option4['sfsi_instagram_token'] : ''; ?>" />
531
+ </div>
532
  </div>
533
+ <div class="sfsi_instagramInstruction">
534
+ <p>To complete the process please follow these steps:</p>
535
+ <ol>
536
+ <li>Go to <a href="https://www.instagram.com/developer" target="_blank">https://www.instagram.com/developer</a></li>
537
+ <li>Login and then click on “Register Your Application” to get to the “Manage Clients” section. On there click on the “Register a new client” button</li>
538
+ <li>Fill out the form and make sure that the “Redirect url” is valid and uncheck the “Disable Implicit oAuth” under the security tab.</li>
539
+ <li>Then click on “Register” button.</li>
540
+ <li>Copy the “Client id” and “Redirect url” you entered into the plugin. Also enter your Instagram User name. After that click on the “Generate token” button.</li>
541
+ <li>Authorize your app to access your account info by clicking the “Authorize” button'.</li>
542
+ <li>Now you will be redirected to the redirect url (which you entered during app creation) and find your access token at the end of this url(For example: http://your-website.com/#access_token=< your access token>)</li>
543
+ <li>Copy the access token, paste it into the plugin and click on “Save”.</li>
544
+ </ol>
545
  </div>
546
+ </li>
547
+ <li>
548
+ <input name="sfsi_instagram_countsFrom" <?php echo ($option4['sfsi_instagram_countsFrom'] == 'manual') ? 'checked="true"' : ''; ?> type="radio" value="manual" class="styled" /><label class="high_prb">Enter the figure manually:</label><input name="sfsi_instagram_manualCounts" type="text" class="input" value="<?php echo ($option4['sfsi_instagram_manualCounts'] != '') ? $option4['sfsi_instagram_manualCounts'] : ''; ?>" style="<?php echo ($option4['sfsi_instagram_countsFrom'] == 'followers') ? 'display:none;' : ''; ?>" />
549
+ </li>
550
+
551
+ </ul>
552
+ </div>
553
+ </div>
554
+ <!-- END INSTAGRAM ICON COUNT SECTION-->
555
+
556
+ <!-- telegram ICON COUNT SECTION-->
557
+ <div class="specify_counts telegram_section">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
558
  <div class="radio_section">
559
+ <input name="sfsi_telegram_countsDisplay" <?php echo ($option4['sfsi_telegram_countsDisplay'] == 'yes') ? 'checked="true"' : ''; ?> type="checkbox" value="yes" class="styled" />
560
  </div>
561
  <div class="social_icon_like">
562
  <ul class="like_icon">
570
  </div>
571
  <div class="listing">
572
  <ul>
573
+ <li>We cannot track this. So enter the figure here: <input name="sfsi_telegram_manualCounts" type="text" class="input" value="<?php echo ($option4['sfsi_telegram_manualCounts'] != '') ? $option4['sfsi_telegram_manualCounts'] : ''; ?>" /></li>
574
  </ul>
575
+ </div>
576
  </div>
577
  <!-- END telegram ICON COUNT SECTION-->
578
 
579
  <!-- vk ICON COUNT SECTION-->
580
  <div class="specify_counts vk_section">
581
  <div class="radio_section">
582
+ <input name="sfsi_vk_countsDisplay" <?php echo ($option4['sfsi_vk_countsDisplay'] == 'yes') ? 'checked="true"' : ''; ?> type="checkbox" value="yes" class="styled" />
583
  </div>
584
  <div class="social_icon_like">
585
  <ul class="like_icon">
593
  </div>
594
  <div class="listing">
595
  <ul>
596
+ <li>We cannot track this. So enter the figure here: <input name="sfsi_vk_manualCounts" type="text" class="input" value="<?php echo ($option4['sfsi_vk_manualCounts'] != '') ? $option4['sfsi_vk_manualCounts'] : ''; ?>" /></li>
597
  </ul>
598
+ </div>
599
  </div>
600
  <!-- END vk ICON COUNT SECTION-->
601
 
602
  <!-- ok ICON COUNT SECTION-->
603
  <div class="specify_counts ok_section">
604
  <div class="radio_section">
605
+ <input name="sfsi_ok_countsDisplay" <?php echo ($option4['sfsi_ok_countsDisplay'] == 'yes') ? 'checked="true"' : ''; ?> type="checkbox" value="yes" class="styled" />
606
  </div>
607
  <div class="social_icon_like">
608
  <ul class="like_icon">
616
  </div>
617
  <div class="listing">
618
  <ul>
619
+ <li>We cannot track this. So enter the figure here: <input name="sfsi_ok_manualCounts" type="text" class="input" value="<?php echo ($option4['sfsi_ok_manualCounts'] != '') ? $option4['sfsi_ok_manualCounts'] : ''; ?>" /></li>
620
  </ul>
621
+ </div>
622
  </div>
623
  <!-- END ok ICON COUNT SECTION-->
624
 
625
  <!-- weibo ICON COUNT SECTION-->
626
  <div class="specify_counts weibo_section">
627
  <div class="radio_section">
628
+ <input name="sfsi_weibo_countsDisplay" <?php echo ($option4['sfsi_weibo_countsDisplay'] == 'yes') ? 'checked="true"' : ''; ?> type="checkbox" value="yes" class="styled" />
629
  </div>
630
  <div class="social_icon_like">
631
  <ul class="like_icon">
639
  </div>
640
  <div class="listing">
641
  <ul>
642
+ <li>We cannot track this. So enter the figure here: <input name="sfsi_weibo_manualCounts" type="text" class="input" value="<?php echo ($option4['sfsi_weibo_manualCounts'] != '') ? $option4['sfsi_weibo_manualCounts'] : ''; ?>" /></li>
643
  </ul>
644
+ </div>
645
  </div>
646
  <!-- END weibo ICON COUNT SECTION-->
647
 
648
  <!-- wechat ICON COUNT SECTION-->
649
  <div class="specify_counts wechat_section">
650
  <div class="radio_section">
651
+ <input name="sfsi_wechat_countsDisplay" <?php echo ($option4['sfsi_wechat_countsDisplay'] == 'yes') ? 'checked="true"' : ''; ?> type="checkbox" value="yes" class="styled" />
652
  </div>
653
  <div class="social_icon_like">
654
  <ul class="like_icon">
662
  </div>
663
  <div class="listing">
664
  <ul>
665
+ <li>We cannot track this. So enter the figure here: <input name="sfsi_wechat_manualCounts" type="text" class="input" value="<?php echo ($option4['sfsi_wechat_manualCounts'] != '') ? $option4['sfsi_wechat_manualCounts'] : ''; ?>" /></li>
666
  </ul>
667
+ </div>
668
  </div>
669
  <!-- END wechat ICON COUNT SECTION-->
670
+
671
+ <h4 style="clear: both;">For which icons do you want to show the counts?</h4>
672
+ <!-- wechat ICON COUNT SECTION-->
673
+ <div class="specify_counts" style="border-top: 0px solid #eaebee;padding-top: 0px;">
674
+ <div class="radio_section">
675
+ <input name="sfsi_round_counts" <?php echo ($option4['sfsi_round_counts'] == 'yes') ? 'checked="true"' : ''; ?> type="checkbox" value="yes" class="styled" />
676
+ </div>
677
+ <div class="listing">
678
+ <ul>
679
+ <li>Round icons</li>
680
+ </ul>
681
+ </div>
682
+ </div>
683
+ <div class="specify_counts" style="border-top: 0px solid #eaebee;padding-top: 0px;">
684
+ <div class="radio_section">
685
+ <input name="sfsi_original_counts" <?php echo ($option4['sfsi_original_counts'] == 'yes') ? 'checked="true"' : ''; ?> type="checkbox" value="yes" class="styled" />
686
+ </div>
687
+ <div class="listing">
688
+ <ul>
689
+ <li>Original icons</li>
690
+ </ul>
691
+ </div>
692
+ </div>
693
+ <div class="specify_counts" style="border-top: 0px solid #eaebee;padding-top: 0px;">
694
+ <div class="radio_section">
695
+ <input name="sfsi_responsive_share_count" <?php echo ($option4['sfsi_responsive_share_count'] == 'yes') ? 'checked="true"' : ''; ?> type="checkbox" value="yes" class="styled" />
696
+ </div>
697
+ <div class="listing">
698
+ <ul>
699
+ <li>Responsive icons</li>
700
+ </ul>
701
+ </div>
702
+ </div>
703
+ <!-- END wechat ICON COUNT SECTION-->
704
+
705
  </div>
706
  <!-- END show/hide counts for all icons section -->
707
+
708
+
709
+
710
+ <?php sfsi_ask_for_help(4); ?>
711
+ <!-- SAVE BUTTON SECTION -->
712
  <div class="save_button">
713
+ <img src="<?php echo SFSI_PLUGURL ?>images/ajax-loader.gif" class="loader-img" />
714
+ <?php $nonce = wp_create_nonce("update_step4"); ?>
715
+ <a href="javascript:;" id="sfsi_save4" title="Save" data-nonce="<?php echo $nonce; ?>">Save</a>
716
  </div>
717
  <!-- END SAVE BUTTON SECTION -->
718
 
724
  <p class="green_txt sucMsg" style="display:none"> </p>
725
  <div class="clear"></div>
726
  </div>
727
+ <!-- END Section 4 "Do you want to display "counts" next to your icons?" -->
views/sfsi_option_view6.php CHANGED
@@ -21,8 +21,6 @@ $option6['sfsi_rss_countsDisplay'] = (isset($option6['sfsi_rss_countsDisplay']
21
 
22
  $option6['sfsi_textBefor_icons'] = (isset($option6['sfsi_textBefor_icons'])) ? sanitize_text_field($option6['sfsi_textBefor_icons']) : '';
23
 
24
- $option6['sfsi_icons_DisplayCounts'] = (isset($option6['sfsi_icons_DisplayCounts'])) ? sanitize_text_field($option6['sfsi_icons_DisplayCounts']) : '';
25
-
26
  $option6['sfsi_rectsub'] = (isset($option6['sfsi_rectsub'])) ? sanitize_text_field($option6['sfsi_rectsub']) : '';
27
 
28
  $option6['sfsi_rectfb'] = (isset($option6['sfsi_rectfb'])) ? sanitize_text_field($option6['sfsi_rectfb']) : '';
@@ -44,9 +42,7 @@ $option6['sfsi_show_premium_placement_box'] = (isset($option6['sfsi_show_premium
44
  $option6['sfsi_responsive_icons_end_post'] = (isset($option6['sfsi_responsive_icons_end_post']))
45
  ? sanitize_text_field($option6['sfsi_responsive_icons_end_post'])
46
  : 'no';
47
- $option6['sfsi_share_count'] = (isset($option6['sfsi_share_count']))
48
- ? sanitize_text_field($option6['sfsi_share_count'])
49
- : 'no';
50
 
51
  $sfsi_responsive_icons_default = array(
52
  "default_icons" => array(
@@ -321,17 +317,7 @@ if (!isset($option6['sfsi_rectfbshare'])) {
321
  </select>
322
  </div>
323
  </div>
324
- <div class="options">
325
 
326
- <label>Do you want to display the counts?</label>
327
- <div class="field"><select name="sfsi_icons_DisplayCounts" id="sfsi_icons_DisplayCounts" class="styled">
328
- <option value="yes" <?php echo ($option6['sfsi_icons_DisplayCounts'] == 'yes') ? 'selected="true"' : ''; ?>>
329
- YES</option>
330
- <option value="no" <?php echo ($option6['sfsi_icons_DisplayCounts'] == 'no') ? 'selected="true"' : ''; ?>>
331
- NO</option>
332
- </select>
333
- </div>
334
- </div>
335
 
336
  </div>
337
  <!-- by developer - 28-5-2019 -->
@@ -490,32 +476,7 @@ if (!isset($option6['sfsi_rectfbshare'])) {
490
  </div>
491
  </div>
492
  </li>
493
- <li class="sfsi_responsive_icon_option_li sfsi_responsive_show" style="margin-left:20px;border-left:0;<?php echo $display; ?>">
494
- <label class=" options heading-label">
495
- Share count
496
- </label>
497
- <div class="options sfsi_margin_top_0">
498
- <label style="width:auto!important;font-size: 16px;">
499
- Show the total share count on the left of your icons. It will only be visible if the
500
- individual counts are set up under <a href="#" style="text-decoration: none;font-size: 16px;" onclick="event.preventDefault();sfsi_scroll_to_div(\'ui-id-9\')">question 5</a>.
501
- </label>
502
-
503
- </div>
504
- <ul class="sfsi_tab_3_icns sfsi_shwthmbfraftr ">
505
- <li class="clckbltglcls sfsi_border_left_0" onclick="sfsi_responsive_icon_counter_tgl(null ,'sfsi_premium_responsive_icon_share_count', this);sfsi_responsive_toggle_count();">
506
- <input name="sfsi_share_count" <?php echo ($option6['sfsi_share_count'] == 'yes') ? 'checked="true"' : ''; ?> type="radio" value="yes" class="styled" />
507
- <label class="labelhdng4">
508
- Yes
509
- </label>
510
- </li>
511
- <li class="clckbltglcls sfsi_border_left_0" onclick="sfsi_responsive_icon_counter_tgl('sfsi_responsive_icon_share_count', null, this);sfsi_responsive_toggle_count();">
512
- <input name="sfsi_share_count" <?php echo ($option6['sfsi_share_count'] == 'no') ? 'checked="true"' : ''; ?> type="radio" value="no" class="styled" />
513
- <label class="labelhdng4">
514
- No
515
- </label>
516
- </li>
517
- </ul>
518
- </li>
519
  </ul>
520
  </div>
521
  </li>
21
 
22
  $option6['sfsi_textBefor_icons'] = (isset($option6['sfsi_textBefor_icons'])) ? sanitize_text_field($option6['sfsi_textBefor_icons']) : '';
23
 
 
 
24
  $option6['sfsi_rectsub'] = (isset($option6['sfsi_rectsub'])) ? sanitize_text_field($option6['sfsi_rectsub']) : '';
25
 
26
  $option6['sfsi_rectfb'] = (isset($option6['sfsi_rectfb'])) ? sanitize_text_field($option6['sfsi_rectfb']) : '';
42
  $option6['sfsi_responsive_icons_end_post'] = (isset($option6['sfsi_responsive_icons_end_post']))
43
  ? sanitize_text_field($option6['sfsi_responsive_icons_end_post'])
44
  : 'no';
45
+
 
 
46
 
47
  $sfsi_responsive_icons_default = array(
48
  "default_icons" => array(
317
  </select>
318
  </div>
319
  </div>
 
320
 
 
 
 
 
 
 
 
 
 
321
 
322
  </div>
323
  <!-- by developer - 28-5-2019 -->
476
  </div>
477
  </div>
478
  </li>
479
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
480
  </ul>
481
  </div>
482
  </li>
views/sfsi_pop_content.php CHANGED
@@ -24,7 +24,7 @@ $connectFeedLgn = "http://api.follow.it/?".base64_encode("userprofile=wordpress&
24
  <input type="email" name="email" value="<?php echo get_option("admin_email"); ?>" placeholder="Your email" style="color: #000 !important;"/>
25
  </div>
26
  <div class="save_button">
27
- <a href="javascript:;" id="sfsi_getMeFullAccess" title="Give me access">
28
  Give me access!
29
  </a>
30
  </div>
24
  <input type="email" name="email" value="<?php echo get_option("admin_email"); ?>" placeholder="Your email" style="color: #000 !important;"/>
25
  </div>
26
  <div class="save_button">
27
+ <a href="javascript:;" id="sfsi_getMeFullAccess" data-nonce-fetch-feed-id="<?php echo wp_create_nonce( 'sfsi_get_feed_id' );?>" title="Give me access">
28
  Give me access!
29
  </a>
30
  </div>