Social Media Share Buttons & Social Sharing Icons - Version 2.5.6

Version Description

  • Fixed undefined index issue
  • Updated Youtube api updated
  • Bitly changes
Download this release

Release Info

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

Code changes from version 2.5.5 to 2.5.6

analyst/src/helpers.php CHANGED
@@ -1,6 +1,6 @@
1
  <?php
2
 
3
- if (! function_exists('analyst_assets_path')) {
4
  /**
5
  * Generates path to file in assets folder
6
  *
@@ -16,7 +16,7 @@ if (! function_exists('analyst_assets_path')) {
16
  }
17
 
18
 
19
- if (! function_exists('analyst_assets_url')) {
20
  /**
21
  * Generates url to file in assets folder
22
  *
@@ -32,31 +32,30 @@ if (! function_exists('analyst_assets_url')) {
32
  // of that path to get the content dir AKA directly where
33
  // plugins are installed and make the magic...
34
  $contentDir = is_link(WP_PLUGIN_DIR) ?
35
- dirname(wp_normalize_path(readlink(WP_PLUGIN_DIR))) :
36
- dirname(wp_normalize_path(WP_PLUGIN_DIR));
37
 
38
- $relativePath = str_replace( $contentDir, '', $absolutePath);
39
 
40
  return content_url(wp_normalize_path($relativePath));
41
  }
42
  }
43
 
44
- if (! function_exists('analyst_templates_path')) {
45
- /**
46
- * Generates path to file in templates folder
47
- *
48
- * @param $file
49
- * @return string
50
- */
51
- function analyst_templates_path($file)
52
- {
53
- $path = sprintf('%s/templates/%s', realpath(__DIR__ . '/..'), trim($file, '/'));
54
-
55
- return wp_normalize_path($path);
56
- }
57
  }
 
58
 
59
- if (! function_exists('analyst_require_template')) {
60
  /**
61
  * Require certain template with data
62
  *
@@ -72,13 +71,90 @@ if (! function_exists('analyst_require_template')) {
72
  }
73
  }
74
 
75
- if (! function_exists('dd')) {
76
  /**
77
  * Dump some data
78
  */
79
- function dd ()
80
  {
81
  // var_dump(func_get_args());
82
  die();
83
  }
84
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  <?php
2
 
3
+ if (!function_exists('analyst_assets_path')) {
4
  /**
5
  * Generates path to file in assets folder
6
  *
16
  }
17
 
18
 
19
+ if (!function_exists('analyst_assets_url')) {
20
  /**
21
  * Generates url to file in assets folder
22
  *
32
  // of that path to get the content dir AKA directly where
33
  // plugins are installed and make the magic...
34
  $contentDir = is_link(WP_PLUGIN_DIR) ?
35
+ dirname(wp_normalize_path(readlink(WP_PLUGIN_DIR))) : dirname(wp_normalize_path(WP_PLUGIN_DIR));
 
36
 
37
+ $relativePath = str_replace($contentDir, '', $absolutePath);
38
 
39
  return content_url(wp_normalize_path($relativePath));
40
  }
41
  }
42
 
43
+ if (!function_exists('analyst_templates_path')) {
44
+ /**
45
+ * Generates path to file in templates folder
46
+ *
47
+ * @param $file
48
+ * @return string
49
+ */
50
+ function analyst_templates_path($file)
51
+ {
52
+ $path = sprintf('%s/templates/%s', realpath(__DIR__ . '/..'), trim($file, '/'));
53
+
54
+ return wp_normalize_path($path);
 
55
  }
56
+ }
57
 
58
+ if (!function_exists('analyst_require_template')) {
59
  /**
60
  * Require certain template with data
61
  *
71
  }
72
  }
73
 
74
+ if (!function_exists('dd')) {
75
  /**
76
  * Dump some data
77
  */
78
+ function dd()
79
  {
80
  // var_dump(func_get_args());
81
  die();
82
  }
83
  }
84
+
85
+
86
+
87
+ // function sfsi_check_plugin_is_active($dir_slug, $option_name, $site_url)
88
+ // {
89
+
90
+
91
+ // // var_dump($plugin_list);
92
+ // $is_active_gallery_plugin = array();
93
+ // foreach ($plugin_list as $key => $plugin) {
94
+ // var_dump($plugin);
95
+ // $is_active_gallery_plugin[$key] = is_plugin_active($plugin_list);
96
+ // }
97
+ // if(in_array(true, $is_active_gallery_plugin)){
98
+ // return true;
99
+ // }
100
+ // }
101
+
102
+ // function sfsi_check_on_plugin_page($dir_slug, $option_name, $site_url="")
103
+ // {
104
+ // var_dump('in helper');
105
+
106
+ // return is_plugin_active($dir_slug) && isset($_GET) && isset($_GET["page"]) && ($_GET['page']==$option_name);
107
+ // }
108
+
109
+ function sfsi_get_plugin($dir_slug)
110
+ {
111
+ // if(is_plugin_active($dir_slug)){
112
+ $plugins = get_plugins();
113
+ if (isset($plugins[$dir_slug])) {
114
+ return $plugins[$dir_slug];
115
+ } else {
116
+ return null;
117
+ }
118
+ // }
119
+ }
120
+
121
+ function sfsi_plugin_waiting_time($option)
122
+ {
123
+
124
+ if (isset($option['show_banner']) && $option['show_banner'] == "no" || isset($option['timestamp']) && !empty($option['timestamp'])) {
125
+ $sfsi_banner_timestamp = strtotime($option['timestamp']);
126
+ $sfsi_show_banner_timestamp = $sfsi_banner_timestamp + (21 * 24 * 60 * 60);
127
+ if (time() >= $sfsi_show_banner_timestamp) {
128
+ return true;
129
+ }
130
+ return false;
131
+ }
132
+ return false;
133
+ }
134
+
135
+ function sfsi_wp_img_count()
136
+ {
137
+ $query_img_args = array(
138
+ 'post_type' => 'attachment',
139
+ 'post_mime_type' => array(
140
+ 'jpg|jpeg|jpe' => 'image/jpeg',
141
+ 'gif' => 'image/gif',
142
+ 'png' => 'image/png',
143
+ ),
144
+ 'post_status' => 'inherit',
145
+ 'posts_per_page' => -1,
146
+ );
147
+ $query_img = new WP_Query($query_img_args);
148
+ return $query_img->post_count;
149
+ }
150
+
151
+ function sfsi_check_pinterest_icon_placed()
152
+ {
153
+ $sfsi_section1 = unserialize(get_option('sfsi_section1_options', false));
154
+ if ($sfsi_section1['sfsi_pinterest_display'] == 'yes') {
155
+ return true;
156
+ }
157
+ return false;
158
+ }
159
+
160
+
css/sfsi-admin-common-style.css CHANGED
@@ -52,7 +52,7 @@ img#sfsi-social-media-image-preview {}
52
  input#sfsi-social-media-image-button,input#sfsi-social-pinterest-image-button {width: 100%;margin-top: 10px;min-height: 45px;background: #45a745;color: white;font-size: 16px;}
53
  .imgTxt{ margin-top: 10px;width: 100%;}
54
  .imgTopTxt{ font-size: 14px;padding-bottom: 10px;}
55
- .imgTopTxt strong {font-size: 17px;font-family: inherit;}
56
  .sfsi_custom_social_titlePlusDescription { margin-left: 30px; width: 70%;float: left; margin-top:7px;}
57
  .sfsi_titlePlusDescription{ margin-left: 30px; width: 100%;float: left;}
58
  .sfsi_custom_social_data_title{float: left;width: 100%;}
@@ -95,4 +95,61 @@ a.sfsi_disable_usm_ogtags_setting_change {color: #444;cursor: pointer;font-weigh
95
  font-size: 22px;
96
  margin-left: -25px;
97
  margin-top: -28px;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
98
  }
52
  input#sfsi-social-media-image-button,input#sfsi-social-pinterest-image-button {width: 100%;margin-top: 10px;min-height: 45px;background: #45a745;color: white;font-size: 16px;}
53
  .imgTxt{ margin-top: 10px;width: 100%;}
54
  .imgTopTxt{ font-size: 14px;padding-bottom: 10px;}
55
+ .imgTopTxt strong {font-size: 17px;font-family: inherit;font-weight: bold;}
56
  .sfsi_custom_social_titlePlusDescription { margin-left: 30px; width: 70%;float: left; margin-top:7px;}
57
  .sfsi_titlePlusDescription{ margin-left: 30px; width: 100%;float: left;}
58
  .sfsi_custom_social_data_title{float: left;width: 100%;}
95
  font-size: 22px;
96
  margin-left: -25px;
97
  margin-top: -28px;
98
+ }
99
+
100
+ .sfsi_new_prmium_follw.sfsi_banner_body {
101
+ width: 91%;
102
+ display: flex;
103
+ padding: 11px 20px;
104
+ margin:15px 40px;
105
+ }
106
+
107
+ .sfsi_new_prmium_follw p a {
108
+ color: #12a252 !important;
109
+ text-decoration: none;
110
+ }
111
+
112
+ .sfsi_new_prmium_follw p {
113
+ margin: 0 !important;
114
+ }
115
+ .sfsi_new_prmium_follw p {
116
+ color: #1a1d20 !important;
117
+ font-size: 18px !important;
118
+ font-family: helveticaregular !important;
119
+ }
120
+
121
+ .sfsi_new_prmium_follw .sfsi_banner_dismiss{
122
+ height: fit-content;
123
+ font-size: 16px;
124
+ line-height: 27px;
125
+ cursor: pointer;
126
+ }
127
+
128
+ .sfsi_new_prmium_follw {
129
+ margin-top: 20px;
130
+ background: #f3faf6;
131
+ border: 1px solid #12a252;
132
+ padding: 15px 75px 20px 24px;
133
+ /* float: left; */
134
+ clear: both;
135
+ }
136
+
137
+ .sfsi_new_prmium_follw.sfsi_banner_body.sfsi_warning_banner{
138
+ background: #ffe1e4;
139
+ border: 1px solid #cd2d2d;
140
+ }
141
+
142
+ .sfsi_new_prmium_follw.sfsi_banner_body .sfsi_premiumNoticeDismiss input{
143
+ color: inherit;
144
+ border: 0px #000 solid;
145
+ background-color: inherit;
146
+ cursor: pointer;
147
+ font-weight: 600;
148
+ }
149
+ .sfsi_new_prmium_follw.sfsi_banner_body .sfsi_premiumNoticeDismiss input:focus {
150
+ outline:none;
151
+ }
152
+
153
+ .sfsi_new_prmium_follw.sfsi_banner_body div:first-child{
154
+ width: 96%;
155
  }
css/sfsi-admin-style.css CHANGED
@@ -1529,6 +1529,27 @@ ul.tab_2_email_sec li .radio {
1529
  background-size: contain;
1530
  }
1531
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1532
  /*tab 6 css*/
1533
  .tab6 .social_icon_like1 {
1534
  width: 100%;
@@ -2330,7 +2351,7 @@ ul.sfsi_floaticon_margin_sec li ins {
2330
  background: #f3faf6;
2331
  border: 1px solid #12a252;
2332
  padding: 25px 38px 35px 40px;
2333
- float: left;
2334
  clear: both;
2335
  }
2336
  .notice_custom_icons_premium.sfsi_new_prmium_follw {
@@ -2403,7 +2424,7 @@ ul.sfsi_floaticon_margin_sec li ins {
2403
  margin-top: 20px;
2404
  display: inline-block;
2405
  padding: 15px 75px 20px 24px;
2406
- float: left;
2407
  }
2408
  .sfsi_new_prmium_follw p {
2409
  margin: 0 !important;
@@ -4644,6 +4665,62 @@ text-decoration:none!important;
4644
 
4645
  .sfsi-premium-btn a:hover {
4646
  color: #ffffff;
4647
-
4648
  cursor: pointer;
4649
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1529
  background-size: contain;
1530
  }
1531
 
1532
+ .icns_tab_3.sfsi_premium_ad span{
1533
+ width: 55px;
1534
+ height: 56px;
1535
+ float: left;
1536
+ margin: 0 4px 0 0;
1537
+ background-size: auto 110px;
1538
+ }
1539
+ .icns_tab_3.sfsi_premium_ad .premium_col_1{
1540
+ background-position: -760px -19px;
1541
+ }
1542
+ .icns_tab_3.sfsi_premium_ad .premium_col_2{
1543
+ background-position: -380px -19px;
1544
+ }
1545
+ .icns_tab_3.sfsi_premium_ad .premium_col_3{
1546
+ background-position: -500px -19px;
1547
+ }
1548
+ .icns_tab_3.sfsi_premium_ad .premium_col_4{
1549
+ background-position: -206px -19px;
1550
+ }
1551
+
1552
+
1553
  /*tab 6 css*/
1554
  .tab6 .social_icon_like1 {
1555
  width: 100%;
2351
  background: #f3faf6;
2352
  border: 1px solid #12a252;
2353
  padding: 25px 38px 35px 40px;
2354
+ /* float: left; */
2355
  clear: both;
2356
  }
2357
  .notice_custom_icons_premium.sfsi_new_prmium_follw {
2424
  margin-top: 20px;
2425
  display: inline-block;
2426
  padding: 15px 75px 20px 24px;
2427
+ /* float: left; */
2428
  }
2429
  .sfsi_new_prmium_follw p {
2430
  margin: 0 !important;
4665
 
4666
  .sfsi-premium-btn a:hover {
4667
  color: #ffffff;
 
4668
  cursor: pointer;
4669
  }
4670
+
4671
+ .sfsi_new_prmium_follw .sfsi_banner_dismiss{
4672
+ height: fit-content;
4673
+ font-size: 16px;
4674
+ line-height: 27px;
4675
+ cursor: pointer;
4676
+ }
4677
+
4678
+ .sfsi_new_prmium_follw.sfsi_banner_body{
4679
+ width: 91%;
4680
+ display: flex;
4681
+ padding: 11px 20px;
4682
+ }
4683
+
4684
+
4685
+ .sfsi_new_prmium_follw.sfsi_banner_body.sfsi_warning_banner{
4686
+ background: #ffe1e4;
4687
+ border: 1px solid #cd2d2d;
4688
+ }
4689
+
4690
+ .icns_tab_3.sfsi_premium_ad .sfis_premium_ad_name{
4691
+ display: inline-block;
4692
+ margin-top: 18px;
4693
+ margin-left: 10px;
4694
+ font-size: 16px;
4695
+ opacity: 0.4;
4696
+ font-weight: bolder;
4697
+ }
4698
+ .tab4 ul.like_icon li span {
4699
+ width:60px!important;
4700
+ height:37px!important;
4701
+ }
4702
+ .sfsi_new_prmium_follw.sfsi_social_sharing{
4703
+ width:100%!important;
4704
+ }
4705
+
4706
+ /*.sf_si_our_prmium_plugin-add{
4707
+ width:100%!important;
4708
+ }*/
4709
+ /*@media only screen and (min-width: 1920px) {
4710
+ .sf_si_our_prmium_plugin-add{
4711
+ width:70%!important;
4712
+ }
4713
+ }*/
4714
+ .effectName label{
4715
+ width: calc( 100% - 50px );
4716
+ }
4717
+
4718
+
4719
+ .wapper.sfsi_mainContainer input {
4720
+ line-height: 1!important;
4721
+ }
4722
+
4723
+
4724
+ .ui-accordion-header:focus {
4725
+ outline: none;
4726
+ }
css/sfsi-style.css CHANGED
@@ -963,7 +963,7 @@ ul.tab_3_icns li .radio {
963
  left: 0;
964
  width: 100%;
965
  height: 100%;
966
- backgound-color: #d3d3d3;
967
  z-index: 10;
968
  padding: 20px;
969
  display: none;
@@ -975,7 +975,7 @@ ul.tab_3_icns li .radio {
975
  left: 0;
976
  width: 100%;
977
  height: 100%;
978
- backgound-color: #d3d3d3;
979
  z-index: -1000;
980
  padding: 20px;
981
  opacity: 0;
@@ -2145,6 +2145,7 @@ h2.optional {
2145
  .sfsi_mainContainer select,
2146
  .sfsi_mainContainer textarea {
2147
  color: #5a6570 !important;
 
2148
  }
2149
 
2150
  .adminTooltip {
@@ -2888,7 +2889,12 @@ a.sficn {
2888
  z-index: 99;
2889
  margin-left: -59px;
2890
  margin-top: -14px;
2891
- background: rgba(255, 255, 255, .8);
 
 
 
 
 
2892
  }
2893
 
2894
  .disabled_checkbox .sfsi_right_info.sfsi_Woocommerce_disable:before {
@@ -3048,7 +3054,7 @@ a.pop-up .radio{
3048
  .sfsi_responsive_icon_gradient{
3049
  background-image: -webkit-linear-gradient(bottom,rgba(0, 0, 0, 0.17) 0%,rgba(255, 255, 255, 0.17) 100%);
3050
  background-image: -moz-linear-gradient(bottom,rgba(0, 0, 0, 0.17) 0%,rgba(255, 255, 255, 0.17) 100%);
3051
- background-image: linear-gradient(bottom,rgba(0,0,0,.17) 0%,rgba(255,255,255,.17) 100%);
3052
  }
3053
  .tab6 ul.sfsi_icn_listing8 ul.sfsi_tab_3_icns li {
3054
  width: 50%;
@@ -3095,7 +3101,6 @@ ul.sfsi_tab_3_icns {
3095
  }
3096
  .tab6 .sfsi_tab_3_icns.sfsi_shwthmbfraftr .social_icon_like1 li {
3097
  width: auto;
3098
- max-width: auto;
3099
  min-width: auto;
3100
  margin: 0 30px 0 0;
3101
  }
963
  left: 0;
964
  width: 100%;
965
  height: 100%;
966
+ background-color: #d3d3d3;
967
  z-index: 10;
968
  padding: 20px;
969
  display: none;
975
  left: 0;
976
  width: 100%;
977
  height: 100%;
978
+ background-color: #d3d3d3;
979
  z-index: -1000;
980
  padding: 20px;
981
  opacity: 0;
2145
  .sfsi_mainContainer select,
2146
  .sfsi_mainContainer textarea {
2147
  color: #5a6570 !important;
2148
+ line-height: 1 !important;
2149
  }
2150
 
2151
  .adminTooltip {
2889
  z-index: 99;
2890
  margin-left: -59px;
2891
  margin-top: -14px;
2892
+ background: rgba(255, 255, 255, .6);
2893
+ }
2894
+
2895
+ .disabled_checkbox .sfsi_right_info.sfsi_Woocommerce_disable:before {
2896
+ margin-left: -49px !important;
2897
+ width: 400px;
2898
  }
2899
 
2900
  .disabled_checkbox .sfsi_right_info.sfsi_Woocommerce_disable:before {
3054
  .sfsi_responsive_icon_gradient{
3055
  background-image: -webkit-linear-gradient(bottom,rgba(0, 0, 0, 0.17) 0%,rgba(255, 255, 255, 0.17) 100%);
3056
  background-image: -moz-linear-gradient(bottom,rgba(0, 0, 0, 0.17) 0%,rgba(255, 255, 255, 0.17) 100%);
3057
+ background-image: linear-gradient(to bottom,rgba(0,0,0,.17) 0%,rgba(255,255,255,.17) 100%);
3058
  }
3059
  .tab6 ul.sfsi_icn_listing8 ul.sfsi_tab_3_icns li {
3060
  width: 50%;
3101
  }
3102
  .tab6 .sfsi_tab_3_icns.sfsi_shwthmbfraftr .social_icon_like1 li {
3103
  width: auto;
 
3104
  min-width: auto;
3105
  margin: 0 30px 0 0;
3106
  }
js/custom-admin.js CHANGED
@@ -574,71 +574,71 @@ 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
  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,
587
- sfsi_email_countsDisplay: t,
588
- sfsi_email_countsFrom: n,
589
- sfsi_email_manualCounts: o,
590
- sfsi_rss_countsDisplay: r,
591
- sfsi_rss_manualCounts: c,
592
- sfsi_facebook_countsDisplay: p,
593
- sfsi_facebook_countsFrom: _,
594
- sfsi_facebook_mypageCounts: mp,
595
- sfsi_facebook_manualCounts: l,
596
- sfsi_twitter_countsDisplay: S,
597
- sfsi_twitter_countsFrom: u,
598
- sfsi_twitter_manualCounts: f,
599
- tw_consumer_key: d,
600
- tw_consumer_secret: I,
601
- tw_oauth_access_token: m,
602
- tw_oauth_access_token_secret: F,
603
- sfsi_linkedIn_countsDisplay: D,
604
- sfsi_linkedIn_countsFrom: k,
605
- sfsi_linkedIn_manualCounts: y,
606
- ln_company: b,
607
- ln_api_key: w,
608
- ln_secret_key: x,
609
- ln_oAuth_user_token: C,
610
- sfsi_youtube_countsDisplay: U,
611
- sfsi_youtube_countsFrom: O,
612
- sfsi_youtube_manualCounts: T,
613
- sfsi_youtube_user: j,
614
- sfsi_youtube_channelId: SFSI("input[name='sfsi_youtube_channelId']").val(),
615
- sfsi_pinterest_countsDisplay: P,
616
- sfsi_pinterest_countsFrom: M,
617
- sfsi_pinterest_manualCounts: L,
618
- sfsi_pinterest_user: B,
619
- sfsi_pinterest_board: E,
620
- sfsi_instagram_countsDisplay: z,
621
- sfsi_instagram_countsFrom: A,
622
- sfsi_instagram_manualCounts: N,
623
- sfsi_instagram_User: H,
624
- sfsi_instagram_clientid: ha,
625
- sfsi_instagram_appurl: ia,
626
- sfsi_instagram_token: ja,
627
- sfsi_telegram_countsDisplay: tc,
628
- sfsi_telegram_manualCounts: tm,
629
- sfsi_vk_countsDisplay: vc,
630
- sfsi_vk_manualCounts: vm,
631
- sfsi_ok_countsDisplay: oc,
632
- sfsi_ok_manualCounts: om,
633
- sfsi_weibo_countsDisplay: wc,
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,
@@ -2166,6 +2166,42 @@ SFSI(document).ready(function (s) {
2166
  SFSI("#sfsi_installDate").on("click", function () {
2167
  sfsi_installDate_save();
2168
  }),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2169
  SFSI("#save_all_settings").on("click", function () {
2170
  return SFSI("#save_all_settings").text("Saving.."), SFSI(".save_button >a").css("pointer-events", "none"),
2171
  sfsi_update_step1(), sfsi_update_step8(), 1 == global_error ? (showErrorSuc("error", 'Some Selection error in "Which icons do you want to show on your site?" tab.', 8),
@@ -2626,6 +2662,8 @@ SFSI(document).ready(function (s) {
2626
  }
2627
 
2628
  if (!error) {
 
 
2629
  // console.log("feedid",feedid);
2630
  if (feedid == "" || undefined == feedid) {
2631
  var nonce = SFSI(this).attr('data-nonce-fetch-feed-id');
@@ -2646,18 +2684,30 @@ SFSI(document).ready(function (s) {
2646
  if ("success" == s.res) {
2647
  var feedid = s.feed_id;
2648
  if (feedid == "" || null == feedid) {
2649
- alert("Error: Claiming didn't work. Please try again later.")
 
 
 
2650
  } else {
2651
  jQuery('#calimingOptimizationForm input[name="feed_id"]').val(feedid);
2652
  // console.log("feedid",feedid,SFSI("#calimingOptimizationForm input[name='feed_id']"),SFSI('#calimingOptimizationForm input[name="feedid"]').val());
2653
  SFSI('#calimingOptimizationForm').submit();
 
 
 
2654
  }
2655
  } else {
2656
  if ("failed" == s.res) {
2657
  alert("Error: " + s.message + ".");
 
 
 
2658
 
2659
  } else {
2660
  alert("Error: Please try again.");
 
 
 
2661
  }
2662
  }
2663
  }
@@ -2727,7 +2777,7 @@ function showhideutube(ref) {
2727
  SFSI(ref).parent(".enough_waffling").next(".cstmutbtxtwpr").children(".cstmutbchnlnmewpr").slideUp();
2728
  }
2729
  }
2730
-
2731
  function checkforinfoslction(ref) {
2732
  var pos = jQuery(ref).children(".checkbox").css("background-position");
2733
 
@@ -2746,6 +2796,7 @@ function checkforinfoslction(ref) {
2746
 
2747
  function checkforinfoslction_checkbox(ref) {
2748
 
 
2749
  var pos = jQuery(ref).children(".checkbox").css("background-position");
2750
 
2751
  var elem = jQuery(ref).parent().children('.sfsi_right_info').find('.kckslctn');
@@ -3437,18 +3488,339 @@ function sfsi_installDate_save() {
3437
  nonce: nonce
3438
  };
3439
  console.log(data);
3440
- SFSI.ajax({
3441
- url: sfsi_icon_ajax_object.ajax_url,
3442
- type: "post",
3443
- data: data,
3444
- success: function (s) {
3445
- console.log(s);
3446
- if (s == "wrong_nonce") {
3447
- showErrorSuc("error", "Unauthorised Request, Try again after refreshing page", 6);
3448
- global_error = 1;
3449
- } else {
3450
- console.log(s);
3451
- }
3452
- }
3453
- });
3454
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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,
587
+ sfsi_email_countsDisplay: t,
588
+ sfsi_email_countsFrom: n,
589
+ sfsi_email_manualCounts: o,
590
+ sfsi_rss_countsDisplay: r,
591
+ sfsi_rss_manualCounts: c,
592
+ sfsi_facebook_countsDisplay: p,
593
+ sfsi_facebook_countsFrom: _,
594
+ sfsi_facebook_mypageCounts: mp,
595
+ sfsi_facebook_manualCounts: l,
596
+ sfsi_twitter_countsDisplay: S,
597
+ sfsi_twitter_countsFrom: u,
598
+ sfsi_twitter_manualCounts: f,
599
+ tw_consumer_key: d,
600
+ tw_consumer_secret: I,
601
+ tw_oauth_access_token: m,
602
+ tw_oauth_access_token_secret: F,
603
+ sfsi_linkedIn_countsDisplay: D,
604
+ sfsi_linkedIn_countsFrom: k,
605
+ sfsi_linkedIn_manualCounts: y,
606
+ ln_company: b,
607
+ ln_api_key: w,
608
+ ln_secret_key: x,
609
+ ln_oAuth_user_token: C,
610
+ sfsi_youtube_countsDisplay: U,
611
+ sfsi_youtube_countsFrom: O,
612
+ sfsi_youtube_manualCounts: T,
613
+ sfsi_youtube_user: j,
614
+ sfsi_youtube_channelId: SFSI("input[name='sfsi_youtube_channelId']").val(),
615
+ sfsi_pinterest_countsDisplay: P,
616
+ sfsi_pinterest_countsFrom: M,
617
+ sfsi_pinterest_manualCounts: L,
618
+ sfsi_pinterest_user: B,
619
+ sfsi_pinterest_board: E,
620
+ sfsi_instagram_countsDisplay: z,
621
+ sfsi_instagram_countsFrom: A,
622
+ sfsi_instagram_manualCounts: N,
623
+ sfsi_instagram_User: H,
624
+ sfsi_instagram_clientid: ha,
625
+ sfsi_instagram_appurl: ia,
626
+ sfsi_instagram_token: ja,
627
+ sfsi_telegram_countsDisplay: tc,
628
+ sfsi_telegram_manualCounts: tm,
629
+ sfsi_vk_countsDisplay: vc,
630
+ sfsi_vk_manualCounts: vm,
631
+ sfsi_ok_countsDisplay: oc,
632
+ sfsi_ok_manualCounts: om,
633
+ sfsi_weibo_countsDisplay: wc,
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,
2166
  SFSI("#sfsi_installDate").on("click", function () {
2167
  sfsi_installDate_save();
2168
  }),
2169
+ SFSI("#sfsi_currentDate").on("click", function () {
2170
+ sfsi_currentDate_save();
2171
+ }),
2172
+ SFSI("#sfsi_showNextBannerDate").on("click", function () {
2173
+ sfsi_showNextBannerDate_save();
2174
+ }),
2175
+ SFSI("#sfsi_cycleDate").on("click", function () {
2176
+ sfsi_cycleDate_save();
2177
+ }),
2178
+ SFSI("#sfsi_loyaltyDate").on("click", function () {
2179
+ sfsi_loyaltyDate_save();
2180
+ }),
2181
+ SFSI("#sfsi_banner_global_firsttime_offer").on("click", function () {
2182
+ sfsi_banner_global_firsttime_offer_save();
2183
+ }),
2184
+ SFSI("#sfsi_banner_global_pinterest").on("click", function () {
2185
+ sfsi_banner_global_pinterest_save();
2186
+ }),
2187
+ SFSI("#sfsi_banner_global_social").on("click", function () {
2188
+ sfsi_banner_global_social_save();
2189
+ }),
2190
+ SFSI("#sfsi_banner_global_load_faster").on("click", function () {
2191
+ sfsi_banner_global_load_faster_save();
2192
+ }),
2193
+ SFSI("#sfsi_banner_global_shares").on("click", function () {
2194
+ sfsi_banner_global_shares_save();
2195
+ }),
2196
+ SFSI("#sfsi_banner_global_gdpr").on("click", function () {
2197
+ sfsi_banner_global_gdpr_save();
2198
+ }),
2199
+ SFSI("#sfsi_banner_global_http").on("click", function () {
2200
+ sfsi_banner_global_http_save();
2201
+ }),
2202
+ SFSI("#sfsi_banner_global_upgrade").on("click", function () {
2203
+ sfsi_banner_global_upgrade_save();
2204
+ }),
2205
  SFSI("#save_all_settings").on("click", function () {
2206
  return SFSI("#save_all_settings").text("Saving.."), SFSI(".save_button >a").css("pointer-events", "none"),
2207
  sfsi_update_step1(), sfsi_update_step8(), 1 == global_error ? (showErrorSuc("error", 'Some Selection error in "Which icons do you want to show on your site?" tab.', 8),
2662
  }
2663
 
2664
  if (!error) {
2665
+
2666
+ SFSI(this).css("pointer-events", "none");
2667
  // console.log("feedid",feedid);
2668
  if (feedid == "" || undefined == feedid) {
2669
  var nonce = SFSI(this).attr('data-nonce-fetch-feed-id');
2684
  if ("success" == s.res) {
2685
  var feedid = s.feed_id;
2686
  if (feedid == "" || null == feedid) {
2687
+ alert("Error: Claiming didn't work. Please try again later.");
2688
+ SFSI(".sfsi_getMeFullAccess_class").css("pointer-events", "initial");
2689
+
2690
+
2691
  } else {
2692
  jQuery('#calimingOptimizationForm input[name="feed_id"]').val(feedid);
2693
  // console.log("feedid",feedid,SFSI("#calimingOptimizationForm input[name='feed_id']"),SFSI('#calimingOptimizationForm input[name="feedid"]').val());
2694
  SFSI('#calimingOptimizationForm').submit();
2695
+ SFSI(".sfsi_getMeFullAccess_class").css("pointer-events", "initial");
2696
+
2697
+
2698
  }
2699
  } else {
2700
  if ("failed" == s.res) {
2701
  alert("Error: " + s.message + ".");
2702
+ SFSI(".sfsi_getMeFullAccess_class").css("pointer-events", "initial");
2703
+
2704
+
2705
 
2706
  } else {
2707
  alert("Error: Please try again.");
2708
+ SFSI(".sfsi_getMeFullAccess_class").css("pointer-events", "initial");
2709
+
2710
+
2711
  }
2712
  }
2713
  }
2777
  SFSI(ref).parent(".enough_waffling").next(".cstmutbtxtwpr").children(".cstmutbchnlnmewpr").slideUp();
2778
  }
2779
  }
2780
+
2781
  function checkforinfoslction(ref) {
2782
  var pos = jQuery(ref).children(".checkbox").css("background-position");
2783
 
2796
 
2797
  function checkforinfoslction_checkbox(ref) {
2798
 
2799
+ console.log(ref)
2800
  var pos = jQuery(ref).children(".checkbox").css("background-position");
2801
 
2802
  var elem = jQuery(ref).parent().children('.sfsi_right_info').find('.kckslctn');
3488
  nonce: nonce
3489
  };
3490
  console.log(data);
3491
+ SFSI.ajax({
3492
+ url: sfsi_icon_ajax_object.ajax_url,
3493
+ type: "post",
3494
+ data: data,
3495
+ success: function (s) {
3496
+ console.log(s);
3497
+ if (s == "wrong_nonce") {
3498
+ showErrorSuc("error", "Unauthorised Request, Try again after refreshing page", 6);
3499
+ global_error = 1;
3500
+ } else {
3501
+ console.log(s);
3502
+ }
3503
+ }
3504
+ });
3505
+ }
3506
+
3507
+ function sfsi_currentDate_save(){
3508
+ var nonce = SFSI("#sfsi_currentDate").attr("data-nonce");
3509
+ console.log(nonce);
3510
+ var sfsi_currentDate = SFSI("input[name='sfsi_currentDate']").val();
3511
+ var data = {
3512
+ action: "sfsi_currentDate",
3513
+ sfsi_currentDate:sfsi_currentDate,
3514
+ nonce: nonce
3515
+ };
3516
+ console.log(data);
3517
+ SFSI.ajax({
3518
+ url: sfsi_icon_ajax_object.ajax_url,
3519
+ type: "post",
3520
+ data: data,
3521
+ success: function (s) {
3522
+ console.log(s);
3523
+ if (s == "wrong_nonce") {
3524
+ showErrorSuc("error", "Unauthorised Request, Try again after refreshing page", 6);
3525
+ global_error = 1;
3526
+ } else {
3527
+ console.log(s);
3528
+ }
3529
+ }
3530
+ });
3531
+ }
3532
+
3533
+ function sfsi_showNextBannerDate_save(){
3534
+ var nonce = SFSI("#sfsi_showNextBannerDate").attr("data-nonce");
3535
+ console.log(nonce);
3536
+ var sfsi_showNextBannerDate = SFSI("input[name='sfsi_showNextBannerDate']").val();
3537
+ var data = {
3538
+ action: "sfsi_showNextBannerDate",
3539
+ sfsi_showNextBannerDate:sfsi_showNextBannerDate,
3540
+ nonce: nonce
3541
+ };
3542
+ console.log(data);
3543
+ SFSI.ajax({
3544
+ url: sfsi_icon_ajax_object.ajax_url,
3545
+ type: "post",
3546
+ data: data,
3547
+ success: function (s) {
3548
+ console.log(s);
3549
+ if (s == "wrong_nonce") {
3550
+ showErrorSuc("error", "Unauthorised Request, Try again after refreshing page", 6);
3551
+ global_error = 1;
3552
+ } else {
3553
+ console.log(s);
3554
+ }
3555
+ }
3556
+ });
3557
+ }
3558
+
3559
+ function sfsi_cycleDate_save(){
3560
+ var nonce = SFSI("#sfsi_cycleDate").attr("data-nonce");
3561
+ console.log(nonce);
3562
+ var sfsi_cycleDate = SFSI("input[name='sfsi_cycleDate']").val();
3563
+ var data = {
3564
+ action: "sfsi_cycleDate",
3565
+ sfsi_cycleDate:sfsi_cycleDate,
3566
+ nonce: nonce
3567
+ };
3568
+ console.log(data);
3569
+ SFSI.ajax({
3570
+ url: sfsi_icon_ajax_object.ajax_url,
3571
+ type: "post",
3572
+ data: data,
3573
+ success: function (s) {
3574
+ console.log(s);
3575
+ if (s == "wrong_nonce") {
3576
+ showErrorSuc("error", "Unauthorised Request, Try again after refreshing page", 6);
3577
+ global_error = 1;
3578
+ } else {
3579
+ console.log(s);
3580
+ }
3581
+ }
3582
+ });
3583
+ }
3584
+
3585
+ function sfsi_loyaltyDate_save(){
3586
+ var nonce = SFSI("#sfsi_loyaltyDate").attr("data-nonce");
3587
+ console.log(nonce);
3588
+ var sfsi_loyaltyDate = SFSI("input[name='sfsi_loyaltyDate']").val();
3589
+ var data = {
3590
+ action: "sfsi_loyaltyDate",
3591
+ sfsi_loyaltyDate:sfsi_loyaltyDate,
3592
+ nonce: nonce
3593
+ };
3594
+ console.log(data);
3595
+ SFSI.ajax({
3596
+ url: sfsi_icon_ajax_object.ajax_url,
3597
+ type: "post",
3598
+ data: data,
3599
+ success: function (s) {
3600
+ console.log(s);
3601
+ if (s == "wrong_nonce") {
3602
+ showErrorSuc("error", "Unauthorised Request, Try again after refreshing page", 6);
3603
+ global_error = 1;
3604
+ } else {
3605
+ console.log(s);
3606
+ }
3607
+ }
3608
+ });
3609
+ }
3610
+
3611
+
3612
+ function sfsi_banner_global_firsttime_offer_save(){
3613
+ var nonce = SFSI("#sfsi_banner_global_firsttime_offer").attr("data-nonce");
3614
+ console.log(nonce);
3615
+ var sfsi_banner_global_firsttime_offer = SFSI("input[name='sfsi_banner_global_firsttime_offer']").val();
3616
+ var data = {
3617
+ action: "sfsi_banner_global_firsttime_offer",
3618
+ sfsi_banner_global_firsttime_offer:sfsi_banner_global_firsttime_offer,
3619
+ nonce: nonce
3620
+ };
3621
+ console.log(data);
3622
+ SFSI.ajax({
3623
+ url: sfsi_icon_ajax_object.ajax_url,
3624
+ type: "post",
3625
+ data: data,
3626
+ success: function (s) {
3627
+ console.log(s);
3628
+ if (s == "wrong_nonce") {
3629
+ showErrorSuc("error", "Unauthorised Request, Try again after refreshing page", 6);
3630
+ global_error = 1;
3631
+ } else {
3632
+ console.log(s);
3633
+ }
3634
+ }
3635
+ });
3636
+ }
3637
+
3638
+
3639
+ function sfsi_banner_global_pinterest_save(){
3640
+ var nonce = SFSI("#sfsi_banner_global_pinterest").attr("data-nonce");
3641
+ console.log(nonce);
3642
+ var sfsi_banner_global_pinterest = SFSI("input[name='sfsi_banner_global_pinterest']").val();
3643
+ var data = {
3644
+ action: "sfsi_banner_global_pinterest",
3645
+ sfsi_banner_global_pinterest:sfsi_banner_global_pinterest,
3646
+ nonce: nonce
3647
+ };
3648
+ console.log(data);
3649
+ SFSI.ajax({
3650
+ url: sfsi_icon_ajax_object.ajax_url,
3651
+ type: "post",
3652
+ data: data,
3653
+ success: function (s) {
3654
+ console.log(s);
3655
+ if (s == "wrong_nonce") {
3656
+ showErrorSuc("error", "Unauthorised Request, Try again after refreshing page", 6);
3657
+ global_error = 1;
3658
+ } else {
3659
+ console.log(s);
3660
+ }
3661
+ }
3662
+ });
3663
+ }
3664
+
3665
+
3666
+ function sfsi_banner_global_social_save(){
3667
+ var nonce = SFSI("#sfsi_banner_global_social").attr("data-nonce");
3668
+ console.log(nonce);
3669
+ var sfsi_banner_global_social = SFSI("input[name='sfsi_banner_global_social']").val();
3670
+ var data = {
3671
+ action: "sfsi_banner_global_social",
3672
+ sfsi_banner_global_social:sfsi_banner_global_social,
3673
+ nonce: nonce
3674
+ };
3675
+ console.log(data);
3676
+ SFSI.ajax({
3677
+ url: sfsi_icon_ajax_object.ajax_url,
3678
+ type: "post",
3679
+ data: data,
3680
+ success: function (s) {
3681
+ console.log(s);
3682
+ if (s == "wrong_nonce") {
3683
+ showErrorSuc("error", "Unauthorised Request, Try again after refreshing page", 6);
3684
+ global_error = 1;
3685
+ } else {
3686
+ console.log(s);
3687
+ }
3688
+ }
3689
+ });
3690
+ }
3691
+
3692
+
3693
+ function sfsi_banner_global_load_faster_save(){
3694
+ var nonce = SFSI("#sfsi_banner_global_load_faster").attr("data-nonce");
3695
+ console.log(nonce);
3696
+ var sfsi_banner_global_load_faster = SFSI("input[name='sfsi_banner_global_load_faster']").val();
3697
+ var data = {
3698
+ action: "sfsi_banner_global_load_faster",
3699
+ sfsi_banner_global_load_faster:sfsi_banner_global_load_faster,
3700
+ nonce: nonce
3701
+ };
3702
+ console.log(data);
3703
+ SFSI.ajax({
3704
+ url: sfsi_icon_ajax_object.ajax_url,
3705
+ type: "post",
3706
+ data: data,
3707
+ success: function (s) {
3708
+ console.log(s);
3709
+ if (s == "wrong_nonce") {
3710
+ showErrorSuc("error", "Unauthorised Request, Try again after refreshing page", 6);
3711
+ global_error = 1;
3712
+ } else {
3713
+ console.log(s);
3714
+ }
3715
+ }
3716
+ });
3717
+ }
3718
+
3719
+
3720
+ function sfsi_banner_global_shares_save(){
3721
+ var nonce = SFSI("#sfsi_banner_global_shares").attr("data-nonce");
3722
+ console.log(nonce);
3723
+ var sfsi_banner_global_shares = SFSI("input[name='sfsi_banner_global_shares']").val();
3724
+ var data = {
3725
+ action: "sfsi_banner_global_shares",
3726
+ sfsi_banner_global_shares:sfsi_banner_global_shares,
3727
+ nonce: nonce
3728
+ };
3729
+ console.log(data);
3730
+ SFSI.ajax({
3731
+ url: sfsi_icon_ajax_object.ajax_url,
3732
+ type: "post",
3733
+ data: data,
3734
+ success: function (s) {
3735
+ console.log(s);
3736
+ if (s == "wrong_nonce") {
3737
+ showErrorSuc("error", "Unauthorised Request, Try again after refreshing page", 6);
3738
+ global_error = 1;
3739
+ } else {
3740
+ console.log(s);
3741
+ }
3742
+ }
3743
+ });
3744
+ }
3745
+
3746
+
3747
+ function sfsi_banner_global_gdpr_save(){
3748
+ var nonce = SFSI("#sfsi_banner_global_gdpr").attr("data-nonce");
3749
+ console.log(nonce);
3750
+ var sfsi_banner_global_gdpr = SFSI("input[name='sfsi_banner_global_gdpr']").val();
3751
+ var data = {
3752
+ action: "sfsi_banner_global_gdpr",
3753
+ sfsi_banner_global_gdpr:sfsi_banner_global_gdpr,
3754
+ nonce: nonce
3755
+ };
3756
+ console.log(data);
3757
+ SFSI.ajax({
3758
+ url: sfsi_icon_ajax_object.ajax_url,
3759
+ type: "post",
3760
+ data: data,
3761
+ success: function (s) {
3762
+ console.log(s);
3763
+ if (s == "wrong_nonce") {
3764
+ showErrorSuc("error", "Unauthorised Request, Try again after refreshing page", 6);
3765
+ global_error = 1;
3766
+ } else {
3767
+ console.log(s);
3768
+ }
3769
+ }
3770
+ });
3771
+ }
3772
+
3773
+
3774
+ function sfsi_banner_global_http_save(){
3775
+ var nonce = SFSI("#sfsi_banner_global_http").attr("data-nonce");
3776
+ console.log(nonce);
3777
+ var sfsi_banner_global_http = SFSI("input[name='sfsi_banner_global_http']").val();
3778
+ var data = {
3779
+ action: "sfsi_banner_global_http",
3780
+ sfsi_banner_global_http:sfsi_banner_global_http,
3781
+ nonce: nonce
3782
+ };
3783
+ console.log(data);
3784
+ SFSI.ajax({
3785
+ url: sfsi_icon_ajax_object.ajax_url,
3786
+ type: "post",
3787
+ data: data,
3788
+ success: function (s) {
3789
+ console.log(s);
3790
+ if (s == "wrong_nonce") {
3791
+ showErrorSuc("error", "Unauthorised Request, Try again after refreshing page", 6);
3792
+ global_error = 1;
3793
+ } else {
3794
+ console.log(s);
3795
+ }
3796
+ }
3797
+ });
3798
+ }
3799
+
3800
+
3801
+ function sfsi_banner_global_upgrade_save(){
3802
+ var nonce = SFSI("#sfsi_banner_global_upgrade").attr("data-nonce");
3803
+ console.log(nonce);
3804
+ var sfsi_banner_global_upgrade = SFSI("input[name='sfsi_banner_global_upgrade']").val();
3805
+ var data = {
3806
+ action: "sfsi_banner_global_upgrade",
3807
+ sfsi_banner_global_upgrade:sfsi_banner_global_upgrade,
3808
+ nonce: nonce
3809
+ };
3810
+ console.log(data);
3811
+ SFSI.ajax({
3812
+ url: sfsi_icon_ajax_object.ajax_url,
3813
+ type: "post",
3814
+ data: data,
3815
+ success: function (s) {
3816
+ console.log(s);
3817
+ if (s == "wrong_nonce") {
3818
+ showErrorSuc("error", "Unauthorised Request, Try again after refreshing page", 6);
3819
+ global_error = 1;
3820
+ } else {
3821
+ console.log(s);
3822
+ }
3823
+ }
3824
+ });
3825
+ }
3826
+
libs/controllers/sfsi_buttons_controller.php CHANGED
@@ -411,10 +411,6 @@ function sfsi_options_updater4()
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();
@@ -1178,7 +1174,13 @@ function sfsi_bannerOption()
1178
 
1179
  $objThemeCheck->sfsi_plus_bannereHtml(
1180
  $themeDataObj->headline,
1181
- $themeDataObj->themeLink,
 
 
 
 
 
 
1182
  SFSI_PLUGURL . 'images/website_theme/' . $themeName . '.png',
1183
  $themeDataObj->bottomtext
1184
  );
@@ -1205,7 +1207,13 @@ function sfsi_bannerOption()
1205
 
1206
  $objThemeCheck->sfsi_plus_bannereHtml(
1207
  $themeDataObj->headline,
1208
- $themeDataObj->themeLink,
 
 
 
 
 
 
1209
  SFSI_PLUGURL . 'images/website_theme/' . $themeName . '.png',
1210
  $themeDataObj->bottomtext
1211
  );
@@ -1232,7 +1240,13 @@ function sfsi_bannerOption()
1232
 
1233
  $objThemeCheck->sfsi_plus_bannereHtml(
1234
  $themeDataObj->headline,
1235
- $themeDataObj->themeLink,
 
 
 
 
 
 
1236
  SFSI_PLUGURL . 'images/website_theme/' . $themeName . '.png',
1237
  $themeDataObj->bottomtext
1238
  );
@@ -1259,7 +1273,13 @@ function sfsi_bannerOption()
1259
 
1260
  $objThemeCheck->sfsi_plus_bannereHtml(
1261
  $themeDataObj->headline,
1262
- $themeDataObj->themeLink,
 
 
 
 
 
 
1263
  SFSI_PLUGURL . 'images/website_theme/' . $themeName . '.png',
1264
  $themeDataObj->bottomtext
1265
  );
@@ -1422,3 +1442,128 @@ function sfsi_installDate()
1422
  echo json_encode(array("success"));
1423
  exit;
1424
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
  update_option('sfsi_section4_options', serialize($up_option4));
416
  $new_counts = sfsi_getCounts();
1174
 
1175
  $objThemeCheck->sfsi_plus_bannereHtml(
1176
  $themeDataObj->headline,
1177
+ $themeName,
1178
+ SFSI_PLUGURL . 'images/website_theme/' . $themeName . '.png',
1179
+ $themeDataObj->bottomtext
1180
+ );
1181
+ $objThemeCheck->sfsi_plus_bannereHtml_main(
1182
+ $themeDataObj->headline,
1183
+ $themeName,
1184
  SFSI_PLUGURL . 'images/website_theme/' . $themeName . '.png',
1185
  $themeDataObj->bottomtext
1186
  );
1207
 
1208
  $objThemeCheck->sfsi_plus_bannereHtml(
1209
  $themeDataObj->headline,
1210
+ $themeName,
1211
+ SFSI_PLUGURL . 'images/website_theme/' . $themeName . '.png',
1212
+ $themeDataObj->bottomtext
1213
+ );
1214
+ $objThemeCheck->sfsi_plus_bannereHtml_main(
1215
+ $themeDataObj->headline,
1216
+ $themeName,
1217
  SFSI_PLUGURL . 'images/website_theme/' . $themeName . '.png',
1218
  $themeDataObj->bottomtext
1219
  );
1240
 
1241
  $objThemeCheck->sfsi_plus_bannereHtml(
1242
  $themeDataObj->headline,
1243
+ $themeName,
1244
+ SFSI_PLUGURL . 'images/website_theme/' . $themeName . '.png',
1245
+ $themeDataObj->bottomtext
1246
+ );
1247
+ $objThemeCheck->sfsi_plus_bannereHtml_main(
1248
+ $themeDataObj->headline,
1249
+ $themeName,
1250
  SFSI_PLUGURL . 'images/website_theme/' . $themeName . '.png',
1251
  $themeDataObj->bottomtext
1252
  );
1273
 
1274
  $objThemeCheck->sfsi_plus_bannereHtml(
1275
  $themeDataObj->headline,
1276
+ $themeName,
1277
+ SFSI_PLUGURL . 'images/website_theme/' . $themeName . '.png',
1278
+ $themeDataObj->bottomtext
1279
+ );
1280
+ $objThemeCheck->sfsi_plus_bannereHtml_main(
1281
+ $themeDataObj->headline,
1282
+ $themeName,
1283
  SFSI_PLUGURL . 'images/website_theme/' . $themeName . '.png',
1284
  $themeDataObj->bottomtext
1285
  );
1442
  echo json_encode(array("success"));
1443
  exit;
1444
  }
1445
+
1446
+ add_action('wp_ajax_sfsi_currentDate', 'sfsi_currentDate');
1447
+ function sfsi_currentDate()
1448
+ {
1449
+ $sfsi_currentDate_value = isset($_POST["sfsi_currentDate"]) ? $_POST["sfsi_currentDate"] : '';
1450
+ update_option('sfsi_currentDate', $sfsi_currentDate_value);
1451
+ echo json_encode(array("success"));
1452
+ exit;
1453
+ }
1454
+
1455
+ add_action('wp_ajax_sfsi_showNextBannerDate', 'sfsi_showNextBannerDate');
1456
+ function sfsi_showNextBannerDate()
1457
+ {
1458
+ $sfsi_showNextBannerDate_value = isset($_POST["sfsi_showNextBannerDate"]) ? $_POST["sfsi_showNextBannerDate"] : '';
1459
+ update_option('sfsi_showNextBannerDate', $sfsi_showNextBannerDate_value);
1460
+ echo json_encode(array("success"));
1461
+ exit;
1462
+ }
1463
+
1464
+ add_action('wp_ajax_sfsi_cycleDate', 'sfsi_cycleDate');
1465
+ function sfsi_cycleDate()
1466
+ {
1467
+ $sfsi_cycleDate_value = isset($_POST["sfsi_cycleDate"]) ? $_POST["sfsi_cycleDate"] : '';
1468
+ update_option('sfsi_cycleDate', $sfsi_cycleDate_value);
1469
+ echo json_encode(array("success"));
1470
+ exit;
1471
+ }
1472
+
1473
+ add_action('wp_ajax_sfsi_loyaltyDate', 'sfsi_loyaltyDate');
1474
+ function sfsi_loyaltyDate()
1475
+ {
1476
+ $sfsi_loyaltyDate_value = isset($_POST["sfsi_loyaltyDate"]) ? $_POST["sfsi_loyaltyDate"] : '';
1477
+ update_option('sfsi_loyaltyDate', $sfsi_loyaltyDate_value);
1478
+ echo json_encode(array("success"));
1479
+ exit;
1480
+ }
1481
+
1482
+ add_action('wp_ajax_sfsi_banner_global_pinterest', 'sfsi_banner_global_pinterest');
1483
+ function sfsi_banner_global_pinterest()
1484
+ {
1485
+ $sfsi_banner_global_pinterest_value = isset($_POST["sfsi_banner_global_pinterest"]) ? $_POST["sfsi_banner_global_pinterest"] : '';
1486
+ $sfsi_banner_global_pinterest = unserialize(get_option('sfsi_banner_global_pinterest', false));
1487
+ $sfsi_banner_global_pinterest['timestamp'] = $sfsi_banner_global_pinterest_value;
1488
+ update_option('sfsi_banner_global_pinterest', serialize($sfsi_banner_global_pinterest));
1489
+ echo json_encode(array("success"));
1490
+ exit;
1491
+ }
1492
+
1493
+ add_action('wp_ajax_sfsi_banner_global_firsttime_offer', 'sfsi_banner_global_firsttime_offer');
1494
+ function sfsi_banner_global_firsttime_offer()
1495
+ {
1496
+ $sfsi_banner_global_firsttime_offer_value = isset($_POST["sfsi_banner_global_firsttime_offer"]) ? $_POST["sfsi_banner_global_firsttime_offer"] : '';
1497
+ $sfsi_banner_global_firsttime_offer = unserialize(get_option('sfsi_banner_global_firsttime_offer', false));
1498
+ $sfsi_banner_global_firsttime_offer['timestamp'] = $sfsi_banner_global_firsttime_offer_value;
1499
+ update_option('sfsi_banner_global_firsttime_offer', serialize($sfsi_banner_global_firsttime_offer));
1500
+ echo json_encode(array("success"));
1501
+ exit;
1502
+ }
1503
+
1504
+ add_action('wp_ajax_sfsi_banner_global_social', 'sfsi_banner_global_social');
1505
+ function sfsi_banner_global_social()
1506
+ {
1507
+ $sfsi_banner_global_social_value = isset($_POST["sfsi_banner_global_social"]) ? $_POST["sfsi_banner_global_social"] : '';
1508
+ $sfsi_banner_global_social = unserialize(get_option('sfsi_banner_global_social', false));
1509
+ $sfsi_banner_global_social['timestamp'] = $sfsi_banner_global_social_value;
1510
+ update_option('sfsi_banner_global_social', serialize($sfsi_banner_global_social));
1511
+ echo json_encode(array("success"));
1512
+ exit;
1513
+ }
1514
+
1515
+ add_action('wp_ajax_sfsi_banner_global_load_faster', 'sfsi_banner_global_load_faster');
1516
+ function sfsi_banner_global_load_faster()
1517
+ {
1518
+ $sfsi_banner_global_load_faster_value = isset($_POST["sfsi_banner_global_load_faster"]) ? $_POST["sfsi_banner_global_load_faster"] : '';
1519
+ $sfsi_banner_global_load_faster = unserialize(get_option('sfsi_banner_global_load_faster', false));
1520
+ $sfsi_banner_global_load_faster['timestamp'] = $sfsi_banner_global_load_faster_value;
1521
+ update_option('sfsi_banner_global_load_faster', serialize($sfsi_banner_global_load_faster));
1522
+ echo json_encode(array("success"));
1523
+ exit;
1524
+ }
1525
+
1526
+ add_action('wp_ajax_sfsi_banner_global_shares', 'sfsi_banner_global_shares');
1527
+ function sfsi_banner_global_shares()
1528
+ {
1529
+ $sfsi_banner_global_shares_value = isset($_POST["sfsi_banner_global_shares"]) ? $_POST["sfsi_banner_global_shares"] : '';
1530
+ $sfsi_banner_global_shares = unserialize(get_option('sfsi_banner_global_shares', false));
1531
+ $sfsi_banner_global_shares['timestamp'] = $sfsi_banner_global_shares_value;
1532
+ update_option('sfsi_banner_global_shares', serialize($sfsi_banner_global_shares));
1533
+ echo json_encode(array("success"));
1534
+ exit;
1535
+ }
1536
+
1537
+
1538
+ add_action('wp_ajax_sfsi_banner_global_gdpr', 'sfsi_banner_global_gdpr');
1539
+ function sfsi_banner_global_gdpr()
1540
+ {
1541
+ $sfsi_banner_global_gdpr_value = isset($_POST["sfsi_banner_global_gdpr"]) ? $_POST["sfsi_banner_global_gdpr"] : '';
1542
+ $sfsi_banner_global_gdpr = unserialize(get_option('sfsi_banner_global_gdpr', false));
1543
+ $sfsi_banner_global_gdpr['timestamp'] = $sfsi_banner_global_gdpr_value;
1544
+ update_option('sfsi_banner_global_gdpr', serialize($sfsi_banner_global_gdpr));
1545
+ echo json_encode(array("success"));
1546
+ exit;
1547
+ }
1548
+
1549
+ add_action('wp_ajax_sfsi_banner_global_http', 'sfsi_banner_global_http');
1550
+ function sfsi_banner_global_http()
1551
+ {
1552
+ $sfsi_banner_global_http_value = isset($_POST["sfsi_banner_global_http"]) ? $_POST["sfsi_banner_global_http"] : '';
1553
+ $sfsi_banner_global_http = unserialize(get_option('sfsi_banner_global_http', false));
1554
+ $sfsi_banner_global_http['timestamp'] = $sfsi_banner_global_http_value;
1555
+ update_option('sfsi_banner_global_http', serialize($sfsi_banner_global_http));
1556
+ echo json_encode(array("success"));
1557
+ exit;
1558
+ }
1559
+
1560
+ add_action('wp_ajax_sfsi_banner_global_upgrade', 'sfsi_banner_global_upgrade');
1561
+ function sfsi_banner_global_upgrade()
1562
+ {
1563
+ $sfsi_banner_global_upgrade_value = isset($_POST["sfsi_banner_global_upgrade"]) ? $_POST["sfsi_banner_global_upgrade"] : '';
1564
+ $sfsi_banner_global_upgrade = unserialize(get_option('sfsi_banner_global_upgrade', false));
1565
+ $sfsi_banner_global_upgrade['timestamp'] = $sfsi_banner_global_upgrade_value;
1566
+ update_option('sfsi_banner_global_upgrade', serialize($sfsi_banner_global_upgrade));
1567
+ echo json_encode(array("success"));
1568
+ exit;
1569
+ }
libs/controllers/sfsi_class_theme_check.php CHANGED
@@ -511,7 +511,16 @@ class sfsi_ThemeCheck
511
  return ($flag)? $strCheckForThemeType:$flag;
512
  }
513
 
514
- public function sfsi_plus_bannereHtml($title, $siteLink, $bannerImage, $buttonTitle)
 
 
 
 
 
 
 
 
 
515
  {
516
  echo '<div class="sfsi_new_notification_cat">
517
  <div class="sfsi_new_notification_header_cat">
@@ -535,6 +544,8 @@ class sfsi_ThemeCheck
535
  </div>
536
  </div>
537
  </div>';
538
- }
 
 
539
  }
540
  ?>
511
  return ($flag)? $strCheckForThemeType:$flag;
512
  }
513
 
514
+ public function sfsi_plus_bannereHtml_main($title, $siteLink, $bannerImage, $buttonTitle)
515
+ {
516
+ echo '<script type="text/javascript">
517
+ SFSI(".sfsi_webtheme").show();
518
+ SFSI(".icns_tab_3.sfsi_premium_ad span ").css("background-image", \'url('.$bannerImage.')\');
519
+ SFSI(".sfsi_premium_ad_lable").text(\''.$siteLink.'\');
520
+ </script>';
521
+ }
522
+
523
+ public function sfsi_plus_bannereHtml($title, $siteLink, $bannerImage, $buttonTitle)
524
  {
525
  echo '<div class="sfsi_new_notification_cat">
526
  <div class="sfsi_new_notification_header_cat">
544
  </div>
545
  </div>
546
  </div>';
547
+ }
548
+
549
+
550
  }
551
  ?>
libs/controllers/sfsi_socialhelper.php CHANGED
@@ -45,14 +45,26 @@ class sfsi_SocialHelper
45
  }
46
 
47
  /* get facebook likes */
 
 
 
 
 
 
 
 
 
 
 
48
  function sfsi_get_fb($url)
49
  {
50
  $count = 0;
51
- $json_string = $this->file_get_contents_curl('https://graph.facebook.com/?id='.$url);
 
 
52
  $json = json_decode($json_string);
53
-
54
- if(isset($json) && isset($json->share) && isset($json->share->share_count)){
55
- $count = $json->share->share_count;
56
  }
57
  return $count;
58
  }
@@ -79,11 +91,11 @@ class sfsi_SocialHelper
79
  !empty($sfsi_section4_options['sfsi_youtube_channelId'])
80
  ) ? $sfsi_section4_options['sfsi_youtube_channelId'] : 'UCYQyWnJPrY4XY3Avc7BU9aA';
81
 
82
- $xmlData = $this->file_get_contents_curl('https://www.googleapis.com/youtube/v3/channels?part=statistics&id='.$user.'&key=AIzaSyA_SqAZGCpZ22vHzOUr3St5xf5XMy78oTY');
83
  }
84
  else
85
  {
86
- $xmlData = $this->file_get_contents_curl('https://www.googleapis.com/youtube/v3/channels?part=statistics&forUsername='.$user.'&key=AIzaSyA_SqAZGCpZ22vHzOUr3St5xf5XMy78oTY');
87
  }
88
 
89
  if($xmlData)
45
  }
46
 
47
  /* get facebook likes */
48
+ // function sfsi_get_fb($url)
49
+ // {
50
+ // $count = 0;
51
+ // $json_string = $this->file_get_contents_curl('https://graph.facebook.com/?id='.$url);
52
+ // $json = json_decode($json_string);
53
+
54
+ // if(isset($json) && isset($json->share) && isset($json->share->share_count)){
55
+ // $count = $json->share->share_count;
56
+ // }
57
+ // return $count;
58
+ // }
59
  function sfsi_get_fb($url)
60
  {
61
  $count = 0;
62
+ $appid = '959456867427268';
63
+ $appsecret = '7cc27f382c47fd5cc3a7203e40d70bf1';
64
+ $json_string = $this->file_get_contents_curl('https://graph.facebook.com/?id='.$url."&fields=engagement&access_token=".$appid.'|'.$appsecret);
65
  $json = json_decode($json_string);
66
+ if(isset($json) && isset($json->engagement)){
67
+ $count = $json->engagement->share_count + $json->engagement->reaction_count + $json->engagement->comment_count + $json->engagement->comment_plugin_count;
 
68
  }
69
  return $count;
70
  }
91
  !empty($sfsi_section4_options['sfsi_youtube_channelId'])
92
  ) ? $sfsi_section4_options['sfsi_youtube_channelId'] : 'UCYQyWnJPrY4XY3Avc7BU9aA';
93
 
94
+ $xmlData = $this->file_get_contents_curl('https://www.googleapis.com/youtube/v3/channels?part=statistics&id='.$user.'&key=AIzaSyB_XMi9MwNweEYyt7c122CidZxqGZqex6Y');
95
  }
96
  else
97
  {
98
+ $xmlData = $this->file_get_contents_curl('https://www.googleapis.com/youtube/v3/channels?part=statistics&forUsername='.$user.'&key=AIzaSyB_XMi9MwNweEYyt7c122CidZxqGZqex6Y');
99
  }
100
 
101
  if($xmlData)
libs/controllers/sfsiocns_OnPosts.php CHANGED
@@ -10,8 +10,8 @@ function sfsi_social_buttons_below($content)
10
  // if($sfsi_section9["sfsi_show_via_afterposts"]!=="yes"){
11
  // return $content;
12
  // }
13
- if($sfsi_section6["sfsi_display_button_type"]=="responsive_button"){
14
- if(is_single() && $sfsi_section6["sfsi_responsive_icons_end_post"]=="yes"){
15
  $content = $content . sfsi_social_responsive_buttons(null, $sfsi_section6);
16
  }
17
  } else {
@@ -38,11 +38,11 @@ function sfsi_social_buttons_below($content)
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 {
@@ -58,7 +58,7 @@ function sfsi_social_buttons_below($content)
58
  //adding wrapper div
59
  $icons .= "<div class='sfsi_socialwpr'>";
60
  if ($sfsi_section6['sfsi_rectsub'] == 'yes' && $sfsi_section6['sfsi_show_Onposts'] == "yes") {
61
-
62
  $icons .= "<div class='sf_subscrbe sf_icon' style='text-align:left;vertical-align: middle;float:left;width:auto'>" . sfsi_Subscribelike($permalink, $show_count) . "</div>";
63
  }
64
  if ($sfsi_section6['sfsi_show_Onposts'] == "yes" && $sfsi_section6['sfsi_rectfb'] == 'yes') {
@@ -68,10 +68,10 @@ function sfsi_social_buttons_below($content)
68
  if ($sfsi_section6['sfsi_show_Onposts'] == "yes" && $sfsi_section6['sfsi_rectfbshare'] == 'yes') {
69
  $sfsi_section4 = unserialize(get_option('sfsi_section4_options', false));
70
  $socialObj = new sfsi_SocialHelper();
71
- $count_html="";
72
- if ($show_count>0) {
73
  if ($sfsi_section4['sfsi_facebook_countsDisplay'] == "yes" && $sfsi_section4['sfsi_display_counts'] == "yes") {
74
-
75
  if ($sfsi_section4['sfsi_facebook_countsFrom'] == "manual") {
76
  $counts = $sfsi_section4['sfsi_facebook_manualCounts'];
77
  } else if ($sfsi_section4['sfsi_facebook_countsFrom'] == "likes") {
@@ -82,17 +82,17 @@ function sfsi_social_buttons_below($content)
82
  $current_url = $sfsi_section4['sfsi_facebook_mypageCounts'];
83
  $counts = $socialObj->sfsi_get_fb_pagelike($current_url);
84
  }
85
- $count_html = '<span class="bot_no">'.$counts.'</span>';
86
  }
87
  }
88
- $icons .= "<div class='sf_fb_share sf_icon' style='text-align:left;vertical-align: middle;'>" . sfsiFB_Share_Custom($permalink, $show_count) .$count_html. "</div>";
89
  }
90
  if (($sfsi_section6['sfsi_recttwtr'] == "yes" && $sfsi_section6['sfsi_show_Onposts'] == "yes")) {
91
  // if ($show_count ) {
92
  // /* get twitter counts */
93
  // if ($sfsi_section4['sfsi_twitter_countsFrom'] == "source") {
94
  // $option2 = unserialize(get_option('sfsi_section2_options', false));
95
-
96
  // $twitter_user = $option2['sfsi_twitter_followUserName'];
97
  // $tw_settings = array(
98
  // 'tw_consumer_key' => $sfsi_section4['tw_consumer_key'],
@@ -100,24 +100,24 @@ function sfsi_social_buttons_below($content)
100
  // 'tw_oauth_access_token' => $sfsi_section4['tw_oauth_access_token'],
101
  // 'tw_oauth_access_token_secret' => $sfsi_section4['tw_oauth_access_token_secret']
102
  // );
103
-
104
  // $followers = $socialObj->sfsi_get_tweets($twitter_user, $tw_settings);
105
  // $counts = $socialObj->format_num($followers);
106
  // } else {
107
  // $counts = $socialObj->format_num($sfsi_section4['sfsi_twitter_manualCounts']);
108
-
109
  // }
110
  // if($counts>0){
111
  // $count_html = '<span class="bot_no">'.$counts.'</span>';
112
  // }
113
  // }
114
- $icons .= sfsi_twitterlike($permalink, $show_count,true);
115
  // $icons .= "<div class='sf_twiter' style='text-align:left;float:left;vertical-align: middle;width:auto'>" . . "</div>";
116
  }
117
 
118
  if (($sfsi_section6['sfsi_show_Onposts'] == "yes") && $sfsi_section6['sfsi_rectpinit'] == 'yes') {
119
- $count_html="";
120
- if ($show_count ) {
121
  /* get Pinterest counts */
122
  if ($sfsi_section4['sfsi_pinterest_countsFrom'] == "pins") {
123
  $url = home_url();
@@ -126,11 +126,11 @@ function sfsi_social_buttons_below($content)
126
  } else {
127
  $counts = $sfsi_section4['sfsi_pinterest_manualCounts'];
128
  }
129
- if($counts>0){
130
- $count_html = '<span class="bot_no">'.$counts.'</span>';
131
  }
132
  }
133
- $icons .= "<div class='sf_pinit sf_icon' style='text-align:left;vertical-align: middle;float:left;line-height: 33px;width:auto;margin: 0 -2px;'>" . sfsi_pinterest_Customs($permalink, $show_count) .$count_html. "</div>";
134
  }
135
  $icons .= "</div>";
136
  //closing wrapper div
@@ -158,14 +158,14 @@ function sfsi_Subscribelike($permalink, $show_count)
158
  $feed_data = $socialObj->SFSI_getFeedSubscriber($feed_id);
159
  // var_dump($feed_data);die();
160
  $counts = $socialObj->format_num($feed_data);
161
- if(empty($counts)) {
162
  $counts = (string) "0";
163
  }
164
  } 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>';
@@ -174,7 +174,7 @@ function sfsi_Subscribelike($permalink, $show_count)
174
  }
175
  /*subscribe like*/
176
  /*twitter like*/
177
- function sfsi_twitterlike($permalink, $show_count,$rectangular_icon=false)
178
  {
179
  // $twitter_text = '';
180
  // if (!empty($permalink)) {
@@ -188,15 +188,15 @@ function sfsi_twitterlike($permalink, $show_count,$rectangular_icon=false)
188
  // if($show_count>0){
189
  // $count_html = '<span class="bot_no">'.$show_count.'</span>';
190
  // }
191
-
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>";
199
- // return $icons;
200
  global $socialObj;
201
  $socialObj = new sfsi_SocialHelper();
202
  $twitter_text = '';
@@ -206,7 +206,7 @@ function sfsi_twitterlike($permalink, $show_count,$rectangular_icon=false)
206
  if (!empty($postid)) {
207
  $twitter_text = get_the_title($postid);
208
  }
209
- return $socialObj->sfsi_twitterSharewithcount($permalink, $twitter_text, $show_count,$rectangular_icon);
210
  }
211
 
212
  /*twitter like*/
@@ -224,9 +224,9 @@ function sfsi_twitterlike($permalink, $show_count,$rectangular_icon=false)
224
  // return $pinit_html;8
225
  // }
226
 
227
- function sfsi_pinterest_Customs($permalink='', $show_count = false)
228
  {
229
- if( "" === $permalink ){
230
  $permalink = trailingslashit(get_permalink());
231
  }
232
 
@@ -235,7 +235,7 @@ function sfsi_pinterest_Customs($permalink='', $show_count = false)
235
  // $pinit_url = 'https://www.pinterest.com/pin/create/button/?url='.$url.'&media='.$media.'&description='.$description;
236
  // $pinit_url = 'https://www.pinterest.com/pin/create/button/?url='.$url.'&media='..'&description='.;
237
 
238
- $pinit_html = "<a href='#' onclick='sfsi_pinterest_modal_images(event,\"".$permalink."\",\"".$description."\")' style='display:inline-block;' > <img class='sfsi_wicon' data-pin-nopin='true' width='auto' height='auto' alt='fb-share-icon' title='Pin Share' src='" . SFSI_PLUGURL . "images/share_icons/Pinterest_Save/en_US_save.svg" . "' /></a>";
239
  return $pinit_html;
240
  }
241
 
@@ -246,9 +246,9 @@ function sfsi_FBlike($permalink, $show_count)
246
  $fb_like_html = '';
247
 
248
  $option6 = unserialize(get_option('sfsi_section6_options', false));
249
-
250
  $fb_like_html .= '<div class="fb-like" data-href="' . $permalink . '" data-send="' . $send . '" ';
251
-
252
  if ($show_count == 1) {
253
  $fb_like_html .= 'data-layout="button_count"';
254
  } else {
@@ -258,14 +258,14 @@ function sfsi_FBlike($permalink, $show_count)
258
  return $fb_like_html;
259
  }
260
 
261
- function sfsiFB_Share_Custom($permalink, $show_count = false)
262
- {
263
- $shareurl = "https://www.facebook.com/sharer/sharer.php?u=";
264
- $shareurl = $shareurl . urlencode(urldecode($permalink));
265
 
266
- $fb_share_html = "<a href='" . $shareurl . "' style='display:inline-block;' > <img class='sfsi_wicon' data-pin-nopin='true' width='auto' height='auto' alt='fb-share-icon' title='Facebook Share' src='" . SFSI_PLUGURL . "images/visit_icons/fbshare_bck.png" . "' /></a>";
267
- return $fb_share_html;
268
- }
269
 
270
  /* add all external javascript to wp_footer */
271
  function sfsi_footer_script()
@@ -297,7 +297,7 @@ function sfsi_footer_script()
297
  $sfsi_section6['sfsi_show_Onposts'] = isset($sfsi_section6['sfsi_show_Onposts']) && !empty($sfsi_section6['sfsi_show_Onposts']) ? $sfsi_section6['sfsi_show_Onposts'] : "no";
298
  if ($sfsi_section1['sfsi_facebook_display'] == "yes") {
299
  // var_dump($sfsi_section6['sfsi_rectfb'],$sfsi_section6['sfsi_show_Onposts']);
300
- if ((($sfsi_section6['sfsi_rectfb'] == "yes" ) && $sfsi_section6['sfsi_show_Onposts'] == "yes") || $sisi_common_options_check && ($sfsi_section2['sfsi_facebookLike_option'] == "yes")) {
301
  ?>
302
  <!--facebook like and share js -->
303
  <div id="fb-root"></div>
@@ -314,212 +314,203 @@ function sfsi_footer_script()
314
  <?php
315
  }
316
  }
317
- $isYoutubeFollowFeatureActive = (
318
- "yes" == $sfsi_section2['sfsi_youtube_follow']) &&
319
- (
320
- isset($sfsi_section2['sfsi_youtubeusernameorid']) &&
321
- !empty($sfsi_section2['sfsi_youtubeusernameorid'])
322
- ) &&
323
- (
324
- (
325
- "name" == $sfsi_section2['sfsi_youtubeusernameorid'] &&
326
- isset($sfsi_section2['sfsi_ytube_user']) &&
327
- !empty($sfsi_section2['sfsi_ytube_user'])
328
- ) ||
329
- (
330
- "id" == $sfsi_section2['sfsi_youtubeusernameorid'] &&
331
- isset($sfsi_section2['sfsi_ytube_chnlid']) &&
332
- !empty($sfsi_section2['sfsi_ytube_chnlid'])
333
- )
334
- );
335
  if ($sfsi_section1['sfsi_youtube_display'] == "yes" && $sisi_common_options_check && $isYoutubeFollowFeatureActive) {
336
  ?>
337
- <script type="text/javascript">
338
- window.___gcfg = {
339
- lang: 'en-US'
340
- };
341
- (function() {
342
- var po = document.createElement('script');
343
- po.type = 'text/javascript';
344
- po.async = true;
345
- po.src = 'https://apis.google.com/js/plusone.js';
346
- var s = document.getElementsByTagName('script')[0];
347
- s.parentNode.insertBefore(po, s);
348
- })();
349
- </script>
350
- <?php
351
- }
352
- $isLinkedInFollowFeatureActive = (isset($sfsi_section2['sfsi_linkedin_follow']) && !empty($sfsi_section2['sfsi_linkedin_follow']) && ("yes" == $sfsi_section2['sfsi_linkedin_follow']) && isset($sfsi_section2['sfsi_linkedin_followCompany']) && !empty($sfsi_section2['sfsi_linkedin_followCompany']));
353
 
354
- $isLinkedInRecommnedFeatureActive = (isset($sfsi_section2['sfsi_linkedin_recommendBusines']) && !empty($sfsi_section2['sfsi_linkedin_recommendBusines']) && ("yes" == $sfsi_section2['sfsi_linkedin_recommendBusines'])
355
- && isset($sfsi_section2['sfsi_linkedin_recommendProductId']) && !empty($sfsi_section2['sfsi_linkedin_recommendProductId'])
356
- && isset($sfsi_section2['sfsi_linkedin_recommendCompany']) && !empty($sfsi_section2['sfsi_linkedin_recommendCompany']));
357
 
358
- if ($sfsi_section1['sfsi_linkedin_display'] == "yes" && ( $isLinkedInFollowFeatureActive || $isLinkedInRecommnedFeatureActive) && $sisi_common_options_check) {
359
- ?>
360
- <script src="//platform.linkedin.com/in.js" type="text/javascript">
361
- lang: en_US
362
- </script>
363
- <?php
364
- }
365
 
366
- /* activate footer credit link */
367
- if (get_option('sfsi_footer_sec') == "yes") {
368
- if (!is_admin()) {
369
- //$footer_link='<div class="sfsiplus_footerLnk" style="margin: 0 auto;z-index:1000; absolute; text-align: center;">Social media & sharing icons powered by <a href="https://wordpress.org/plugins/ultimate-social-media-icons/" target="new">UltimatelySocial</a> ';
370
-
371
- $sfsi_themecheck = new sfsi_ThemeCheck();
372
- $domain = $sfsi_themecheck->sfsi_plus_getdomain(get_site_url());
373
- $firstCharacter = substr($domain, 0, 1);
374
- if (in_array($firstCharacter, array('a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm'))) {
375
- $footer_link = '<div class="sfsiplus_footerLnk" style="margin: 0 auto;z-index:1000; text-align: center;">Social media & sharing icons powered by <a href="https://www.ultimatelysocial.com/?utm_source=usmplus_settings_page&utm_campaign=credit_link_to_homepage&utm_medium=banner" target="new">UltimatelySocial </a>';
376
- $footer_link .= "</div>";
377
- echo $footer_link;
378
- } else if (in_array($firstCharacter, array('n', 'o', 'p', 'q', 'r', 's'))) {
379
- $footer_link = '<div class="sfsiplus_footerLnk" style="margin: 0 auto;z-index:1000; text-align: center;"><a href="https://www.ultimatelysocial.com/usm-premium/" target="new">Wordpress Social Share Plugin </a> powered by Ultimatelysocial';
380
- $footer_link .= "</div>";
381
- echo $footer_link;
382
- } else {
383
- $footer_link = '<div class="sfsiplus_footerLnk" style="margin: 0 auto;z-index:1000;text-align: center;"><a href="https://www.ultimatelysocial.com/?utm_source=usmplus_settings_page&utm_campaign=credit_link_to_homepage&utm_medium=banner" target="new">Social Share Buttons and Icons</a> powered by Ultimatelysocial';
384
- $footer_link .= "</div>";
385
- echo $footer_link;
386
- }
387
  }
388
  }
389
  }
390
- /* filter the content of post */
391
- add_filter('the_content', 'sfsi_social_buttons_below');
392
-
393
- /* update footer for frontend and admin both */
394
- if (!is_admin()) {
395
- global $post;
396
- add_action('wp_footer', 'sfsi_footer_script');
397
- add_action('wp_footer', 'sfsi_check_PopUp');
398
- add_action('wp_footer', 'sfsi_frontFloter');
399
- }
400
 
401
- if (is_admin()) {
402
- add_action('in_admin_footer', 'sfsi_footer_script');
403
- }
404
- /* ping to vendor site on updation of new post */
405
-
406
- //<---------------------* Responsive icons *----------------->
407
- function sfsi_social_responsive_buttons($content, $option6, $server_side = false)
408
- {
409
- global $wp;
410
- $count = 60;
411
- if (((isset($option6["sfsi_display_button_type"]) && $option6["sfsi_display_button_type"] == "responsive_button")) || $server_side) :
412
- $option2 = unserialize(get_option('sfsi_section2_options', false));
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(
420
- "default_icons" => array(
421
- "facebook" => array("active" => "yes", "text" => "Share on Facebook", "url" => ""),
422
- "Twitter" => array("active" => "yes", "text" => "Tweet", "url" => ""),
423
- "Follow" => array("active" => "yes", "text" => "Follow us", "url" => "")
424
- ),
425
- "custom_icons" => array(),
426
- "settings" => array(
427
- "icon_size" => "Medium",
428
- "icon_width_type" => "Fully responsive",
429
- "icon_width_size" => 240,
430
- "edge_type" => "Round",
431
- "edge_radius" => 5,
432
- "style" => "Gradient",
433
- "margin" => 10,
434
- "text_align" => "Centered",
435
- "show_count" => "no",
436
- "counter_color" => "#aaaaaa",
437
- "counter_bg_color" => "#fff",
438
- "share_count_text" => "SHARES",
439
- "margin_above" => 10,
440
- "margin_below" => 10,
441
-
442
- )
443
- );
444
- } else {
445
- return ""; // dont return anything if options not set;
446
- }
 
 
 
 
 
 
 
447
  }
448
- $twitter_text = isset($option2['sfsi_twitter_aboutPageText']) && !empty($option2['sfsi_twitter_aboutPageText']) ? $option2['sfsi_twitter_aboutPageText'] : false;
449
-
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);
457
- $count = 0;
458
- if (isset($counts['email_count'])) {
459
- $count = (int) ($counts['email_count']) + $count;
460
- }
461
- if (isset($counts['fb_count'])) {
462
- $count = (int) ($counts['fb_count']) + $count;
463
- }
464
- if (isset($counts['twitter_count'])) {
465
- $count = (int) ($counts['twitter_count']) + $count;
466
- } else { } else :
467
- $counter_class = "sfsi_responsive_without_counter_icons";
468
- $couter_display = "none";
469
- endif;
470
- $icons .= "<div class='sfsi_responsive_icons' style='display:inline-block;margin-top:".$margin_above."px; margin-bottom: ".$margin_below."px; " . ($icon_width_type == "Fully Responsive" ? "width:100%;display:flex; " : 'width:100%') . "' data-icon-width-type='" . $icon_width_type . "' data-icon-width-size='" . $sfsi_responsive_icons["settings"]['icon_width_size'] . "' data-edge-type='" . $sfsi_responsive_icons["settings"]['edge_type'] . "' data-edge-radius='" . $sfsi_responsive_icons["settings"]['edge_radius'] . "' >";
471
- $sfsi_anchor_div_style = "";
472
- if ($sfsi_responsive_icons["settings"]["edge_type"] === "Round") {
473
- $sfsi_anchor_div_style .= " border-radius:";
474
- if ($sfsi_responsive_icons["settings"]["edge_radius"] !== "") {
475
- $sfsi_anchor_div_style .= $sfsi_responsive_icons["settings"]["edge_radius"] . 'px; ';
476
- } else {
477
- $sfsi_anchor_div_style .= '0px; ';
478
- }
479
  }
 
480
 
481
- ob_start(); ?>
482
- <div class="sfsi_responsive_icons_count sfsi_<?php echo ($icon_width_type=="Fully responsive"?'responsive':'fixed'); ?>_count_container sfsi_<?php echo strtolower($sfsi_responsive_icons['settings']['icon_size']); ?>_button" style='display:<?php echo $couter_display; ?>;text-align:center; background-color:<?php echo $sfsi_responsive_icons['settings']['counter_bg_color'] ;?>;color:<?php echo $sfsi_responsive_icons['settings']['counter_color'] ;?>; <?php echo $sfsi_anchor_div_style; ?>;' >
483
- <h3 style="color:<?php echo $sfsi_responsive_icons['settings']['counter_color'] ;?>; " ><?php echo $count; ?></h3>
484
- <h6 style="color:<?php echo $sfsi_responsive_icons['settings']['counter_color'] ;?>;" ><?php echo $sfsi_responsive_icons['settings']["share_count_text"]; ?></h6>
485
- </div>
486
- <?php
487
- $icons.= ob_get_contents();
488
  ob_end_clean();
489
- $icons .= "\t<div class='sfsi_icons_container ".$counter_class." sfsi_".strtolower($sfsi_responsive_icons['settings']['icon_size'])."_button_container sfsi_icons_container_box_".($icon_width_type!=="Fixed icon width"?"fully":'fixed')."_container ' style='".($icon_width_type!=="Fixed icon width"?"width:100%;display:flex; ":'width:auto')."; text-align:center;' >";
490
- $socialObj = new sfsi_SocialHelper();
491
- //styles
492
- $sfsi_anchor_style="";
493
- if($sfsi_responsive_icons["settings"]["text_align"]=="Centered"){
494
- $sfsi_anchor_style.='text-align:center;';
495
- }
496
- if($sfsi_responsive_icons["settings"]["margin"]!==""){
497
- $sfsi_anchor_style.='margin-left:'.$sfsi_responsive_icons["settings"]["margin"]."px; ";
498
- // $sfsi_anchor_style.='margin-bottom:'.$sfsi_responsive_icons["settings"]["margin"]."px; ";
499
- }
500
- //styles
501
-
502
- if($sfsi_responsive_icons['settings']['icon_width_type']==="Fixed icon width")
503
- {
504
- $sfsi_anchor_div_style.='width:'.$sfsi_responsive_icons['settings']['icon_width_size'].'px;';
505
- }
506
- else{
507
- $sfsi_anchor_style.=" flex-basis:100%;";
508
- $sfsi_anchor_div_style.=" width:100%;";
509
- }
510
- // var_dump($sfsi_anchor_style,$sfsi_anchor_div_style);
511
- foreach($sfsi_responsive_icons['default_icons'] as $icon=>$icon_config){
512
- // var_dump($icon_config);
513
- // $current_url = $socialObj->sfsi_get_custom_share_link(strtolower($icon));
514
- switch($icon){
515
- case "facebook":$share_url="https://www.facebook.com/sharer/sharer.php?u=".urlencode($current_url); break;
516
- case "Twitter":$twitter_text = $share_url = "https://twitter.com/intent/tweet?text=".urlencode($twitter_text)."&url=".urlencode($current_url);break;
517
- case "Follow":
518
- $share_url = (isset($option2['sfsi_email_url']))
519
- ? $option2['sfsi_email_url']
520
- : 'https://follow.it/now';
521
- break;
522
- }
 
 
523
  $icons .= "\t\t" . "<a " . sfsi_checkNewWindow() . " href='" . ($icon_config['url'] == "" ? $share_url : $icon_config['url']) . "' style='" . ($icon_config['active'] == 'yes' ? ($sfsi_responsive_icons['settings']['icon_width_type'] === "Fixed icon width" ? 'display:inline-flex' : 'display:block') : 'display:none') . ";" . $sfsi_anchor_style . "' class=" . ($sfsi_responsive_icons['settings']['icon_width_type'] === "Fixed icon width" ? 'sfsi_responsive_fixed_width' : 'sfsi_responsive_fluid') . " >" . "\n";
524
  $icons .= "\t\t\t<div class='sfsi_responsive_icon_item_container sfsi_responsive_icon_" . strtolower($icon) . "_container sfsi_" . strtolower($sfsi_responsive_icons['settings']['icon_size']) . "_button " . ($sfsi_responsive_icons['settings']['style'] == "Gradient" ? 'sfsi_responsive_icon_gradient' : '') . (" sfsi_" . (strtolower($sfsi_responsive_icons['settings']['text_align']) == "centered" ? 'centered' : 'left-align') . "_icon") . "' style='" . $sfsi_anchor_div_style . " ' >" . "\n";
525
  $icons .= "\t\t\t\t<img style='max-height: 25px;display:unset;margin:0' class='sfsi_wicon' src='" . SFSI_PLUGURL . "images/responsive-icon/" . $icon . ('Follow' === $icon ? '.png' : '.svg') . "'>" . "\n";
10
  // if($sfsi_section9["sfsi_show_via_afterposts"]!=="yes"){
11
  // return $content;
12
  // }
13
+ if ($sfsi_section6["sfsi_display_button_type"] == "responsive_button") {
14
+ if (is_single() && $sfsi_section6["sfsi_responsive_icons_end_post"] == "yes") {
15
  $content = $content . sfsi_social_responsive_buttons(null, $sfsi_section6);
16
  }
17
  } else {
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 {
58
  //adding wrapper div
59
  $icons .= "<div class='sfsi_socialwpr'>";
60
  if ($sfsi_section6['sfsi_rectsub'] == 'yes' && $sfsi_section6['sfsi_show_Onposts'] == "yes") {
61
+
62
  $icons .= "<div class='sf_subscrbe sf_icon' style='text-align:left;vertical-align: middle;float:left;width:auto'>" . sfsi_Subscribelike($permalink, $show_count) . "</div>";
63
  }
64
  if ($sfsi_section6['sfsi_show_Onposts'] == "yes" && $sfsi_section6['sfsi_rectfb'] == 'yes') {
68
  if ($sfsi_section6['sfsi_show_Onposts'] == "yes" && $sfsi_section6['sfsi_rectfbshare'] == 'yes') {
69
  $sfsi_section4 = unserialize(get_option('sfsi_section4_options', false));
70
  $socialObj = new sfsi_SocialHelper();
71
+ $count_html = "";
72
+ if ($show_count > 0) {
73
  if ($sfsi_section4['sfsi_facebook_countsDisplay'] == "yes" && $sfsi_section4['sfsi_display_counts'] == "yes") {
74
+
75
  if ($sfsi_section4['sfsi_facebook_countsFrom'] == "manual") {
76
  $counts = $sfsi_section4['sfsi_facebook_manualCounts'];
77
  } else if ($sfsi_section4['sfsi_facebook_countsFrom'] == "likes") {
82
  $current_url = $sfsi_section4['sfsi_facebook_mypageCounts'];
83
  $counts = $socialObj->sfsi_get_fb_pagelike($current_url);
84
  }
85
+ $count_html = '<span class="bot_no">' . $counts . '</span>';
86
  }
87
  }
88
+ $icons .= "<div class='sf_fb_share sf_icon' style='text-align:left;vertical-align: middle;'>" . sfsiFB_Share_Custom($permalink, $show_count) . $count_html . "</div>";
89
  }
90
  if (($sfsi_section6['sfsi_recttwtr'] == "yes" && $sfsi_section6['sfsi_show_Onposts'] == "yes")) {
91
  // if ($show_count ) {
92
  // /* get twitter counts */
93
  // if ($sfsi_section4['sfsi_twitter_countsFrom'] == "source") {
94
  // $option2 = unserialize(get_option('sfsi_section2_options', false));
95
+
96
  // $twitter_user = $option2['sfsi_twitter_followUserName'];
97
  // $tw_settings = array(
98
  // 'tw_consumer_key' => $sfsi_section4['tw_consumer_key'],
100
  // 'tw_oauth_access_token' => $sfsi_section4['tw_oauth_access_token'],
101
  // 'tw_oauth_access_token_secret' => $sfsi_section4['tw_oauth_access_token_secret']
102
  // );
103
+
104
  // $followers = $socialObj->sfsi_get_tweets($twitter_user, $tw_settings);
105
  // $counts = $socialObj->format_num($followers);
106
  // } else {
107
  // $counts = $socialObj->format_num($sfsi_section4['sfsi_twitter_manualCounts']);
108
+
109
  // }
110
  // if($counts>0){
111
  // $count_html = '<span class="bot_no">'.$counts.'</span>';
112
  // }
113
  // }
114
+ $icons .= sfsi_twitterlike($permalink, $show_count, true);
115
  // $icons .= "<div class='sf_twiter' style='text-align:left;float:left;vertical-align: middle;width:auto'>" . . "</div>";
116
  }
117
 
118
  if (($sfsi_section6['sfsi_show_Onposts'] == "yes") && $sfsi_section6['sfsi_rectpinit'] == 'yes') {
119
+ $count_html = "";
120
+ if ($show_count) {
121
  /* get Pinterest counts */
122
  if ($sfsi_section4['sfsi_pinterest_countsFrom'] == "pins") {
123
  $url = home_url();
126
  } else {
127
  $counts = $sfsi_section4['sfsi_pinterest_manualCounts'];
128
  }
129
+ if ($counts > 0) {
130
+ $count_html = '<span class="bot_no">' . $counts . '</span>';
131
  }
132
  }
133
+ $icons .= "<div class='sf_pinit sf_icon' style='text-align:left;vertical-align: middle;float:left;line-height: 33px;width:auto;margin: 0 -2px;'>" . sfsi_pinterest_Customs($permalink, $show_count) . $count_html . "</div>";
134
  }
135
  $icons .= "</div>";
136
  //closing wrapper div
158
  $feed_data = $socialObj->SFSI_getFeedSubscriber($feed_id);
159
  // var_dump($feed_data);die();
160
  $counts = $socialObj->format_num($feed_data);
161
+ if (empty($counts)) {
162
  $counts = (string) "0";
163
  }
164
  } 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>';
174
  }
175
  /*subscribe like*/
176
  /*twitter like*/
177
+ function sfsi_twitterlike($permalink, $show_count, $rectangular_icon = false)
178
  {
179
  // $twitter_text = '';
180
  // if (!empty($permalink)) {
188
  // if($show_count>0){
189
  // $count_html = '<span class="bot_no">'.$show_count.'</span>';
190
  // }
191
+
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>";
199
+ // return $icons;
200
  global $socialObj;
201
  $socialObj = new sfsi_SocialHelper();
202
  $twitter_text = '';
206
  if (!empty($postid)) {
207
  $twitter_text = get_the_title($postid);
208
  }
209
+ return $socialObj->sfsi_twitterSharewithcount($permalink, $twitter_text, $show_count, $rectangular_icon);
210
  }
211
 
212
  /*twitter like*/
224
  // return $pinit_html;8
225
  // }
226
 
227
+ function sfsi_pinterest_Customs($permalink = '', $show_count = false)
228
  {
229
+ if ("" === $permalink) {
230
  $permalink = trailingslashit(get_permalink());
231
  }
232
 
235
  // $pinit_url = 'https://www.pinterest.com/pin/create/button/?url='.$url.'&media='.$media.'&description='.$description;
236
  // $pinit_url = 'https://www.pinterest.com/pin/create/button/?url='.$url.'&media='..'&description='.;
237
 
238
+ $pinit_html = "<a href='#' onclick='sfsi_pinterest_modal_images(event,\"" . $permalink . "\",\"" . $description . "\")' style='display:inline-block;' > <img class='sfsi_wicon' data-pin-nopin='true' width='auto' height='auto' alt='fb-share-icon' title='Pin Share' src='" . SFSI_PLUGURL . "images/share_icons/Pinterest_Save/en_US_save.svg" . "' /></a>";
239
  return $pinit_html;
240
  }
241
 
246
  $fb_like_html = '';
247
 
248
  $option6 = unserialize(get_option('sfsi_section6_options', false));
249
+
250
  $fb_like_html .= '<div class="fb-like" data-href="' . $permalink . '" data-send="' . $send . '" ';
251
+
252
  if ($show_count == 1) {
253
  $fb_like_html .= 'data-layout="button_count"';
254
  } else {
258
  return $fb_like_html;
259
  }
260
 
261
+ function sfsiFB_Share_Custom($permalink, $show_count = false)
262
+ {
263
+ $shareurl = "https://www.facebook.com/sharer/sharer.php?u=";
264
+ $shareurl = $shareurl . urlencode(urldecode($permalink));
265
 
266
+ $fb_share_html = "<a href='" . $shareurl . "' style='display:inline-block;' > <img class='sfsi_wicon' data-pin-nopin='true' width='auto' height='auto' alt='fb-share-icon' title='Facebook Share' src='" . SFSI_PLUGURL . "images/visit_icons/fbshare_bck.png" . "' /></a>";
267
+ return $fb_share_html;
268
+ }
269
 
270
  /* add all external javascript to wp_footer */
271
  function sfsi_footer_script()
297
  $sfsi_section6['sfsi_show_Onposts'] = isset($sfsi_section6['sfsi_show_Onposts']) && !empty($sfsi_section6['sfsi_show_Onposts']) ? $sfsi_section6['sfsi_show_Onposts'] : "no";
298
  if ($sfsi_section1['sfsi_facebook_display'] == "yes") {
299
  // var_dump($sfsi_section6['sfsi_rectfb'],$sfsi_section6['sfsi_show_Onposts']);
300
+ if ((($sfsi_section6['sfsi_rectfb'] == "yes") && $sfsi_section6['sfsi_show_Onposts'] == "yes") || $sisi_common_options_check && ($sfsi_section2['sfsi_facebookLike_option'] == "yes")) {
301
  ?>
302
  <!--facebook like and share js -->
303
  <div id="fb-root"></div>
314
  <?php
315
  }
316
  }
317
+ $isYoutubeFollowFeatureActive = (isset($sfsi_section2['sfsi_youtube_follow']) && "yes" == $sfsi_section2['sfsi_youtube_follow']) && (isset($sfsi_section2['sfsi_youtubeusernameorid']) &&
318
+ !empty($sfsi_section2['sfsi_youtubeusernameorid'])) && (
319
+ ("name" == $sfsi_section2['sfsi_youtubeusernameorid'] &&
320
+ isset($sfsi_section2['sfsi_ytube_user']) &&
321
+ !empty($sfsi_section2['sfsi_ytube_user'])) || ("id" == $sfsi_section2['sfsi_youtubeusernameorid'] &&
322
+ isset($sfsi_section2['sfsi_ytube_chnlid']) &&
323
+ !empty($sfsi_section2['sfsi_ytube_chnlid'])));
 
 
 
 
 
 
 
 
 
 
 
324
  if ($sfsi_section1['sfsi_youtube_display'] == "yes" && $sisi_common_options_check && $isYoutubeFollowFeatureActive) {
325
  ?>
326
+ <script type="text/javascript">
327
+ window.___gcfg = {
328
+ lang: 'en-US'
329
+ };
330
+ (function() {
331
+ var po = document.createElement('script');
332
+ po.type = 'text/javascript';
333
+ po.async = true;
334
+ po.src = 'https://apis.google.com/js/plusone.js';
335
+ var s = document.getElementsByTagName('script')[0];
336
+ s.parentNode.insertBefore(po, s);
337
+ })();
338
+ </script>
339
+ <?php
340
+ }
341
+ $isLinkedInFollowFeatureActive = (isset($sfsi_section2['sfsi_linkedin_follow']) && !empty($sfsi_section2['sfsi_linkedin_follow']) && ("yes" == $sfsi_section2['sfsi_linkedin_follow']) && isset($sfsi_section2['sfsi_linkedin_followCompany']) && !empty($sfsi_section2['sfsi_linkedin_followCompany']));
342
 
343
+ $isLinkedInRecommnedFeatureActive = (isset($sfsi_section2['sfsi_linkedin_recommendBusines']) && !empty($sfsi_section2['sfsi_linkedin_recommendBusines']) && ("yes" == $sfsi_section2['sfsi_linkedin_recommendBusines'])
344
+ && isset($sfsi_section2['sfsi_linkedin_recommendProductId']) && !empty($sfsi_section2['sfsi_linkedin_recommendProductId'])
345
+ && isset($sfsi_section2['sfsi_linkedin_recommendCompany']) && !empty($sfsi_section2['sfsi_linkedin_recommendCompany']));
346
 
347
+ if ($sfsi_section1['sfsi_linkedin_display'] == "yes" && ($isLinkedInFollowFeatureActive || $isLinkedInRecommnedFeatureActive) && $sisi_common_options_check) {
348
+ ?>
349
+ <script src="//platform.linkedin.com/in.js" type="text/javascript">
350
+ lang: en_US
351
+ </script>
352
+ <?php
353
+ }
354
 
355
+ /* activate footer credit link */
356
+ if (get_option('sfsi_footer_sec') == "yes") {
357
+ if (!is_admin()) {
358
+ //$footer_link='<div class="sfsiplus_footerLnk" style="margin: 0 auto;z-index:1000; absolute; text-align: center;">Social media & sharing icons powered by <a href="https://wordpress.org/plugins/ultimate-social-media-icons/" target="new">UltimatelySocial</a> ';
359
+
360
+ $sfsi_themecheck = new sfsi_ThemeCheck();
361
+ $domain = $sfsi_themecheck->sfsi_plus_getdomain(get_site_url());
362
+ $firstCharacter = substr($domain, 0, 1);
363
+ if (in_array($firstCharacter, array('a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm'))) {
364
+ $footer_link = '<div class="sfsiplus_footerLnk" style="margin: 0 auto;z-index:1000; text-align: center;">Social media & sharing icons powered by <a href="https://www.ultimatelysocial.com/?utm_source=usmplus_settings_page&utm_campaign=credit_link_to_homepage&utm_medium=banner" target="new">UltimatelySocial </a>';
365
+ $footer_link .= "</div>";
366
+ echo $footer_link;
367
+ } else if (in_array($firstCharacter, array('n', 'o', 'p', 'q', 'r', 's'))) {
368
+ $footer_link = '<div class="sfsiplus_footerLnk" style="margin: 0 auto;z-index:1000; text-align: center;"><a href="https://www.ultimatelysocial.com/usm-premium/" target="new">Wordpress Social Share Plugin </a> powered by Ultimatelysocial';
369
+ $footer_link .= "</div>";
370
+ echo $footer_link;
371
+ } else {
372
+ $footer_link = '<div class="sfsiplus_footerLnk" style="margin: 0 auto;z-index:1000;text-align: center;"><a href="https://www.ultimatelysocial.com/?utm_source=usmplus_settings_page&utm_campaign=credit_link_to_homepage&utm_medium=banner" target="new">Social Share Buttons and Icons</a> powered by Ultimatelysocial';
373
+ $footer_link .= "</div>";
374
+ echo $footer_link;
 
375
  }
376
  }
377
  }
378
+ }
379
+ /* filter the content of post */
380
+ add_filter('the_content', 'sfsi_social_buttons_below');
 
 
 
 
 
 
 
381
 
382
+ /* update footer for frontend and admin both */
383
+ if (!is_admin()) {
384
+ global $post;
385
+ add_action('wp_footer', 'sfsi_footer_script');
386
+ add_action('wp_footer', 'sfsi_check_PopUp');
387
+ add_action('wp_footer', 'sfsi_frontFloter');
388
+ }
389
+
390
+ if (is_admin()) {
391
+ add_action('in_admin_footer', 'sfsi_footer_script');
392
+ }
393
+ /* ping to vendor site on updation of new post */
394
+
395
+ //<---------------------* Responsive icons *----------------->
396
+ function sfsi_social_responsive_buttons($content, $option6, $server_side = false)
397
+ {
398
+ global $wp;
399
+ $count = 60;
400
+ if (((isset($option6["sfsi_display_button_type"]) && $option6["sfsi_display_button_type"] == "responsive_button")) || $server_side) :
401
+ $option2 = unserialize(get_option('sfsi_section2_options', false));
402
+ $option4 = unserialize(get_option('sfsi_section4_options', false));
403
+ $icons = "";
404
+ $sfsi_responsive_icons = (isset($option6["sfsi_responsive_icons"]) ? $option6["sfsi_responsive_icons"] : null);
405
+ $current_url = in_the_loop() ? add_query_arg($_GET ? $_GET : array(), get_permalink()) : add_query_arg($wp->query_vars, home_url($wp->request));
406
+ if (is_null($sfsi_responsive_icons)) {
407
+ if ($server_side) {
408
+ $sfsi_responsive_icons = array(
409
+ "default_icons" => array(
410
+ "facebook" => array("active" => "yes", "text" => "Share on Facebook", "url" => ""),
411
+ "Twitter" => array("active" => "yes", "text" => "Tweet", "url" => ""),
412
+ "Follow" => array("active" => "yes", "text" => "Follow us", "url" => "")
413
+ ),
414
+ "custom_icons" => array(),
415
+ "settings" => array(
416
+ "icon_size" => "Medium",
417
+ "icon_width_type" => "Fully responsive",
418
+ "icon_width_size" => 240,
419
+ "edge_type" => "Round",
420
+ "edge_radius" => 5,
421
+ "style" => "Gradient",
422
+ "margin" => 10,
423
+ "text_align" => "Centered",
424
+ "show_count" => "no",
425
+ "counter_color" => "#aaaaaa",
426
+ "counter_bg_color" => "#fff",
427
+ "share_count_text" => "SHARES",
428
+ "margin_above" => 10,
429
+ "margin_below" => 10,
430
+
431
+ )
432
+ );
433
+ } else {
434
+ return ""; // dont return anything if options not set;
435
  }
436
+ }
437
+ $twitter_text = isset($option2['sfsi_twitter_aboutPageText']) && !empty($option2['sfsi_twitter_aboutPageText']) ? $option2['sfsi_twitter_aboutPageText'] : false;
438
+
439
+ $icon_width_type = $sfsi_responsive_icons["settings"]["icon_width_type"];
440
+ $margin_above = $sfsi_responsive_icons["settings"]["margin_above"];
441
+ $margin_below = $sfsi_responsive_icons["settings"]["margin_below"];
442
+ if ($option4['sfsi_display_counts'] == 'yes' && $option4['sfsi_responsive_share_count'] == 'yes') :
443
+ $counter_class = "sfsi_responsive_with_counter_icons";
444
+ $couter_display = "inline-block";
445
+ $counts = sfsi_getCounts(true);
446
+ $count = 0;
447
+ if (isset($counts['email_count'])) {
448
+ $count = (int) ($counts['email_count']) + $count;
449
+ }
450
+ if (isset($counts['fb_count'])) {
451
+ $count = (int) ($counts['fb_count']) + $count;
452
+ }
453
+ if (isset($counts['twitter_count'])) {
454
+ $count = (int) ($counts['twitter_count']) + $count;
455
+ } else { } else :
456
+ $counter_class = "sfsi_responsive_without_counter_icons";
457
+ $couter_display = "none";
458
+ endif;
459
+ $icons .= "<div class='sfsi_responsive_icons' style='display:inline-block;margin-top:" . $margin_above . "px; margin-bottom: " . $margin_below . "px; " . ($icon_width_type == "Fully Responsive" ? "width:100%;display:flex; " : 'width:100%') . "' data-icon-width-type='" . $icon_width_type . "' data-icon-width-size='" . $sfsi_responsive_icons["settings"]['icon_width_size'] . "' data-edge-type='" . $sfsi_responsive_icons["settings"]['edge_type'] . "' data-edge-radius='" . $sfsi_responsive_icons["settings"]['edge_radius'] . "' >";
460
+ $sfsi_anchor_div_style = "";
461
+ if ($sfsi_responsive_icons["settings"]["edge_type"] === "Round") {
462
+ $sfsi_anchor_div_style .= " border-radius:";
463
+ if ($sfsi_responsive_icons["settings"]["edge_radius"] !== "") {
464
+ $sfsi_anchor_div_style .= $sfsi_responsive_icons["settings"]["edge_radius"] . 'px; ';
465
+ } else {
466
+ $sfsi_anchor_div_style .= '0px; ';
467
  }
468
+ }
469
 
470
+ ob_start(); ?>
471
+ <div class="sfsi_responsive_icons_count sfsi_<?php echo ($icon_width_type == "Fully responsive" ? 'responsive' : 'fixed'); ?>_count_container sfsi_<?php echo strtolower($sfsi_responsive_icons['settings']['icon_size']); ?>_button" style='display:<?php echo $couter_display; ?>;text-align:center; background-color:<?php echo $sfsi_responsive_icons['settings']['counter_bg_color']; ?>;color:<?php echo $sfsi_responsive_icons['settings']['counter_color']; ?>; <?php echo $sfsi_anchor_div_style; ?>;'>
472
+ <h3 style="color:<?php echo $sfsi_responsive_icons['settings']['counter_color']; ?>; "><?php echo $count; ?></h3>
473
+ <h6 style="color:<?php echo $sfsi_responsive_icons['settings']['counter_color']; ?>;"><?php echo $sfsi_responsive_icons['settings']["share_count_text"]; ?></h6>
474
+ </div>
475
+ <?php
476
+ $icons .= ob_get_contents();
477
  ob_end_clean();
478
+ $icons .= "\t<div class='sfsi_icons_container " . $counter_class . " sfsi_" . strtolower($sfsi_responsive_icons['settings']['icon_size']) . "_button_container sfsi_icons_container_box_" . ($icon_width_type !== "Fixed icon width" ? "fully" : 'fixed') . "_container ' style='" . ($icon_width_type !== "Fixed icon width" ? "width:100%;display:flex; " : 'width:auto') . "; text-align:center;' >";
479
+ $socialObj = new sfsi_SocialHelper();
480
+ //styles
481
+ $sfsi_anchor_style = "";
482
+ if ($sfsi_responsive_icons["settings"]["text_align"] == "Centered") {
483
+ $sfsi_anchor_style .= 'text-align:center;';
484
+ }
485
+ if ($sfsi_responsive_icons["settings"]["margin"] !== "") {
486
+ $sfsi_anchor_style .= 'margin-left:' . $sfsi_responsive_icons["settings"]["margin"] . "px; ";
487
+ // $sfsi_anchor_style.='margin-bottom:'.$sfsi_responsive_icons["settings"]["margin"]."px; ";
488
+ }
489
+ //styles
490
+
491
+ if ($sfsi_responsive_icons['settings']['icon_width_type'] === "Fixed icon width") {
492
+ $sfsi_anchor_div_style .= 'width:' . $sfsi_responsive_icons['settings']['icon_width_size'] . 'px;';
493
+ } else {
494
+ $sfsi_anchor_style .= " flex-basis:100%;";
495
+ $sfsi_anchor_div_style .= " width:100%;";
496
+ }
497
+ // var_dump($sfsi_anchor_style,$sfsi_anchor_div_style);
498
+ foreach ($sfsi_responsive_icons['default_icons'] as $icon => $icon_config) {
499
+ // var_dump($icon_config);
500
+ // $current_url = $socialObj->sfsi_get_custom_share_link(strtolower($icon));
501
+ switch ($icon) {
502
+ case "facebook":
503
+ $share_url = "https://www.facebook.com/sharer/sharer.php?u=" . urlencode($current_url);
504
+ break;
505
+ case "Twitter":
506
+ $twitter_text = $share_url = "https://twitter.com/intent/tweet?text=" . urlencode($twitter_text) . "&url=" . urlencode($current_url);
507
+ break;
508
+ case "Follow":
509
+ $share_url = (isset($option2['sfsi_email_url']))
510
+ ? $option2['sfsi_email_url']
511
+ : 'https://follow.it/now';
512
+ break;
513
+ }
514
  $icons .= "\t\t" . "<a " . sfsi_checkNewWindow() . " href='" . ($icon_config['url'] == "" ? $share_url : $icon_config['url']) . "' style='" . ($icon_config['active'] == 'yes' ? ($sfsi_responsive_icons['settings']['icon_width_type'] === "Fixed icon width" ? 'display:inline-flex' : 'display:block') : 'display:none') . ";" . $sfsi_anchor_style . "' class=" . ($sfsi_responsive_icons['settings']['icon_width_type'] === "Fixed icon width" ? 'sfsi_responsive_fixed_width' : 'sfsi_responsive_fluid') . " >" . "\n";
515
  $icons .= "\t\t\t<div class='sfsi_responsive_icon_item_container sfsi_responsive_icon_" . strtolower($icon) . "_container sfsi_" . strtolower($sfsi_responsive_icons['settings']['icon_size']) . "_button " . ($sfsi_responsive_icons['settings']['style'] == "Gradient" ? 'sfsi_responsive_icon_gradient' : '') . (" sfsi_" . (strtolower($sfsi_responsive_icons['settings']['text_align']) == "centered" ? 'centered' : 'left-align') . "_icon") . "' style='" . $sfsi_anchor_div_style . " ' >" . "\n";
516
  $icons .= "\t\t\t\t<img style='max-height: 25px;display:unset;margin:0' class='sfsi_wicon' src='" . SFSI_PLUGURL . "images/responsive-icon/" . $icon . ('Follow' === $icon ? '.png' : '.svg') . "'>" . "\n";
libs/sfsi_custom_social_sharing_data.php CHANGED
@@ -126,7 +126,7 @@ function sfsi_social_media_metabox( $post ) { ?>
126
 
127
  <div class="sfsi_custom_social_data_container">
128
 
129
- <div class="imgTopTxt"><?php _e('<strong>Picture </strong>(for social media sharing)',SFSI_DOMAIN); ?>
130
  </div>
131
 
132
  <div class="imgContainer imgpicker">
@@ -164,7 +164,6 @@ function sfsi_social_media_metabox( $post ) { ?>
164
  <div class="remaining_char_box" class="sfsi-remaining_char_title">
165
  <?php _e('<span id="sfsi_title_remaining_char">95</span> Characters Remaining',SFSI_DOMAIN);?>
166
  </div>
167
-
168
  </div>
169
 
170
  <!--********************************** TITLE for Social Networks (Facebook, LinkedIn & Twitter) CLOSES ***********************************************-->
@@ -181,17 +180,15 @@ function sfsi_social_media_metabox( $post ) { ?>
181
  class="sfsi_textarea"
182
  maxlength="297"></textarea>
183
  </div>
184
-
185
- <div class="social_description_hint">
186
- <div style="padding-right: 15px;">
187
  <?php _e('This description will be used when shared on Facebook, Linkedin, Twitter and WhatsApp (if you use ‘Twitter cards’). Leave it blank to use the post excerpt. [Developers: this is used by the open graph meta tag «og:description»]',SFSI_DOMAIN); ?>
188
  </div>
189
- </div>
190
 
191
- <div class="remaining_char_box">
192
- <?php _e('<span id="sfsi_desc_remaining_char">297</span> Characters Remaining',SFSI_DOMAIN);?>
 
193
  </div>
194
-
195
  <?php //sfsi_social_image_issues_support_link(); ?>
196
 
197
  </div>
@@ -207,7 +204,7 @@ function sfsi_social_media_metabox( $post ) { ?>
207
 
208
  <div class="sfsi_custom_social_data_container">
209
 
210
- <div class="imgTopTxt"><?php _e('<strong>Pinterest image </strong>',SFSI_DOMAIN); ?></div>
211
 
212
  <div class="imgContainer imgpicker">
213
 
@@ -258,14 +255,15 @@ function sfsi_social_media_metabox( $post ) { ?>
258
  maxlength="106"></textarea>
259
  </div>
260
 
261
- <div class="social_description_hint">
262
- <?php _e('This will be used as tweet-text (the link which get shared will be automatically the added at the end). If you don’t enter anything here the tweet text will be used which you defined globally under question 6 on the plugin’s settings page. ',SFSI_DOMAIN); ?>
263
- </div>
 
264
 
265
- <div class="remaining_char_box" id="remaining_twiter_char_description">
266
- <?php _e('<span id="sfsi_twitter_desc_remaining_char">106</span> Characters Remaining',SFSI_DOMAIN);?>
 
267
  </div>
268
-
269
  <?php //sfsi_social_image_issues_support_link(); ?>
270
 
271
  </div>
126
 
127
  <div class="sfsi_custom_social_data_container">
128
 
129
+ <div class="imgTopTxt"><?php _e('<strong>Picture </strong>(For social media sharing)',SFSI_DOMAIN); ?>
130
  </div>
131
 
132
  <div class="imgContainer imgpicker">
164
  <div class="remaining_char_box" class="sfsi-remaining_char_title">
165
  <?php _e('<span id="sfsi_title_remaining_char">95</span> Characters Remaining',SFSI_DOMAIN);?>
166
  </div>
 
167
  </div>
168
 
169
  <!--********************************** TITLE for Social Networks (Facebook, LinkedIn & Twitter) CLOSES ***********************************************-->
180
  class="sfsi_textarea"
181
  maxlength="297"></textarea>
182
  </div>
183
+ <div style="display: flex;justify-content: space-between;">
184
+ <div class="social_description_hint">
 
185
  <?php _e('This description will be used when shared on Facebook, Linkedin, Twitter and WhatsApp (if you use ‘Twitter cards’). Leave it blank to use the post excerpt. [Developers: this is used by the open graph meta tag «og:description»]',SFSI_DOMAIN); ?>
186
  </div>
 
187
 
188
+ <div class="remaining_char_box">
189
+ <?php _e('<span id="sfsi_desc_remaining_char">297</span> Characters Remaining',SFSI_DOMAIN);?>
190
+ </div>
191
  </div>
 
192
  <?php //sfsi_social_image_issues_support_link(); ?>
193
 
194
  </div>
204
 
205
  <div class="sfsi_custom_social_data_container">
206
 
207
+ <div class="imgTopTxt"><?php _e('<strong>Picture </strong>(For social media sharing)',SFSI_DOMAIN); ?></div>
208
 
209
  <div class="imgContainer imgpicker">
210
 
255
  maxlength="106"></textarea>
256
  </div>
257
 
258
+ <div style="display: flex;justify-content: space-between;">
259
+ <div class="social_description_hint">
260
+ <?php _e('This will be used as tweet-text (the link which get shared will be automatically the added at the end). If you don’t enter anything here the tweet text will be used which you defined globally under question 6 on the plugin’s settings page. ',SFSI_DOMAIN); ?>
261
+ </div>
262
 
263
+ <div class="remaining_char_box" id="remaining_twiter_char_description">
264
+ <?php _e('<span id="sfsi_twitter_desc_remaining_char">106</span> Characters Remaining',SFSI_DOMAIN);?>
265
+ </div>
266
  </div>
 
267
  <?php //sfsi_social_image_issues_support_link(); ?>
268
 
269
  </div>
libs/sfsi_install_uninstall.php CHANGED
@@ -29,7 +29,7 @@ function sfsi_update_plugin()
29
  update_option('sfsi_feed_id', sanitize_text_field($sfsiId->feed_id));
30
  update_option('sfsi_redirect_url', esc_url($sfsiId->redirect_url));
31
  }
32
- if(""==$feed_id){
33
  $sfsiId = SFSI_getFeedUrl();
34
  update_option('sfsi_feed_id', sanitize_text_field($sfsiId->feed_id));
35
  update_option('sfsi_redirect_url', esc_url($sfsiId->redirect_url));
@@ -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.55");
43
 
44
  if (!get_option('sfsi_serverphpVersionnotification')) {
45
  add_option("sfsi_serverphpVersionnotification", "yes");
@@ -66,13 +66,138 @@ function sfsi_update_plugin()
66
  }
67
 
68
  /* show mobile notification */
69
- if (!get_option('show_mobile_notification')) {
70
- add_option("show_mobile_notification", "yes");
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
71
  }
72
 
73
- if (!get_option('sfsi_languageNotice')) {
74
- add_option("sfsi_languageNotice", "yes");
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
75
  }
 
 
76
  /*Extra important options*/
77
  if (!get_option('sfsi_instagram_sf_count')) {
78
 
@@ -83,11 +208,11 @@ function sfsi_update_plugin()
83
  );
84
  add_option('sfsi_instagram_sf_count', serialize($sfsi_instagram_sf_count));
85
  } else {
86
-
87
  $sfsi_instagram_sf_count_option = get_option('sfsi_instagram_sf_count', false);
88
- if(!is_array($sfsi_instagram_sf_count_option)){
89
  $sfsi_instagram_sf_count = unserialize($sfsi_instagram_sf_count_option);
90
- }else{
91
  $sfsi_instagram_sf_count = $sfsi_instagram_sf_count_option;
92
  }
93
  $sfsi_instagram_sf_count["date_sf"] = isset($sfsi_instagram_sf_count["date"]) ? $sfsi_instagram_sf_count["date"] : '';
@@ -166,6 +291,15 @@ function sfsi_update_plugin()
166
  if (isset($option4['sfsi_google_manualCounts'])) {
167
  unset($option4['sfsi_google_manualCounts']);
168
  }
 
 
 
 
 
 
 
 
 
169
  }
170
 
171
  $option3 = unserialize(get_option('sfsi_section3_options', false));
@@ -571,6 +705,11 @@ function sfsi_update_plugin()
571
  //removing as we moved to wp_remote calls and remote calls can work without curl installed.
572
  delete_option("sfsi_curlErrorNotices");
573
  delete_option("sfsi_curlErrorMessage");
 
 
 
 
 
574
  }
575
 
576
  function sfsi_activate_plugin()
@@ -969,10 +1108,147 @@ function sfsi_activate_plugin()
969
  update_option('sfsi_feed_id', sanitize_text_field($sffeeds->feed_id));
970
  update_option('sfsi_redirect_url', esc_url($sffeeds->redirect_url));
971
  add_option('sfsi_installDate', date('Y-m-d h:i:s'));
 
 
 
 
 
 
 
972
  add_option('sfsi_RatingDiv', 'no');
973
  add_option('sfsi_footer_sec', 'no');
974
  update_option('sfsi_activate', 1);
975
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
976
  /*Changes in option 2*/
977
  $get_option2 = unserialize(get_option('sfsi_section2_options', false));
978
 
@@ -1054,6 +1330,12 @@ function sfsi_Unistall_plugin()
1054
  delete_option("sfsi_languageNotice");
1055
  delete_option("sfsi_instagram_sf_count");
1056
  delete_option("sfsi_installDate");
 
 
 
 
 
 
1057
 
1058
  delete_option("adding_tags");
1059
  delete_option("show_notification_plugin");
@@ -1068,6 +1350,23 @@ function sfsi_Unistall_plugin()
1068
  delete_option("sfsi_error_reporting_notice_dismissed");
1069
  delete_option('widget_sfsi_widget');
1070
  delete_option('widget_subscriber_widget');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1071
  }
1072
  /* end function */
1073
 
@@ -1271,7 +1570,7 @@ function sfsi_rating_msg()
1271
  $datetime2 = new DateTime($display_date);
1272
  $diff_inrval = round(($datetime2->format('U') - $datetime1->format('U')) / (60 * 60 * 24));
1273
  $screen = get_current_screen();
1274
- if ($diff_inrval >= 40 && "no" == get_option('sfsi_RatingDiv') && !is_null($screen) && "toplevel_page_sfsi-options"==$screen->id ) {
1275
  ?>
1276
  <style type="text/css">
1277
  .plg-rating-dismiss:before {
@@ -1348,7 +1647,7 @@ function sfsi_rating_msg()
1348
  });
1349
  </script>
1350
 
1351
- <?php
1352
  }
1353
  }
1354
 
29
  update_option('sfsi_feed_id', sanitize_text_field($sfsiId->feed_id));
30
  update_option('sfsi_redirect_url', esc_url($sfsiId->redirect_url));
31
  }
32
+ if ("" == $feed_id) {
33
  $sfsiId = SFSI_getFeedUrl();
34
  update_option('sfsi_feed_id', sanitize_text_field($sfsiId->feed_id));
35
  update_option('sfsi_redirect_url', esc_url($sfsiId->redirect_url));
39
  update_option("sfsi_custom_icons", "yes");
40
  }
41
  //Install version
42
+ update_option("sfsi_pluginVersion", "2.56");
43
 
44
  if (!get_option('sfsi_serverphpVersionnotification')) {
45
  add_option("sfsi_serverphpVersionnotification", "yes");
66
  }
67
 
68
  /* show mobile notification */
69
+ $sfsi_dismiss_sharecount = unserialize(get_option('sfsi_dismiss_sharecount'));
70
+ if (!isset($sfsi_dismiss_sharecount) || empty($sfsi_dismiss_sharecount)) {
71
+ $sfsi_dismiss_sharecount = array(
72
+ 'show_banner' => "yes",
73
+ 'timestamp' => ""
74
+ );
75
+ add_option("sfsi_dismiss_sharecount", serialize($sfsi_dismiss_sharecount));
76
+ }
77
+
78
+ $sfsi_dismiss_google_analytic = unserialize(get_option('sfsi_dismiss_google_analytic'));
79
+ if (!isset($sfsi_dismiss_google_analytic) || empty($sfsi_dismiss_google_analytic)) {
80
+ $sfsi_dismiss_google_analytic = array(
81
+ 'show_banner' => "yes",
82
+ 'timestamp' => ""
83
+ );
84
+ add_option("sfsi_dismiss_google_analytic", serialize($sfsi_dismiss_google_analytic));
85
+ }
86
+
87
+
88
+ $sfsi_banner_global_firsttime_offer = unserialize(get_option('sfsi_banner_global_firsttime_offer'));
89
+ // var_dump($sfsi_banner_global_firsttime_offer);
90
+ if (!isset($sfsi_banner_global_firsttime_offer) || empty($sfsi_banner_global_firsttime_offer) || !isset($sfsi_banner_global_firsttime_offer["is_active"]) ) {
91
+ $sfsi_banner_global_firsttime_offer = array(
92
+ 'met_criteria' => "yes",
93
+ 'is_active' => "yes",
94
+ 'timestamp' => ""
95
+ );
96
+ update_option("sfsi_banner_global_firsttime_offer", serialize($sfsi_banner_global_firsttime_offer));
97
+ }
98
+
99
+ $sfsi_dismiss_gdpr = unserialize(get_option('sfsi_dismiss_gdpr'));
100
+ if (!isset($sfsi_dismiss_gdpr) || empty($sfsi_dismiss_gdpr)) {
101
+ $sfsi_dismiss_gdpr = array(
102
+ 'show_banner' => "yes",
103
+ 'timestamp' => ""
104
+ );
105
+ add_option("sfsi_dismiss_gdpr", serialize($sfsi_dismiss_gdpr));
106
+ }
107
+
108
+ $sfsi_dismiss_optimization = unserialize(get_option('sfsi_dismiss_optimization'));
109
+ if (!isset($sfsi_dismiss_optimization) || empty($sfsi_dismiss_optimization)) {
110
+ $sfsi_dismiss_optimization = array(
111
+ 'show_banner' => "yes",
112
+ 'timestamp' => ""
113
+ );
114
+ add_option("sfsi_dismiss_optimization", serialize($sfsi_dismiss_optimization));
115
  }
116
 
117
+ $sfsi_dismiss_gallery = unserialize(get_option('sfsi_dismiss_gallery'));
118
+ if (!isset($sfsi_dismiss_gallery) || empty($sfsi_dismiss_gallery)) {
119
+ $sfsi_dismiss_gallery = array(
120
+ 'show_banner' => "yes",
121
+ 'timestamp' => ""
122
+ );
123
+ add_option("sfsi_dismiss_gallery", serialize($sfsi_dismiss_gallery));
124
+ }
125
+
126
+
127
+
128
+ $sfsi_banner_global_upgrade = unserialize(get_option('sfsi_banner_global_upgrade'));
129
+ if (!isset($sfsi_banner_global_upgrade) || empty($sfsi_banner_global_upgrade) || !isset($sfsi_banner_global_upgrade["is_active"])) {
130
+ $sfsi_banner_global_upgrade = array(
131
+ 'met_criteria' => "no",
132
+ 'banner_appeared' => "no",
133
+ 'is_active' => "no",
134
+ 'timestamp' => ""
135
+ );
136
+ update_option("sfsi_banner_global_upgrade", serialize($sfsi_banner_global_upgrade));
137
+ }
138
+
139
+ $sfsi_banner_global_http = unserialize(get_option('sfsi_banner_global_http'));
140
+ if (!isset($sfsi_banner_global_http) || empty($sfsi_banner_global_http) || !isset($sfsi_banner_global_http["is_active"])) {
141
+ $sfsi_banner_global_http = array(
142
+ 'met_criteria' => "no",
143
+ 'banner_appeared' => "no",
144
+ 'is_active' => "no",
145
+ 'timestamp' => ""
146
+ );
147
+ update_option("sfsi_banner_global_http", serialize($sfsi_banner_global_http));
148
+ }
149
+ $sfsi_banner_global_gdpr = unserialize(get_option('sfsi_banner_global_gdpr'));
150
+ if (!isset($sfsi_banner_global_gdpr) || empty($sfsi_banner_global_gdpr) || !isset($sfsi_banner_global_gdpr["is_active"])) {
151
+ $sfsi_banner_global_gdpr = array(
152
+ 'met_criteria' => "no",
153
+ 'banner_appeared' => "no",
154
+ 'is_active' => "no",
155
+ 'timestamp' => ""
156
+ );
157
+ update_option("sfsi_banner_global_gdpr", serialize($sfsi_banner_global_gdpr));
158
+ }
159
+ $sfsi_banner_global_shares = unserialize(get_option('sfsi_banner_global_shares'));
160
+ if (!isset($sfsi_banner_global_shares) || empty($sfsi_banner_global_shares) || !isset($sfsi_banner_global_shares["is_active"]) ) {
161
+ $sfsi_banner_global_shares = array(
162
+ 'met_criteria' => "no",
163
+ 'banner_appeared' => "no",
164
+ 'is_active' => "no",
165
+ 'timestamp' => ""
166
+ );
167
+ update_option("sfsi_banner_global_shares", serialize($sfsi_banner_global_shares));
168
+ }
169
+ $sfsi_banner_global_load_faster = unserialize(get_option('sfsi_banner_global_load_faster'));
170
+ if (!isset($sfsi_banner_global_load_faster) || empty($sfsi_banner_global_load_faster) || !isset($sfsi_banner_global_load_faster["is_active"])) {
171
+ $sfsi_banner_global_load_faster = array(
172
+ 'met_criteria' => "no",
173
+ 'banner_appeared' => "no",
174
+ 'is_active' => "no",
175
+ 'timestamp' => ""
176
+ );
177
+ update_option("sfsi_banner_global_load_faster", serialize($sfsi_banner_global_load_faster));
178
+ }
179
+ $sfsi_banner_global_social = unserialize(get_option('sfsi_banner_global_social'));
180
+ if (!isset($sfsi_banner_global_social) || empty($sfsi_banner_global_social) || !isset($sfsi_banner_global_social["is_active"])) {
181
+ $sfsi_banner_global_social = array(
182
+ 'met_criteria' => "no",
183
+ 'banner_appeared' => "no",
184
+ 'is_active' => "no",
185
+ 'timestamp' => ""
186
+ );
187
+ update_option("sfsi_banner_global_social", serialize($sfsi_banner_global_social));
188
+ }
189
+ $sfsi_banner_global_pinterest = unserialize(get_option('sfsi_banner_global_pinterest'));
190
+ if (!isset($sfsi_banner_global_pinterest) || empty($sfsi_banner_global_pinterest) || !isset($sfsi_banner_global_pinterest["is_active"])) {
191
+ $sfsi_banner_global_pinterest = array(
192
+ 'met_criteria' => "no",
193
+ 'banner_appeared' => "no",
194
+ 'is_active' => "no",
195
+ 'timestamp' => ""
196
+ );
197
+ update_option("sfsi_banner_global_pinterest", serialize($sfsi_banner_global_pinterest));
198
  }
199
+
200
+
201
  /*Extra important options*/
202
  if (!get_option('sfsi_instagram_sf_count')) {
203
 
208
  );
209
  add_option('sfsi_instagram_sf_count', serialize($sfsi_instagram_sf_count));
210
  } else {
211
+
212
  $sfsi_instagram_sf_count_option = get_option('sfsi_instagram_sf_count', false);
213
+ if (!is_array($sfsi_instagram_sf_count_option)) {
214
  $sfsi_instagram_sf_count = unserialize($sfsi_instagram_sf_count_option);
215
+ } else {
216
  $sfsi_instagram_sf_count = $sfsi_instagram_sf_count_option;
217
  }
218
  $sfsi_instagram_sf_count["date_sf"] = isset($sfsi_instagram_sf_count["date"]) ? $sfsi_instagram_sf_count["date"] : '';
291
  if (isset($option4['sfsi_google_manualCounts'])) {
292
  unset($option4['sfsi_google_manualCounts']);
293
  }
294
+ if (!isset($option4['sfsi_round_counts'])) {
295
+ $option4['sfsi_round_counts'] = "no";
296
+ }
297
+ if (!isset($option4['sfsi_original_counts'])) {
298
+ $option4['sfsi_original_counts'] = "no";
299
+ }
300
+ if (!isset($option4['sfsi_responsive_share_count'])) {
301
+ $option4['sfsi_responsive_share_count'] = "no";
302
+ }
303
  }
304
 
305
  $option3 = unserialize(get_option('sfsi_section3_options', false));
705
  //removing as we moved to wp_remote calls and remote calls can work without curl installed.
706
  delete_option("sfsi_curlErrorNotices");
707
  delete_option("sfsi_curlErrorMessage");
708
+
709
+ add_option('sfsi_currentDate', date('Y-m-d h:i:s'));
710
+ add_option('sfsi_showNextBannerDate', '21 day');
711
+ add_option('sfsi_cycleDate', "180 day");
712
+ add_option('sfsi_loyaltyDate', "180 day");
713
  }
714
 
715
  function sfsi_activate_plugin()
1108
  update_option('sfsi_feed_id', sanitize_text_field($sffeeds->feed_id));
1109
  update_option('sfsi_redirect_url', esc_url($sffeeds->redirect_url));
1110
  add_option('sfsi_installDate', date('Y-m-d h:i:s'));
1111
+ add_option('sfsi_currentDate', date('Y-m-d h:i:s'));
1112
+ add_option('sfsi_showNextBannerDate', '21 day');
1113
+ add_option('sfsi_cycleDate', "180 day");
1114
+ add_option('sfsi_loyaltyDate', "180 day");
1115
+
1116
+
1117
+
1118
  add_option('sfsi_RatingDiv', 'no');
1119
  add_option('sfsi_footer_sec', 'no');
1120
  update_option('sfsi_activate', 1);
1121
 
1122
+ $sfsi_dismiss_sharecount = unserialize(get_option('sfsi_dismiss_sharecount'));
1123
+ if (!isset($sfsi_dismiss_sharecount) || empty($sfsi_dismiss_sharecount)) {
1124
+ $sfsi_dismiss_sharecount = array(
1125
+ 'show_banner' => "yes",
1126
+ 'timestamp' => ""
1127
+ );
1128
+ add_option("sfsi_dismiss_sharecount", serialize($sfsi_dismiss_sharecount));
1129
+ }
1130
+
1131
+ $sfsi_dismiss_google_analytic = unserialize(get_option('sfsi_dismiss_google_analytic'));
1132
+ if (!isset($sfsi_dismiss_google_analytic) || empty($sfsi_dismiss_google_analytic)) {
1133
+ $sfsi_dismiss_google_analytic = array(
1134
+ 'show_banner' => "yes",
1135
+ 'timestamp' => ""
1136
+ );
1137
+ add_option("sfsi_dismiss_google_analytic", serialize($sfsi_dismiss_google_analytic));
1138
+ }
1139
+
1140
+
1141
+ $sfsi_banner_global_firsttime_offer = unserialize(get_option('sfsi_banner_global_firsttime_offer'));
1142
+ if (!isset($sfsi_banner_global_firsttime_offer) || empty($sfsi_banner_global_firsttime_offer) || !isset($sfsi_banner_global_firsttime_offer["is_active"])) {
1143
+ $sfsi_banner_global_firsttime_offer = array(
1144
+ 'met_criteria' => "yes",
1145
+ 'is_active' => "yes",
1146
+ 'timestamp' => ""
1147
+ );
1148
+ update_option("sfsi_banner_global_firsttime_offer", serialize($sfsi_banner_global_firsttime_offer));
1149
+ }
1150
+
1151
+ $sfsi_dismiss_gdpr = unserialize(get_option('sfsi_dismiss_gdpr'));
1152
+ if (!isset($sfsi_dismiss_gdpr) || empty($sfsi_dismiss_gdpr)) {
1153
+ $sfsi_dismiss_gdpr = array(
1154
+ 'show_banner' => "yes",
1155
+ 'timestamp' => ""
1156
+ );
1157
+ add_option("sfsi_dismiss_gdpr", serialize($sfsi_dismiss_gdpr));
1158
+ }
1159
+
1160
+ $sfsi_dismiss_optimization = unserialize(get_option('sfsi_dismiss_optimization'));
1161
+ if (!isset($sfsi_dismiss_optimization) || empty($sfsi_dismiss_optimization)) {
1162
+ $sfsi_dismiss_optimization = array(
1163
+ 'show_banner' => "yes",
1164
+ 'timestamp' => ""
1165
+ );
1166
+ add_option("sfsi_dismiss_optimization", serialize($sfsi_dismiss_optimization));
1167
+ }
1168
+
1169
+ $sfsi_dismiss_gallery = unserialize(get_option('sfsi_dismiss_gallery'));
1170
+ if (!isset($sfsi_dismiss_gallery) || empty($sfsi_dismiss_gallery)) {
1171
+ $sfsi_dismiss_gallery = array(
1172
+ 'show_banner' => "yes",
1173
+ 'timestamp' => ""
1174
+ );
1175
+ add_option("sfsi_dismiss_gallery", serialize($sfsi_dismiss_gallery));
1176
+ }
1177
+
1178
+
1179
+
1180
+ $sfsi_banner_global_upgrade = unserialize(get_option('sfsi_banner_global_upgrade'));
1181
+ if (!isset($sfsi_banner_global_upgrade) || empty($sfsi_banner_global_upgrade) || !isset($sfsi_banner_global_upgrade["is_active"])) {
1182
+ $sfsi_banner_global_upgrade = array(
1183
+ 'met_criteria' => "no",
1184
+ 'banner_appeared' => "no",
1185
+ 'is_active' => "no",
1186
+ 'timestamp' => ""
1187
+ );
1188
+ add_option("sfsi_banner_global_upgrade", serialize($sfsi_banner_global_upgrade));
1189
+ }
1190
+ $sfsi_banner_global_http = unserialize(get_option('sfsi_banner_global_http'));
1191
+ if (!isset($sfsi_banner_global_http) || empty($sfsi_banner_global_http) || !isset($sfsi_banner_global_http["is_active"])) {
1192
+ $sfsi_banner_global_http = array(
1193
+ 'met_criteria' => "no",
1194
+ 'banner_appeared' => "no",
1195
+ 'is_active' => "no",
1196
+ 'timestamp' => ""
1197
+ );
1198
+ add_option("sfsi_banner_global_http", serialize($sfsi_banner_global_http));
1199
+ }
1200
+ $sfsi_banner_global_gdpr = unserialize(get_option('sfsi_banner_global_gdpr'));
1201
+ if (!isset($sfsi_banner_global_gdpr) || empty($sfsi_banner_global_gdpr)) {
1202
+ $sfsi_banner_global_gdpr = array(
1203
+ 'met_criteria' => "no",
1204
+ 'banner_appeared' => "no",
1205
+ 'is_active' => "no",
1206
+ 'timestamp' => ""
1207
+ );
1208
+ add_option("sfsi_banner_global_gdpr", serialize($sfsi_banner_global_gdpr));
1209
+ }
1210
+ $sfsi_banner_global_shares = unserialize(get_option('sfsi_banner_global_shares'));
1211
+ if (!isset($sfsi_banner_global_shares) || empty($sfsi_banner_global_shares) ||!isset($sfsi_banner_global_shares["is_active"])) {
1212
+ $sfsi_banner_global_shares = array(
1213
+ 'met_criteria' => "no",
1214
+ 'banner_appeared' => "no",
1215
+ 'is_active' => "no",
1216
+ 'timestamp' => ""
1217
+ );
1218
+ add_option("sfsi_banner_global_shares", serialize($sfsi_banner_global_shares));
1219
+ }
1220
+ $sfsi_banner_global_load_faster = unserialize(get_option('sfsi_banner_global_load_faster'));
1221
+ if (!isset($sfsi_banner_global_load_faster) || empty($sfsi_banner_global_load_faster) || !isset($sfsi_banner_global_load_faster["is_active"])) {
1222
+ $sfsi_banner_global_load_faster = array(
1223
+ 'met_criteria' => "no",
1224
+ 'banner_appeared' => "no",
1225
+ 'is_active' => "no",
1226
+ 'timestamp' => ""
1227
+ );
1228
+ add_option("sfsi_banner_global_load_faster", serialize($sfsi_banner_global_load_faster));
1229
+ }
1230
+ $sfsi_banner_global_social = unserialize(get_option('sfsi_banner_global_social'));
1231
+ if (!isset($sfsi_banner_global_social) || empty($sfsi_banner_global_social) || !isset($sfsi_banner_global_load_faster["is_active"])) {
1232
+ $sfsi_banner_global_social = array(
1233
+ 'met_criteria' => "no",
1234
+ 'banner_appeared' => "no",
1235
+ 'is_active' => "no",
1236
+ 'timestamp' => ""
1237
+ );
1238
+ add_option("sfsi_banner_global_social", serialize($sfsi_banner_global_social));
1239
+ }
1240
+ $sfsi_banner_global_pinterest = unserialize(get_option('sfsi_banner_global_pinterest'));
1241
+ if (!isset($sfsi_banner_global_pinterest) || empty($sfsi_banner_global_pinterest) || !isset($sfsi_banner_global_pinterest["is_active"])) {
1242
+ $sfsi_banner_global_pinterest = array(
1243
+ 'met_criteria' => "no",
1244
+ 'banner_appeared' => "no",
1245
+ 'is_active' => "no",
1246
+ 'timestamp' => ""
1247
+ );
1248
+ add_option("sfsi_banner_global_pinterest", serialize($sfsi_banner_global_pinterest));
1249
+ }
1250
+
1251
+
1252
  /*Changes in option 2*/
1253
  $get_option2 = unserialize(get_option('sfsi_section2_options', false));
1254
 
1330
  delete_option("sfsi_languageNotice");
1331
  delete_option("sfsi_instagram_sf_count");
1332
  delete_option("sfsi_installDate");
1333
+ delete_option("sfsi_currentDate");
1334
+ delete_option("sfsi_showNextBannerDate");
1335
+ delete_option("sfsi_cycleDate");
1336
+ delete_option("sfsi_loyaltyDate");
1337
+
1338
+
1339
 
1340
  delete_option("adding_tags");
1341
  delete_option("show_notification_plugin");
1350
  delete_option("sfsi_error_reporting_notice_dismissed");
1351
  delete_option('widget_sfsi_widget');
1352
  delete_option('widget_subscriber_widget');
1353
+
1354
+ delete_option("sfsi_dismiss_sharecount");
1355
+ delete_option("sfsi_dismiss_google_analytic");
1356
+ delete_option("sfsi_dismiss_gdpr");
1357
+ delete_option("sfsi_dismiss_optimization");
1358
+ delete_option("sfsi_dismiss_gallery");
1359
+ delete_option("sfsi_banner_global_firsttime_offer");
1360
+ delete_option("sfsi_banner_global_social");
1361
+ delete_option("sfsi_banner_global_gdpr");
1362
+ delete_option("sfsi_banner_global_pinterest");
1363
+ delete_option("sfsi_banner_global_load_faster");
1364
+ delete_option("sfsi_banner_global_shares");
1365
+ delete_option("sfsi_banner_global_http");
1366
+ delete_option("sfsi_banner_global_upgrade");
1367
+
1368
+
1369
+
1370
  }
1371
  /* end function */
1372
 
1570
  $datetime2 = new DateTime($display_date);
1571
  $diff_inrval = round(($datetime2->format('U') - $datetime1->format('U')) / (60 * 60 * 24));
1572
  $screen = get_current_screen();
1573
+ if ($diff_inrval >= 40 && "no" == get_option('sfsi_RatingDiv') && !is_null($screen) && "toplevel_page_sfsi-options" == $screen->id) {
1574
  ?>
1575
  <style type="text/css">
1576
  .plg-rating-dismiss:before {
1647
  });
1648
  </script>
1649
 
1650
+ <?php
1651
  }
1652
  }
1653
 
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.5
7
  License: GPLv2
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -270,6 +270,11 @@ You cannot use the same plugin twice, however you can install both the USM as we
270
 
271
 
272
  == Changelog ==
 
 
 
 
 
273
  = 2.5.5 =
274
  * Fixed claim feed from Q8 popup.
275
  * Updated new section to show counts.
@@ -928,5 +933,5 @@ You cannot use the same plugin twice, however you can install both the USM as we
928
 
929
  == Upgrade Notice ==
930
 
931
- = 2.5.5 =
932
  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.6
7
  License: GPLv2
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
270
 
271
 
272
  == Changelog ==
273
+ = 2.5.6 =
274
+ * Fixed undefined index issue
275
+ * Updated Youtube api updated
276
+ * Bitly changes
277
+
278
  = 2.5.5 =
279
  * Fixed claim feed from Q8 popup.
280
  * Updated new section to show counts.
933
 
934
  == Upgrade Notice ==
935
 
936
+ = 2.5.6 =
937
  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.5
10
  License: GPLv2 or later
11
  */
12
  require_once 'analyst/main.php';
@@ -90,8 +90,7 @@ register_deactivation_hook(__FILE__, 'sfsi_deactivate_plugin');
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
  }
97
  /* redirect setting page hook */
@@ -799,95 +798,25 @@ function sfsi_admin_notice()
799
  $siteMatch = false;
800
  }
801
  }
802
- $screen = get_current_screen();
803
- if (get_option("show_premium_notification") == "yes" && ($screen->id != "toplevel_page_sfsi-options")) {
804
-
805
- ?>
806
-
807
- <style type="text/css">
808
- div.sfsi_show_premium_notification {
809
-
810
- float: none;
811
-
812
- display: block;
813
-
814
- margin-left: 15px;
815
-
816
- margin-top: 15px;
817
-
818
- padding: 8px;
819
-
820
- background-color: #38B54A;
821
-
822
- color: #fff;
823
-
824
- font-size: 18px;
825
-
826
- }
827
-
828
- .sfsi_show_premium_notification a {
829
-
830
- color: #fff;
831
-
832
- }
833
-
834
- form.sfsi_premiumNoticeDismiss {
835
-
836
- display: inline-block;
837
-
838
- margin: 5px 0 0;
839
-
840
- vertical-align: middle;
841
-
842
- }
843
-
844
- .sfsi_premiumNoticeDismiss input[type='submit'] {
845
-
846
- background-color: transparent;
847
-
848
- border: medium none;
849
-
850
- color: #fff;
851
-
852
- margin: 0;
853
-
854
- padding: 0;
855
 
856
- cursor: pointer;
 
857
 
858
- }
859
- </style>
860
-
861
- <div class="updated sfsi_show_premium_notification" style="<?php echo isset($style) ? $style : ''; ?>">
862
-
863
- <div style="margin: 9px 0; ">
864
-
865
- BIG NEWS: There is now a <b><a href="https://www.ultimatelysocial.com/usm-premium/?utm_source=usmi_settings_page&utm_campaign=notification_banner&utm_medium=banner" target="_blank">Premium Ultimate Social Media Plugin</a></b> available with many more cool features: <a href="https://www.ultimatelysocial.com/usm-premium/?utm_source=usmi_settings_page&utm_campaign=notification_banner&utm_medium=banner" target="_blank">Check it out</a>
866
-
867
- </div>
868
-
869
- <div style="text-align:right;margin-top:-40px;">
870
-
871
- <form method="post" class="sfsi_premiumNoticeDismiss" style="padding-bottom:8px;">
872
 
873
- <input type="hidden" name="sfsi-dismiss-premiumNotice" value="true">
874
 
875
- <input type="submit" name="dismiss" value="Dismiss" />
876
-
877
- </form>
878
-
879
- </div>
880
-
881
- </div>
882
-
883
- <?php
884
 
885
- }
886
- if (is_ssl() && false) {
887
- if (get_option("show_premium_cumulative_count_notification") == "yes") {
888
 
889
- ?>
 
890
 
 
891
  <style type="text/css">
892
  div.sfsi_show_premium_cumulative_count_notification {
893
 
@@ -967,6 +896,7 @@ function sfsi_admin_notice()
967
 
968
  }
969
  }
 
970
  /* show mobile notification */
971
 
972
  if (get_option("show_mobile_notification") == "yes") {
@@ -1386,6 +1316,8 @@ function sfsi_admin_notice()
1386
 
1387
  {
1388
 
 
 
1389
  if (isset($_REQUEST['sfsi-dismiss-notice']) && $_REQUEST['sfsi-dismiss-notice'] == 'true') {
1390
 
1391
  update_option('show_notification_plugin', "no");
@@ -1424,7 +1356,139 @@ function sfsi_admin_notice()
1424
 
1425
  update_option('show_premium_cumulative_count_notification', "no");
1426
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1427
  }
 
 
1428
  function sfsi_get_bloginfo($url)
1429
 
1430
  {
@@ -1926,4 +1990,426 @@ function sfsi_plugin_redirect()
1926
 
1927
  add_action('wp_ajax_sfsi_dismiss_error_reporting_notice', 'sfsi_dismiss_error_reporting_notice');
1928
  // ********************************* Notice for error reporting CLOSE *******************************//
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1929
  ?>
6
 
7
  Author: UltimatelySocial
8
  Author URI: http://ultimatelysocial.com
9
+ Version: 2.5.6
10
  License: GPLv2 or later
11
  */
12
  require_once 'analyst/main.php';
90
 
91
  register_uninstall_hook(__FILE__, 'sfsi_Unistall_plugin');
92
 
93
+ if (!get_option('sfsi_pluginVersion') || get_option('sfsi_pluginVersion') < 2.56) {
 
94
  add_action("init", "sfsi_update_plugin");
95
  }
96
  /* redirect setting page hook */
798
  $siteMatch = false;
799
  }
800
  }
801
+ // $screen = get_current_screen();
802
+ // if (get_option("show_premium_notification") == "yes" && ($screen->id != "toplevel_page_sfsi-options")) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
803
 
804
+ //
805
+ ?>
806
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
807
 
 
808
 
809
+ </style>
810
+ <?php
 
 
 
 
 
 
 
811
 
812
+ include("views/sfsi_plugin_lists.php");
813
+ include("views/sfsi_other_banners.php");
814
+ include("views/sfsi_global_banners.php");
815
 
816
+ if (is_ssl() && false) {
817
+ if (get_option("show_premium_cumulative_count_notification") == "yes") {
818
 
819
+ ?>
820
  <style type="text/css">
821
  div.sfsi_show_premium_cumulative_count_notification {
822
 
896
 
897
  }
898
  }
899
+
900
  /* show mobile notification */
901
 
902
  if (get_option("show_mobile_notification") == "yes") {
1316
 
1317
  {
1318
 
1319
+ $current_date_sfsi = date("Y-m-d h:i:s");
1320
+
1321
  if (isset($_REQUEST['sfsi-dismiss-notice']) && $_REQUEST['sfsi-dismiss-notice'] == 'true') {
1322
 
1323
  update_option('show_notification_plugin', "no");
1356
 
1357
  update_option('show_premium_cumulative_count_notification', "no");
1358
  }
1359
+ if (isset($_REQUEST['sfsi-dismiss-sharecount']) && $_REQUEST['sfsi-dismiss-sharecount'] == 'true') {
1360
+ $sfsi_dismiss_sharecount = array(
1361
+ 'show_banner' => "no",
1362
+ 'timestamp' => strtotime(date("Y-m-d h:i:s"))
1363
+ );
1364
+ update_option('sfsi_dismiss_sharecount', serialize($sfsi_dismiss_sharecount));
1365
+ }
1366
+ if (isset($_REQUEST['sfsi-dismiss-google-analytic']) && $_REQUEST['sfsi-dismiss-google-analytic'] == 'true') {
1367
+ $sfsi_dismiss_google_analytic = array(
1368
+ 'show_banner' => "no",
1369
+ 'timestamp' => strtotime(date("Y-m-d h:i:s"))
1370
+ );
1371
+ update_option('sfsi_dismiss_google_analytic', serialize($sfsi_dismiss_google_analytic));
1372
+ }
1373
+ if (isset($_REQUEST['sfsi-dismiss-gdpr']) && $_REQUEST['sfsi-dismiss-gdpr'] == 'true') {
1374
+ $sfsi_dismiss_gdpr = array(
1375
+ 'show_banner' => "no",
1376
+ 'timestamp' => strtotime(date("Y-m-d h:i:s"))
1377
+ );
1378
+ update_option('sfsi_dismiss_gdpr', serialize($sfsi_dismiss_gdpr));
1379
+ }
1380
+ if (isset($_REQUEST['sfsi-dismiss-optimization']) && $_REQUEST['sfsi-dismiss-optimization'] == 'true') {
1381
+ $sfsi_dismiss_optimization = array(
1382
+ 'show_banner' => "no",
1383
+ 'timestamp' => strtotime(date("Y-m-d h:i:s"))
1384
+ );
1385
+ update_option('sfsi_dismiss_optimization', serialize($sfsi_dismiss_optimization));
1386
+ }
1387
+ if (isset($_REQUEST['sfsi-dismiss-gallery']) && $_REQUEST['sfsi-dismiss-gallery'] == 'true') {
1388
+ $sfsi_dismiss_gallery = array(
1389
+ 'show_banner' => "no",
1390
+ 'timestamp' => strtotime(date("Y-m-d h:i:s"))
1391
+ );
1392
+ update_option('sfsi_dismiss_gallery', serialize($sfsi_dismiss_gallery));
1393
+ }
1394
+
1395
+
1396
+ if (isset($_REQUEST['sfsi-banner-global-upgrade']) && $_REQUEST['sfsi-banner-global-upgrade'] == 'true') {
1397
+ $sfsi_banner_global_upgrade = unserialize(get_option('sfsi_banner_global_upgrade', false));
1398
+ $sfsi_banner_global_upgrade = array(
1399
+ 'met_criteria' => $sfsi_banner_global_upgrade['met_criteria'],
1400
+ 'banner_appeared' => "yes",
1401
+ 'is_active' => "no",
1402
+ 'timestamp' => $current_date_sfsi
1403
+ );
1404
+ update_option('sfsi_banner_global_upgrade', serialize($sfsi_banner_global_upgrade));
1405
+ sfsi_check_banner();
1406
+ }
1407
+ if (isset($_REQUEST['sfsi-banner-global-http']) && $_REQUEST['sfsi-banner-global-http'] == 'true') {
1408
+ $sfsi_banner_global_http = unserialize(get_option('sfsi_banner_global_http', false));
1409
+ $sfsi_banner_global_http = array(
1410
+ 'met_criteria' => $sfsi_banner_global_http['met_criteria'],
1411
+ 'banner_appeared' => "yes",
1412
+ 'is_active' => "no",
1413
+ 'timestamp' => $current_date_sfsi
1414
+ );
1415
+ update_option('sfsi_banner_global_http', serialize($sfsi_banner_global_http));
1416
+ sfsi_check_banner();
1417
+ }
1418
+ if (isset($_REQUEST['sfsi-banner-global-gdpr']) && $_REQUEST['sfsi-banner-global-gdpr'] == 'true') {
1419
+ $sfsi_banner_global_gdpr = unserialize(get_option('sfsi_banner_global_gdpr', false));
1420
+ $sfsi_banner_global_gdpr = array(
1421
+ 'met_criteria' => $sfsi_banner_global_gdpr['met_criteria'],
1422
+ 'banner_appeared' => "yes",
1423
+ 'is_active' => "no",
1424
+ 'timestamp' => $current_date_sfsi
1425
+ );
1426
+ update_option('sfsi_banner_global_gdpr', serialize($sfsi_banner_global_gdpr));
1427
+ sfsi_check_banner();
1428
+ }
1429
+
1430
+ if (isset($_REQUEST['sfsi-banner-global-shares']) && $_REQUEST['sfsi-banner-global-shares'] == 'true') {
1431
+ $sfsi_banner_global_shares = unserialize(get_option('sfsi_banner_global_shares', false));
1432
+ $sfsi_banner_global_shares = array(
1433
+ 'met_criteria' => $sfsi_banner_global_shares['met_criteria'],
1434
+ 'banner_appeared' => "yes",
1435
+ 'is_active' => "no",
1436
+ 'timestamp' => $current_date_sfsi
1437
+ );
1438
+ update_option('sfsi_banner_global_shares', serialize($sfsi_banner_global_shares));
1439
+ sfsi_check_banner();
1440
+ }
1441
+ if (isset($_REQUEST['sfsi-banner-global-load_faster']) && $_REQUEST['sfsi-banner-global-load_faster'] == 'true') {
1442
+ $sfsi_banner_global_load_faster = unserialize(get_option('sfsi_banner_global_load_faster', false));
1443
+ $sfsi_banner_global_load_faster = array(
1444
+ 'met_criteria' => $sfsi_banner_global_load_faster['met_criteria'],
1445
+ 'banner_appeared' => "yes",
1446
+ 'is_active' => "no",
1447
+ 'timestamp' => $current_date_sfsi
1448
+ );
1449
+ update_option('sfsi_banner_global_load_faster', serialize($sfsi_banner_global_load_faster));
1450
+ sfsi_check_banner();
1451
+ }
1452
+ if (isset($_REQUEST['sfsi-banner-global-social']) && $_REQUEST['sfsi-banner-global-social'] == 'true') {
1453
+ $sfsi_banner_global_social = unserialize(get_option('sfsi_banner_global_social', false));
1454
+ $sfsi_banner_global_social = array(
1455
+ 'met_criteria' => $sfsi_banner_global_social['met_criteria'],
1456
+ 'banner_appeared' => "yes",
1457
+ 'is_active' => "no",
1458
+ 'timestamp' => $current_date_sfsi
1459
+ );
1460
+ update_option('sfsi_banner_global_social', serialize($sfsi_banner_global_social));
1461
+ sfsi_check_banner();
1462
+ }
1463
+ if (isset($_REQUEST['sfsi-banner-global-pinterest']) && $_REQUEST['sfsi-banner-global-pinterest'] == 'true') {
1464
+ $sfsi_banner_global_pinterest = unserialize(get_option('sfsi_banner_global_pinterest', false));
1465
+ $sfsi_banner_global_pinterest = array(
1466
+ 'met_criteria' => $sfsi_banner_global_pinterest['met_criteria'],
1467
+ 'banner_appeared' => "yes",
1468
+ 'is_active' => "no",
1469
+ 'timestamp' => $current_date_sfsi
1470
+ );
1471
+ update_option('sfsi_banner_global_pinterest', serialize($sfsi_banner_global_pinterest));
1472
+ sfsi_check_banner();
1473
+ }
1474
+ $sfsi_install_time = strtotime(get_option('sfsi_installDate'));
1475
+ $sfsi_max_show_time = $sfsi_install_time + (60 * 60);
1476
+ $sfsi_banner_global_firsttime_offer = unserialize(get_option('sfsi_banner_global_firsttime_offer', false));
1477
+ if (
1478
+ (isset($_REQUEST['sfsi-banner-global-firsttime-offer']) && $_REQUEST['sfsi-banner-global-firsttime-offer'] == 'true') || (isset($sfsi_banner_global_firsttime_offer['is_active']) && $sfsi_banner_global_firsttime_offer['is_active'] == "yes" && ceil(($sfsi_max_show_time - strtotime(date('Y-m-d h:i:s'))) / 60) <= 0)
1479
+ ) {
1480
+
1481
+ $sfsi_banner_global_firsttime_offer = array(
1482
+ 'met_criteria' => "yes",
1483
+ 'is_active' => "no",
1484
+ 'timestamp' => $current_date_sfsi
1485
+ );
1486
+ update_option('sfsi_banner_global_firsttime_offer', serialize($sfsi_banner_global_firsttime_offer));
1487
+ sfsi_check_banner();
1488
+ }
1489
  }
1490
+ // add_action("admin_init","sfsi_check_banner");
1491
+
1492
  function sfsi_get_bloginfo($url)
1493
 
1494
  {
1990
 
1991
  add_action('wp_ajax_sfsi_dismiss_error_reporting_notice', 'sfsi_dismiss_error_reporting_notice');
1992
  // ********************************* Notice for error reporting CLOSE *******************************//
1993
+
1994
+ function sfsi_check_banner()
1995
+ {
1996
+ $gallery_plugins = array(
1997
+ array('option_name' => 'photoblocks', 'dir_slug' => 'photoblocks-grid-gallery/photoblocks.php'),
1998
+ array('option_name' => 'everlightbox_options', 'dir_slug' => 'everlightbox/everlightbox.php'),
1999
+ array('option_name' => 'Total_Soft_Gallery_Video', 'dir_slug' => 'gallery-videos/index.php'),
2000
+ array('option_name' => 'Wpape-gallery-settings', 'dir_slug' => 'gallery-images-ape/index.php'),
2001
+ array('option_name' => 'overview', 'dir_slug' => 'robo-gallery/robogallery.php'),
2002
+ array('option_name' => 'flag-overview', 'dir_slug' => 'flash-album-gallery/flag.php'),
2003
+ array('option_name' => 'GrandMedia', 'dir_slug' => 'grand-media/grand-media.php'),
2004
+ array('option_name' => 'emg-whats-new', 'dir_slug' => 'easy-media-gallery/easy-media-gallery.php'),
2005
+ array('option_name' => 'grid-kit', 'dir_slug' => 'portfolio-wp/portfolio-wp.php'),
2006
+ array('option_name' => 'Wc-gallery', 'dir_slug' => 'wc-gallery/wc-gallery.php'),
2007
+ array('option_name' => 'elementor-getting-started', 'dir_slug' => 'elementor/elementor.php'),
2008
+ array('option_name' => 'photospace.php', 'dir_slug' => 'photospace/photospace.php'),
2009
+ array('option_name' => 'unitegallery', 'dir_slug' => 'unite-gallery-lite/unitegallery.php'),
2010
+ array('option_name' => 'resmushit_options', 'dir_slug' => 'resmushit-image-optimizer/resmushit.php'),
2011
+ array('option_name' => 'picture-gallery', 'dir_slug' => 'picture-gallery/picture-gallery.php'),
2012
+ array('option_name' => 'imagify', 'dir_slug' => 'imagify/imagify.php'),
2013
+ array('option_name' => 'gallery_bank', 'dir_slug' => 'gallery-bank/gallery-bank.php'),
2014
+ array('option_name' => 'wp-shortpixel-settings', 'dir_slug' => 'shortpixel-image-optimiser/wp-shortpixel.php'),
2015
+ array('option_name' => 'post-gallery-settings', 'dir_slug' => 'simple-post-gallery/plugin.php'),
2016
+ array('option_name' => 'image-gallery-settings', 'dir_slug' => 'responsive-photo-gallery/get-responsive-gallery.php'),
2017
+ array('option_name' => 'gallery-plugin.php', 'dir_slug' => 'gallery-plugin/gallery-plugin.php'),
2018
+ array('option_name' => 'youtube-my-preferences', 'dir_slug' => 'youtube-embed-plus/youtube.php'),
2019
+ array('option_name' => 'pfg-update-plugin', 'dir_slug' => 'portfolio-filter-gallery/portfolio-filter-gallery.php'),
2020
+ array('option_name' => 'jetpack', 'dir_slug' => 'jetpack/jetpack.php'),
2021
+ array('option_name' => 'gallery-options', 'dir_slug' => 'fancy-gallery/plugin.php'),
2022
+ array('option_name' => 'gallery-box-options.php', 'dir_slug' => 'gallery-box/gallery-box.php'),
2023
+ array('option_name' => 'catch-gallery', 'dir_slug' => 'catch-gallery/catch-gallery.php'),
2024
+ array('option_name' => 'galleries_grs', 'dir_slug' => 'limb-gallery/gallery-rs.php'),
2025
+ array('option_name' => 'wooswipe-options', 'dir_slug' => 'wooswipe/wooswipe.php'),
2026
+ array('option_name' => 'photoswipe-masonry.php', 'dir_slug' => 'photoswipe-masonry/photoswipe-masonry.php'),
2027
+ array('option_name' => 'maxgalleria-settings', 'dir_slug' => 'maxgalleria/maxgalleria-admin.php'),
2028
+ array('option_name' => 'Emg-whats-new', 'dir_slug' => 'easy-media-gallery/easy-media-gallery.php'),
2029
+ array('option_name' => 'wpffag_products', 'dir_slug' => 'flickr-album-gallery/flickr-album-gallery.php'),
2030
+ array('option_name' => 'foogallery-settings', 'dir_slug' => 'foogallery/foogallery.php'),
2031
+ array('option_name' => 'foogallery-settings', 'dir_slug' => 'foogallery/foogallery.php'),
2032
+ array('option_name' => 'modula', 'dir_slug' => 'modula-best-grid-gallery/Modula.php'),
2033
+ array('option_name' => 'robo-gallery-settings', 'dir_slug' => 'robo-gallery/robogallery.php'),
2034
+ );
2035
+ $sharecount_plugins = array(
2036
+ array("dir_slug" => "optinmonster/optin-monster-wp-api.php", 'option_name' => 'optin-monster-api-welcome'),
2037
+ array("dir_slug" => "floating-social-bar/floating-social-bar.php", 'option_name' => 'floating-social-bar'),
2038
+ array("dir_slug" => "tweet-old-post/tweet-old-post.php", 'option_name' => 'TweetOldPost'),
2039
+ array("dir_slug" => "wp-to-buffer/wp-to-buffer.php", 'option_name' => 'wp-to-buffer-settings'),
2040
+ array("dir_slug" => "wordpress-seo/wp-seo.php", 'option_name' => 'wpseo_dashboard'),
2041
+ array("dir_slug" => "intelly-related-posts/index.php", 'option_name' => 'intelly-related-posts'),
2042
+ array("dir_slug" => "wordpress-popular-posts/wordpress-popular-posts.php", 'option_name' => 'wordpress-popular-posts'),
2043
+ array("dir_slug" => "subscribe-to-comments-reloaded/subscribe-to-comments-reloaded.php", 'option_name' => 'stcr_options'),
2044
+ array("dir_slug" => "click-to-tweet-by-todaymade/tm-click-to-tweet.php", 'option_name' => 'tmclicktotweet'),
2045
+ array("dir_slug" => "fb-instant-articles/facebook-instant-articles.php", 'option_name' => 'instant-articles-wizard'),
2046
+ array("dir_slug" => "sharebar/sharebar.php", 'option_name' => 'Sharebar'),
2047
+ array("dir_slug" => "wp-to-twitter/wp-to-twitter.php", 'option_name' => 'wp-tweets-pro'),
2048
+ array("dir_slug" => "sem-bookmark-me/sem-bookmark-me.php", 'option_name' => ''),
2049
+ array("dir_slug" => "onlywire-bookmark-share-button/owbutton_wordpress.php", 'option_name' => 'onlywireoptions'),
2050
+ array("dir_slug" => "google-analyticator/google-analyticator.php", 'option_name' => 'google-analyticator'),
2051
+ array("dir_slug" => "getsocial/getsocial.php", 'option_name' => 'getsocial/getsocial.php'),
2052
+ array("dir_slug" => "visitors-traffic-real-time-statistics/Visitors-Traffic-Real-Time-Statistics.php", 'option_name' => 'ahc_hits_counter_menu_free'),
2053
+ array("dir_slug" => "microblog-poster/microblogposter.php", 'option_name' => 'microblogposter.php'),
2054
+ array("dir_slug" => "triberr-wordpress-plugin/triberr.php", 'option_name' => 'triberr-options'),
2055
+ array("dir_slug" => "social-networks-auto-poster-facebook-twitter-g/NextScripts_SNAP.php", 'option_name' => 'nxssnap-ntadmin'),
2056
+ array("dir_slug" => "all-in-one-seo-pack/all_in_one_seo_pack.php", 'option_name' => 'all-in-one-seo-pack/aioseop_class.php'),
2057
+ array("dir_slug" => "multi-rating/multi-rating.php", 'option_name' => 'mr_settings'),
2058
+ array("dir_slug" => "social-pug/index.php", 'option_name' => 'dpsp-social-pug'),
2059
+ array("dir_slug" => "comment-reply-email-notification/cren_plugin.php", 'option_name' => 'comment_reply_email_notification'),
2060
+ array("dir_slug" => "share-subscribe-contact-aio-widget/free_profitquery_aio_widgets.php", 'option_name' => 'free_profitquery_aio_widgets'),
2061
+ array("dir_slug" => "better-robots-txt/better-robots-txt.php", 'option_name' => 'better-robots-txt'),
2062
+ array("dir_slug" => "google-analytics-for-wordpress/googleanalytics.php", 'option_name' => 'monsterinsights_settings'),
2063
+ array("dir_slug" => "onesignal-free-web-push-notifications/onesignal-push", 'option_name' => 'onesignal-push'),
2064
+ array("dir_slug" => "access-watch/index.php", 'option_name' => 'access-watch-dashboard'),
2065
+
2066
+ );
2067
+ $optimization_plugins = array(
2068
+ array('dir_slug' => 'litespeed-cache/litespeed-cache.php', 'option_name' => 'lscache-settings'),
2069
+ array('dir_slug' => 'w3-total-cache/w3-total-cache.php', 'option_name' => 'w3tc_dashboard'),
2070
+ array('dir_slug' => 'wp-fastest-cache/wpFastestCache.php', 'option_name' => 'wpfastestcacheoptions'),
2071
+ array('dir_slug' => 'wp-optimize/wp-optimize.php', 'option_name' => 'WP-Optimize'),
2072
+ array('dir_slug' => 'autoptimize/autoptimize.php', 'option_name' => 'autoptimize'),
2073
+ array('dir_slug' => 'cache-enabler/cache-enabler.php', 'option_name' => 'cache-enabler'),
2074
+ array('dir_slug' => 'wp-super-cache/wp-cache.php', 'option_name' => 'wpsupercache'),
2075
+ array('dir_slug' => 'hummingbird-performance/wp-hummingbird.php', 'option_name' => 'wphb'),
2076
+ array('dir_slug' => 'breeze/breeze.php', 'option_name' => 'breeze'),
2077
+ array('dir_slug' => 'sg-cachepress/sg-cachepress.php', 'option_name' => 'sg-cachepress'),
2078
+ array('dir_slug' => 'wp-rest-cache/wp-rest-cache.php', 'option_name' => 'wp-rest-cache'),
2079
+ array('dir_slug' => 'fast-velocity-minify/fvm.php', 'option_name' => 'fastvelocity-min'),
2080
+ array('dir_slug' => 'hyper-cache/plugin.php', 'option_name' => 'hyper-cache/options.php'),
2081
+ array('dir_slug' => 'redis-cache/redis-cache.php', 'option_name' => 'redis-cache'),
2082
+ array('dir_slug' => 'varnish-page', 'option_name' => 'varnish-page'),
2083
+ array('dir_slug' => 'sns-count-cache/sns-count-cache.php', 'option_name' => 'scc-dashboard'),
2084
+ array('dir_slug' => 'harrys-gravatar-cache/harrys-gravatar-cache.php', 'option_name' => 'harrys-gravatar-cache-options'),
2085
+ array('dir_slug' => 'fv-gravatar-cache/fv-gravatar-cache.php', 'option_name' => 'fv-gravatar-cache'),
2086
+ array('dir_slug' => 'wpe-advanced-cache-options/wpe-advanced-cache.php', 'option_name' => 'cache-settings'),
2087
+ array('dir_slug' => 'simple-cache/simple-cache.php', 'option_name' => 'simple-cache'),
2088
+ array('dir_slug' => 'ezcache/ezcache.php', 'option_name' => 'ezcache'),
2089
+ array('dir_slug' => 'wp-cloudflare-page-cache/wp-cloudflare-super-page-cache.php', 'option_name' => 'wp-cloudflare-super-page-cache-index'),
2090
+ array('dir_slug' => 'optimum-gravatar-cache/optimum-gravatar-cache.php', 'option_name' => 'optimum-gravatar-cache'),
2091
+ array('dir_slug' => 'yasakani-cache/yasakani-cache.php', 'option_name' => 'yasakani-cache'),
2092
+ array('dir_slug' => 'cachify/cachify.php', 'option_name' => 'cachify'),
2093
+ array('dir_slug' => 'gator-cache/gator-cache.php', 'option_name' => 'gtr_cache'),
2094
+ array('dir_slug' => 'wp-speed-of-light/wp-speed-of-light.php', 'option_name' => 'wpsol_dashboard'),
2095
+ array('dir_slug' => 'wp-super-minify/wp-super-minify.php', 'option_name' => 'wp-super-minify'),
2096
+ array('dir_slug' => 'wsa-cachepurge/wsa-cachepurge.php', 'option_name' => 'wsa-cachepurge/lib/wsa-cachepurge_display.php'),
2097
+ array('dir_slug' => 'a2-optimized-wp/a2-optimized.php', 'option_name' => 'A2_Optimized_Plugin_admin'),
2098
+ array('dir_slug' => 'nitropack/main.php', 'option_name' => 'nitropack'),
2099
+ array('dir_slug' => 'swift-performance-lite/performance.php', 'option_name' => 'swift-performance'),
2100
+ array('dir_slug' => 'wp-performance/wp-performance.php', 'option_name' => 'wp-performance'),
2101
+ array('dir_slug' => 'arvancloud-cache-cleaner/Arvancloud.php', 'option_name' => 'ar_cache'),
2102
+ array('dir_slug' => 'clear-cache-for-widgets/clear-cache-for-widgets.php', 'option_name' => 'ccfm-options'),
2103
+ array('dir_slug' => 'wp-asset-clean-up/wpacu.php', 'option_name' => 'wpassetcleanup_settings'),
2104
+ array('dir_slug' => 'flying-pages/flying-pages.php', 'option_name' => 'flying-pages'),
2105
+ array('dir_slug' => 'speed-booster-pack/speed-booster-pack.php', 'option_name' => 'sbp-options'),
2106
+ array('dir_slug' => 'baqend/baqend.php', 'option_name' => 'baqend'),
2107
+ array('dir_slug' => 'wp-smushit/wp-smush.php', 'option_name' => 'smush')
2108
+ );
2109
+ $gdpr_plugins = array(
2110
+ array('dir_slug' => 'cookie-law-info/cookie-law-info.php', 'option_name' => 'cookie-law-info'),
2111
+ array('dir_slug' => 'complianz-gdpr/complianz-gpdr.php', 'option_name' => 'complianz'),
2112
+ array('dir_slug' => 'shapepress-dsgvo/sp-dsgvo.php', 'option_name' => 'sp-dsgvo'),
2113
+ array('dir_slug' => 'cookiebot/cookiebot.php', 'option_name' => 'cookiebot'),
2114
+ array('dir_slug' => 'gdpr-banner/gdpr-banner.php', 'option_name' => 'gdpr_banner'),
2115
+ array('dir_slug' => 'dsgvo-tools-cookie-hinweis-datenschutz/main.php', 'option_name' => 'fhw_dsgvo_cookies_options'),
2116
+ array('dir_slug' => 'ga-germanized/ga-germanized.php', 'option_name' => 'ga-germanized'),
2117
+ array('dir_slug' => 'cwis-antivirus-malware-detected/cwis-antivirus-malware-detected.php', 'option_name' => 'cwis-updater'),
2118
+ array('dir_slug' => 'luckywp-cookie-notice-gdpr/luckywp-cookie-notice-gdpr.php', 'option_name' => 'lwpcng_settings'),
2119
+ array('dir_slug' => 'ninja-gdpr-compliance/njt-gdpr.php', 'option_name' => 'njt-gdpr'),
2120
+ array('dir_slug' => 'gdpr-cookie-consent/gdpr-cookie-consent.php', 'option_name' => 'gdpr-cookie-consent'),
2121
+ array('dir_slug' => 'uniconsent-cmp/uniconsent-cmp.php', 'option_name' => 'unic-options'),
2122
+ array('dir_slug' => 'wplegalpages/wplegalpages.php', 'option_name' => 'legal-pages'),
2123
+ array('dir_slug' => 'smart-cookie-kit/plugin.php', 'option_name' => 'nmod_sck_graphics'),
2124
+ array('dir_slug' => 'cookie-information-consent-solution/cookie-information.php', 'option_name' => 'cookie-information'),
2125
+ array('dir_slug' => 'dsgvo-fur-die-schweiz/dsgvo-fur-die-schweiz.php', 'option_name' => 'dsgvo-admin'),
2126
+ array('dir_slug' => 'gdpr-cookies-pro/gdpr-cookies-pro.php', 'option_name' => 'gdpr-cookies-pro'),
2127
+ array('dir_slug' => 'seahorse-gdpr-data-manager/seahorse-gdpr-data-manager.php', 'option_name' => 'seahorse_gdpr_data_manager_plugin'),
2128
+ array('dir_slug' => 'dsgvo-tools-kommentar-ip-entfernen/main.php', 'option_name' => 'fhw_dsgvo_kommentar_options'),
2129
+ array('dir_slug' => 'gdpr-tools/gdpr-tools.php', 'option_name' => 'gdpr-tools-settings')
2130
+ );
2131
+ $google_analytics = array(
2132
+ array('dir_slug' => 'really-simple-ssl/rlrsssl-really-simple-ssl.php', 'option_name' => 'rlrsssl_really_simple_ssl'),
2133
+ array('dir_slug' => 'ssl-insecure-content-fixer/ssl-insecure-content-fixer.php', 'option_name' => 'ssl-insecure-content-fixer'),
2134
+ array('dir_slug' => 'https-redirection/https-redirection.php', 'option_name' => 'https-redirection'),
2135
+ array('dir_slug' => 'wordpress-https/wordpress-https.php', 'option_name' => 'wordpress-https'),
2136
+ array('dir_slug' => 'wp-force-ssl/wp-force-ssl.php', 'option_name' => 'wpfs-settings'),
2137
+ array('dir_slug' => 'sakura-rs-wp-ssl/sakura-rs-ssl.php', 'option_name' => 'sakura-admin-menu'),
2138
+ array('dir_slug' => 'wp-letsencrypt-ssl/wp-letsencrypt.php', 'option_name' => 'wp_encryption'),
2139
+ array('dir_slug' => 'ssl-zen/ssl_zen.php', 'option_name' => 'ssl_zen'),
2140
+ array('dir_slug' => 'one-click-ssl/ssl.php', 'option_name' => 'one-click-ssl'),
2141
+ array('dir_slug' => 'http-https-remover/http-https-remover.php', 'option_name' => 'httphttpsRemoval')
2142
+ );
2143
+
2144
+ $socialObj = new sfsi_SocialHelper();
2145
+ $current_url = site_url();
2146
+ $fb_data = $socialObj->sfsi_get_fb($current_url);
2147
+ $check_fb_count_more_than_one = $fb_data > 0 || $socialObj->sfsi_get_pinterest($current_url) > 0;
2148
+
2149
+
2150
+ // $sfsi_banner_global_firsttime_offer = unserialize(get_option('sfsi_banner_global_firsttime_offer', false));
2151
+ $sfsi_banner_global_pinterest = unserialize(get_option('sfsi_banner_global_pinterest', false));
2152
+ $sfsi_banner_global_social = unserialize(get_option('sfsi_banner_global_social', false));
2153
+ $sfsi_banner_global_load_faster = unserialize(get_option('sfsi_banner_global_load_faster', false));
2154
+ $sfsi_banner_global_shares = unserialize(get_option('sfsi_banner_global_shares', false));
2155
+ $sfsi_banner_global_gdpr = unserialize(get_option('sfsi_banner_global_gdpr', false));
2156
+ $sfsi_banner_global_http = unserialize(get_option('sfsi_banner_global_http', false));
2157
+ $sfsi_banner_global_upgrade = unserialize(get_option('sfsi_banner_global_upgrade', false));
2158
+
2159
+ // $sfsi_banner_global_firsttime_offer_criteria = true;
2160
+ $sfsi_banner_global_pinterest_criteria = ((sfsi_count_media_item() > 2) || (sfsi_pinterest_icon_shown()) || sfsi_has_gallery_plugin_activated($gallery_plugins));
2161
+ $sfsi_banner_global_social_criteria = sfsi_mobile_icons_shown();
2162
+ $sfsi_banner_global_load_faster_criteria = sfsi_has_cache_plugin_activated($optimization_plugins);
2163
+ $sfsi_banner_global_shares_criteria = sfsi_has_sharecount_plugin_activated($sharecount_plugins);
2164
+ $sfsi_banner_global_gdpr_criteria = sfsi_has_gdpr_plugin_activated($gdpr_plugins);
2165
+ $sfsi_banner_global_http_criteria = is_ssl() && $check_fb_count_more_than_one;
2166
+ // $sfsi_banner_global_http_criteria = true;
2167
+
2168
+
2169
+ $global_banners = array(
2170
+ array($sfsi_banner_global_social, 'sfsi_banner_global_social', $sfsi_banner_global_social_criteria),
2171
+ array($sfsi_banner_global_gdpr, 'sfsi_banner_global_gdpr', $sfsi_banner_global_gdpr_criteria),
2172
+ array($sfsi_banner_global_pinterest, 'sfsi_banner_global_pinterest', $sfsi_banner_global_pinterest_criteria),
2173
+ array($sfsi_banner_global_load_faster, 'sfsi_banner_global_load_faster', $sfsi_banner_global_load_faster_criteria),
2174
+ array($sfsi_banner_global_shares, 'sfsi_banner_global_shares', $sfsi_banner_global_shares_criteria),
2175
+ array($sfsi_banner_global_http, 'sfsi_banner_global_http', $sfsi_banner_global_http_criteria),
2176
+ );
2177
+ $global_banners_not_met_criteria = array(
2178
+ array($sfsi_banner_global_pinterest, 'sfsi_banner_global_pinterest', !(sfsi_count_media_item() > 2)),
2179
+ array($sfsi_banner_global_shares, 'sfsi_banner_global_shares', $sfsi_banner_global_shares_criteria),
2180
+ array($sfsi_banner_global_load_faster, 'sfsi_banner_global_load_faster', $sfsi_banner_global_load_faster_criteria),
2181
+ array($sfsi_banner_global_gdpr, 'sfsi_banner_global_gdpr', $sfsi_banner_global_gdpr_criteria),
2182
+ );
2183
+ $global_banner_criteria = array(
2184
+ $sfsi_banner_global_pinterest_criteria,
2185
+ $sfsi_banner_global_social_criteria,
2186
+ $sfsi_banner_global_load_faster_criteria,
2187
+ $sfsi_banner_global_shares_criteria,
2188
+ $sfsi_banner_global_gdpr_criteria,
2189
+ $sfsi_banner_global_http_criteria
2190
+ );
2191
+ // var_dump($global_banner_criteria);
2192
+
2193
+ $global_banner_criteria_true_count = count(array_keys($global_banner_criteria, true));
2194
+ $global_banner_appeared_true_count = 0;
2195
+
2196
+ $count = 0;
2197
+ $sfsi_present_time = strtotime(date('Y-m-d h:i:s'));
2198
+ $sfsi_install_time = (get_option('sfsi_installDate'));
2199
+ $sfsi_loyalty = get_option("sfsi_loyaltyDate");
2200
+ $sfsi_min_loyalty_time = date('Y-m-d H:i:s', strtotime($sfsi_install_time . $sfsi_loyalty));
2201
+ $sfsi_round_one_added = false;
2202
+ foreach ($global_banners as $key => $global_banner) {
2203
+
2204
+ if ($sfsi_present_time >= strtotime($global_banner[0]['timestamp']) || ($global_banner[0]['timestamp'] == "")) {
2205
+ // var_dump("round1",$global_banner[1]);
2206
+
2207
+ if ($global_banner[0]['met_criteria'] == "yes") {
2208
+ $count = $count + 1;
2209
+ }
2210
+ if ($global_banner[0]['banner_appeared'] == "yes") {
2211
+ $global_banner_appeared_true_count = $global_banner_appeared_true_count + 1;
2212
+ }
2213
+ if ($global_banner[0]['met_criteria'] == "no" && $global_banner[0]['banner_appeared'] == "no" && $global_banner[0]['is_active'] == "no" && $global_banner[2] == true) {
2214
+ // var_dump('met criteria');
2215
+ $todaysdate = date("Y-m-d h:i:s");
2216
+ $showNextBanner = get_option('sfsi_showNextBannerDate');
2217
+ if ($todaysdate >= $sfsi_min_loyalty_time && $sfsi_banner_global_upgrade['met_criteria'] == "no") {
2218
+ $date = date('Y-m-d H:i:s', strtotime($todaysdate . $showNextBanner));
2219
+ $update_banner_status = array(
2220
+ 'met_criteria' => "yes",
2221
+ 'is_active' => "yes",
2222
+ 'timestamp' => $date
2223
+ );
2224
+ update_option('sfsi_banner_global_upgrade', serialize($update_banner_status));
2225
+ break;
2226
+ }
2227
+ $date = date('Y-m-d H:i:s', strtotime($todaysdate . $showNextBanner));
2228
+ $update_banner_status = array(
2229
+ 'met_criteria' => "yes",
2230
+ 'banner_appeared' => "yes",
2231
+ 'is_active' => "yes",
2232
+ 'timestamp' => $date
2233
+ );
2234
+ update_option($global_banner[1], serialize($update_banner_status));
2235
+ $sfsi_round_one_added = true;
2236
+
2237
+ break;
2238
+ }
2239
+ }
2240
+ }
2241
+
2242
+ $global_banners_filters = array_filter($global_banners_not_met_criteria, function ($global_banner) {
2243
+ return ($global_banner[2] == false && $global_banner[0]['met_criteria'] == "no" && $global_banner[0]['banner_appeared'] == "no" && $global_banner[0]['is_active'] == "no");
2244
+ });
2245
+ $global_banners_criteria_filters = array_filter($global_banners, function ($global_banner) {
2246
+ return ($global_banner[2] == true && $global_banner[0]['met_criteria'] == "no" && $global_banner[0]['banner_appeared'] == "no" && $global_banner[0]['is_active'] == "no");
2247
+ });
2248
+ // var_dump("round one added",$sfsi_round_one_added);
2249
+ if (false === $sfsi_round_one_added) {
2250
+ foreach ($global_banners_filters as $key => $global_banners_filter) {
2251
+ // if ($count >= $global_banner_criteria_true_count) {
2252
+ // var_dump('round2', $global_banners_filter);
2253
+ if ($global_banners_filter[0]['met_criteria'] == "no" && $global_banners_filter[0]['banner_appeared'] == "no" && $global_banners_filter[0]['is_active'] == "no" && $global_banners_filter[2] == false) {
2254
+ $todaysdate = date("Y-m-d h:i:s");
2255
+ $showNextBanner = get_option('sfsi_showNextBannerDate');
2256
+ if ($todaysdate >= $sfsi_min_loyalty_time && $sfsi_banner_global_upgrade['met_criteria'] == "no") {
2257
+ $date = date('Y-m-d H:i:s', strtotime($todaysdate . $showNextBanner));
2258
+ $update_banner_status = array(
2259
+ 'met_criteria' => "yes",
2260
+ 'is_active' => "yes",
2261
+ 'timestamp' => $date
2262
+ );
2263
+ update_option('sfsi_banner_global_upgrade', serialize($update_banner_status));
2264
+ break;
2265
+ }
2266
+ $date = date('Y-m-d H:i:s', strtotime($todaysdate . $showNextBanner));
2267
+ $update_banner_status = array(
2268
+ 'met_criteria' => "no",
2269
+ 'banner_appeared' => "yes",
2270
+ 'is_active' => "yes",
2271
+ 'timestamp' => $date
2272
+ );
2273
+ update_option($global_banners_filter[1], serialize($update_banner_status));
2274
+ break;
2275
+ }
2276
+ // }
2277
+ }
2278
+ }
2279
+ if (empty($global_banners_filters ) && empty($global_banners_criteria_filters)) {
2280
+ foreach ($global_banners as $key => $global_banner) {
2281
+
2282
+ $todaysdate = date("Y-m-d h:i:s");
2283
+ $cycleDate = get_option('sfsi_cycleDate');
2284
+
2285
+ $date_plus_180 = date('Y-m-d H:i:s', strtotime($todaysdate . $cycleDate));
2286
+ $update_banner_status = array(
2287
+ 'met_criteria' => "no",
2288
+ 'banner_appeared' => "no",
2289
+ 'is_active' => "no",
2290
+ 'timestamp' => $date_plus_180,
2291
+ );
2292
+ update_option($global_banner[1], serialize($update_banner_status));
2293
+ }
2294
+ foreach ($global_banners as $key => $global_banner) {
2295
+ if ($global_banner[2] == true) {
2296
+ $update_banner_status = array(
2297
+ 'met_criteria' => "yes",
2298
+ 'banner_appeared' => "yes",
2299
+ 'is_active' => "yes",
2300
+ 'timestamp' => $date_plus_180,
2301
+ );
2302
+ update_option($global_banner[1], serialize($update_banner_status));
2303
+ break;
2304
+ }
2305
+ }
2306
+ if ($global_banner_criteria_true_count == 0) {
2307
+ foreach ($global_banners_not_met_criteria as $key => $global_banner) {
2308
+ $update_banner_status = array(
2309
+ 'met_criteria' => "no",
2310
+ 'banner_appeared' => "yes",
2311
+ 'is_active' => "yes",
2312
+ 'timestamp' => $date_plus_180,
2313
+ );
2314
+ // var_dump($global_banners_not_met_criteria,'kfdjgkdsfgndfkngn isdfhgi hsdfg idhfguidfi');
2315
+ if ($global_banner[2] == false) {
2316
+ update_option($global_banner[1], serialize($update_banner_status));
2317
+ break;
2318
+ }
2319
+ }
2320
+ }
2321
+ }
2322
+ // return false;
2323
+ }
2324
+
2325
+ function sfsi_count_media_item()
2326
+ {
2327
+ $query_img_args = array(
2328
+ 'post_type' => 'attachment',
2329
+ 'post_mime_type' => array(
2330
+ 'jpg|jpeg|jpe' => 'image/jpeg',
2331
+ 'gif' => 'image/gif',
2332
+ 'png' => 'image/png',
2333
+ ),
2334
+ 'post_status' => 'inherit',
2335
+ 'posts_per_page' => -1,
2336
+ );
2337
+ $query_img = new WP_Query($query_img_args);
2338
+ return $query_img->post_count;
2339
+ }
2340
+ function sfsi_pinterest_icon_shown()
2341
+ {
2342
+ $sfsi_section1 = unserialize(get_option('sfsi_section1_options', false));
2343
+ $option9 = unserialize(get_option('sfsi_section9_options', false));
2344
+ $option6 = unserialize(get_option('sfsi_section6_options', false));
2345
+ // var_dump($option9["sfsi_icons_float"]);
2346
+ // var_dump($option9["sfsi_show_via_widget"]);
2347
+ // var_dump($option9["sfsi_show_via_shortcode"]);
2348
+ // var_dump($sfsi_section1["sfsi_pinterest_display"]);
2349
+ // var_dump($option6["sfsi_show_Onposts"]);
2350
+ // var_dump($option6["sfsi_rectpinit"]);
2351
+ // var_dump($option9["sfsi_show_via_afterposts"]);
2352
+ //check if icons are displayed
2353
+ if (
2354
+ (
2355
+ (
2356
+ (isset($option9["sfsi_icons_float"]) && $option9["sfsi_icons_float"] == "yes") || (isset($option9["sfsi_show_via_widget"]) && $option9["sfsi_show_via_widget"] == "yes") || (isset($option9["sfsi_show_via_shortcode"]) && $option9["sfsi_show_via_shortcode"] == "yes")) &&
2357
+ $sfsi_section1["sfsi_pinterest_display"] == "yes") || (isset($option9["sfsi_show_via_afterposts"]) &&
2358
+ $option9["sfsi_show_via_afterposts"] == "yes" &&
2359
+ $option6["sfsi_show_Onposts"] == "yes" &&
2360
+ $option6["sfsi_rectpinit"] == "yes")
2361
+ ) {
2362
+ return true;
2363
+ }
2364
+ return false;
2365
+ }
2366
+ function sfsi_mobile_icons_shown()
2367
+ {
2368
+ /// check if mobile icons are shown and mobile icons are present on the homepage.
2369
+ $sfsi_section9 = unserialize(get_option('sfsi_section9_options', false));
2370
+ if ($sfsi_section9['sfsi_disable_floaticons'] == "yes") {
2371
+ return true;
2372
+ }
2373
+ return false;
2374
+ }
2375
+ function sfsi_has_cache_plugin_activated($optimization_plugins)
2376
+ {
2377
+ $sfsi_optimization_plugin_active = array();
2378
+ foreach ($optimization_plugins as $key => $optimization_plugin) {
2379
+ $sfsi_optimization_plugin_active[$key] = is_plugin_active($optimization_plugin['dir_slug']);
2380
+ }
2381
+ $check_optimization_plugin_active_is_true = in_array(true, $sfsi_optimization_plugin_active);
2382
+ return $check_optimization_plugin_active_is_true;
2383
+ }
2384
+
2385
+ function sfsi_has_sharecount_plugin_activated($sharecount_plugins)
2386
+ {
2387
+ $sfsi_sharecount_plugin_active = array();
2388
+ foreach ($sharecount_plugins as $key => $sharecount_plugin) {
2389
+ $sfsi_sharecount_plugin_active[$key] = is_plugin_active($sharecount_plugin['dir_slug']);
2390
+ }
2391
+ $check_sharecount_plugin_active_is_true = in_array(true, $sfsi_sharecount_plugin_active);
2392
+ return $check_sharecount_plugin_active_is_true;
2393
+ }
2394
+
2395
+ function sfsi_has_gdpr_plugin_activated($gdpr_plugins)
2396
+ {
2397
+ $sfsi_gdpr_plugin_active = array();
2398
+ foreach ($gdpr_plugins as $key => $gdpr_plugin) {
2399
+ $sfsi_gdpr_plugin_active[$key] = is_plugin_active($gdpr_plugin['dir_slug']);
2400
+ }
2401
+ $check_gdpr_plugin_active_is_true = in_array(true, $sfsi_gdpr_plugin_active);
2402
+ return $check_gdpr_plugin_active_is_true;
2403
+ }
2404
+
2405
+ function sfsi_has_gallery_plugin_activated($gallery_plugins)
2406
+ {
2407
+ $sfsi_gallery_plugin_active = array();
2408
+ foreach ($gallery_plugins as $key => $gallery_plugin) {
2409
+ $sfsi_gallery_plugin_active[$key] = is_plugin_active($gallery_plugin['dir_slug']);
2410
+ }
2411
+ $check_gallery_plugin_active_is_true = in_array(true, $sfsi_gallery_plugin_active);
2412
+ return $check_gallery_plugin_active_is_true;
2413
+ }
2414
+
2415
  ?>
views/sfsi_global_banners.php ADDED
@@ -0,0 +1,284 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!------------------------------------------------------ Global Banners ----------------------------------------------------------->
2
+ <?php
3
+ // sfsi_has_gdpr_plugin_activated($gdpr_plugins);
4
+ if (!is_plugin_active('Ultimate-Premium-Plugin/usm_premium_icons.php')) {
5
+ $sfsi_banner_global_firsttime_offer = unserialize(get_option('sfsi_banner_global_firsttime_offer', false));
6
+ $sfsi_banner_global_pinterest = unserialize(get_option('sfsi_banner_global_pinterest', false));
7
+ $sfsi_banner_global_social = unserialize(get_option('sfsi_banner_global_social', false));
8
+ $sfsi_banner_global_load_faster = unserialize(get_option('sfsi_banner_global_load_faster', false));
9
+ $sfsi_banner_global_shares = unserialize(get_option('sfsi_banner_global_shares', false));
10
+ $sfsi_banner_global_gdpr = unserialize(get_option('sfsi_banner_global_gdpr', false));
11
+ $sfsi_banner_global_http = unserialize(get_option('sfsi_banner_global_http', false));
12
+ $sfsi_banner_global_upgrade = unserialize(get_option('sfsi_banner_global_upgrade', false));
13
+
14
+ // var_dump(
15
+ // $sfsi_banner_global_firsttime_offer,
16
+ // $sfsi_banner_global_pinterest,
17
+ // $sfsi_banner_global_social,
18
+ // $sfsi_banner_global_load_faster,
19
+ // $sfsi_banner_global_shares,
20
+ // $sfsi_banner_global_gdpr,
21
+ // $sfsi_banner_global_http,
22
+ // $sfsi_banner_global_upgrade
23
+ // );
24
+
25
+ $sfsi_install_time = strtotime(get_option('sfsi_installDate'));
26
+ $sfsi_max_show_time = $sfsi_install_time + (60 * 60);
27
+ $sfsi_current_time = (date('Y-m-d h:i:s'));
28
+
29
+ $sfsi_loyalty = get_option("sfsi_loyaltyDate");
30
+
31
+ $sfsi_min_loyalty_time = date('Y-m-d H:i:s', strtotime($sfsi_loyalty . get_option('sfsi_installDate')));
32
+
33
+
34
+ $socialObj = new sfsi_SocialHelper();
35
+ $current_url = site_url();
36
+ $fb_data = $socialObj->sfsi_get_fb($current_url);
37
+ $check_fb_count_more_than_one = $fb_data > 0 || $socialObj->sfsi_get_pinterest($current_url) > 0;
38
+
39
+
40
+
41
+ if (
42
+ $sfsi_banner_global_firsttime_offer['is_active'] == "yes"
43
+ ) {
44
+ if ($sfsi_max_show_time >= strtotime(date('Y-m-d h:i:s')) && (!sfsi_check_not_show_other_plugin_settings_page($gallery_plugins, $optimization_plugins, $sharecount_plugins, $google_analytics, $gdpr_plugins))) :
45
+ ?>
46
+ <!---------------New installs discount--------------->
47
+ <div id="sfsi_firsttime_offer" class="sfsi_new_prmium_follw sfsi_banner_body">
48
+ <div>
49
+ <p style="margin-bottom: 12px !important;">You seem to have installed the Ultimate Social media plugin for the first time – Thank you & Welcome!</p>
50
+ <p style="font-size:18px !important">
51
+ For newbies we have a special offer: get the Premium Plugin within the next <span class='sfsi_new_premium_counter'><?php echo ceil(($sfsi_max_show_time - strtotime(date('Y-m-d h:i:s'))) / 60) ?></span> minutes and benefit from a discount of 30%! <a href="https://www.ultimatelysocial.com/usm-premium/?withqp=1&discount=NEWINSTALL&utm_source=usmi_global&utm_campaign=new_installs&utm_medium=banner" class="sfsi_font_inherit" target="_blank" style="color:#1a1d20 !important;font-weight: bold;"><span>&#10151;</span> <span style="text-decoration: underline;">Get it now</span></a>
52
+ </p>
53
+ </div>
54
+ <div style="text-align:right;">
55
+
56
+ <form method="post" class="sfsi_premiumNoticeDismiss" style="padding-bottom:8px;">
57
+
58
+ <input type="hidden" name="sfsi-banner-global-firsttime-offer" value="true">
59
+ <input type="submit" name="dismiss" value="Dismiss" />
60
+
61
+ </form>
62
+
63
+ </div>
64
+ </div>
65
+ <script>
66
+ window.sfsi_firsttime_timerstart = <?php echo ceil(($sfsi_max_show_time - strtotime(date('Y-m-d h:i:s'))) / 60) ?>;
67
+ window.sfsi_firsttime_timerId = window.setInterval(function() {
68
+ if (window.sfsi_firsttime_timerstart <= 0) {
69
+ var sfsi_firsttime_offer_banners = document.getElementsByClassName("sfsi_firsttime_offer");
70
+ if (sfsi_firsttime_offer_banners.length > 0) {
71
+ sfsi_firsttime_offer_banners[0].style.display = "none";
72
+ window.clearInterval(window.sfsi_firsttime_timerstart);
73
+ }
74
+ } else {
75
+ var counters = document.getElementsByClassName("sfsi_new_premium_counter");
76
+ if (counters.length > 0) {
77
+ var counter = counters[0];
78
+ window.sfsi_firsttime_timerstart = window.sfsi_firsttime_timerstart - 1;
79
+ counter.innerText = window.sfsi_firsttime_timerstart;
80
+ }
81
+ }
82
+ }, 60 * 1000);
83
+ </script>
84
+ <!---------------End New installs discount--------------->
85
+ <?php endif;
86
+ }
87
+ ?>
88
+
89
+ <!--------------- Show Pinterest on mouse-over--------------->
90
+ <?php
91
+
92
+
93
+ if (sfsi_check_banner_criteria($sfsi_banner_global_pinterest, $gallery_plugins, $optimization_plugins, $sharecount_plugins, $google_analytics, $gdpr_plugins, $sfsi_current_time)) { ?>
94
+ <div class="sfsi_new_prmium_follw sfsi_banner_body">
95
+ <div>
96
+ <p style="margin-bottom: 12px !important;"><b>Get more traffic from your pictures </b>– The Ultimate Social Media Premium Plugin allows to show a Pinterest save-icon after users move over your pictures, increasing sharing activity significantly.
97
+ <a href="https://www.ultimatelysocial.com/usm-premium/?withqp=1&discount=PINTERESTICON&utm_source=usmi_global&utm_campaign=pinterest_on_mouse_over&utm_medium=banner" class="sfsi_font_inherit" target="_blank" style="color:#1a1d20 !important;font-weight: bold;"><span>&#10151;</span> <span style="text-decoration: underline;"></span> <span style="text-decoration: underline;">Get it now at 20% discount</span></a>
98
+ </p>
99
+ </div>
100
+
101
+ <div style="text-align:right;">
102
+
103
+ <form method="post" class="sfsi_premiumNoticeDismiss" style="padding-bottom:8px;">
104
+
105
+ <input type="hidden" name="sfsi-banner-global-pinterest" value="true">
106
+
107
+ <input type="submit" name="dismiss" value="Dismiss" />
108
+
109
+ </form>
110
+
111
+ </div>
112
+ </div>
113
+ <?php
114
+ }
115
+ ?>
116
+ <!---------------End Show Pinterest on mouse-over--------------->
117
+
118
+ <!--------------- Show Icons don’t show on mobile--------------->
119
+ <?php
120
+
121
+ if (sfsi_check_banner_criteria($sfsi_banner_global_social, $gallery_plugins, $optimization_plugins, $sharecount_plugins, $google_analytics, $gdpr_plugins, $sfsi_current_time)) { ?>
122
+ <div class="sfsi_new_prmium_follw sfsi_banner_body sfsi_warning_banner">
123
+ <div>
124
+ <p style="margin-bottom: 12px !important;">Your social media & sharing icons<b> don’t seem to show on mobile.</b> If you want to increase sharing & traffic to your site it is very important that they do (>50% of traffic is from mobile). </p>
125
+ <p style="font-size:18px !important">
126
+ Please go to the <a href="<?php echo admin_url('/admin.php?page=sfsi-options'); ?>" class="sfsi_font_inherit" target="_blank" style="color:#1a1d20 !important;text-decoration: underline;"><span></span> Ultimate Social Media plugin page</a> and ensure you made the right selections. If they still don’t show it could be an issue with your theme. Our premium plugin allows to place the icons separately for mobile, which always fixes this issue. <a href="https://www.ultimatelysocial.com/usm-premium/?withqp=1&discount=MOBILEICONS&utm_source=usmi_global&utm_campaign=mobile_icons_banner&utm_medium=banner" class="sfsi_font_inherit" target="_blank" style="color:#1a1d20 !important;font-weight: bold;"><span>&#10151;</span> <span style="text-decoration: underline;"></span> <span style="text-decoration: underline;">Get it now at 20% discount</span></a>
127
+ </p>
128
+ </div>
129
+ <div style="text-align:right;">
130
+
131
+ <form method="post" class="sfsi_premiumNoticeDismiss" style="padding-bottom:8px;">
132
+
133
+ <input type="hidden" name="sfsi-banner-global-social" value="true">
134
+
135
+ <input type="submit" name="dismiss" value="Dismiss" />
136
+
137
+ </form>
138
+
139
+ </div>
140
+ </div>
141
+ <?php
142
+ }
143
+ ?>
144
+ <!---------------End Show Icons don’t show on mobile--------------->
145
+
146
+ <!--------------- Improve your website speed--------------->
147
+ <?php
148
+ if (sfsi_check_banner_criteria($sfsi_banner_global_load_faster, $gallery_plugins, $optimization_plugins, $sharecount_plugins, $google_analytics, $gdpr_plugins, $sfsi_current_time)) {
149
+ ?>
150
+ <div class="sfsi_new_prmium_follw sfsi_banner_body">
151
+ <div>
152
+ <p style="font-size:18px !important">
153
+ <b>Make your website load faster</b> – the Ultimate Social Media Premium Plugin is the most optimized sharing plugin for speed. It also includes support to help you optimize it for minimizing loading time.<a href="https://www.ultimatelysocial.com/usm-premium/?withqp=1&discount=IMPROVESPEED&utm_source=usmi_global&utm_campaign=improve_website_speed&utm_medium=banner" class="sfsi_font_inherit" target="_blank" style="color:#1a1d20 !important;font-weight: bold;"><span>&#10151;</span> <span style="text-decoration: underline;"></span> <span style="text-decoration: underline;">Get it now at 20% discount</span></a>
154
+ </p>
155
+ </div>
156
+ <div style="text-align:right;">
157
+
158
+ <form method="post" class="sfsi_premiumNoticeDismiss" style="padding-bottom:8px;">
159
+
160
+ <input type="hidden" name="sfsi-banner-global-load_faster" value="true">
161
+
162
+ <input type="submit" name="dismiss" value="Dismiss" />
163
+
164
+ </form>
165
+
166
+ </div>
167
+ </div>
168
+ <?php
169
+ }
170
+ ?>
171
+ <!---------------End Improve your website speed--------------->
172
+
173
+ <!--------------- Get more traffic--------------->
174
+ <?php
175
+ if (sfsi_check_banner_criteria($sfsi_banner_global_shares, $gallery_plugins, $optimization_plugins, $sharecount_plugins, $google_analytics, $gdpr_plugins, $sfsi_current_time)) { ?>
176
+ <div class="sfsi_new_prmium_follw sfsi_banner_body">
177
+ <div>
178
+ <p style="font-size:18px !important">
179
+ <b>Get 20%+ more traffic </b> from more likes & shares with the Ultimatelysocial Premium Plugin. Or get a refund within 20 days. <a href="https://www.ultimatelysocial.com/usm-premium/?withqp=1&discount=MORETRAFFIC2&utm_source=usmi_global&utm_campaign=more_traffic&utm_medium=banner" class="sfsi_font_inherit" target="_blank" style="color:#1a1d20 !important;font-weight: bold;"><span>&#10151;</span> <span style="text-decoration: underline;"></span> <span style="text-decoration: underline;">Get it now at 20% discount</span></a>
180
+ </p>
181
+ </div>
182
+ <div style="text-align:right;">
183
+
184
+ <form method="post" class="sfsi_premiumNoticeDismiss" style="padding-bottom:8px;">
185
+
186
+ <input type="hidden" name="sfsi-banner-global-shares" value="true">
187
+
188
+ <input type="submit" name="dismiss" value="Dismiss" />
189
+
190
+ </form>
191
+
192
+ </div>
193
+ </div>
194
+ <?php
195
+ }
196
+ ?>
197
+ <!---------------End Get more traffic--------------->
198
+
199
+ <!--------------- GDPR compliance--------------->
200
+ <?php
201
+
202
+ if (sfsi_check_banner_criteria($sfsi_banner_global_gdpr, $gallery_plugins, $optimization_plugins, $sharecount_plugins, $google_analytics, $gdpr_plugins, $sfsi_current_time)) { ?>
203
+ <div class="sfsi_new_prmium_follw sfsi_banner_body">
204
+ <div>
205
+ <p style="margin-bottom: 12px !important;"><b>Make sure your social media icons are GDPR compliant. </b> You are using the Ultimate Social Media Plugin – see more information about GDPR <a href="http://ultimatelysocial.com/gdpr/?utm_source=usmi_global&utm_campaign=gdpr_page&utm_medium=banner" style="color:#1a1d20 !important;text-decoration: underline;">here</a></p>
206
+ <p style="font-size:18px !important">
207
+ If you don’t want to check GDPR compliance yourself: As part of the Ultimate Social Media <a href="https://www.ultimatelysocial.com/usm-premium/?utm_source=usmi_global&discount=GDPRCOMPLIANCE2&utm_campaign=gdpr&utm_medium=banner" target="_blank" style="color:#1a1d20 !important;text-decoration: underline;"> Premium Plugin</a> a GDPR review is done for you (at no extra charge) <a href="https://www.ultimatelysocial.com/usm-premium/?withqp=1&discount=GDPRCOMPLIANCE2&utm_source=usmi_global&utm_campaign=gdpr&utm_medium=banner" class="sfsi_font_inherit" target="_blank" style="color:#1a1d20 !important;font-weight: bold;"><span>&#10151;</span> <span style="text-decoration: underline;"></span> <span style="text-decoration: underline;">Get it now</span></a>
208
+ </p>
209
+ </div>
210
+ <div style="text-align:right;">
211
+
212
+ <form method="post" class="sfsi_premiumNoticeDismiss" style="padding-bottom:8px;">
213
+
214
+ <input type="hidden" name="sfsi-banner-global-gdpr" value="true">
215
+
216
+ <input type="submit" name="dismiss" value="Dismiss" />
217
+
218
+ </form>
219
+
220
+ </div>
221
+ </div>
222
+ <?php
223
+ }
224
+ ?>
225
+ <!---------------End GDPR compliance--------------->
226
+
227
+ <!--------------- Share counts--------------->
228
+
229
+ <?php
230
+ if (sfsi_check_banner_criteria($sfsi_banner_global_http, $gallery_plugins, $optimization_plugins, $sharecount_plugins, $google_analytics, $gdpr_plugins, $sfsi_current_time)) { ?>
231
+ <div class="sfsi_new_prmium_follw sfsi_banner_body">
232
+ <div>
233
+ <p style="margin-bottom: 12px !important;"><b>Important: </b> Your website used to be on http (before you enabled an SSL certificate to switch to https). We found share counts for your URLs on http which usually get lost after switch to https (because Facebook etc. provide the counts per url, and an url on https is a different url then one on http).<b> We found a solution for that </b> so that your share counts on http and https will be aggregated and your full number of share counts is restored. It is implemented in the Premium Plugin – <a href="https://www.ultimatelysocial.com/usm-premium/?withqp=1&discount=SHARECOUNTS&utm_source=usmi_global&utm_campaign=share_counts_banner&utm_medium=banner" class="sfsi_font_inherit" target="_blank" style="color:#1a1d20 !important;font-weight: bold;"><span></span> <span style="text-decoration: underline;"></span> <span style="text-decoration: underline;">Get it now at 20% discount</span></a></p>
234
+ </div>
235
+ <div style="text-align:right;">
236
+
237
+ <form method="post" class="sfsi_premiumNoticeDismiss" style="padding-bottom:8px;">
238
+
239
+ <input type="hidden" name="sfsi-banner-global-http" value="true">
240
+
241
+ <input type="submit" name="dismiss" value="Dismiss" />
242
+
243
+ </form>
244
+
245
+ </div>
246
+ </div>
247
+ <?php
248
+ }
249
+ ?>
250
+ <!---------------End Share counts--------------->
251
+
252
+ <!--------------- Loyalty discount--------------->
253
+ <?php
254
+ if (sfsi_check_banner_criteria($sfsi_banner_global_upgrade, $gallery_plugins, $optimization_plugins, $sharecount_plugins, $google_analytics, $gdpr_plugins, $sfsi_current_time) && $sfsi_current_time >= $sfsi_min_loyalty_time) {
255
+
256
+ ?>
257
+ <div class="sfsi_new_prmium_follw sfsi_banner_body">
258
+ <div>
259
+ <p style="margin-bottom: 12px !important;">You’ve been using the Ultimate Social media plugin for <b>over half a year</b>. That’s a long time!</p>
260
+ <p style="font-size:18px !important">
261
+ Why not give yourself a treat and upgrade to premium? It has <a href="https://www.ultimatelysocial.com/usm-premium/?utm_source=usmi_global&utm_campaign=loyalty_banner&utm_medium=banner" class="sfsi_font_inherit" target="_blank" style="color:#1a1d20 !important;text-decoration: underline;"><span></span> tons of benefits</a>. As a THANK YOU for your loyalty we’re happy to give you a <b>20% discount</b>.
262
+ <a href="https://www.ultimatelysocial.com/usm-premium/?withqp=1&discount=LOYALTYDISCOUNT&utm_source=usmi_global&utm_campaign=loyalty_banner&utm_medium=banner" class="sfsi_font_inherit" target="_blank" style="color:#1a1d20 !important;text-decoration: underline;"><span></span> Apply it now</a>
263
+ </p>
264
+ </div>
265
+ <!-- https://www.ultimatelysocial.com/usm-premium/?withqp=1&discount=20&utm_source=usmi_global&utm_campaign=loyalty_banner&utm_medium=banner -->
266
+ <div style="text-align:right;">
267
+
268
+ <form method="post" class="sfsi_premiumNoticeDismiss" style="padding-bottom:8px;">
269
+
270
+ <input type="hidden" name="sfsi-banner-global-upgrade" value="true">
271
+
272
+ <input type="submit" name="dismiss" value="Dismiss" />
273
+
274
+ </form>
275
+
276
+ </div>
277
+ </div>
278
+ <?php
279
+ }
280
+ }
281
+ ?>
282
+ <!---------------End Loyalty discount--------------->
283
+
284
+ <!------------------------------------------------------End Global Banners ----------------------------------------------------------->
views/sfsi_option_view2.php CHANGED
@@ -127,7 +127,7 @@ $option2['sfsi_ok_pageURL'] = (isset($option2['sfsi_ok_pageURL']
127
  ? esc_url($option2['sfsi_ok_pageURL'])
128
  : '';
129
 
130
- if ("name" == $option2['sfsi_youtubeusernameorid'] && isset($option2['sfsi_youtubeusernameorid']) && !empty($option2['sfsi_youtubeusernameorid'])) {
131
 
132
  if (isset($option2['sfsi_ytube_user']) && !empty($option2['sfsi_ytube_user'])) {
133
  $option2['sfsi_ytube_user'] = sfsi_sanitize_field($option2['sfsi_ytube_user']);
@@ -136,7 +136,7 @@ if ("name" == $option2['sfsi_youtubeusernameorid'] && isset($option2['sfsi_youtu
136
  }
137
  }
138
 
139
- if ("id" == $option2['sfsi_youtubeusernameorid'] && isset($option2['sfsi_youtubeusernameorid']) && !empty($option2['sfsi_youtubeusernameorid'])) {
140
 
141
  if (isset($option2['sfsi_ytube_chnlid']) && !empty($option2['sfsi_ytube_chnlid'])) {
142
  $option2['sfsi_ytube_chnlid'] = sfsi_sanitize_field($option2['sfsi_ytube_chnlid']);
@@ -219,7 +219,7 @@ if ("id" == $option2['sfsi_youtubeusernameorid'] && isset($option2['sfsi_youtube
219
  <input type="email" name="email" value="<?php echo bloginfo('admin_email'); ?>" />
220
  </div>
221
  <div class='sfsi_more_services_link'>
222
- <a href="javascript:;" id="sfsi_getMeFullAccess" title="Give me access" data-nonce-fetch-feed-id="<?php echo wp_create_nonce( 'sfsi_get_feed_id' );?>" >
223
  Click here to benefit from all advantages >
224
  </a>
225
  </div>
@@ -294,12 +294,12 @@ if ("id" == $option2['sfsi_youtubeusernameorid'] && isset($option2['sfsi_youtube
294
  <!--Adding Code for Channel Id and Channel Name-->
295
  <div class="cstmutbewpr">
296
  <ul class="enough_waffling">
297
- <li onclick="showhideutube(this);"><input name="sfsi_youtubeusernameorid" <?php echo ($option2['sfsi_youtubeusernameorid'] == 'name') ? 'checked="true"' : ''; ?> type="radio" value="name" class="styled" /><label>User Name</label></li>
298
- <li onclick="showhideutube(this);"><input name="sfsi_youtubeusernameorid" <?php echo ($option2['sfsi_youtubeusernameorid'] == 'id') ? 'checked="true"' : ''; ?> type="radio" value="id" class="styled" /><label>Channel Id</label></li>
299
  </ul>
300
  <div class="cstmutbtxtwpr">
301
  <?php
302
- $sfsi_youtubeusernameorid = $option2['sfsi_youtubeusernameorid'];
303
  ?>
304
  <div class="cstmutbchnlnmewpr" <?php if ($sfsi_youtubeusernameorid != 'id') {
305
  echo 'style="display: block;"';
127
  ? esc_url($option2['sfsi_ok_pageURL'])
128
  : '';
129
 
130
+ if ( isset($option2['sfsi_youtubeusernameorid']) && "name" == $option2['sfsi_youtubeusernameorid'] && !empty($option2['sfsi_youtubeusernameorid'])) {
131
 
132
  if (isset($option2['sfsi_ytube_user']) && !empty($option2['sfsi_ytube_user'])) {
133
  $option2['sfsi_ytube_user'] = sfsi_sanitize_field($option2['sfsi_ytube_user']);
136
  }
137
  }
138
 
139
+ if ( isset($option2['sfsi_youtubeusernameorid']) && "id" == $option2['sfsi_youtubeusernameorid'] && !empty($option2['sfsi_youtubeusernameorid'])) {
140
 
141
  if (isset($option2['sfsi_ytube_chnlid']) && !empty($option2['sfsi_ytube_chnlid'])) {
142
  $option2['sfsi_ytube_chnlid'] = sfsi_sanitize_field($option2['sfsi_ytube_chnlid']);
219
  <input type="email" name="email" value="<?php echo bloginfo('admin_email'); ?>" />
220
  </div>
221
  <div class='sfsi_more_services_link'>
222
+ <a href="javascript:;" id="sfsi_getMeFullAccess" class="sfsi_getMeFullAccess_class" title="Give me access" data-nonce-fetch-feed-id="<?php echo wp_create_nonce( 'sfsi_get_feed_id' );?>" >
223
  Click here to benefit from all advantages >
224
  </a>
225
  </div>
294
  <!--Adding Code for Channel Id and Channel Name-->
295
  <div class="cstmutbewpr">
296
  <ul class="enough_waffling">
297
+ <li onclick="showhideutube(this);"><input name="sfsi_youtubeusernameorid" <?php echo (isset($option2['sfsi_youtubeusernameorid']) && $option2['sfsi_youtubeusernameorid'] == 'name') ? 'checked="true"' : ''; ?> type="radio" value="name" class="styled" /><label>User Name</label></li>
298
+ <li onclick="showhideutube(this);"><input name="sfsi_youtubeusernameorid" <?php echo (isset($option2['sfsi_youtubeusernameorid']) && $option2['sfsi_youtubeusernameorid'] == 'id') ? 'checked="true"' : ''; ?> type="radio" value="id" class="styled" /><label>Channel Id</label></li>
299
  </ul>
300
  <div class="cstmutbtxtwpr">
301
  <?php
302
+ $sfsi_youtubeusernameorid = isset($option2['sfsi_youtubeusernameorid']) ? $option2['sfsi_youtubeusernameorid'] : "";
303
  ?>
304
  <div class="cstmutbchnlnmewpr" <?php if ($sfsi_youtubeusernameorid != 'id') {
305
  echo 'style="display: block;"';
views/sfsi_option_view3.php CHANGED
@@ -70,6 +70,17 @@ $mouseover_other_icons_transition_effect = (isset($option3['mouseover_other_icon
70
  </div>
71
  </li>
72
 
 
 
 
 
 
 
 
 
 
 
 
73
  <li><input name="sfsi_actvite_theme" <?php echo ($option3['sfsi_actvite_theme'] == 'flat') ? 'checked="true"' : ''; ?> type="radio" value="flat" class="styled" /><label>Flat</label>
74
  <div class="icns_tab_3"><span class="row_2_1 rss_section"></span><span class="row_2_2 email_section"></span><span class="row_2_3 facebook_section"></span><span class="row_2_5 twitter_section"></span><span class="row_2_7 youtube_section"></span><span class="row_2_8 pinterest_section"></span><span class="row_2_9 linkedin_section"></span><span class="row_2_10 instagram_section"></span><span class="row_2_14 telegram_section"></span><span class="row_2_15 vk_section"></span><span class="row_2_16 ok_section"></span><span class="row_2_17 weibo_section"></span><span class="row_2_18 wechat_section"></span>
75
  <!--<span class="row_2_11 sf_section"></span>-->
@@ -179,142 +190,142 @@ $mouseover_other_icons_transition_effect = (isset($option3['mouseover_other_icon
179
 
180
  <?php
181
 
182
- if (get_option("rss_skin")) {
183
 
184
- $icon = get_option("rss_skin");
185
 
186
- echo '<span class="row_17_1 rss_section sfsi-bgimage" style="background: url(' . $icon . ') no-repeat;"></span>';
187
- } else {
188
 
189
- echo '<span class="row_17_1 rss_section" style="background-position:-1px 0;"></span>';
190
- }
191
 
192
- if (get_option("email_skin")) {
193
 
194
- $icon = get_option("email_skin");
195
 
196
- echo '<span class="row_17_2 email_section sfsi-bgimage" style="background: url(' . $icon . ') no-repeat;"></span>';
197
- } else {
198
 
199
- echo '<span class="row_17_2 email_section" style="background-position:-58px 0;"></span>';
200
- }
201
 
202
- if (get_option("facebook_skin")) {
203
 
204
- $icon = get_option("facebook_skin");
205
 
206
- echo '<span class="row_17_3 facebook_section sfsi-bgimage" style="background: url(' . $icon . ') no-repeat;"></span>';
207
- } else {
208
 
209
- echo '<span class="row_17_3 facebook_section" style="background-position:-118px 0;"></span>';
210
- }
211
- if (get_option("twitter_skin")) {
212
 
213
- $icon = get_option("twitter_skin");
214
 
215
- echo '<span class="row_17_5 twitter_section sfsi-bgimage" style="background: url(' . $icon . ') no-repeat;"></span>';
216
- } else {
217
 
218
- echo '<span class="row_17_5 twitter_section" style="background-position:-235px 0;"></span>';
219
- }
220
 
221
- if (get_option("youtube_skin")) {
222
 
223
- $icon = get_option("youtube_skin");
224
 
225
- echo '<span class="row_17_7 youtube_section sfsi-bgimage" style="background: url(' . $icon . ') no-repeat;"></span>';
226
- } else {
227
 
228
- echo '<span class="row_17_7 youtube_section" style="background-position:-350px 0;"></span>';
229
- }
230
 
231
- if (get_option("pintrest_skin")) {
232
 
233
- $icon = get_option("pintrest_skin");
234
 
235
- echo '<span class="row_17_8 pinterest_section sfsi-bgimage" style="background: url(' . $icon . ') no-repeat;"></span>';
236
- } else {
237
 
238
- echo '<span class="row_17_8 pinterest_section" style="background-position:-409px 0;"></span>';
239
- }
240
 
241
- if (get_option("linkedin_skin")) {
242
 
243
- $icon = get_option("linkedin_skin");
244
 
245
- echo '<span class="row_17_9 linkedin_section sfsi-bgimage" style="background: url(' . $icon . ') no-repeat;"></span>';
246
- } else {
247
 
248
- echo '<span class="row_17_9 linkedin_section" style="background-position:-467px 0;"></span>';
249
- }
250
 
251
- if (get_option("instagram_skin")) {
252
 
253
- $icon = get_option("instagram_skin");
254
 
255
- echo '<span class="row_17_10 instagram_section sfsi-bgimage" style="background: url(' . $icon . ') no-repeat;"></span>';
256
- } else {
257
 
258
- echo '<span class="row_17_10 instagram_section" style="background-position:-526px 0;"></span>';
259
- }
260
 
261
- if (get_option("telegram_skin")) {
262
 
263
- $icon = get_option("telegram_skin");
264
 
265
- echo '<span class="row_17_10 telegram_section sfsi-bgimage" style="background: url(' . $icon . ') no-repeat;"></span>';
266
- } else {
267
 
268
- echo '<span class="row_17_10 telegram_section" style="background-position:-773px 0;"></span>';
269
- }
270
 
271
- if (get_option("vk_skin")) {
272
 
273
- $icon = get_option("vk_skin");
274
 
275
- echo '<span class="row_17_10 vk_section sfsi-bgimage" style="background: url(' . $icon . ') no-repeat;"></span>';
276
- } else {
277
 
278
- echo '<span class="row_17_10 vk_section" style="background-position:-838px 0;"></span>';
279
- }
280
 
281
- if (get_option("ok_skin")) {
282
 
283
- $icon = get_option("ok_skin");
284
 
285
- echo '<span class="row_17_10 ok_section sfsi-bgimage" style="background: url(' . $icon . ') no-repeat;"></span>';
286
- } else {
287
 
288
- echo '<span class="row_17_10 ok_section" style="background-position:-909px 0;"></span>';
289
- }
290
 
291
- if (get_option("weibo_skin")) {
292
 
293
- $icon = get_option("weibo_skin");
294
 
295
- echo '<span class="row_17_10 weibo_section sfsi-bgimage" style="background: url(' . $icon . ') no-repeat;"></span>';
296
- } else {
297
 
298
- echo '<span class="row_17_10 weibo_section" style="background-position:-977px 0;"></span>';
299
- }
300
 
301
- if (get_option("wechat_skin")) {
302
 
303
- $icon = get_option("wechat_skin");
304
 
305
- echo '<span class="row_17_10 wechat_section sfsi-bgimage" style="background: url(' . $icon . ') no-repeat;"></span>';
306
- } else {
307
 
308
- echo '<span class="row_1_18 wechat_section"></span>';
309
- }
310
 
311
- ?>
312
 
313
  </div>
314
  </li>
315
- <?php
316
- }
317
- ?><?php if (get_option('sfsi_custom_icons') == 'no') { ?>
318
 
319
  <li class="sfsi_custom_icons_q4">
320
  <div style="float: left;">
@@ -332,10 +343,10 @@ $mouseover_other_icons_transition_effect = (isset($option3['mouseover_other_icon
332
  </a>
333
  <span>Upload any icons you want <a class="pop-up" style="cursor:pointer; color: #12a252 !important;border-bottom: 1px solid #12a252;text-decoration: none;font-weight: bold;" data-id="sfsi_quickpay-overlay" onclick="sfsi_open_quick_checkout(event)" target="_blank">
334
  Get it now.
335
- </a>&nbsp; Custom design for the social media platforms implemented in the plugin under question number 1 - </span>
336
- <a class="pop-up" style="cursor:pointer; color: #12a252 !important;border-bottom: 1px solid #12a252;text-decoration: none;font-weight: bold;" data-id="sfsi_quickpay-overlay" onclick="sfsi_open_quick_checkout(event)" target="_blank">
337
  Get it now.
338
- </a>
339
  </p>
340
  </div>
341
  </li>
@@ -345,7 +356,7 @@ $mouseover_other_icons_transition_effect = (isset($option3['mouseover_other_icon
345
 
346
  <input type="radio" class="styled" />
347
 
348
- <label style="line-height:20px !important;margin-top:15px;">Tailored</label>
349
  </a>
350
  </div>
351
  <div>
@@ -358,8 +369,8 @@ $mouseover_other_icons_transition_effect = (isset($option3['mouseover_other_icon
358
  </div>
359
  </li>
360
  <?php
361
- }
362
- ?>
363
  <li>
364
 
365
  <?php include_once(SFSI_DOCROOT . '/views/subviews/que4/banner.php'); ?>
70
  </div>
71
  </li>
72
 
73
+ <li class="sfsi_notificationBannner" style="display:none"></li>
74
+
75
+
76
+ <li class="sfsi_webtheme" style='display:none'>
77
+ <span class="radio" style="opacity: 0.5;"></span>
78
+ <label class="sfsi_premium_ad_lable" style="text-transform: capitalize;">Default</label>
79
+ <div class="icns_tab_3 sfsi_premium_ad"><span class="premium_col_1 rss_section"></span><span class="premium_col_2 email_section"></span><span class="premium_col_3 facebook_section"></span><span class="premium_col_4 twitter_section"></span><div class="sfis_premium_ad_name">(Premium)</div>
80
+ <!--<span class="row_1_11 sf_section"></span>-->
81
+ </div>
82
+ </li>
83
+
84
  <li><input name="sfsi_actvite_theme" <?php echo ($option3['sfsi_actvite_theme'] == 'flat') ? 'checked="true"' : ''; ?> type="radio" value="flat" class="styled" /><label>Flat</label>
85
  <div class="icns_tab_3"><span class="row_2_1 rss_section"></span><span class="row_2_2 email_section"></span><span class="row_2_3 facebook_section"></span><span class="row_2_5 twitter_section"></span><span class="row_2_7 youtube_section"></span><span class="row_2_8 pinterest_section"></span><span class="row_2_9 linkedin_section"></span><span class="row_2_10 instagram_section"></span><span class="row_2_14 telegram_section"></span><span class="row_2_15 vk_section"></span><span class="row_2_16 ok_section"></span><span class="row_2_17 weibo_section"></span><span class="row_2_18 wechat_section"></span>
86
  <!--<span class="row_2_11 sf_section"></span>-->
190
 
191
  <?php
192
 
193
+ if (get_option("rss_skin")) {
194
 
195
+ $icon = get_option("rss_skin");
196
 
197
+ echo '<span class="row_17_1 rss_section sfsi-bgimage" style="background: url(' . $icon . ') no-repeat;"></span>';
198
+ } else {
199
 
200
+ echo '<span class="row_17_1 rss_section" style="background-position:-1px 0;"></span>';
201
+ }
202
 
203
+ if (get_option("email_skin")) {
204
 
205
+ $icon = get_option("email_skin");
206
 
207
+ echo '<span class="row_17_2 email_section sfsi-bgimage" style="background: url(' . $icon . ') no-repeat;"></span>';
208
+ } else {
209
 
210
+ echo '<span class="row_17_2 email_section" style="background-position:-58px 0;"></span>';
211
+ }
212
 
213
+ if (get_option("facebook_skin")) {
214
 
215
+ $icon = get_option("facebook_skin");
216
 
217
+ echo '<span class="row_17_3 facebook_section sfsi-bgimage" style="background: url(' . $icon . ') no-repeat;"></span>';
218
+ } else {
219
 
220
+ echo '<span class="row_17_3 facebook_section" style="background-position:-118px 0;"></span>';
221
+ }
222
+ if (get_option("twitter_skin")) {
223
 
224
+ $icon = get_option("twitter_skin");
225
 
226
+ echo '<span class="row_17_5 twitter_section sfsi-bgimage" style="background: url(' . $icon . ') no-repeat;"></span>';
227
+ } else {
228
 
229
+ echo '<span class="row_17_5 twitter_section" style="background-position:-235px 0;"></span>';
230
+ }
231
 
232
+ if (get_option("youtube_skin")) {
233
 
234
+ $icon = get_option("youtube_skin");
235
 
236
+ echo '<span class="row_17_7 youtube_section sfsi-bgimage" style="background: url(' . $icon . ') no-repeat;"></span>';
237
+ } else {
238
 
239
+ echo '<span class="row_17_7 youtube_section" style="background-position:-350px 0;"></span>';
240
+ }
241
 
242
+ if (get_option("pintrest_skin")) {
243
 
244
+ $icon = get_option("pintrest_skin");
245
 
246
+ echo '<span class="row_17_8 pinterest_section sfsi-bgimage" style="background: url(' . $icon . ') no-repeat;"></span>';
247
+ } else {
248
 
249
+ echo '<span class="row_17_8 pinterest_section" style="background-position:-409px 0;"></span>';
250
+ }
251
 
252
+ if (get_option("linkedin_skin")) {
253
 
254
+ $icon = get_option("linkedin_skin");
255
 
256
+ echo '<span class="row_17_9 linkedin_section sfsi-bgimage" style="background: url(' . $icon . ') no-repeat;"></span>';
257
+ } else {
258
 
259
+ echo '<span class="row_17_9 linkedin_section" style="background-position:-467px 0;"></span>';
260
+ }
261
 
262
+ if (get_option("instagram_skin")) {
263
 
264
+ $icon = get_option("instagram_skin");
265
 
266
+ echo '<span class="row_17_10 instagram_section sfsi-bgimage" style="background: url(' . $icon . ') no-repeat;"></span>';
267
+ } else {
268
 
269
+ echo '<span class="row_17_10 instagram_section" style="background-position:-526px 0;"></span>';
270
+ }
271
 
272
+ if (get_option("telegram_skin")) {
273
 
274
+ $icon = get_option("telegram_skin");
275
 
276
+ echo '<span class="row_17_10 telegram_section sfsi-bgimage" style="background: url(' . $icon . ') no-repeat;"></span>';
277
+ } else {
278
 
279
+ echo '<span class="row_17_10 telegram_section" style="background-position:-773px 0;"></span>';
280
+ }
281
 
282
+ if (get_option("vk_skin")) {
283
 
284
+ $icon = get_option("vk_skin");
285
 
286
+ echo '<span class="row_17_10 vk_section sfsi-bgimage" style="background: url(' . $icon . ') no-repeat;"></span>';
287
+ } else {
288
 
289
+ echo '<span class="row_17_10 vk_section" style="background-position:-838px 0;"></span>';
290
+ }
291
 
292
+ if (get_option("ok_skin")) {
293
 
294
+ $icon = get_option("ok_skin");
295
 
296
+ echo '<span class="row_17_10 ok_section sfsi-bgimage" style="background: url(' . $icon . ') no-repeat;"></span>';
297
+ } else {
298
 
299
+ echo '<span class="row_17_10 ok_section" style="background-position:-909px 0;"></span>';
300
+ }
301
 
302
+ if (get_option("weibo_skin")) {
303
 
304
+ $icon = get_option("weibo_skin");
305
 
306
+ echo '<span class="row_17_10 weibo_section sfsi-bgimage" style="background: url(' . $icon . ') no-repeat;"></span>';
307
+ } else {
308
 
309
+ echo '<span class="row_17_10 weibo_section" style="background-position:-977px 0;"></span>';
310
+ }
311
 
312
+ if (get_option("wechat_skin")) {
313
 
314
+ $icon = get_option("wechat_skin");
315
 
316
+ echo '<span class="row_17_10 wechat_section sfsi-bgimage" style="background: url(' . $icon . ') no-repeat;"></span>';
317
+ } else {
318
 
319
+ echo '<span class="row_1_18 wechat_section"></span>';
320
+ }
321
 
322
+ ?>
323
 
324
  </div>
325
  </li>
326
+ <?php
327
+ }
328
+ ?><?php if (get_option('sfsi_custom_icons') == 'no') { ?>
329
 
330
  <li class="sfsi_custom_icons_q4">
331
  <div style="float: left;">
343
  </a>
344
  <span>Upload any icons you want <a class="pop-up" style="cursor:pointer; color: #12a252 !important;border-bottom: 1px solid #12a252;text-decoration: none;font-weight: bold;" data-id="sfsi_quickpay-overlay" onclick="sfsi_open_quick_checkout(event)" target="_blank">
345
  Get it now.
346
+ <!-- </a>&nbsp; Custom design for the social media platforms implemented in the plugin under question number 1 - </span> -->
347
+ <!-- <a class="pop-up" style="cursor:pointer; color: #12a252 !important;border-bottom: 1px solid #12a252;text-decoration: none;font-weight: bold;" data-id="sfsi_quickpay-overlay" onclick="sfsi_open_quick_checkout(event)" target="_blank">
348
  Get it now.
349
+ </a> -->
350
  </p>
351
  </div>
352
  </li>
356
 
357
  <input type="radio" class="styled" />
358
 
359
+ <label style="line-height:20px !important;margin-top:15px;opacity: 0.5;min-width: 79px;">Tailored -</label>
360
  </a>
361
  </div>
362
  <div>
369
  </div>
370
  </li>
371
  <?php
372
+ }
373
+ ?>
374
  <li>
375
 
376
  <?php include_once(SFSI_DOCROOT . '/views/subviews/que4/banner.php'); ?>
views/sfsi_option_view4.php CHANGED
@@ -112,7 +112,7 @@ $option4['sfsi_responsive_share_count'] = (isset($option4['sfsi_responsi
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
  }
@@ -246,9 +246,34 @@ $hide = "display:none;";
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">
@@ -457,6 +482,8 @@ $hide = "display:none;";
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'] : ''; ?>" />
@@ -488,8 +515,9 @@ $hide = "display:none;";
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-->
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 (isset($option2['sfsi_youtubeusernameorid']) && "name" == $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
  }
246
  </ul>
247
  <!-- END show/hide counts for icons section -->
248
 
249
+
250
+
251
  <!-- show/hide counts for all icons section START -->
252
+
253
  <div class="count_sections" style="display:none">
254
+ <?php
255
+ $socialObj = new sfsi_SocialHelper();
256
+ $current_url = sfsi_get_current_page_url();
257
+ $fb_data = $socialObj->sfsi_get_fb($current_url);
258
+ $check_fb_count_more_than_one = $fb_data>0 || $socialObj->sfsi_get_pinterest($current_url)>0;
259
+
260
+ if (is_ssl() && $check_fb_count_more_than_one) {
261
+ ?>
262
+ <div class="sfsi_new_prmium_follw sfsi_banner_body sfsi_warning_banner">
263
+ <div>
264
+ <p style="margin-bottom: 12px !important;"><b>Important:</b> Your website used to be on http (before you enabled an SSL certificate to switch to https). We found share counts for your URLs on http which usually get lost
265
+ after switch to https (because Facebook etc. provide the counts per url, and an url on https is a different url then one on http). <b>We found a solution for that</b> so that your share counts on http and https will
266
+ be aggregated and your full number of share counts is restored. It is implemented in the Premium Plugin - <a href="https://www.ultimatelysocial.com/usm-premium/?utm_source=usmi_settings_page&utm_campaign=share_count_recovery_notification&utm_medium=link" style="cursor:pointer; color: #12a252 !important;border-bottom: 1px solid #222222;text-decoration: none;font-weight: bold;font-family: unset;" data-id="sfsi_quickpay-overlay" target="_blank">
267
+ <b>Get it now.</b>
268
+ </a>
269
+ </p>
270
+ </div>
271
+ <small class="sfsi_banner_dismiss">Dismiss</small>
272
+ </div>
273
+ <?php
274
+ }
275
+ ?>
276
+ <h4 style="display: inline-block;">Please specify which counts should be shown:</h4>
277
 
278
  <!-- RSS ICON COUNT SECTION-->
279
  <div class="specify_counts rss_section">
482
  <label>Enter Youtube User name:</label>
483
  <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'] : ''; ?>" />
484
  </div>
485
+ </li>
486
+ <li class="youtube_options" style="<?php echo (!isset($option4['sfsi_youtube_countsFrom']) || empty($option4['sfsi_youtube_countsFrom']) || $option4['sfsi_youtube_countsFrom'] == 'manual') ? 'display:none;' : ''; ?>">
487
  <div>
488
  <label>Enter Youtube Channel Id:</label>
489
  <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'] : ''; ?>" />
515
  <div class="sfsi_new_prmium_follw" style="margin-top: 38px;">
516
  <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>
517
  </div>
 
518
  </div>
519
+
520
+
521
  <!-- END PINIT ICON COUNT SECTION-->
522
 
523
  <!-- INSTAGRAM ICON COUNT SECTION-->
views/sfsi_option_view5.php CHANGED
@@ -465,7 +465,23 @@ here what text will be displayed if a user moves his mouse over the icon:
465
  </li>
466
  </ul>
467
  </div>
468
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
469
 
470
  <?php sfsi_ask_for_help(5); ?>
471
  <!-- SAVE BUTTON SECTION -->
465
  </li>
466
  </ul>
467
  </div>
468
+ </div>
469
+
470
+ <!-- <div class="row new_wind">
471
+ <h4>Tips</h4>
472
+ <div class="row_onl"><p>Show useful tips for more sharing & traffic?</p>
473
+ <ul class="enough_waffling">
474
+ <li>
475
+ <input name="sfsi_icons_hide_banners" checked="true" type="radio" value="yes" class="styled" />
476
+ <label>Yes</label>
477
+ </li>
478
+ <li>
479
+ <input name="sfsi_icons_hide_banners" type="radio" value="no" class="styled" />
480
+ <label>No</label>
481
+ </li>
482
+ </ul>
483
+ </div>
484
+ </div> -->
485
 
486
  <?php sfsi_ask_for_help(5); ?>
487
  <!-- SAVE BUTTON SECTION -->
views/sfsi_options_view.php CHANGED
@@ -55,8 +55,8 @@
55
  </div> -->
56
  <?php } ?>
57
  <!-- Get notification bar-->
58
-
59
  <div class="sfsi_notificationBannner"></div>
 
60
  <!-- Get new_notification bar-->
61
  <script type="text/javascript">
62
  jQuery(document).ready(function() {
55
  </div> -->
56
  <?php } ?>
57
  <!-- Get notification bar-->
 
58
  <div class="sfsi_notificationBannner"></div>
59
+
60
  <!-- Get new_notification bar-->
61
  <script type="text/javascript">
62
  jQuery(document).ready(function() {
views/sfsi_other_banners.php ADDED
@@ -0,0 +1,211 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!------------------------------------------------------Banners on other plugins’ settings pages ----------------------------------------------------------->
2
+
3
+
4
+ <!---------------recovering sharedcount Check sharecount plugins is active --------------->
5
+ <?php
6
+ if (!is_plugin_active('Ultimate-Premium-Plugin/usm_premium_icons.php')) {
7
+ $current_site_url = 0 . $_SERVER['REQUEST_URI'];
8
+ $sfsi_dismiss_sharecount = unserialize(get_option('sfsi_dismiss_sharecount', false));
9
+ $sfsi_dismiss_gallery = unserialize(get_option('sfsi_dismiss_gallery', false));
10
+ $sfsi_dismiss_optimization = unserialize(get_option('sfsi_dismiss_optimization', false));
11
+ $sfsi_dismiss_gdpr = unserialize(get_option('sfsi_dismiss_gdpr', false));
12
+ $sfsi_dismiss_google_analytic = unserialize(get_option('sfsi_dismiss_google_analytic', false));
13
+ // var_dump($sfsi_dismiss_sharecount,$sfsi_dismiss_gallery,$sfsi_dismiss_optimization,$sfsi_dismiss_gdpr,$sfsi_dismiss_google_analytic);
14
+ foreach ($gallery_plugins as $key => $gallery_plugin) {
15
+ $sfsi_show_gallery_banner = sfsi_check_on_plugin_page($gallery_plugin['dir_slug'], $gallery_plugin['option_name'], $current_site_url);
16
+ if( $gallery_plugin['option_name'] == 'robo-gallery-settings'){
17
+ // var_dump(($sfsi_show_gallery_banner),'lfjgdjkf');
18
+ }
19
+ // var_dump($sfsi_show_gallery_banner,$gallery_plugin['option_name'] );
20
+
21
+ }
22
+ $socialObj = new sfsi_SocialHelper();
23
+ $current_url = site_url();
24
+ $fb_data = $socialObj->sfsi_get_fb($current_url);
25
+ $check_fb_count_more_than_one = ((!empty($socialObj->format_num($fb_data['like_count'])) || !empty($socialObj->format_num($fb_data['share_count']))) && !empty($socialObj->sfsi_get_pinterest($current_url)));
26
+ ?>
27
+ <?php
28
+ if (is_ssl() && $check_fb_count_more_than_one && ($sfsi_dismiss_sharecount['show_banner'] == "yes" || false == $sfsi_dismiss_sharecount)) {
29
+ // also check if there is likes on http page
30
+ foreach ($google_analytics as $key => $sharecount_plugin) {
31
+ $sfsi_show_sharecount_banner = sfsi_check_on_plugin_page($sharecount_plugin['dir_slug'], $sharecount_plugin['option_name'], $current_site_url);
32
+ if ($sfsi_show_sharecount_banner) {
33
+ ?>
34
+ <div class="sfsi_new_prmium_follw sfsi_banner_body">
35
+ <p style="font-size:18px !important">
36
+ <b>You’re on https, that’s great! </b>– However: we noticed that you still have share & like counts (from social media) on your old (http://) urls. If you don’t want to lose them, check out <a href="https://www.ultimatelysocial.com/usm-premium/?utm_source=usmi_other_plugins_settings_page&utm_campaign=sharedcount_recovery_banner&utm_medium=banner" class="sfsi_font_inherit" target="_blank" style="color:#1a1d20 !important;text-decoration: underline;"><span></span> this plugin</a> which has a share count recovery feature. <a href="https://www.ultimatelysocial.com/usm-premium/?withqp=1&discount=RECOVERSHARECOUNT&utm_source=usmi_other_plugins_settings_page&utm_campaign=sharedcount_recovery_banner&utm_medium=banner" class="sfsi_font_inherit" target="_blank" style="color:#1a1d20 !important;font-weight: bold;"><span>&#10151;</span> <span style="text-decoration: underline;"></span> <span style="text-decoration: underline;">Get it now at 20% discount</span> </a>
37
+ </p>
38
+
39
+ <div style="text-align:right;">
40
+
41
+ <form method="post" class="sfsi_premiumNoticeDismiss" style="padding-bottom:8px;">
42
+
43
+ <input type="hidden" name="sfsi-dismiss-sharecount" value="true">
44
+
45
+ <input type="submit" name="dismiss" value="Dismiss" />
46
+
47
+ </form>
48
+
49
+ </div>
50
+ </div>
51
+ <?php
52
+ }
53
+ if ($sfsi_show_sharecount_banner) {
54
+ break;
55
+ }
56
+ }
57
+ }
58
+ ?>
59
+ <!---------------End check optimization plugins is active--------------->
60
+
61
+ <!---------------Pinterest on mouse-over Check gallery plugins is active --------------->
62
+ <?php
63
+ if ($sfsi_dismiss_gallery['show_banner'] == "yes" || false == $sfsi_dismiss_gallery) {
64
+ foreach ($gallery_plugins as $key => $gallery_plugin) {
65
+ $sfsi_show_gallery_banner = sfsi_check_on_plugin_page($gallery_plugin['dir_slug'], $gallery_plugin['option_name'], $current_site_url);
66
+
67
+ if ($sfsi_show_gallery_banner) {
68
+ $plugin = sfsi_get_plugin($gallery_plugin['dir_slug']);
69
+ ?>
70
+ <div class="sfsi_new_prmium_follw sfsi_banner_body">
71
+ <div>
72
+ <p style="margin-bottom: 12px !important;"><b>Get more traffic from your pictures </b>– The Ultimate Social Media Premium Plugin allows to show a Pinterest save-icon after users move over your pictures, increasing sharing activity significantly.
73
+ </p>
74
+ <p style="font-size:18px !important">
75
+ It works very well with the <b><?php echo ($plugin["Name"]); ?> plugin</b> which you are using, resulting in more traffic for your site.
76
+ <a href="https://www.ultimatelysocial.com/usm-premium/?withqp=1&discount=PINTERESTDISCOUNT&utm_source=usmi_other_plugins_settings_page&utm_campaign=pinterest_mouse_over&utm_medium=banner" class="sfsi_font_inherit" target="_blank" style="color:#1a1d20 !important;font-weight: bold;"><span>&#10151;</span> <span style="text-decoration: underline;"></span>
77
+ <span style="text-decoration: underline;">Get it now at 20% discount</span>
78
+ </a>
79
+ </p>
80
+ </div>
81
+
82
+ <div style="text-align:right;">
83
+
84
+ <form method="post" class="sfsi_premiumNoticeDismiss" style="padding-bottom:8px;">
85
+
86
+ <input type="hidden" name="sfsi-dismiss-gallery" value="true">
87
+
88
+ <input type="submit" name="dismiss" value="Dismiss" />
89
+
90
+ </form>
91
+
92
+ </div>
93
+ </div>
94
+ <?php
95
+ }
96
+ if ($sfsi_show_gallery_banner) {
97
+ break;
98
+ }
99
+ }
100
+ }
101
+ ?>
102
+ <!---------------End check gallery plugins is active --------------->
103
+
104
+
105
+ <!---------------Website speed Check optimization plugins is active --------------->
106
+ <?php
107
+ if ($sfsi_dismiss_optimization['show_banner'] == "yes" || false == $sfsi_dismiss_optimization) {
108
+ foreach ($optimization_plugins as $key => $optimization_plugin) {
109
+ $sfsi_show_optimization_banner = sfsi_check_on_plugin_page($optimization_plugin['dir_slug'], $optimization_plugin['option_name']);
110
+ if ($sfsi_show_optimization_banner) {
111
+ ?>
112
+ <div class="sfsi_new_prmium_follw sfsi_banner_body">
113
+ <p style="font-size:18px !important">
114
+ <b>Make your website load faster </b>– the Ultimate Social Media <a href="https://www.ultimatelysocial.com/usm-premium/?utm_source=usmi_other_plugins_settings_page&utm_campaign=website_load_faster&utm_medium=banner" class="sfsi_font_inherit" target="_blank" style="color:#1a1d20 !important;text-decoration: underline;"><span></span> Premium Plugin</a> is the most optimized sharing plugin for speed. It also includes support to help you optimize it for minimizing loading time.<a href="https://www.ultimatelysocial.com/usm-premium/?withqp=1&discount=MORESPEEED&utm_source=usmi_other_plugins_settings_page&utm_campaign=website_load_faster&utm_medium=banner" class="sfsi_font_inherit" target="_blank" style="color:#1a1d20 !important;font-weight: bold;"><span>&#10151;</span> <span style="text-decoration: underline;"></span> <span style="text-decoration: underline;">Get it now at 20% discount</span> </a>
115
+ </p>
116
+ <div style="text-align:right;">
117
+ <form method="post" class="sfsi_premiumNoticeDismiss" style="padding-bottom:8px;">
118
+
119
+ <input type="hidden" name="sfsi-dismiss-optimization" value="true">
120
+
121
+ <input type="submit" name="dismiss" value="Dismiss" />
122
+
123
+ </form>
124
+
125
+ </div>
126
+ </div>
127
+
128
+ <?php
129
+ }
130
+ if ($sfsi_show_optimization_banner) {
131
+ break;
132
+ }
133
+ }
134
+ }
135
+ ?>
136
+ <!---------------End check optimization plugins is active--------------->
137
+
138
+
139
+ <!---------------GDPR compliance Check GDPR plugins is active--------------->
140
+ <?php
141
+ if ($sfsi_dismiss_gdpr['show_banner'] == "yes" || false == $sfsi_dismiss_gdpr) {
142
+
143
+ foreach ($gdpr_plugins as $key => $gdpr_plugin) {
144
+ $sfsi_show_gdpr_banner = sfsi_check_on_plugin_page($gdpr_plugin['dir_slug'], $gdpr_plugin['option_name'], $current_site_url);
145
+ if ($sfsi_show_gdpr_banner) {
146
+ ?>
147
+ <div class="sfsi_new_prmium_follw sfsi_banner_body">
148
+ <p style="font-size:18px !important">
149
+ <b>Make sure your site is GDPR compliant </b>– As part of the Ultimate Social Media Premium Plugin you can request a review (at no extra charge) to check if your sharing icons are GDPR compliant. <a href="https://www.ultimatelysocial.com/usm-premium/?withqp=1&discount=GDPRCOMPLIANT&utm_source=usmi_other_plugins_settings_page&utm_campaign=gdpr_compliance&utm_medium=banner" class="sfsi_font_inherit" target="_blank" style="color:#1a1d20 !important;font-weight: bold;"><span>&#10151;</span> <span style="text-decoration: underline;"></span> <span style="text-decoration: underline;">Get it now at 20% discount</span> </a>
150
+ </p>
151
+ <div style="text-align:right;">
152
+
153
+ <form method="post" class="sfsi_premiumNoticeDismiss" style="padding-bottom:8px;">
154
+
155
+ <input type="hidden" name="sfsi-dismiss-gdpr" value="true">
156
+
157
+ <input type="submit" name="dismiss" value="Dismiss" />
158
+
159
+ </form>
160
+
161
+ </div>
162
+ </div>
163
+ <?php
164
+ }
165
+ if ($sfsi_show_gdpr_banner) {
166
+ break;
167
+ }
168
+ }
169
+ }
170
+ ?>
171
+ <!---------------End check GDPR plugins is active--------------->
172
+
173
+
174
+ <!---------------More traffic Check Google analytics plugin is active--------------->
175
+ <?php
176
+ if ($sfsi_dismiss_google_analytic['show_banner'] == "yes" || false == $sfsi_dismiss_google_analytic) {
177
+ foreach ($sharecount_plugins as $key => $google_analytic) {
178
+ $sfsi_show_google_analytic_banner = sfsi_check_on_plugin_page($google_analytic['dir_slug'], $google_analytic['option_name'], $current_site_url);
179
+ if ($sfsi_show_google_analytic_banner) {
180
+ ?>
181
+ <div class="sfsi_new_prmium_follw sfsi_banner_body">
182
+ <div>
183
+ <p style="font-size:18px !important">
184
+ <b>Get 20%+ more traffic </b>– from more likes & shares with the Ultimatelysocial Premium Plugin. Or get a refund within 20 days. <a href="https://www.ultimatelysocial.com/usm-premium/?withqp=1&discount=MORETRAFFIC&utm_source=usmi_other_plugins_settings_page&utm_campaign=more_traffic&utm_medium=banner" class="sfsi_font_inherit" target="_blank" style="color:#1a1d20 !important;font-weight: bold;"><span>&#10151;</span> <span style="text-decoration: underline;"></span> <span style="text-decoration: underline;">Get it now at 20% discount</span> </a>
185
+ </p>
186
+ </div>
187
+ <div style="text-align:right;">
188
+
189
+ <form method="post" class="sfsi_premiumNoticeDismiss" style="padding-bottom:8px;">
190
+
191
+ <input type="hidden" name="sfsi-dismiss-google-analytic" value="true">
192
+
193
+ <input type="submit" name="dismiss" value="Dismiss" />
194
+
195
+ </form>
196
+
197
+ </div>
198
+ </div>
199
+ <?php
200
+ }
201
+ if ($sfsi_show_google_analytic_banner) {
202
+ break;
203
+ }
204
+ }
205
+ }
206
+ }
207
+ ?>
208
+ <!---------------End Check Google analytics plugin is active--------------->
209
+
210
+
211
+ <!------------------------------------------------------End Banners on other plugins’ settings pages ----------------------------------------------------------->
views/sfsi_plugin_lists.php ADDED
@@ -0,0 +1,248 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $gallery_plugins = array(
3
+ array('option_name' => 'photoblocks', 'dir_slug' => 'photoblocks-grid-gallery/photoblocks.php'),
4
+ array('option_name' => 'everlightbox_options', 'dir_slug' => 'everlightbox/everlightbox.php'),
5
+ array('option_name' => 'Total_Soft_Gallery_Video', 'dir_slug' => 'gallery-videos/index.php'),
6
+ array('option_name' => 'Wpape-gallery-settings', 'dir_slug' => 'gallery-images-ape/index.php'),
7
+ array('option_name' => 'overview', 'dir_slug' => 'robo-gallery/robogallery.php'),
8
+ array('option_name' => 'flag-overview', 'dir_slug' => 'flash-album-gallery/flag.php'),
9
+ array('option_name' => 'GrandMedia', 'dir_slug' => 'grand-media/grand-media.php'),
10
+ array('option_name' => 'emg-whats-new', 'dir_slug' => 'easy-media-gallery/easy-media-gallery.php'),
11
+ array('option_name' => 'grid-kit', 'dir_slug' => 'portfolio-wp/portfolio-wp.php'),
12
+ array('option_name' => 'Wc-gallery', 'dir_slug' => 'wc-gallery/wc-gallery.php'),
13
+ array('option_name' => 'elementor-getting-started', 'dir_slug' => 'elementor/elementor.php'),
14
+ array('option_name' => 'photospace.php', 'dir_slug' => 'photospace/photospace.php'),
15
+ array('option_name' => 'unitegallery', 'dir_slug' => 'unite-gallery-lite/unitegallery.php'),
16
+ array('option_name' => 'resmushit_options', 'dir_slug' => 'resmushit-image-optimizer/resmushit.php'),
17
+ array('option_name' => 'picture-gallery', 'dir_slug' => 'picture-gallery/picture-gallery.php'),
18
+ array('option_name' => 'imagify', 'dir_slug' => 'imagify/imagify.php'),
19
+ array('option_name' => 'gallery_bank', 'dir_slug' => 'gallery-bank/gallery-bank.php'),
20
+ array('option_name' => 'wp-shortpixel-settings', 'dir_slug' => 'shortpixel-image-optimiser/wp-shortpixel.php'),
21
+ array('option_name' => 'post-gallery-settings', 'dir_slug' => 'simple-post-gallery/plugin.php'),
22
+ array('option_name' => 'image-gallery-settings', 'dir_slug' => 'responsive-photo-gallery/get-responsive-gallery.php'),
23
+ array('option_name' => 'gallery-plugin.php', 'dir_slug' => 'gallery-plugin/gallery-plugin.php'),
24
+ array('option_name' => 'youtube-my-preferences', 'dir_slug' => 'youtube-embed-plus/youtube.php'),
25
+ array('option_name' => 'pfg-update-plugin', 'dir_slug' => 'portfolio-filter-gallery/portfolio-filter-gallery.php'),
26
+ array('option_name' => 'jetpack', 'dir_slug' => 'jetpack/jetpack.php'),
27
+ array('option_name' => 'gallery-options', 'dir_slug' => 'fancy-gallery/plugin.php'),
28
+ array('option_name' => 'gallery-box-options.php', 'dir_slug' => 'gallery-box/gallery-box.php'),
29
+ array('option_name' => 'catch-gallery', 'dir_slug' => 'catch-gallery/catch-gallery.php'),
30
+ array('option_name' => 'galleries_grs', 'dir_slug' => 'limb-gallery/gallery-rs.php'),
31
+ array('option_name' => 'wooswipe-options', 'dir_slug' => 'wooswipe/wooswipe.php'),
32
+ array('option_name' => 'photoswipe-masonry.php', 'dir_slug' => 'photoswipe-masonry/photoswipe-masonry.php'),
33
+ array('option_name' => 'maxgalleria-settings', 'dir_slug' => 'maxgalleria/maxgalleria-admin.php'),
34
+ array('option_name' => 'Emg-whats-new', 'dir_slug' => 'easy-media-gallery/easy-media-gallery.php'),
35
+ array('option_name' => 'wpffag_products', 'dir_slug' => 'flickr-album-gallery/flickr-album-gallery.php'),
36
+ array('option_name' => 'foogallery-settings', 'dir_slug' => 'foogallery/foogallery.php'),
37
+ array('option_name' => 'foogallery-settings', 'dir_slug' => 'foogallery/foogallery.php'),
38
+ array('option_name' => 'modula', 'dir_slug' => 'modula-best-grid-gallery/Modula.php'),
39
+ array('option_name' => 'robo-gallery-settings', 'dir_slug' => 'robo-gallery/robogallery.php'),
40
+
41
+
42
+ );
43
+ $sharecount_plugins = array(
44
+ array("dir_slug" => "optinmonster/optin-monster-wp-api.php", 'option_name' => 'optin-monster-api-welcome'),
45
+ array("dir_slug" => "floating-social-bar/floating-social-bar.php", 'option_name' => 'floating-social-bar'),
46
+ array("dir_slug" => "tweet-old-post/tweet-old-post.php", 'option_name' => 'TweetOldPost'),
47
+ array("dir_slug" => "wp-to-buffer/wp-to-buffer.php", 'option_name' => 'wp-to-buffer-settings'),
48
+ array("dir_slug" => "wordpress-seo/wp-seo.php", 'option_name' => 'wpseo_dashboard'),
49
+ array("dir_slug" => "intelly-related-posts/index.php", 'option_name' => 'intelly-related-posts'),
50
+ array("dir_slug" => "wordpress-popular-posts/wordpress-popular-posts.php", 'option_name' => 'wordpress-popular-posts'),
51
+ array("dir_slug" => "subscribe-to-comments-reloaded/subscribe-to-comments-reloaded.php", 'option_name' => 'stcr_options'),
52
+ array("dir_slug" => "click-to-tweet-by-todaymade/tm-click-to-tweet.php", 'option_name' => 'tmclicktotweet'),
53
+ array("dir_slug" => "fb-instant-articles/facebook-instant-articles.php", 'option_name' => 'instant-articles-wizard'),
54
+ array("dir_slug" => "sharebar/sharebar.php", 'option_name' => 'Sharebar'),
55
+ array("dir_slug" => "wp-to-twitter/wp-to-twitter.php", 'option_name' => 'wp-tweets-pro'),
56
+ array("dir_slug" => "sem-bookmark-me/sem-bookmark-me.php", 'option_name' => ''),
57
+ array("dir_slug" => "onlywire-bookmark-share-button/owbutton_wordpress.php", 'option_name' => 'onlywireoptions'),
58
+ array("dir_slug" => "google-analyticator/google-analyticator.php", 'option_name' => 'google-analyticator'),
59
+ array("dir_slug" => "getsocial/getsocial.php", 'option_name' => 'getsocial/getsocial.php'),
60
+ array("dir_slug" => "visitors-traffic-real-time-statistics/Visitors-Traffic-Real-Time-Statistics.php", 'option_name' => 'ahc_hits_counter_menu_free'),
61
+ array("dir_slug" => "microblog-poster/microblogposter.php", 'option_name' => 'microblogposter.php'),
62
+ array("dir_slug" => "triberr-wordpress-plugin/triberr.php", 'option_name' => 'triberr-options'),
63
+ array("dir_slug" => "social-networks-auto-poster-facebook-twitter-g/NextScripts_SNAP.php", 'option_name' => 'nxssnap-ntadmin'),
64
+ array("dir_slug" => "all-in-one-seo-pack/all_in_one_seo_pack.php", 'option_name' => 'all-in-one-seo-pack/aioseop_class.php'),
65
+ array("dir_slug" => "multi-rating/multi-rating.php", 'option_name' => 'mr_settings'),
66
+ array("dir_slug" => "social-pug/index.php", 'option_name' => 'dpsp-social-pug'),
67
+ array("dir_slug" => "comment-reply-email-notification/cren_plugin.php", 'option_name' => 'comment_reply_email_notification'),
68
+ array("dir_slug" => "share-subscribe-contact-aio-widget/free_profitquery_aio_widgets.php", 'option_name' => 'free_profitquery_aio_widgets'),
69
+ array("dir_slug" => "better-robots-txt/better-robots-txt.php", 'option_name' => 'better-robots-txt'),
70
+ array("dir_slug" => "google-analytics-for-wordpress/googleanalytics.php", 'option_name' => 'monsterinsights_settings'),
71
+ array("dir_slug" => "onesignal-free-web-push-notifications/onesignal-push", 'option_name' => 'onesignal-push'),
72
+ array("dir_slug" => "access-watch/index.php", 'option_name' => 'access-watch-dashboard'),
73
+
74
+ );
75
+
76
+ $optimization_plugins = array(
77
+ array('dir_slug' => 'litespeed-cache/litespeed-cache.php', 'option_name' => 'lscache-settings'),
78
+ array('dir_slug' => 'w3-total-cache/w3-total-cache.php', 'option_name' => 'w3tc_dashboard'),
79
+ array('dir_slug' => 'wp-fastest-cache/wpFastestCache.php', 'option_name' => 'wpfastestcacheoptions'),
80
+ array('dir_slug' => 'wp-optimize/wp-optimize.php', 'option_name' => 'WP-Optimize'),
81
+ array('dir_slug' => 'autoptimize/autoptimize.php', 'option_name' => 'autoptimize'),
82
+ array('dir_slug' => 'cache-enabler/cache-enabler.php', 'option_name' => 'cache-enabler'),
83
+ array('dir_slug' => 'wp-super-cache/wp-cache.php', 'option_name' => 'wpsupercache'),
84
+ array('dir_slug' => 'hummingbird-performance/wp-hummingbird.php', 'option_name' => 'wphb'),
85
+ array('dir_slug' => 'breeze/breeze.php', 'option_name' => 'breeze'),
86
+ array('dir_slug' => 'sg-cachepress/sg-cachepress.php', 'option_name' => 'sg-cachepress'),
87
+ array('dir_slug' => 'wp-rest-cache/wp-rest-cache.php', 'option_name' => 'wp-rest-cache'),
88
+ array('dir_slug' => 'fast-velocity-minify/fvm.php', 'option_name' => 'fastvelocity-min'),
89
+ array('dir_slug' => 'hyper-cache/plugin.php', 'option_name' => 'hyper-cache/options.php'),
90
+ array('dir_slug' => 'redis-cache/redis-cache.php', 'option_name' => 'redis-cache'),
91
+ array('dir_slug' => 'varnish-page', 'option_name' => 'varnish-page'),
92
+ array('dir_slug' => 'sns-count-cache/sns-count-cache.php', 'option_name' => 'scc-dashboard'),
93
+ array('dir_slug' => 'harrys-gravatar-cache/harrys-gravatar-cache.php', 'option_name' => 'harrys-gravatar-cache-options'),
94
+ array('dir_slug' => 'fv-gravatar-cache/fv-gravatar-cache.php', 'option_name' => 'fv-gravatar-cache'),
95
+ array('dir_slug' => 'wpe-advanced-cache-options/wpe-advanced-cache.php', 'option_name' => 'cache-settings'),
96
+ array('dir_slug' => 'simple-cache/simple-cache.php', 'option_name' => 'simple-cache'),
97
+ array('dir_slug' => 'ezcache/ezcache.php', 'option_name' => 'ezcache'),
98
+ array('dir_slug' => 'wp-cloudflare-page-cache/wp-cloudflare-super-page-cache.php', 'option_name' => 'wp-cloudflare-super-page-cache-index'),
99
+ array('dir_slug' => 'optimum-gravatar-cache/optimum-gravatar-cache.php', 'option_name' => 'optimum-gravatar-cache'),
100
+ array('dir_slug' => 'yasakani-cache/yasakani-cache.php', 'option_name' => 'yasakani-cache'),
101
+ array('dir_slug' => 'cachify/cachify.php', 'option_name' => 'cachify'),
102
+ array('dir_slug' => 'gator-cache/gator-cache.php', 'option_name' => 'gtr_cache'),
103
+ array('dir_slug' => 'wp-speed-of-light/wp-speed-of-light.php', 'option_name' => 'wpsol_dashboard'),
104
+ array('dir_slug' => 'wp-super-minify/wp-super-minify.php', 'option_name' => 'wp-super-minify'),
105
+ array('dir_slug' => 'wsa-cachepurge/wsa-cachepurge.php', 'option_name' => 'wsa-cachepurge/lib/wsa-cachepurge_display.php'),
106
+ array('dir_slug' => 'a2-optimized-wp/a2-optimized.php', 'option_name' => 'A2_Optimized_Plugin_admin'),
107
+ array('dir_slug' => 'nitropack/main.php', 'option_name' => 'nitropack'),
108
+ array('dir_slug' => 'swift-performance-lite/performance.php', 'option_name' => 'swift-performance'),
109
+ array('dir_slug' => 'wp-performance/wp-performance.php', 'option_name' => 'wp-performance'),
110
+ array('dir_slug' => 'arvancloud-cache-cleaner/Arvancloud.php', 'option_name' => 'ar_cache'),
111
+ array('dir_slug' => 'clear-cache-for-widgets/clear-cache-for-widgets.php', 'option_name' => 'ccfm-options'),
112
+ array('dir_slug' => 'wp-asset-clean-up/wpacu.php', 'option_name' => 'wpassetcleanup_settings'),
113
+ array('dir_slug' => 'flying-pages/flying-pages.php', 'option_name' => 'flying-pages'),
114
+ array('dir_slug' => 'speed-booster-pack/speed-booster-pack.php', 'option_name' => 'sbp-options'),
115
+ array('dir_slug' => 'baqend/baqend.php', 'option_name' => 'baqend'),
116
+ array('dir_slug' => 'wp-smushit/wp-smush.php', 'option_name' => 'smush')
117
+ );
118
+ $gdpr_plugins = array(
119
+ array('dir_slug' => 'cookie-law-info/cookie-law-info.php', 'option_name' => 'cookie-law-info'),
120
+ array('dir_slug' => 'complianz-gdpr/complianz-gpdr.php', 'option_name' => 'complianz'),
121
+ array('dir_slug' => 'shapepress-dsgvo/sp-dsgvo.php', 'option_name' => 'sp-dsgvo'),
122
+ array('dir_slug' => 'cookiebot/cookiebot.php', 'option_name' => 'cookiebot'),
123
+ array('dir_slug' => 'gdpr-banner/gdpr-banner.php', 'option_name' => 'gdpr_banner'),
124
+ array('dir_slug' => 'dsgvo-tools-cookie-hinweis-datenschutz/main.php', 'option_name' => 'fhw_dsgvo_cookies_options'),
125
+ array('dir_slug' => 'ga-germanized/ga-germanized.php', 'option_name' => 'ga-germanized'),
126
+ array('dir_slug' => 'cwis-antivirus-malware-detected/cwis-antivirus-malware-detected.php', 'option_name' => 'cwis-updater'),
127
+ array('dir_slug' => 'luckywp-cookie-notice-gdpr/luckywp-cookie-notice-gdpr.php', 'option_name' => 'lwpcng_settings'),
128
+ array('dir_slug' => 'ninja-gdpr-compliance/njt-gdpr.php', 'option_name' => 'njt-gdpr'),
129
+ array('dir_slug' => 'gdpr-cookie-consent/gdpr-cookie-consent.php', 'option_name' => 'gdpr-cookie-consent'),
130
+ array('dir_slug' => 'uniconsent-cmp/uniconsent-cmp.php', 'option_name' => 'unic-options'),
131
+ array('dir_slug' => 'wplegalpages/wplegalpages.php', 'option_name' => 'legal-pages'),
132
+ array('dir_slug' => 'smart-cookie-kit/plugin.php', 'option_name' => 'nmod_sck_graphics'),
133
+ array('dir_slug' => 'cookie-information-consent-solution/cookie-information.php', 'option_name' => 'cookie-information'),
134
+ array('dir_slug' => 'dsgvo-fur-die-schweiz/dsgvo-fur-die-schweiz.php', 'option_name' => 'dsgvo-admin'),
135
+ array('dir_slug' => 'gdpr-cookies-pro/gdpr-cookies-pro.php', 'option_name' => 'gdpr-cookies-pro'),
136
+ array('dir_slug' => 'seahorse-gdpr-data-manager/seahorse-gdpr-data-manager.php', 'option_name' => 'seahorse_gdpr_data_manager_plugin'),
137
+ array('dir_slug' => 'dsgvo-tools-kommentar-ip-entfernen/main.php', 'option_name' => 'fhw_dsgvo_kommentar_options'),
138
+ array('dir_slug' => 'gdpr-tools/gdpr-tools.php', 'option_name' => 'gdpr-tools-settings')
139
+ );
140
+ $google_analytics = array(
141
+ array('dir_slug' => 'really-simple-ssl/rlrsssl-really-simple-ssl.php', 'option_name' => 'rlrsssl_really_simple_ssl'),
142
+ array('dir_slug' => 'ssl-insecure-content-fixer/ssl-insecure-content-fixer.php', 'option_name' => 'ssl-insecure-content-fixer'),
143
+ array('dir_slug' => 'https-redirection/https-redirection.php', 'option_name' => 'https-redirection'),
144
+ array('dir_slug' => 'wordpress-https/wordpress-https.php', 'option_name' => 'wordpress-https'),
145
+ array('dir_slug' => 'wp-force-ssl/wp-force-ssl.php', 'option_name' => 'wpfs-settings'),
146
+ array('dir_slug' => 'sakura-rs-wp-ssl/sakura-rs-ssl.php', 'option_name' => 'sakura-admin-menu'),
147
+ array('dir_slug' => 'wp-letsencrypt-ssl/wp-letsencrypt.php', 'option_name' => 'wp_encryption'),
148
+ array('dir_slug' => 'ssl-zen/ssl_zen.php', 'option_name' => 'ssl_zen'),
149
+ array('dir_slug' => 'one-click-ssl/ssl.php', 'option_name' => 'one-click-ssl'),
150
+ array('dir_slug' => 'http-https-remover/http-https-remover.php', 'option_name' => 'httphttpsRemoval')
151
+ );
152
+ function sfsi_check_on_plugin_page($dir_slug, $option_name, $site_url = "")
153
+ {
154
+ return is_plugin_active($dir_slug) && isset($_GET) && isset($_GET["page"]) && ($_GET['page'] == $option_name);
155
+ }
156
+ function sfsi_has_gallery_plugin($gallery_plugins)
157
+ {
158
+ foreach ($gallery_plugins as $key => $gallery_plugin) {
159
+ $sfsi_show_gallery_banner = sfsi_check_on_plugin_page($gallery_plugin['dir_slug'], $gallery_plugin['option_name']);
160
+ if ($sfsi_show_gallery_banner) {
161
+ return $sfsi_show_gallery_banner;
162
+ }
163
+ }
164
+ }
165
+ function sfsi_has_cache_plugin($optimization_plugins)
166
+ {
167
+ foreach ($optimization_plugins as $key => $optimization_plugin) {
168
+ $sfsi_show_optimization_plugin = sfsi_check_on_plugin_page($optimization_plugin['dir_slug'], $optimization_plugin['option_name']);
169
+ if ($sfsi_show_optimization_plugin) {
170
+ return $sfsi_show_optimization_plugin;
171
+ }
172
+ }
173
+ }
174
+
175
+ function sfsi_has_share_count_plugin($sharecount_plugins)
176
+ {
177
+ foreach ($sharecount_plugins as $key => $sharecount_plugin) {
178
+ $sfsi_show_share_count_plugin = sfsi_check_on_plugin_page($sharecount_plugin['dir_slug'], $sharecount_plugin['option_name']);
179
+ if ($sfsi_show_share_count_plugin) {
180
+ return $sfsi_show_share_count_plugin;
181
+ }
182
+ }
183
+ }
184
+
185
+ function sfsi_has_google_analytics_plugin($google_analytics)
186
+ {
187
+ foreach ($google_analytics as $key => $google_analytic) {
188
+ $sfsi_show_analytics_plugin = sfsi_check_on_plugin_page($google_analytic['dir_slug'], $google_analytic['option_name']);
189
+ if ($sfsi_show_analytics_plugin) {
190
+ return $sfsi_show_analytics_plugin;
191
+ }
192
+ }
193
+ }
194
+
195
+ function sfsi_has_gdpr_plugins($gdpr_plugins)
196
+ {
197
+ foreach ($gdpr_plugins as $key => $gdpr_plugin) {
198
+ $sfsi_show_gdpr_plugin = sfsi_check_on_plugin_page($gdpr_plugin['dir_slug'], $gdpr_plugin['option_name']);
199
+ if ($sfsi_show_gdpr_plugin) {
200
+ return $sfsi_show_gdpr_plugin;
201
+ }
202
+ }
203
+ }
204
+
205
+ function sfsi_check_not_show_other_plugin_settings_page($gallery_plugins, $optimization_plugins, $sharecount_plugins, $google_analytics, $gdpr_plugins)
206
+ {
207
+ $all_banner = array(
208
+ sfsi_has_gallery_plugin($gallery_plugins),
209
+ sfsi_has_cache_plugin($optimization_plugins),
210
+ sfsi_has_share_count_plugin($sharecount_plugins),
211
+ sfsi_has_google_analytics_plugin($google_analytics),
212
+ sfsi_has_gdpr_plugins($gdpr_plugins)
213
+ );
214
+ $check_any_banner_is_true = in_array(true, $all_banner);
215
+ return $check_any_banner_is_true;
216
+ }
217
+ function sfsi_social_media_counts_active_onhttp()
218
+ {
219
+ // check if user has activated the counts and his homepage has count on fb
220
+ $sfsi_section4 = unserialize(get_option('sfsi_section4_options', false));
221
+ $sfsi_section1 = unserialize(get_option('sfsi_section1_options', false));
222
+ if ($sfsi_section1['sfsi_facebook_display'] && $sfsi_section4['sfsi_display_counts'] == "yes" && $sfsi_section4['sfsi_facebook_countsDisplay'] == "yes") {
223
+ return true;
224
+ };
225
+ return false;
226
+ }
227
+
228
+ function sfsi_should_show_loyalty()
229
+ {
230
+ // check if domain starts with a;
231
+ if (strtolower(substr($_SERVER['SERVER_NAME'], 0, 1)) == "a") {
232
+ return true;
233
+ }
234
+ return false;
235
+ }
236
+
237
+ function sfsi_check_banner_criteria($banner, $gallery_plugins, $optimization_plugins, $sharecount_plugins, $google_analytics, $gdpr_plugins, $time)
238
+ {
239
+ // var_dump($banner);
240
+ if (
241
+ ($banner['is_active'] == "yes") &&
242
+ $time >= ($banner['timestamp']) &&
243
+ (!sfsi_check_not_show_other_plugin_settings_page($gallery_plugins, $optimization_plugins, $sharecount_plugins, $google_analytics, $gdpr_plugins))
244
+ ) {
245
+ return true;
246
+ }
247
+ return false;
248
+ }
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" 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>
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" class="sfsi_getMeFullAccess_class" 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>
views/sfsi_question3.php CHANGED
@@ -66,7 +66,7 @@ if(!is_null($analyst_cache) && isset($analyst_cache["plugin_to_install"])){
66
 
67
  <p style="display:block">
68
 
69
- <span class="sfsi_toglepstpgspn" style="display:inline-block;float:left;">Show a Pinterest icon over images on mouse-over </span>- <span><a href="https://www.ultimatelysocial.com/usm-premium/?utm_source=usmi_settings_page&utm_campaign=pinterest_icon_mouse_over&utm_medium=link" target="_blank" style="font-weight:800">Premium feature</a></span>
70
 
71
  </p>
72
 
66
 
67
  <p style="display:block">
68
 
69
+ <span class="sfsi_toglepstpgspn" style="display:inline-block;float:left;">Show a Pinterest icon over images on mouse-over </span>&nbsp;- <span><a href="https://www.ultimatelysocial.com/usm-premium/?utm_source=usmi_settings_page&utm_campaign=pinterest_icon_mouse_over&utm_medium=link" target="_blank" style="font-weight:800">Premium feature</a></span>
70
 
71
  </p>
72
 
views/sfsi_section_for_premium.php CHANGED
@@ -4,28 +4,34 @@
4
  text-align: center;
5
  width: 75%;
6
  }
7
- .sfsi-footer-pointing-to-premium-plugin{
 
8
  float: left;
9
  background: #fff;
10
  padding: 33px 0px;
11
  color: #414951 !important;
12
  }
13
- .sfsi-footer-pointing-heading{
 
14
  margin-top: 40px;
15
  text-align: center;
16
  padding-bottom: 15px;
17
  }
18
- .sfsi-footer-pointing-heading p{
 
19
  font-size: 23px;
20
  font-weight: 600;
21
  }
22
- .sfsi-footer-pointing-heading .sfsi-green-heading{
 
23
  color: #12a252;
24
  }
25
- .sfsi-footer-pointing-content{
 
26
  background: #fff;
27
  }
28
- .sfsi-footer-left-section{
 
29
  width: 57%;
30
  position: relative;
31
  min-height: 1px;
@@ -34,7 +40,8 @@
34
  padding-left: 15px;
35
  margin-left: 15px;
36
  }
37
- .sfsi-footer-right-section{
 
38
  width: 34%;
39
  position: relative;
40
  min-height: 1px;
@@ -43,21 +50,23 @@
43
  padding-left: 15px;
44
  text-align: center;
45
  }
46
- .sfsi-equal-col-md-6{
 
47
  width: 50%;
48
  position: relative;
49
  min-height: 1px;
50
  float: left;
51
  }
52
-
53
- .sfsi-left-image-section{
54
  width: 52px;
55
  display: inline-block;
56
  text-align: center;
57
  height: 43px;
58
  vertical-align: middle;
59
  }
60
- .sfsi-li-right-content{
 
61
  text-align: left;
62
  padding-left: 25px;
63
  font-size: 16px;
@@ -66,21 +75,24 @@
66
  width: calc(100% - 95px);
67
  display: inline-block;
68
  }
69
- .sfsi-footer-left-section ul li:not(:last-child){
 
70
  margin-bottom: 20px;
71
  }
72
- .sfsi-checkout-premium-plugin-button{
 
73
  font-size: 18px;
74
  text-align: center;
75
  background: #12a252;
76
- color: #FFF!important;
77
  padding: 11px 30px;
78
  text-decoration: none;
79
  display: inline-block;
80
  margin-top: 15px;
81
  font-weight: 700;
82
  }
83
- .so-much-more{
 
84
  float: left;
85
  width: 100%;
86
  text-align: center;
@@ -88,46 +100,57 @@
88
  margin-top: 28px !important;
89
  font-weight: 700 !important;
90
  }
91
- .so-much-more a{
 
92
  color: #12a252;
93
  }
94
- .sfsi-footer-bottom-text{
 
95
  float: left;
96
  width: 99%;
97
  text-align: center;
98
  color: #414951 !important;
99
  padding-top: 15px !important;
100
  }
101
- .sfsi-footer-bottom-text p{
 
102
  font-size: 18px;
103
  }
104
- @media(min-width: 320px) and (max-width: 480px){
105
- .sfsi-footer-container{
 
106
  width: 100% !important;
107
  }
108
- .sfsi-footer-bottom-text{
 
109
  display: inline-block;
110
  float: left !important;
111
  width: 100% !important;
112
  }
113
  }
114
- @media (min-width: 320px) and (max-width: 767px){
115
- .sfsi-equal-col-xs-12{
 
116
  width: 100%;
117
  }
 
118
  .sfsi-footer-left-section {
119
  width: 76%;
120
  }
 
121
  .sfsi-footer-right-section {
122
  width: 88%;
123
  padding-top: 30px;
124
  }
125
- .sfsi-right-video iframe{
 
126
  height: 125px;
127
  }
 
128
  .sfsi-checkout-premium-plugin-button {
129
  font-size: 16px;
130
  }
 
131
  .sfsi-footer-bottom-text {
132
  float: unset !important;
133
  width: 65%;
@@ -135,69 +158,86 @@
135
  margin-right: auto;
136
  }
137
  }
138
- @media(min-width: 768px) and (max-width: 1023px){
139
- .sfsi-footer-container{
 
140
  width: 100%;
141
  }
 
142
  .sfsi-footer-left-section {
143
  width: 95%;
144
  }
 
145
  .sfsi-footer-right-section {
146
  width: 95%;
147
  margin-top: 20px;
148
  }
 
149
  .sfsi-footer-pointing-heading p {
150
  font-size: 20px;
151
  }
152
  }
153
- @media(min-width: 1024px) and (max-width: 1032px){
154
- .sfsi-footer-container{
 
155
  width: 100%;
156
  }
 
157
  .sfsi-footer-left-section {
158
  width: 56%;
159
  margin-left: 0px !important;
160
  }
 
161
  .sfsi-footer-right-section {
162
  width: 34%;
163
  }
164
  }
165
- @media(min-width: 1033px) and (max-width: 1050px){
 
166
  .sfsi-footer-left-section {
167
  width: 56%;
168
  }
 
169
  .sfsi-footer-right-section {
170
  width: 35%;
171
  }
172
  }
173
- @media(min-width: 1051px) and (max-width: 1115px){
 
174
  .sfsi-footer-left-section {
175
  width: 52%;
176
  }
 
177
  .sfsi-footer-right-section {
178
  width: 39%;
179
  }
180
  }
181
- @media(min-width: 1116px) and (max-width: 1223px){
 
182
  .sfsi-footer-left-section {
183
  width: 52%;
184
  }
 
185
  .sfsi-footer-right-section {
186
  width: 40%;
187
  }
188
  }
189
- @media(min-width: 1224px) and (max-width: 1347px){
 
190
  .sfsi-footer-left-section {
191
  width: 50%;
192
  }
 
193
  .sfsi-footer-right-section {
194
  width: 43%;
195
  }
196
  }
197
- @media(min-width: 1348px) and (max-width: 2300px){
 
198
  .sfsi-footer-left-section {
199
  width: 51%;
200
  }
 
201
  .sfsi-footer-right-section {
202
  width: 40%;
203
  }
@@ -282,7 +322,7 @@
282
  </li>
283
  <li>
284
  <span class="sfsi-left-image-section">
285
- <img src="<?php echo SFSI_PLUGURL ?>images/footer_banner/more_platforms.png" alt='error'>
286
  </span>
287
  <span class="sfsi-li-right-content">
288
  More platforms
@@ -303,7 +343,7 @@
303
  <iframe src="https://video.inchev.com/videos/embed/c952d896-34be-45bc-8142-ba14694c1bd0" frameborder="0" webkitallowfullscreen="" mozallowfullscreen="" allowfullscreen="" style="position:absolute;top:0;left:0;width:100%;height:100%;"></iframe>
304
  </div>
305
  </span>
306
- <a target="_blank" href="https://www.ultimatelysocial.com/usm-premium/?utm_source=usmi_settings_page&utm_campaign=new_bottom_banner_to_checkout&utm_medium=banner" class="sfsi-checkout-premium-plugin-button">Check out the Premium Plugin >></a>
307
  </div>
308
  </div>
309
  </div>
@@ -318,9 +358,99 @@
318
 
319
 
320
  <!-- <div style="clear:both">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
321
 
322
- <?php $noncea = wp_create_nonce("sfsi_installDate"); ?>
323
- <label style="font-size: 17px;">Installed date: </label>
324
- <input type="text" name="sfsi_installDate" placeholder="date" value="<?php echo get_option("sfsi_installDate");?>">
325
- <button type="button" id="sfsi_installDate" data-nonce="<?php echo $noncea;?>"> click</button>
 
326
  </div> -->
4
  text-align: center;
5
  width: 75%;
6
  }
7
+
8
+ .sfsi-footer-pointing-to-premium-plugin {
9
  float: left;
10
  background: #fff;
11
  padding: 33px 0px;
12
  color: #414951 !important;
13
  }
14
+
15
+ .sfsi-footer-pointing-heading {
16
  margin-top: 40px;
17
  text-align: center;
18
  padding-bottom: 15px;
19
  }
20
+
21
+ .sfsi-footer-pointing-heading p {
22
  font-size: 23px;
23
  font-weight: 600;
24
  }
25
+
26
+ .sfsi-footer-pointing-heading .sfsi-green-heading {
27
  color: #12a252;
28
  }
29
+
30
+ .sfsi-footer-pointing-content {
31
  background: #fff;
32
  }
33
+
34
+ .sfsi-footer-left-section {
35
  width: 57%;
36
  position: relative;
37
  min-height: 1px;
40
  padding-left: 15px;
41
  margin-left: 15px;
42
  }
43
+
44
+ .sfsi-footer-right-section {
45
  width: 34%;
46
  position: relative;
47
  min-height: 1px;
50
  padding-left: 15px;
51
  text-align: center;
52
  }
53
+
54
+ .sfsi-equal-col-md-6 {
55
  width: 50%;
56
  position: relative;
57
  min-height: 1px;
58
  float: left;
59
  }
60
+
61
+ .sfsi-left-image-section {
62
  width: 52px;
63
  display: inline-block;
64
  text-align: center;
65
  height: 43px;
66
  vertical-align: middle;
67
  }
68
+
69
+ .sfsi-li-right-content {
70
  text-align: left;
71
  padding-left: 25px;
72
  font-size: 16px;
75
  width: calc(100% - 95px);
76
  display: inline-block;
77
  }
78
+
79
+ .sfsi-footer-left-section ul li:not(:last-child) {
80
  margin-bottom: 20px;
81
  }
82
+
83
+ .sfsi-checkout-premium-plugin-button {
84
  font-size: 18px;
85
  text-align: center;
86
  background: #12a252;
87
+ color: #FFF !important;
88
  padding: 11px 30px;
89
  text-decoration: none;
90
  display: inline-block;
91
  margin-top: 15px;
92
  font-weight: 700;
93
  }
94
+
95
+ .so-much-more {
96
  float: left;
97
  width: 100%;
98
  text-align: center;
100
  margin-top: 28px !important;
101
  font-weight: 700 !important;
102
  }
103
+
104
+ .so-much-more a {
105
  color: #12a252;
106
  }
107
+
108
+ .sfsi-footer-bottom-text {
109
  float: left;
110
  width: 99%;
111
  text-align: center;
112
  color: #414951 !important;
113
  padding-top: 15px !important;
114
  }
115
+
116
+ .sfsi-footer-bottom-text p {
117
  font-size: 18px;
118
  }
119
+
120
+ @media(min-width: 320px) and (max-width: 480px) {
121
+ .sfsi-footer-container {
122
  width: 100% !important;
123
  }
124
+
125
+ .sfsi-footer-bottom-text {
126
  display: inline-block;
127
  float: left !important;
128
  width: 100% !important;
129
  }
130
  }
131
+
132
+ @media (min-width: 320px) and (max-width: 767px) {
133
+ .sfsi-equal-col-xs-12 {
134
  width: 100%;
135
  }
136
+
137
  .sfsi-footer-left-section {
138
  width: 76%;
139
  }
140
+
141
  .sfsi-footer-right-section {
142
  width: 88%;
143
  padding-top: 30px;
144
  }
145
+
146
+ .sfsi-right-video iframe {
147
  height: 125px;
148
  }
149
+
150
  .sfsi-checkout-premium-plugin-button {
151
  font-size: 16px;
152
  }
153
+
154
  .sfsi-footer-bottom-text {
155
  float: unset !important;
156
  width: 65%;
158
  margin-right: auto;
159
  }
160
  }
161
+
162
+ @media(min-width: 768px) and (max-width: 1023px) {
163
+ .sfsi-footer-container {
164
  width: 100%;
165
  }
166
+
167
  .sfsi-footer-left-section {
168
  width: 95%;
169
  }
170
+
171
  .sfsi-footer-right-section {
172
  width: 95%;
173
  margin-top: 20px;
174
  }
175
+
176
  .sfsi-footer-pointing-heading p {
177
  font-size: 20px;
178
  }
179
  }
180
+
181
+ @media(min-width: 1024px) and (max-width: 1032px) {
182
+ .sfsi-footer-container {
183
  width: 100%;
184
  }
185
+
186
  .sfsi-footer-left-section {
187
  width: 56%;
188
  margin-left: 0px !important;
189
  }
190
+
191
  .sfsi-footer-right-section {
192
  width: 34%;
193
  }
194
  }
195
+
196
+ @media(min-width: 1033px) and (max-width: 1050px) {
197
  .sfsi-footer-left-section {
198
  width: 56%;
199
  }
200
+
201
  .sfsi-footer-right-section {
202
  width: 35%;
203
  }
204
  }
205
+
206
+ @media(min-width: 1051px) and (max-width: 1115px) {
207
  .sfsi-footer-left-section {
208
  width: 52%;
209
  }
210
+
211
  .sfsi-footer-right-section {
212
  width: 39%;
213
  }
214
  }
215
+
216
+ @media(min-width: 1116px) and (max-width: 1223px) {
217
  .sfsi-footer-left-section {
218
  width: 52%;
219
  }
220
+
221
  .sfsi-footer-right-section {
222
  width: 40%;
223
  }
224
  }
225
+
226
+ @media(min-width: 1224px) and (max-width: 1347px) {
227
  .sfsi-footer-left-section {
228
  width: 50%;
229
  }
230
+
231
  .sfsi-footer-right-section {
232
  width: 43%;
233
  }
234
  }
235
+
236
+ @media(min-width: 1348px) and (max-width: 2300px) {
237
  .sfsi-footer-left-section {
238
  width: 51%;
239
  }
240
+
241
  .sfsi-footer-right-section {
242
  width: 40%;
243
  }
322
  </li>
323
  <li>
324
  <span class="sfsi-left-image-section">
325
+ <img src="<?php echo SFSI_PLUGURL ?>images/footer_banner/more_platforms.png" alt='error'>
326
  </span>
327
  <span class="sfsi-li-right-content">
328
  More platforms
343
  <iframe src="https://video.inchev.com/videos/embed/c952d896-34be-45bc-8142-ba14694c1bd0" frameborder="0" webkitallowfullscreen="" mozallowfullscreen="" allowfullscreen="" style="position:absolute;top:0;left:0;width:100%;height:100%;"></iframe>
344
  </div>
345
  </span>
346
+ <a target="_blank" href="https://www.ultimatelysocial.com/usm-premium/?utm_source=usmi_settings_page&utm_campaign=new_bottom_banner_to_checkout&utm_medium=banner" class="sfsi-checkout-premium-plugin-button">Check out the Premium Plugin >></a>
347
  </div>
348
  </div>
349
  </div>
358
 
359
 
360
  <!-- <div style="clear:both">
361
+ <?php // $noncea = wp_create_nonce("sfsi_installDate"); ?>
362
+ <label style="font-size: 17px;">Installed date: </label>
363
+ <input type="text" name="sfsi_installDate" placeholder="date" value="<?php // echo get_option("sfsi_installDate"); ?>">
364
+ <button type="button" id="sfsi_installDate" data-nonce="<?php // echo $noncea; ?>"> click</button>
365
+ </div> -->
366
+
367
+ <!-- <div style="clear:both">
368
+ <?php // // $noncec = wp_create_nonce("sfsi_currentDate"); ?>
369
+ <label style="font-size: 17px;">Current date: </label>
370
+ <input type="text" name="sfsi_currentDate" placeholder="date" value="<?php // echo get_option("sfsi_currentDate"); ?>">
371
+ <button type="button" id="sfsi_currentDate" data-nonce="<?php // echo $noncec; ?>"> click</button>
372
+ </div> -->
373
+ <!-- <div style="clear:both">
374
+ <?php // $noncec = wp_create_nonce("sfsi_showNextBannerDate"); ?>
375
+ <label style="font-size: 17px;">show next banner in (ex: 1 seconds,1 minute,1 hour,1 day ): </label>
376
+ <input type="text" name="sfsi_showNextBannerDate" placeholder="no of days" value="<?php // echo get_option("sfsi_showNextBannerDate"); ?>">
377
+ <button type="button" id="sfsi_showNextBannerDate" data-nonce="<?php // echo $noncec; ?>"> click</button>
378
+ </div>
379
+ <div style="clear:both">
380
+ <?php // $noncec = wp_create_nonce("sfsi_cycleDate"); ?>
381
+ <label style="font-size: 17px;">Cycle in (ex: 1 seconds,1 minute,1 hour,1 day ): </label>
382
+ <input type="text" name="sfsi_cycleDate" placeholder="no of days" value="<?php // echo get_option("sfsi_cycleDate"); ?>">
383
+ <button type="button" id="sfsi_cycleDate" data-nonce="<?php // echo $noncec; ?>"> click</button>
384
+ </div>
385
+ <div style="clear:both">
386
+ <?php // $noncec = wp_create_nonce("sfsi_loyaltyDate"); ?>
387
+ <label style="font-size: 17px;">Loyalty in (ex: 1 seconds,1 minute,1 hour,1 day ): </label>
388
+ <input type="text" name="sfsi_loyaltyDate" placeholder="no of days" value="<?php // echo get_option("sfsi_loyaltyDate"); ?>">
389
+ <button type="button" id="sfsi_loyaltyDate" data-nonce="<?php // echo $noncec; ?>"> click</button>
390
+ </div>
391
+ <?php //
392
+ // $sfsi_banner_global_firsttime_offer = unserialize(get_option('sfsi_banner_global_firsttime_offer', false));
393
+ // $sfsi_banner_global_pinterest = unserialize(get_option('sfsi_banner_global_pinterest', false));
394
+ // $sfsi_banner_global_social = unserialize(get_option('sfsi_banner_global_social', false));
395
+ // $sfsi_banner_global_load_faster = unserialize(get_option('sfsi_banner_global_load_faster', false));
396
+ // $sfsi_banner_global_shares = unserialize(get_option('sfsi_banner_global_shares', false));
397
+ // $sfsi_banner_global_gdpr = unserialize(get_option('sfsi_banner_global_gdpr', false));
398
+ // $sfsi_banner_global_http = unserialize(get_option('sfsi_banner_global_http', false));
399
+ // $sfsi_banner_global_upgrade = unserialize(get_option('sfsi_banner_global_upgrade', false));
400
+ ?>
401
+
402
+ <div style="clear:both">
403
+ <?php // $noncef = wp_create_nonce("sfsi_banner_global_firsttime_offer"); ?>
404
+ <label style="font-size: 17px;">Dismiss Firsttime offer time:</label>
405
+ <input type="text" name="sfsi_banner_global_firsttime_offer" placeholder="date" value="<?php // echo $sfsi_banner_global_firsttime_offer['timestamp'] ?>">
406
+ <button type="button" id="sfsi_banner_global_firsttime_offer" data-nonce="<?php // echo $noncef; ?>"style="display: <?php // echo $sfsi_banner_global_firsttime_offer['is_active'] == "yes" ? "inline-block": "none" ?>;"> This banner will appear</button>
407
+ </div>
408
+
409
+ <div style="clear:both">
410
+ <?php // $noncep = wp_create_nonce("sfsi_banner_global_pinterest"); ?>
411
+ <label style="font-size: 17px;">Dismiss Pinterest time: </label>
412
+ <input type="text" name="sfsi_banner_global_pinterest" placeholder="date" value="<?php // echo $sfsi_banner_global_pinterest['timestamp'] ?>">
413
+ <button type="button" id="sfsi_banner_global_pinterest" data-nonce="<?php // echo $noncep; ?>" style="display: <?php // echo $sfsi_banner_global_pinterest['is_active'] == "yes" ? "inline-block": "none" ?>;"> This banner will appear</button>
414
+ </div>
415
+
416
+ <div style="clear:both">
417
+ <?php // $noncem = wp_create_nonce("sfsi_banner_global_social"); ?>
418
+ <label style="font-size: 17px;">Dismiss Mobile time: </label>
419
+ <input type="text" name="sfsi_banner_global_social" placeholder="date" value="<?php // echo $sfsi_banner_global_social['timestamp'] ?>">
420
+ <button type="button" id="sfsi_banner_global_social" data-nonce="<?php // echo $noncem; ?>" style="display: <?php // echo $sfsi_banner_global_social['is_active'] == "yes" ? "inline-block": "none" ?>;"> This banner will appear</button>
421
+ </div>
422
+
423
+ <div style="clear:both">
424
+ <?php // $noncel = wp_create_nonce("sfsi_banner_global_load_faster"); ?>
425
+ <label style="font-size: 17px;">Dismiss Load faster time: </label>
426
+ <input type="text" name="sfsi_banner_global_load_faster" placeholder="date" value="<?php // echo $sfsi_banner_global_load_faster['timestamp'] ?>">
427
+ <button type="button" id="sfsi_banner_global_load_faster" data-nonce="<?php // echo $noncel; ?>" style="display: <?php // echo $sfsi_banner_global_load_faster['is_active'] == "yes" ? "inline-block": "none" ?>;"> This banner will appear</button>
428
+ </div>
429
+
430
+ <div style="clear:both">
431
+ <?php // $nonces = wp_create_nonce("sfsi_banner_global_shares"); ?>
432
+ <label style="font-size: 17px;">Dismiss Shares time: </label>
433
+ <input type="text" name="sfsi_banner_global_shares" placeholder="date" value="<?php // echo $sfsi_banner_global_shares['timestamp'] ?>">
434
+ <button type="button" id="sfsi_banner_global_shares" data-nonce="<?php // echo $nonces; ?>" style="display: <?php // echo $sfsi_banner_global_shares['is_active'] == "yes" ? "inline-block": "none" ?>;"> This banner will appear</button>
435
+ </div>
436
+
437
+ <div style="clear:both">
438
+ <?php // $nonceg = wp_create_nonce("sfsi_banner_global_gdpr"); ?>
439
+ <label style="font-size: 17px;">Dismiss Gdpr time: </label>
440
+ <input type="text" name="sfsi_banner_global_gdpr" placeholder="date" value="<?php // echo $sfsi_banner_global_gdpr['timestamp'] ?>">
441
+ <button type="button" id="sfsi_banner_global_gdpr" data-nonce="<?php // echo $nonceg; ?>" style="display: <?php // echo $sfsi_banner_global_gdpr['is_active'] == "yes" ? "inline-block": "none" ?>;"> This banner will appear</button>
442
+ </div>
443
+
444
+ <div style="clear:both">
445
+ <?php // $nonceh = wp_create_nonce("sfsi_banner_global_http"); ?>
446
+ <label style="font-size: 17px;">Dismiss Http time: </label>
447
+ <input type="text" name="sfsi_banner_global_http" placeholder="date" value="<?php // echo $sfsi_banner_global_http['timestamp'] ?>">
448
+ <button type="button" id="sfsi_banner_global_http" data-nonce="<?php // echo $nonceh; ?>" style="display: <?php // echo $sfsi_banner_global_http['is_active'] == "yes" ? "inline-block": "none" ?>;"> This banner will appear</button>
449
+ </div>
450
 
451
+ <div style="clear:both">
452
+ <?php // $nonceu = wp_create_nonce("sfsi_banner_global_upgrade"); ?>
453
+ <label style="font-size: 17px;">Dismiss Loyalty time: </label>
454
+ <input type="text" name="sfsi_banner_global_upgrade" placeholder="date" value="<?php // echo $sfsi_banner_global_upgrade['timestamp'] ?>">
455
+ <button type="button" id="sfsi_banner_global_upgrade" data-nonce="<?php // echo $nonceu; ?>" style="display: <?php // echo $sfsi_banner_global_upgrade['is_active'] == "yes" ? "inline-block": "none" ?>;"> This banner will appear</button>
456
  </div> -->
views/subviews/que3/sfsi_que3_place_via_shortcode.php CHANGED
@@ -1,59 +1,58 @@
1
- <?php
2
 
3
- $sfsi_show_via_shortcode = isset($option9['sfsi_show_via_shortcode']) && !empty($option9['sfsi_show_via_shortcode']) ? $option9['sfsi_show_via_shortcode'] : "no";
4
 
5
- $checked = '';
6
- $label_style = 'style="display:none;"';
7
 
8
- if("yes" == $sfsi_show_via_shortcode){
9
- $checked = 'checked="true"';
10
- $label_style = 'style="display:block;"';
11
- }
12
 
13
  ?>
14
 
15
- <li class="sfsi_show_via_shortcode">
16
-
17
- <div class="radio_section tb_4_ck" onclick="checkforinfoslction_checkbox(this);">
18
- <input name="sfsi_show_via_shortcode" <?php echo $checked; ?> type="checkbox" value="<?php echo $sfsi_show_via_shortcode; ?>" class="styled" />
19
- </div>
20
-
21
- <div class="sfsi_right_info">
22
-
23
- <p>
24
- <span class="sfsi_toglepstpgspn">Place via shortcode</span><br>
25
 
26
- <div class="kckslctn" <?php echo $label_style;?>>
27
-
28
- <p>Please use the shortcode <b>[DISPLAY_ULTIMATE_SOCIAL_ICONS]</b> to place the icons anywhere you want.</p>
29
 
30
- <p>Or, place the icons directly into our (theme) codes by using <b>&lt;?php echo do_shortcode('[DISPLAY_ULTIMATE_SOCIAL_ICONS]'); ?&gt;</b></p>
31
 
32
- <p>Want to show icons <b>vertically</b> or <b>centralize the icons</b> in the shortcode container? Or need <b>different settings for mobile</b>? Check out the <a href="https://www.ultimatelysocial.com/usm-premium/" target="_blank"><b>Premium Plugin.</b></a></p>
33
 
34
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
35
  </p>
36
- </div>
37
-
38
- </li>
39
-
40
-
41
- <li class="sfsi_show_via_onhover " style="display:none">
42
- <div class="radio_section tb_4_ck">
43
- <span class="checkbox" style="background-position:0px 0px!important;width:31px"></span>
44
- <input name="" type="checkbox" disable value="" class="hide" style="display:none;" />
45
- </div>
46
- <div class="sfsi_right_info">
47
- <p style="display: inline-flex;">
48
- <span class="sfsi_toglepstpgspn" style="display:inline-block;float:left;">In your theme's header</span>
49
- </p>
50
- <p>
51
- Placing icons in your thene's header can be tricky / technical as CSS & PHP know-how is required (as every theme is different, no "automic" placement is possible).
52
- </p>
53
- <p>
54
- You can try via shortcode (see above), however if you don't want any hassle, check out our <span style="text-decoration: underline;">Premium plugin</span> where - as part of our service - we can place the icons for you, making theme adjustments
55
- where needed. This ensures perfect the perfect appearance (on all devices) for your icons. <a class="pop-up" style="cursor:pointer; color: #12a252 !important;border-bottom: 1px solid #12a252;text-decoration: none;font-weight: bold;" target="_blank">
56
- Get it now </a>
57
- </p>
58
- </div>
59
- </li>
1
+ <?php
2
 
3
+ $sfsi_show_via_shortcode = isset($option9['sfsi_show_via_shortcode']) && !empty($option9['sfsi_show_via_shortcode']) ? $option9['sfsi_show_via_shortcode'] : "no";
4
 
5
+ $checked = '';
6
+ $label_style = 'style="display:none;"';
7
 
8
+ if ("yes" == $sfsi_show_via_shortcode) {
9
+ $checked = 'checked="true"';
10
+ $label_style = 'style="display:block;"';
11
+ }
12
 
13
  ?>
14
 
15
+ <li class="sfsi_show_via_shortcode">
16
+
17
+ <div class="radio_section tb_4_ck" onclick="checkforinfoslction_checkbox(this);">
18
+ <input name="sfsi_show_via_shortcode" <?php echo $checked; ?> type="checkbox" value="<?php echo $sfsi_show_via_shortcode; ?>" class="styled" />
19
+ </div>
20
+
21
+ <div class="sfsi_right_info">
22
+
23
+ <p>
24
+ <span class="sfsi_toglepstpgspn">Place via shortcode</span><br>
25
 
26
+ <div class="kckslctn" <?php echo $label_style; ?>>
 
 
27
 
28
+ <p>Please use the shortcode <b>[DISPLAY_ULTIMATE_SOCIAL_ICONS]</b> to place the icons anywhere you want.</p>
29
 
30
+ <p>Or, place the icons directly into our (theme) codes by using <b>&lt;?php echo do_shortcode('[DISPLAY_ULTIMATE_SOCIAL_ICONS]'); ?&gt;</b></p>
31
 
32
+ <p>Want to show icons <b>vertically</b> or <b>centralize the icons</b> in the shortcode container? Or need <b>different settings for mobile</b>? Check out the <a href="https://www.ultimatelysocial.com/usm-premium/" target="_blank"><b>Premium Plugin.</b></a></p>
33
+
34
+ </div>
35
+ </p>
36
+ </div>
37
+ </li>
38
+ <li class="sfsi_show_via_onhover">
39
+ <div class="radio_section tb_4_ck" onclick="checkforinfoslction_checkbox(this)" ;>
40
+ <!-- <span class="checkbox" style="background-position:0px 0px!important;width:31px"></span> -->
41
+ <input name="sfsi_show_theme_heade" type="checkbox" value="yes" class="styled" />
42
+ </div>
43
+ <div class="sfsi_right_info">
44
+ <p style="display: inline-flex;">
45
+ <span class="sfsi_toglepstpgspn" style="display:inline-block;float:left;">In your theme's header</span>
46
+ </p>
47
+ <div class="kckslctn" style="display: none;">
48
+ <p>
49
+ Placing icons in your theme's header can be tricky / technical as CSS & PHP know-how is required (as every theme is different, no "automatic" placement is possible).
50
  </p>
51
+ <p>
52
+ You can try via shortcode (see above), however if you don't want any hassle, check out our <a class="pop-up" data-id="sfsi_quickpay-overlay" onclick="sfsi_open_quick_checkout(event)"><span style="text-decoration: underline;cursor: pointer;color:#5A6570">Premium plugin</span></a> where - as part of our service - we can place the icons for you, making theme adjustments
53
+ where needed. This ensures the perfect appearance (on all devices) for your icons. <a href="https://www.ultimatelysocial.com/usm-premium/?utm_source=usmi_settings_page&utm_campaign=theme_header_placement&utm_medium=link" style="cursor:pointer; color: #1a1d20 !important;border-bottom: 1px solid #12a252;text-decoration: none;font-weight: bold;" target="_blank">
54
+ <b>Get it now</b> </a>
55
+ </p>
56
+ </div>
57
+ </div>
58
+ </li>