Social Share Icons & Social Share Buttons - Version 3.4.7

Version Description

  • Updated to Wordpress 5.6 compatibility.
  • Updated to PHP 8 compatibility.
Download this release

Release Info

Developer socialsharepro
Plugin Icon 128x128 Social Share Icons & Social Share Buttons
Version 3.4.7
Comparing to
See all releases

Code changes from version 3.4.6 to 3.4.7

css/sfsi-admin-style.css CHANGED
@@ -1876,6 +1876,9 @@ ul.tab_2_email_sec li .radio {
1876
  ul#adminmenu li.toplevel_page_sfsi-plus-options div.wp-menu-image {
1877
  display: none;
1878
  }
 
 
 
1879
 
1880
  #adminmenu li.toplevel_page_sfsi-plus-options a.toplevel_page_sfsi-plus-options {
1881
  padding: 0 0 0 38px;
@@ -3547,9 +3550,9 @@ div#sfsi_plus_langnotice {
3547
  width: 40%;
3548
  }
3549
 
3550
- .tab3 .sub_row label {
3551
  width: 75%;
3552
- }
3553
  }
3554
 
3555
  @media (min-width:768px) and (max-width: 1024px) and (orientation:portrait) {
1876
  ul#adminmenu li.toplevel_page_sfsi-plus-options div.wp-menu-image {
1877
  display: none;
1878
  }
1879
+ #adminmenu #toplevel_page_sfsi-plus-options div.wp-menu-name {
1880
+ padding: 8px 8px 8px 8px;
1881
+ }
1882
 
1883
  #adminmenu li.toplevel_page_sfsi-plus-options a.toplevel_page_sfsi-plus-options {
1884
  padding: 0 0 0 38px;
3550
  width: 40%;
3551
  }
3552
 
3553
+ /* .tab3 .sub_row label {
3554
  width: 75%;
3555
+ } */
3556
  }
3557
 
3558
  @media (min-width:768px) and (max-width: 1024px) and (orientation:portrait) {
css/sfsi-style.css CHANGED
@@ -2268,7 +2268,7 @@ ul.tab_3_list li span {
2268
  -webkit-box-sizing: border-box;
2269
  -moz-box-sizing: border-box;
2270
  box-sizing: border-box;
2271
- margin-top: 10px;
2272
  width: 40px;
2273
  }
2274
 
@@ -2296,7 +2296,7 @@ ul.tab_3_list li span {
2296
  text-align: center;
2297
  white-space: pre;
2298
  width: 33px;
2299
- height: 19px;
2300
  z-index: 9;
2301
  display: inline-block;
2302
  vertical-align: bottom;
@@ -2417,7 +2417,7 @@ h2.optional {
2417
  line-height: 0;
2418
  }
2419
 
2420
- #sfsi_plus_floater .sfsi_plus_fb_tool_bdr .sfsi_plus_inside .icon3 {
2421
  margin: 7px 0 0 0;
2422
  }
2423
 
@@ -2910,9 +2910,6 @@ h2.optional {
2910
  width: 15% !important;
2911
  }
2912
 
2913
- .sfsi_inside .icon2 .fb_iframe_widget span {
2914
- /* width: 500px!important; sunil*/
2915
- }
2916
 
2917
  @media (max-width:767px) {
2918
  .icon2 .fb_iframe_widget span {
@@ -2951,11 +2948,11 @@ h2.optional {
2951
  line-height: 0px;
2952
  }
2953
 
2954
- .sfsi_plus_Sicons .sf_twiter {
2955
  margin: 1px 4px 0 2px;
2956
  line-height: 19px;
2957
  height: 32px;
2958
- }
2959
 
2960
  .sfsi_plus_Sicons.left .sf_subscrbe {
2961
  margin: 2px 8px 0 0;
@@ -2966,7 +2963,7 @@ h2.optional {
2966
  }
2967
 
2968
  .sfsi_plus_Sicons.left .sf_twiter {
2969
- margin: 1px 8px 0 0;
2970
  }
2971
 
2972
  .sfsi_plus_Sicons.right .sf_subscrbe {
@@ -3029,8 +3026,8 @@ h2.optional {
3029
  /*absolute commented as for standard icon it was giving issue while icon was to be aligned centerd.*/
3030
  .sfsi_plus_Sicons .sf_fb .fb_iframe_widget>span {
3031
  position: relative;
3032
- /*width: 450px!important;*/
3033
  float: left;
 
3034
  }
3035
 
3036
  .tab2 .utube_inn label {
@@ -4174,7 +4171,7 @@ label.sfsiplus_toglpstpgsbttl {
4174
  margin-right: 4px;
4175
  }
4176
 
4177
- .sfsi_plus_Sicons .sf_pinit>span {
4178
  height: 22px !important;
4179
  vertical-align: middle;
4180
  }
@@ -4182,7 +4179,7 @@ label.sfsiplus_toglpstpgsbttl {
4182
  .sfsi_plus_Sicons .sf_pinit>span {
4183
  height: 20px !important;
4184
  vertical-align: middle;
4185
- }
4186
 
4187
  /*.sfsi_plus_Sicons .sf_pinit > span > span
4188
  {
@@ -4974,196 +4971,6 @@ a.pop-up .radio {
4974
  margin-bottom: -15px;
4975
  }
4976
 
4977
- @import url('https://fonts.googleapis.com/css?family=Montserrat:300,600&display=swap');
4978
-
4979
- #wpse1_6817 * {
4980
- font-family: 'helveticaneue-light';
4981
- font-weight: 300;
4982
- font-size: 17px;
4983
- -webkit-touch-callout: none;
4984
- -webkit-user-select: none;
4985
- -khtml-user-select: none;
4986
- -moz-user-select: none;
4987
- -ms-user-select: none;
4988
- user-select: none;
4989
- }
4990
-
4991
- #wpse1_6817 b,
4992
- #wpse1_6817_who b {
4993
- font-family: 'helveticaneue-light';
4994
- font-weight: 600 !important;
4995
- }
4996
-
4997
- #wpse1_6817_who {
4998
- font-family: 'helveticaneue-light';
4999
- text-align: right;
5000
- max-width: 1169px;
5001
- margin-left: 2px;
5002
- margin-top: 1px;
5003
- }
5004
-
5005
- #wpse1_6817 {
5006
- background: #fff;
5007
- border: 2px solid #4fbe99;
5008
- border-radius: 3px;
5009
- max-width: 1413px;
5010
- margin-top: 20px;
5011
- padding: 15px 20px;
5012
- margin-right: 20px;
5013
- background: url('../images/wpse1_6817_cdp_bg.png');
5014
- background-repeat: no-repeat;
5015
- background-position: center;
5016
- background-size: cover;
5017
- }
5018
-
5019
- #wpse1_6817_container {
5020
- position: relative;
5021
- line-height: 20px;
5022
- display: flex;
5023
- align-items: center;
5024
- justify-content: space-between;
5025
- }
5026
-
5027
- /* #wpse1_6817_container::after {
5028
- content: '';
5029
- display: block;
5030
- clear: both;
5031
- } */
5032
-
5033
- #wpse1_6817_text {
5034
- float: left;
5035
- line-height: 22px;
5036
- padding-left: 70px;
5037
- padding-top: 2px;
5038
- }
5039
-
5040
- #wpse1_6817_img {
5041
- position: absolute;
5042
- pointer-events: none;
5043
- }
5044
-
5045
- #wpse1_6817_btns {
5046
- float: right;
5047
- top: 4px;
5048
- position: relative;
5049
- }
5050
-
5051
- #wpse1_6817_other {
5052
- float: left;
5053
- white-space: nowrap;
5054
- overflow: hidden;
5055
- text-overflow: clip;
5056
- display: flex;
5057
- }
5058
-
5059
- #wpse1_6817_btns::after {
5060
- content: '';
5061
- display: block;
5062
- clear: both;
5063
- }
5064
-
5065
- #wpse1_6817_install {
5066
- float: left;
5067
- }
5068
-
5069
- #wpse1_6817_show {
5070
- display: inline-block;
5071
- padding-left: 20px;
5072
- white-space: nowrap;
5073
- overflow: hidden;
5074
- text-overflow: clip;
5075
- }
5076
-
5077
- #wpse1_6817_dismiss {
5078
- display: inline-block;
5079
- padding-left: 29px;
5080
- white-space: nowrap;
5081
- overflow: hidden;
5082
- text-overflow: clip;
5083
- }
5084
-
5085
- #wpse1_6817_dismiss span {
5086
- transition: all .3s;
5087
- }
5088
-
5089
- #wpse1_6817_show a {
5090
- line-height: 48px;
5091
- color: #000;
5092
- text-decoration: none !important;
5093
- cursor: pointer;
5094
- }
5095
-
5096
- #wpse1_6817_dismiss input {
5097
- line-height: 48px;
5098
- color: #c5c5c5;
5099
- text-decoration: none !important;
5100
- cursor: pointer;
5101
- border: 0px #000 solid;
5102
- background-color: inherit;
5103
- cursor: pointer;
5104
- }
5105
-
5106
- #wpse1_6817_show a,
5107
- #wpse1_6817_dismiss a {
5108
- opacity: 1;
5109
- transition: all .3s;
5110
- }
5111
-
5112
- #wpse1_6817_show a:hover,
5113
- #wpse1_6817_dismiss a:hover {
5114
- opacity: .6;
5115
- }
5116
-
5117
- #wpse1_6817_install button {
5118
- border: 0;
5119
- outline: none;
5120
- width: 238px;
5121
- max-width: 238px;
5122
- height: 48px;
5123
- max-height: 48px;
5124
- cursor: pointer;
5125
- background: url('../images/wpse1_6817_cdp_button.png');
5126
- background-repeat: no-repeat;
5127
- background-position: center;
5128
- background-size: cover;
5129
- border-radius: 30px;
5130
- opacity: 1;
5131
- transition: all .3s;
5132
- }
5133
-
5134
- #wpse1_6817_install button:hover {
5135
- opacity: .8;
5136
- }
5137
-
5138
- @media screen and (max-width: 1375px) {
5139
- #wpse1_6817_who {
5140
- max-width: calc(100% - 25px);
5141
- margin-left: 2px;
5142
- margin-top: 1px;
5143
- }
5144
- }
5145
-
5146
- @media screen and (max-width: 1320px) {
5147
- #wpse1_6817_btns {
5148
- float: left;
5149
- }
5150
-
5151
- #wpse1_6817_btns:not(.wpse1_6817_btns_installing) {
5152
- padding-left: 69px;
5153
- }
5154
-
5155
- #wpse1_6817_text {
5156
- float: none !important;
5157
- padding-bottom: 10px;
5158
- }
5159
-
5160
- #wpse1_6817_text br {
5161
- display: none;
5162
- }
5163
- }
5164
-
5165
- @media screen and (max-width: 600px) {
5166
- #wpse1_6817_complete {
5167
- display: none;
5168
- }
5169
  }
2268
  -webkit-box-sizing: border-box;
2269
  -moz-box-sizing: border-box;
2270
  box-sizing: border-box;
2271
+ margin-top: -2px;
2272
  width: 40px;
2273
  }
2274
 
2296
  text-align: center;
2297
  white-space: pre;
2298
  width: 33px;
2299
+ height: 21px;
2300
  z-index: 9;
2301
  display: inline-block;
2302
  vertical-align: bottom;
2417
  line-height: 0;
2418
  }
2419
 
2420
+ .sfsi_plus_fb_tool_bdr .sfsi_plus_inside .icon3 {
2421
  margin: 7px 0 0 0;
2422
  }
2423
 
2910
  width: 15% !important;
2911
  }
2912
 
 
 
 
2913
 
2914
  @media (max-width:767px) {
2915
  .icon2 .fb_iframe_widget span {
2948
  line-height: 0px;
2949
  }
2950
 
2951
+ /* .sfsi_plus_Sicons .sf_twiter {
2952
  margin: 1px 4px 0 2px;
2953
  line-height: 19px;
2954
  height: 32px;
2955
+ } */
2956
 
2957
  .sfsi_plus_Sicons.left .sf_subscrbe {
2958
  margin: 2px 8px 0 0;
2963
  }
2964
 
2965
  .sfsi_plus_Sicons.left .sf_twiter {
2966
+ margin: 0px 4px 0 0;
2967
  }
2968
 
2969
  .sfsi_plus_Sicons.right .sf_subscrbe {
3026
  /*absolute commented as for standard icon it was giving issue while icon was to be aligned centerd.*/
3027
  .sfsi_plus_Sicons .sf_fb .fb_iframe_widget>span {
3028
  position: relative;
 
3029
  float: left;
3030
+ height: 21px !important;
3031
  }
3032
 
3033
  .tab2 .utube_inn label {
4171
  margin-right: 4px;
4172
  }
4173
 
4174
+ /* .sfsi_plus_Sicons .sf_pinit>span {
4175
  height: 22px !important;
4176
  vertical-align: middle;
4177
  }
4179
  .sfsi_plus_Sicons .sf_pinit>span {
4180
  height: 20px !important;
4181
  vertical-align: middle;
4182
+ } */
4183
 
4184
  /*.sfsi_plus_Sicons .sf_pinit > span > span
4185
  {
4971
  margin-bottom: -15px;
4972
  }
4973
 
4974
+ .sfsiaftrpstwpr{
4975
+ max-width: none !important;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4976
  }
images/icons_theme/flat/flat_instagram.png CHANGED
Binary file
images/wpse1_6817_cdp.png DELETED
Binary file
images/wpse1_6817_cdp_bg.png DELETED
Binary file
images/wpse1_6817_cdp_button.png DELETED
Binary file
js/custom-admin.js CHANGED
@@ -1310,7 +1310,7 @@ function sfsiplus_showErrorSuc(s, i, e) {
1310
  if ("error" == s) var t = "errorMsg";
1311
  else var t = "sucMsg";
1312
  return SFSI(".tab" + e + ">." + t).html(i), SFSI(".tab" + e + ">." + t).show(),
1313
- SFSI(".tab" + e + ">." + t).effect("highlight", {}, 5e3), setTimeout(function () {
1314
  SFSI("." + t).slideUp("slow");
1315
  }, 5e3), !1;
1316
  }
@@ -2231,7 +2231,7 @@ SFSI(document).ready(function (s) {
2231
  var s = SFSI(this).parent().find("input:checkbox:first");
2232
 
2233
  var inputName = s.attr('name');
2234
- var inputChecked = s.attr("checked");
2235
 
2236
  switch (inputName) {
2237
 
@@ -2746,7 +2746,7 @@ SFSI(document).on("click", '.checkbox', function () {
2746
  var s = SFSI(this).parent().find("input:checkbox:first");
2747
 
2748
  var inputName = s.attr("name");
2749
- var inputChecked = s.attr("checked");
2750
 
2751
  //----------------- Customization for twitter card section STARTS----------------------------//
2752
 
@@ -4073,150 +4073,3 @@ function sfsi_plus_banner_global_upgrade_save(){
4073
  }
4074
  });
4075
  }
4076
-
4077
-
4078
- jQuery(document).ready(function($) {
4079
- console.log('ksdlfsd');
4080
- let entered = false, interval = null;
4081
-
4082
- SFSI('#wpse1_6817_btn').on('click', wpse1_6817_btn);
4083
- SFSI('#wpse1_6817_install_btn').on('click', wpse1_6817_btn_install);
4084
- SFSI('#wpse1_6817_btn').on('mouseenter', wpse1_6817_show);
4085
- SFSI('#wpse1_6817_btn').on('mouseleave', wpse1_6817_hide);
4086
- function hideIt() {
4087
- SFSI('#wpse1_6817_who').hide(300);
4088
- SFSI('#wpse1_6817').css({
4089
- 'overflow': 'hidden',
4090
- 'max-height': SFSI('#wpse1_6817').height(),
4091
- 'max-width': SFSI('#wpse1_6817').width(),
4092
- 'opacity': 1
4093
- });
4094
-
4095
- SFSI('#wpse1_6817').animate({'max-height': '0px', 'opacity': '0', 'padding-top': '0', 'padding-bottom': '0', 'margin-top': '0'}, 300, function () {
4096
- setTimeout(() => { SFSI('#wpse1_6817').remove(); }, 10);
4097
- });
4098
- }
4099
- function wpse1_6817_btn() {
4100
- setTimeout(() => { hideIt(); }, 100);
4101
- SFSI.post(ajaxurl, { action: 'wpse1_6817_btn' });
4102
- }
4103
- function wpse1_6817_btn_install() {
4104
-
4105
- SFSI('#wpse1_6817_install_btn').css({'pointer-events': 'none', 'opacity': '.8'});
4106
- SFSI('#wpse1_6817_btns').addClass('wpse1_6817_btns_installing');
4107
- SFSI('#wpse1_6817_other').css({'max-width': `${SFSI('#wpse1_6817_other').width()}px`, 'max-height': `${SFSI('#wpse1_6817_other').height()}px`, 'overflow': 'hidden'});
4108
- SFSI('#wpse1_6817_show').css({'max-width': `${SFSI('#wpse1_6817_show').width()}px`, 'overflow': 'hidden'});
4109
- SFSI('#wpse1_6817_dismiss').css({'max-width': `${SFSI('#wpse1_6817_dismiss').width()}px`, 'overflow': 'hidden'});
4110
- SFSI('#wpse1_6817_other').animate({'padding-left': '0', 'max-width': '0'}, 500, function () {
4111
- SFSI('#wpse1_6817_btns, #wpse1_6817_install').css({'float': 'right'});
4112
- });
4113
-
4114
- SFSI('#wpse1_6817_text').css({'opacity': '1'});
4115
- SFSI('#wpse1_6817_text').animate({'opacity': '0'}, 500, function () {
4116
- SFSI('#wpse1_6817_text').html(`We\'re downloading this awesome plugin!<br>We will redirect you soon, please wait<span id="wpse1_6817_dots">...</span> :)`);
4117
- SFSI('#wpse1_6817_text').animate({'opacity': '1'}, 500, function () {
4118
- let dox = '..', predox = '...';
4119
- interval = setInterval(() => {
4120
- SFSI('#wpse1_6817_dots').text(dox);
4121
-
4122
- // I named it DOXPARADOX <3
4123
- if (dox == '..' && predox == '...') { dox = '.'; predox = '..' }
4124
- else if (dox == '.' && predox == '...') { dox = '..'; predox = '.' }
4125
- else if (dox == '..' && predox == '..') { dox = '...'; predox = '..' }
4126
- else if (dox == '.' && predox == '..') { dox = '..'; predox = '.' }
4127
- else if (dox == '..' && predox == '.') { dox = '...'; predox = '..' }
4128
- else { dox = '..'; predox = '...' }
4129
- }, 700);
4130
- });
4131
- });
4132
-
4133
- SFSI('#wpse1_6817_btns, #wpse1_6817_install').css({'text-align': 'right'});
4134
- SFSI('#wpse1_6817_show, #wpse1_6817_dismiss').css({'overflow': 'hidden', 'text-align': 'right'});
4135
-
4136
- $.post(ajaxurl, { action: 'wpse1_6817_install' }).done((res) => {
4137
- if (isJsonString(res)) res = cdpParse(res);
4138
- let url = SFSI('#wpse1_6817').data('url');
4139
- if (res.status == 'success') window.location.reload();
4140
- else if (typeof res.url != 'undefined') handleIssue();
4141
- else handleIssue();
4142
- }).fail(() => { handleIssue(); });
4143
-
4144
- function handleIssue() {
4145
- clearInterval(interval);
4146
-
4147
- SFSI('#wpse1_6817_text').animate({'opacity': '0'}, 500, function () {
4148
- SFSI('#wpse1_6817_text').html(`There was an error during plugin download :(<br>Please try to do it manualy, we will redirect you in <span id="wpse1_6817_dots">3</span>s.`);
4149
- SFSI('#wpse1_6817_text').animate({'opacity': '1'}, 500, function () {
4150
- let i = 3;
4151
- interval = setInterval(() => {
4152
- i--;
4153
- SFSI('#wpse1_6817_dots').text(i);
4154
- if (i == 0) {
4155
- let url = SFSI('#wpse1_6817').data('url');
4156
- window.location.href = `${url}/wp-admin/plugin-install.php?s=CopyDeletePosts&tab=search&type=author`;
4157
- }
4158
- }, 1050);
4159
- });
4160
- });
4161
-
4162
- }
4163
-
4164
- }
4165
- function wpse1_6817_show() {
4166
- $('#wpse1_6817_smile').css({'opacity': 1});
4167
- }
4168
- function wpse1_6817_hide() {
4169
- $('#wpse1_6817_smile').css({'opacity': 0});
4170
- }
4171
-
4172
- function isJsonString(str) {
4173
- try { JSON.parse(str); }
4174
- catch (e) {
4175
- if (typeof str === 'string') {
4176
- let reversed = cdpReverseString(str);
4177
- let lastcorrect = reversed.indexOf('}');
4178
- if (lastcorrect == 0) lastcorrect = str.length;
4179
- else lastcorrect = -lastcorrect;
4180
-
4181
- str = str.slice(str.indexOf('{'), lastcorrect);
4182
-
4183
- try {
4184
- JSON.parse(str);
4185
- } catch (e) {
4186
- return false;
4187
- }
4188
- return true;
4189
- } else return false;
4190
- }
4191
- return true;
4192
- }
4193
-
4194
- function cdpReverseString(str) {
4195
- if (typeof str === 'string')
4196
- return (str === '') ? '' : cdpReverseString(str.substr(1)) + str.charAt(0);
4197
- else
4198
- return str;
4199
- }
4200
-
4201
- function cdpParse(str) {
4202
- try { JSON.parse(str); }
4203
- catch (e) {
4204
- if (typeof str === 'string') {
4205
- let reversed = cdpReverseString(str);
4206
- let lastcorrect = reversed.indexOf('}');
4207
- if (lastcorrect == 0) lastcorrect = str.length;
4208
- else lastcorrect = -lastcorrect;
4209
- str = str.slice(str.indexOf('{'), lastcorrect);
4210
- try {
4211
- JSON.parse(str);
4212
- } catch (e) {
4213
- return false;
4214
- }
4215
- return JSON.parse(str);
4216
- } else return false;
4217
- }
4218
- return JSON.parse(str);
4219
- }
4220
-
4221
- });
4222
-
1310
  if ("error" == s) var t = "errorMsg";
1311
  else var t = "sucMsg";
1312
  return SFSI(".tab" + e + ">." + t).html(i), SFSI(".tab" + e + ">." + t).show(),
1313
+ SFSI(".tab" + e + ">." + t), setTimeout(function () {
1314
  SFSI("." + t).slideUp("slow");
1315
  }, 5e3), !1;
1316
  }
2231
  var s = SFSI(this).parent().find("input:checkbox:first");
2232
 
2233
  var inputName = s.attr('name');
2234
+ var inputChecked = s.prop("checked");
2235
 
2236
  switch (inputName) {
2237
 
2746
  var s = SFSI(this).parent().find("input:checkbox:first");
2747
 
2748
  var inputName = s.attr("name");
2749
+ var inputChecked = s.prop("checked");
2750
 
2751
  //----------------- Customization for twitter card section STARTS----------------------------//
2752
 
4073
  }
4074
  });
4075
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
js/custom.js CHANGED
@@ -6,7 +6,7 @@ function sfsiplus_showErrorSuc(s, i, e) {
6
  if ("error" == s) var t = "errorMsg";
7
  else var t = "sucMsg";
8
  return SFSI(".tab" + e + ">." + t).html(i), SFSI(".tab" + e + ">." + t).show(),
9
- SFSI(".tab" + e + ">." + t).effect("highlight", {}, 5e3), setTimeout(function () {
10
  SFSI("." + t).slideUp("slow");
11
  }, 5e3), !1;
12
  }
@@ -122,13 +122,19 @@ function sfsi_plus_float_widget(s) {
122
  }
123
 
124
  function sfsi_plus_shuffle() {
125
- var s = [];
126
- SFSI(".sfsi_plus_wicons ").each(function (i) {
127
- SFSI(this).text().match(/^\s*$/) || (s[i] = "<div class='" + SFSI(this).attr("class") + "'>" + SFSI(this).html() + "</div>",
128
- SFSI(this).fadeOut("slow"), SFSI(this).insertBefore(SFSI(this).prev(".sfsi_plus_wicons")),
129
- SFSI(this).fadeIn("slow"));
130
- }), s = sfsiplus_Shuffle(s), $("#sfsi_plus_wDiv").html("");
131
- for (var i = 0; i < testArray.length; i++) $("#sfsi_plus_wDiv").append(s[i]);
 
 
 
 
 
 
132
  }
133
 
134
  function sfsiplus_Shuffle(s) {
6
  if ("error" == s) var t = "errorMsg";
7
  else var t = "sucMsg";
8
  return SFSI(".tab" + e + ">." + t).html(i), SFSI(".tab" + e + ">." + t).show(),
9
+ SFSI(".tab" + e + ">." + t), setTimeout(function () {
10
  SFSI("." + t).slideUp("slow");
11
  }, 5e3), !1;
12
  }
122
  }
123
 
124
  function sfsi_plus_shuffle() {
125
+ var $ = window.jQuery;
126
+
127
+ return SFSI('.sfsi_plus_wDiv').each(function (index, container) {
128
+ var s = [];
129
+ s = SFSI(container).find(".sfsi_plus_wicons ");
130
+ s = sfsiplus_Shuffle(s);
131
+ SFSI(container).html("");
132
+ for (var i = 0; i < s.length; i++) {
133
+ SFSI(s[i]).css('transform', 'none');
134
+ SFSI(s[i]).css('position', 'relative');
135
+ SFSI(container).append(s[i]);
136
+ }
137
+ })
138
  }
139
 
140
  function sfsiplus_Shuffle(s) {
libs/sfsi_Init_JqueryCss.php CHANGED
@@ -9,6 +9,7 @@ function sfsiplus_plugin_back_enqueue_script()
9
  wp_enqueue_style("SFSIPLUSbootstrap", SFSI_PLUS_PLUGURL . 'css/bootstrap.min.css');
10
  wp_enqueue_style('thickbox');
11
  wp_enqueue_style("SFSIPLUSmainCss", SFSI_PLUS_PLUGURL . 'css/sfsi-style.css' );
 
12
  /* include CSS for backend */
13
  wp_enqueue_style("SFSIPLUSmainadminCss", SFSI_PLUS_PLUGURL . 'css/sfsi-admin-style.css' );
14
 
@@ -47,6 +48,9 @@ function sfsiplus_plugin_back_enqueue_script()
47
  wp_enqueue_script("SFSIPLUSCustomFormJs");
48
 
49
  wp_register_script('SFSIPLUSCustomJs', SFSI_PLUS_PLUGURL . 'js/custom-admin.js', '', '', true);
 
 
 
50
 
51
  // Localize the script with new data
52
  $translation_array = array(
9
  wp_enqueue_style("SFSIPLUSbootstrap", SFSI_PLUS_PLUGURL . 'css/bootstrap.min.css');
10
  wp_enqueue_style('thickbox');
11
  wp_enqueue_style("SFSIPLUSmainCss", SFSI_PLUS_PLUGURL . 'css/sfsi-style.css' );
12
+ wp_enqueue_style("SFSIPLUSWpsesCss", SFSI_PLUS_PLUGURL . 'wpses/wpse1_6817_notiad.min.css' );
13
  /* include CSS for backend */
14
  wp_enqueue_style("SFSIPLUSmainadminCss", SFSI_PLUS_PLUGURL . 'css/sfsi-admin-style.css' );
15
 
48
  wp_enqueue_script("SFSIPLUSCustomFormJs");
49
 
50
  wp_register_script('SFSIPLUSCustomJs', SFSI_PLUS_PLUGURL . 'js/custom-admin.js', '', '', true);
51
+
52
+ wp_register_script('SFSIPLUSWpses', SFSI_PLUS_PLUGURL . 'wpses/wpse1_6817_notiad.min.js', '', '', true);
53
+ wp_enqueue_script("SFSIPLUSWpses");
54
 
55
  // Localize the script with new data
56
  $translation_array = array(
libs/sfsi_gutenberg_block.php CHANGED
@@ -104,7 +104,7 @@ function sfsi_plus_render_shortcode(){
104
  }
105
 
106
 
107
- function sfsi_plus_render_gutenberg_round($args = null, $content = null,$share_url=null, $is_admin){
108
  $instance = array("showf" => 1, "title" => '');
109
  $sfsi_plus_section8_options = get_option("sfsi_plus_section8_options");
110
  $sfsi_plus_section8_options = unserialize($sfsi_plus_section8_options);
104
  }
105
 
106
 
107
+ function sfsi_plus_render_gutenberg_round($args = null, $content = null,$share_url=null, $is_admin = null){
108
  $instance = array("showf" => 1, "title" => '');
109
  $sfsi_plus_section8_options = get_option("sfsi_plus_section8_options");
110
  $sfsi_plus_section8_options = unserialize($sfsi_plus_section8_options);
libs/sfsi_install_uninstall.php CHANGED
@@ -20,7 +20,7 @@ function sfsi_plus_update_plugin()
20
  $sfsi_banner_error_version = ['3.39','3.40','3.41'];
21
 
22
  //Install version
23
- update_option("sfsi_plus_pluginVersion", "3.46");
24
  if(!get_option('sfsi_plus_serverphpVersionnotification'))
25
  {
26
  add_option("sfsi_plus_serverphpVersionnotification", "yes");
20
  $sfsi_banner_error_version = ['3.39','3.40','3.41'];
21
 
22
  //Install version
23
+ update_option("sfsi_plus_pluginVersion", "3.47");
24
  if(!get_option('sfsi_plus_serverphpVersionnotification'))
25
  {
26
  add_option("sfsi_plus_serverphpVersionnotification", "yes");
libs/sfsi_widget.php CHANGED
@@ -233,13 +233,13 @@ class Sfsi_Plus_Widget extends WP_Widget
233
  if ($sfsi_section3['sfsi_plus_shuffle_Firstload'] == "yes" && $sfsi_section3['sfsi_plus_shuffle_interval'] == "yes") {
234
  $shuffle_time = (isset($sfsi_section3['sfsi_plus_shuffle_intervalTime'])) ? $sfsi_section3['sfsi_plus_shuffle_intervalTime'] : 3;
235
  $shuffle_time = $shuffle_time * 1000;
236
- $jquery .= "window.addEventListener('sfsi_plus_functions_loaded',function( totwith=" . (isset($totwith) ? $totwith : 0) . " ) { jQuery('.sfsi_plus_wDiv').each(function(){ new window.Manipulator( jQuery(this)); }); setTimeout(function(){ jQuery('#sfsi_plus_wDiv').each(function(){ jQuery(this).click(); })},2000); setInterval(function(){ jQuery('#sfsi_plus_wDiv').each(function(){ jQuery(this).click(); })}," . $shuffle_time . "); });";
237
  } else if ($sfsi_section3['sfsi_plus_shuffle_Firstload'] == "no" && $sfsi_section3['sfsi_plus_shuffle_interval'] == "yes") {
238
  $shuffle_time = (isset($sfsi_section3['sfsi_plus_shuffle_intervalTime'])) ? $sfsi_section3['sfsi_plus_shuffle_intervalTime'] : 3;
239
  $shuffle_time = $shuffle_time * 1000;
240
- $jquery .= "window.addEventListener('sfsi_plus_functions_loaded',function( totwith=" . (isset($totwith) ? $totwith : 0) . " ) { jQuery('.sfsi_plus_wDiv').each(function(){ new window.Manipulator( jQuery(this)); }); setInterval(function(){ jQuery('#sfsi_plus_wDiv').each(function(){ jQuery(this).click(); })}," . $shuffle_time . "); });";
241
  } else {
242
- $jquery .= "window.addEventListener('sfsi_plus_functions_loaded',function( totwith=" . (isset($totwith) ? $totwith : 0) . " ) { jQuery('.sfsi_plus_wDiv').each(function(){ new window.Manipulator( jQuery(this)); }); setTimeout(function(){ jQuery('#sfsi_plus_wDiv').each(function(){ jQuery(this).click(); })},2000); });";
243
  }
244
  }
245
 
233
  if ($sfsi_section3['sfsi_plus_shuffle_Firstload'] == "yes" && $sfsi_section3['sfsi_plus_shuffle_interval'] == "yes") {
234
  $shuffle_time = (isset($sfsi_section3['sfsi_plus_shuffle_intervalTime'])) ? $sfsi_section3['sfsi_plus_shuffle_intervalTime'] : 3;
235
  $shuffle_time = $shuffle_time * 1000;
236
+ $jquery .= "jQuery( document ).ready(function( ) { jQuery('.sfsi_plus_wDiv').each(function(){ new window.Manipulator( jQuery(this)); }); setTimeout(function(){sfsi_plus_shuffle(); jQuery('#sfsi_plus_wDiv').each(function(){ jQuery(this).click(); })},2000); setInterval(function(){ jQuery('#sfsi_plus_wDiv').each(function(){ jQuery(this).click(); })}," . $shuffle_time . "); });";
237
  } else if ($sfsi_section3['sfsi_plus_shuffle_Firstload'] == "no" && $sfsi_section3['sfsi_plus_shuffle_interval'] == "yes") {
238
  $shuffle_time = (isset($sfsi_section3['sfsi_plus_shuffle_intervalTime'])) ? $sfsi_section3['sfsi_plus_shuffle_intervalTime'] : 3;
239
  $shuffle_time = $shuffle_time * 1000;
240
+ $jquery .= "jQuery( document ).ready(function( ) { jQuery('.sfsi_plus_wDiv').each(function(){ new window.Manipulator( jQuery(this)); }); setInterval(function(){sfsi_plus_shuffle(); jQuery('#sfsi_plus_wDiv').each(function(){ jQuery(this).click(); })}," . $shuffle_time . "); });";
241
  } else {
242
+ $jquery .= "jQuery( document ).ready(function( ) { jQuery('.sfsi_plus_wDiv').each(function(){ new window.Manipulator( jQuery(this)); }); setTimeout(function(){sfsi_plus_shuffle(); jQuery('#sfsi_plus_wDiv').each(function(){ jQuery(this).click(); })},2000); });";
243
  }
244
  }
245
 
readme.txt CHANGED
@@ -2,8 +2,8 @@
2
  Contributors: socialsharepro, socialtech
3
  Tags: Share, sharing, share buttons, share button, share social media, share icons, social buttons, sharing buttons, sharing icons, social media icons, social share, social sharing
4
  Requires at least: 3.0
5
- Tested up to: 5.5
6
- Stable tag: 3.4.6
7
  License: GPLv2
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
  
@@ -294,6 +294,9 @@ The premium plugin offrs many more social buttons from other social media platfo
294
  9. You can also display a pop-up (designed to your liking) which asks users to like & share your site
295
 
296
  == Changelog ==
 
 
 
297
 
298
  = 3.4.6 =
299
  * Fixed banner.
@@ -862,5 +865,5 @@ The premium plugin offrs many more social buttons from other social media platfo
862
 
863
  == Upgrade Notice ==
864
 
865
- = 3.4.6 =
866
  * Please update
2
  Contributors: socialsharepro, socialtech
3
  Tags: Share, sharing, share buttons, share button, share social media, share icons, social buttons, sharing buttons, sharing icons, social media icons, social share, social sharing
4
  Requires at least: 3.0
5
+ Tested up to: 5.6
6
+ Stable tag: 3.4.7
7
  License: GPLv2
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
  
294
  9. You can also display a pop-up (designed to your liking) which asks users to like & share your site
295
 
296
  == Changelog ==
297
+ = 3.4.7 =
298
+ * Updated to Wordpress 5.6 compatibility.
299
+ * Updated to PHP 8 compatibility.
300
 
301
  = 3.4.6 =
302
  * Fixed banner.
865
 
866
  == Upgrade Notice ==
867
 
868
+ = 3.4.7 =
869
  * Please update
ultimate_social_media_icons.php CHANGED
@@ -7,486 +7,405 @@ Author: social share pro
7
  Text Domain: ultimate-social-media-plus
8
  Domain Path: /languages
9
  Author URI: http://socialshare.pro/
10
- Version: 3.4.6
11
  License: GPLv2
12
  */
 
 
 
 
 
 
 
 
13
 
14
- sfsi_plus_error_reporting();
15
-
16
- require_once 'analyst/main.php';
17
-
18
- analyst_init(array(
19
- 'client-id' => 'w6l8b75dy5qkv9ze',
20
- 'client-secret' => '39db55426579986bb6c79c6d94aa6ab82b67f9f5',
21
- 'base-dir' => __FILE__
22
- ));
23
 
24
- global $wpdb;
25
- /* define the Root for URL and Document */
26
 
27
- define('SFSI_PLUS_DOCROOT', dirname(__FILE__));
28
- // define('SFSI_PLUS_PLUGURL', plugin_dir_url(__FILE__));
29
- define('SFSI_PLUS_PLUGURL', site_url() . '/wp-content/plugins/ultimate-social-media-plus/');
30
- define('SFSI_PLUS_WEBROOT', str_replace(getcwd(), home_url(), dirname(__FILE__)));
31
- define('SFSI_PLUS_DOMAIN', 'ultimate-social-media-plus');
32
- define('SFSI_PLUS_SUPPORT_FORM', 'https://goo.gl/jySrSF');
33
 
34
- $wp_upload_dir = wp_upload_dir();
35
- define('SFSI_PLUS_UPLOAD_DIR_BASEURL', trailingslashit($wp_upload_dir['baseurl']));
36
 
37
 
38
- define('SFSI_PLUS_ALLICONS', serialize(array(
39
- "rss", "email", "facebook", "twitter", "youtube", "linkedin",
40
- "pinterest", "instagram", "houzz", "ok", "telegram", "vk", "weibo", "wechat"
41
- )));
42
 
43
- function sfsi_plus_get_current_url()
44
- {
45
- global $post, $wp;
46
 
47
- if (!empty($wp)) {
48
- return home_url(add_query_arg(array(), $wp->request));
49
- } elseif (!empty($post)) {
50
- return get_permalink($post->ID);
51
- } else {
52
- return site_url();
 
53
  }
54
- }
55
 
56
- /* load all files */
57
- include(SFSI_PLUS_DOCROOT . '/helpers/common_helper.php');
58
- include(SFSI_PLUS_DOCROOT . '/libs/controllers/sfsi_socialhelper.php');
59
- include(SFSI_PLUS_DOCROOT . '/libs/controllers/sfsi_class_theme_check.php');
60
- include(SFSI_PLUS_DOCROOT . '/libs/sfsi_install_uninstall.php');
61
- include(SFSI_PLUS_DOCROOT . '/libs/controllers/sfsi_buttons_controller.php');
62
- include(SFSI_PLUS_DOCROOT . '/libs/controllers/sfsi_iconsUpload_contoller.php');
63
- include(SFSI_PLUS_DOCROOT . '/libs/sfsi_Init_JqueryCss.php');
64
- include(SFSI_PLUS_DOCROOT . '/libs/controllers/sfsi_floater_icons.php');
65
- include(SFSI_PLUS_DOCROOT . '/libs/controllers/sfsiocns_OnPosts.php');
66
- include(SFSI_PLUS_DOCROOT . '/libs/sfsi_widget.php');
67
- include(SFSI_PLUS_DOCROOT . '/libs/sfsi_plus_subscribe_widget.php');
68
- include(SFSI_PLUS_DOCROOT . '/libs/sfsi_custom_social_sharing_data.php');
69
- include(SFSI_PLUS_DOCROOT . '/libs/sfsi_ajax_social_sharing_settings_updater.php');
70
- include(SFSI_PLUS_DOCROOT . '/libs/sfsi_gutenberg_block.php');
71
-
72
-
73
- /* plugin install and uninstall hooks */
74
- register_activation_hook(__FILE__, 'sfsi_plus_activate_plugin');
75
- register_deactivation_hook(__FILE__, 'sfsi_plus_deactivate_plugin');
76
- register_uninstall_hook(__FILE__, 'sfsi_plus_Unistall_plugin');
77
-
78
- /*Plugin version setup*/
79
- if (!get_option('sfsi_plus_pluginVersion') || get_option('sfsi_plus_pluginVersion') < 3.46) {
80
- add_action("init", "sfsi_plus_update_plugin");
81
- }
82
 
83
- //************************************** Setting error reporting STARTS ****************************************//
84
 
85
- function sfsi_plus_error_reporting()
86
- {
87
 
88
- $option5 = unserialize(get_option('sfsi_plus_section5_options', false));
89
 
90
- if (
91
- isset($option5['sfsi_pplus_icons_suppress_errors'])
92
 
93
- && !empty($option5['sfsi_pplus_icons_suppress_errors'])
94
 
95
- && "yes" == $option5['sfsi_pplus_icons_suppress_errors']
96
- ) {
97
 
98
- error_reporting(0);
 
99
  }
100
- }
101
 
102
- //************************************** Setting error reporting CLOSES ****************************************//
103
-
104
- //shortcode for the ultimate social icons {Monad}
105
- add_shortcode("DISPLAY_ULTIMATE_PLUS", "DISPLAY_ULTIMATE_PLUS");
106
- function DISPLAY_ULTIMATE_PLUS($args = null, $content = null, $share_url = null)
107
- {
108
- if ("DISPLAY_ULTIMATE_PLUS" === $share_url) {
109
- $share_url = null;
110
- }
111
- $instance = array("showf" => 1, "title" => '');
112
- $sfsi_plus_section8_options = get_option("sfsi_plus_section8_options");
113
- $sfsi_plus_section8_options = unserialize($sfsi_plus_section8_options);
114
- $sfsi_plus_place_item_manually = $sfsi_plus_section8_options['sfsi_plus_place_item_manually'];
115
- if ($sfsi_plus_place_item_manually == "yes") {
116
- $return = '';
117
- if (!isset($before_widget)) : $before_widget = '';
118
- endif;
119
- if (!isset($after_widget)) : $after_widget = '';
120
- endif;
121
-
122
- /*Our variables from the widget settings. */
123
- $title = apply_filters('widget_title', $instance['title']);
124
- $show_info = isset($instance['show_info']) ? $instance['show_info'] : false;
125
- global $is_floter;
126
- $return .= $before_widget;
127
- /* Display the widget title */
128
- if ($title) $return .= $before_title . $title . $after_title;
129
- $return .= '<div class="sfsi_plus_widget">';
130
- $return .= '<div id="sfsi_plus_wDiv"></div>';
131
- /* Link the main icons function */
132
- $return .= sfsi_plus_check_visiblity(0, $share_url, 'absolute', false);
133
- $return .= '<div style="clear: both;"></div>';
134
- $return .= '</div>';
135
- $return .= $after_widget;
136
- return $return;
137
- } else {
138
- return __('Kindly go to setting page and check the option "Place them manually"', SFSI_PLUS_DOMAIN);
139
- }
140
- }
141
- //adding some meta tags for facebook news feed
142
- function sfsi_plus_checkmetas()
143
- {
144
- $adding_plustags = "yes";
145
 
146
- if (!function_exists('get_plugins')) {
147
- require_once ABSPATH . 'wp-admin/includes/plugin.php';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
148
  }
 
 
 
 
149
 
150
- $all_plugins = get_plugins();
 
 
151
 
152
- foreach ($all_plugins as $key => $plugin) :
153
 
154
- if (is_plugin_active($key)) :
155
 
156
- if (preg_match("/(seo|search engine optimization|meta tag|open graph|opengraph|og tag|ogtag)/im", $plugin['Name']) || preg_match("/(seo|search engine optimization|meta tag|open graph|opengraph|og tag|ogtag)/im", $plugin['Description'])) {
157
- $adding_plustags = "no";
158
- break;
159
- }
160
 
161
- endif;
 
 
 
162
 
163
- endforeach;
164
 
165
- update_option('adding_plustags', $adding_plustags);
166
- }
167
 
168
- if (is_admin()) {
169
- // sfsi_plus_checkmetas();
170
- add_action('after_setup_theme', 'sfsi_plus_checkmetas');
171
- }
172
-
173
- add_action('wp_head', 'ultimateplusfbmetatags');
174
- function ultimateplusfbmetatags()
175
- {
176
- $metarequest = get_option("adding_plustags");
177
- $post_id = get_the_ID();
178
 
179
- $feed_id = sanitize_text_field(get_option('sfsi_plus_feed_id'));
180
- $verification_code = get_option('sfsi_plus_verificatiom_code');
181
- if (!empty($feed_id) && !empty($verification_code) && $verification_code != "no") {
182
- echo '<meta name="follow.it-verification-code-' . $feed_id . '" content="' . $verification_code . '"/>';
183
  }
184
 
185
- if ($metarequest == 'yes' && !empty($post_id)) {
186
- $post = get_post($post_id);
187
- $attachment_id = get_post_thumbnail_id($post_id);
188
- $title = str_replace('"', "", strip_tags(get_the_title($post_id)));
189
- $description = $post->post_content;
190
- $description = str_replace('"', "", strip_tags($description));
191
- $url = get_permalink($post_id);
192
-
193
- //checking for disabling viewport meta tag
194
- $option5 = unserialize(get_option('sfsi_plus_section5_options', false));
195
- if (isset($option5['sfsi_plus_disable_viewport'])) {
196
- $sfsi_plus_disable_viewport = $option5['sfsi_plus_disable_viewport'];
197
- } else {
198
- $sfsi_plus_disable_viewport = 'no';
199
- }
200
- if ($sfsi_plus_disable_viewport == 'no') {
201
- echo ' <meta name="viewport" content="width=device-width, initial-scale=1">';
202
  }
203
- //checking for disabling viewport meta tag
204
 
205
- if ($attachment_id) {
206
- $feat_image = wp_get_attachment_url($attachment_id);
207
- if (preg_match('/https/', $feat_image)) {
208
- echo '<meta property="og:image:secure_url" content="' . $feat_image . '" data-id="sfsi-plus"/>';
 
 
 
 
 
 
 
 
209
  } else {
210
- echo '<meta property="og:image" content="' . $feat_image . '" data-id="sfsi-plus"/>';
211
  }
212
- $metadata = wp_get_attachment_metadata($attachment_id);
213
- if (isset($metadata) && !empty($metadata)) {
214
- if (isset($metadata['sizes']['post-thumbnail'])) {
215
- $image_type = $metadata['sizes']['post-thumbnail']['mime-type'];
 
 
 
 
 
216
  } else {
217
- $image_type = '';
218
  }
219
- if (isset($metadata['width'])) {
220
- $width = $metadata['width'];
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
221
  } else {
 
222
  $width = '';
223
- }
224
- if (isset($metadata['height'])) {
225
- $height = $metadata['height'];
226
- } else {
227
  $height = '';
228
  }
229
- } else {
230
- $image_type = '';
231
- $width = '';
232
- $height = '';
 
 
233
  }
234
- echo '<meta property="og:image:type" content="' . $image_type . '" data-id="sfsi-plus"/>';
235
- echo '<meta property="og:image:width" content="' . $width . '" data-id="sfsi-plus"/>';
236
- echo '<meta property="og:image:height" content="' . $height . '" data-id="sfsi-plus"/>';
237
- echo '<meta property="og:description" content="' . $description . '" data-id="sfsi-plus"/>';
238
- echo '<meta property="og:url" content="' . $url . '" data-id="sfsi-plus"/>';
239
- echo '<meta property="og:title" content="' . $title . '" data-id="sfsi-plus"/>';
240
  }
241
  }
242
- }
243
 
244
- //Get verification code
245
- if (is_admin()) {
246
- $code = sanitize_text_field(get_option('sfsi_plus_verificatiom_code'));
247
- $feed_id = sanitize_text_field(get_option('sfsi_plus_feed_id'));
248
- if (empty($code) && !empty($feed_id)) {
249
- add_action("init", "sfsi_plus_getverification_code");
250
- }
251
- }
252
- function sfsi_plus_getverification_code()
253
- {
254
- $feed_id = sanitize_text_field(get_option('sfsi_plus_feed_id'));
255
- $url = $http_url = 'https://api.follow.it/wordpress/getVerifiedCode_plugin';
256
-
257
- $args = array(
258
- 'timeout' => 30,
259
- 'sslverify' => true,
260
- 'body' => array(
261
- 'feed_id' => $feed_id
262
- )
263
- );
264
-
265
- $request = wp_remote_post($url, $args);
266
-
267
- if (!is_wp_error($request)) {
268
- $resp = json_decode($request['body']);
269
- update_option('sfsi_plus_verificatiom_code', $resp->code);
270
  }
271
- }
 
 
 
 
 
 
 
 
 
 
 
272
 
273
- //functionality for before and after single posts
274
- add_filter('the_content', 'sfsi_plus_beforaftereposts');
275
- function sfsi_plus_beforaftereposts($content)
276
- {
277
-
278
- $org_content = $content;
279
- $icons_before = '';
280
- $icons_after = '';
281
- if (is_single()) {
282
- $option8 = unserialize(get_option('sfsi_plus_section8_options', false));
283
- // var_dump($option8);die();
284
- $lineheight = $option8['sfsi_plus_post_icons_size'];
285
- $lineheight = sfsi_plus_getlinhght($lineheight);
286
- $sfsi_plus_display_button_type = $option8['sfsi_plus_display_button_type'];
287
- $txt = (isset($option8['sfsi_plus_textBefor_icons'])) ? $option8['sfsi_plus_textBefor_icons'] : "Please follow and like us:";
288
- $float = $option8['sfsi_plus_icons_alignment'];
289
- if ($float == "center") {
290
- $style_parent = 'text-align: center;';
291
- $style = 'float:none; display: inline-block;';
292
- } else {
293
- $style_parent = '';
294
- $style = 'float:' . $float;
295
  }
 
296
 
297
- if ($option8['sfsi_plus_display_before_posts'] == "yes" && $option8['sfsi_plus_show_item_onposts'] == "yes") {
298
- $icons_before .= '<div class="sfsibeforpstwpr" style="' . $style_parent . '">';
299
- if ($sfsi_plus_display_button_type == 'standard_buttons') {
300
- $icons_before .= sfsi_plus_social_buttons_below($content = null);
301
- } else if ($option8['sfsi_plus_display_button_type'] == 'responsive_button') {
302
- $icons_before .= "";
 
 
 
 
 
 
 
 
 
 
 
 
 
303
  } else {
304
- $icons_before .= "<div class='sfsi_plus_Sicons' style='" . $style . "'>";
305
- $icons_before .= "<div style='float:left;margin:0 0px; line-height:" . $lineheight . "px'><span>" . $txt . "</span></div>";
306
- $icons_before .= sfsi_plus_check_posts_visiblity(0, "yes");
307
- $icons_before .= "</div>";
308
  }
309
- $icons_before .= '</div>';
310
- }
311
- if ($option8['sfsi_plus_show_item_onposts'] == "yes") {
312
 
313
- $icons_after .= '<div class="sfsiaftrpstwpr" style="' . $style_parent . '">';
314
- if ($option8['sfsi_plus_display_after_posts'] == "yes") {
315
  if ($sfsi_plus_display_button_type == 'standard_buttons') {
316
- $icons_after .= sfsi_plus_social_buttons_below($content = null);
317
  } else if ($option8['sfsi_plus_display_button_type'] == 'responsive_button') {
318
- $icons_after .= sfsi_plus_social_responsive_buttons(null, $option8);
319
  } else {
320
- $icons_after .= "<div class='sfsi_plus_Sicons' style='" . $style . "'>";
321
- $icons_after .= "<div style='float:left;margin:0 0px; line-height:" . $lineheight . "px'><span>" . $txt . "</span></div>";
322
- $icons_after .= sfsi_plus_check_posts_visiblity(0, "yes");
323
- $icons_after .= "</div>";
324
- }
325
- } else {
326
- if (isset($option8['sfsi_plus_display_button_type']) && $option8['sfsi_plus_display_button_type'] == 'responsive_button') {
327
- $icons_after .= sfsi_plus_social_responsive_buttons(null, $option8);
328
  }
 
329
  }
330
-
331
- $icons_after .= '</div>';
332
- }
333
- }
334
- $content = $icons_before . $org_content . $icons_after;
335
- return $content;
336
- }
337
-
338
- //showing before and after blog posts
339
- add_filter('the_excerpt', 'sfsi_plus_beforeafterblogposts');
340
- add_filter('the_content', 'sfsi_plus_beforeafterblogposts');
341
- function sfsi_plus_beforeafterblogposts($content)
342
- {
343
- if (is_home()) {
344
- $icons_before = '';
345
- $icons_after = '';
346
- $sfsi_section8 = unserialize(get_option('sfsi_plus_section8_options', false));
347
- $sfsi_section4 = unserialize(get_option('sfsi_plus_section4_options', false));
348
- $lineheight = $sfsi_section8['sfsi_plus_post_icons_size'];
349
- $lineheight = sfsi_plus_getlinhght($lineheight);
350
-
351
- global $id, $post;
352
- $sfsi_plus_display_button_type = $sfsi_section8['sfsi_plus_display_button_type'];
353
- $sfsi_plus_show_item_onposts = $sfsi_section8['sfsi_plus_show_item_onposts'];
354
- $permalink = get_permalink($post->ID);
355
- $post_title = $post->post_title;
356
- $sfsiLikeWith = "45px;";
357
- if ($sfsi_section4['sfsi_plus_display_counts'] == "yes" && $sfsi_section4['sfsi_plus_original_counts'] == "yes") {
358
- $show_count = 1;
359
- $sfsiLikeWith = "75px;";
360
- } else {
361
- $show_count = 0;
362
- }
363
-
364
- //checking for standard icons
365
- if (!isset($sfsi_section8['sfsi_plus_rectsub'])) {
366
- $sfsi_section8['sfsi_plus_rectsub'] = 'no';
367
- }
368
- if (!isset($sfsi_section8['sfsi_plus_recttwtr'])) {
369
- $sfsi_section8['sfsi_plus_recttwtr'] = 'no';
370
- }
371
- if (!isset($sfsi_section8['sfsi_plus_rectpinit'])) {
372
- $sfsi_section8['sfsi_plus_rectpinit'] = 'no';
373
- }
374
- if (!isset($sfsi_section8['sfsi_plus_rectfbshare'])) {
375
- $sfsi_section8['sfsi_plus_rectfbshare'] = 'no';
376
- }
377
-
378
- //checking for standard icons
379
- $txt = (isset($sfsi_section8['sfsi_plus_textBefor_icons'])) ? $sfsi_section8['sfsi_plus_textBefor_icons'] : "Please follow and like us:";
380
- $float = $sfsi_section8['sfsi_plus_icons_alignment'];
381
- if ($float == "center") {
382
- $style_parent = 'text-align: center;';
383
- $style = 'float:none; display: inline-block;';
384
- } else {
385
- $style_parent = '';
386
- $style = 'float:' . $float;
387
- }
388
-
389
- if (
390
- $sfsi_section8['sfsi_plus_display_before_blogposts'] == "yes" &&
391
- $sfsi_section8['sfsi_plus_show_item_onposts'] == "yes"
392
- ) {
393
- //icon selection
394
- $icons_before .= "<div class='sfsibeforpstwpr' style='" . $style_parent . "'>";
395
- $icons_before .= "<div class='sfsi_plus_Sicons " . $float . "' style='" . $style . "'>";
396
- if ($sfsi_plus_display_button_type == 'standard_buttons') {
397
- if (
398
- $sfsi_section8['sfsi_plus_rectsub'] == 'yes' ||
399
- $sfsi_section8['sfsi_plus_rectfb'] == 'yes' ||
400
- $sfsi_section8['sfsi_plus_recttwtr'] == 'yes' ||
401
- $sfsi_section8['sfsi_plus_rectpinit'] == 'yes' ||
402
- $sfsi_section8['sfsi_plus_rectfbshare'] == 'yes'
403
- ) {
404
- $icons_before .= "<div style='display: inline-block;margin-bottom: 0; margin-left: 0; margin-right: 8px; margin-top: 0; vertical-align: middle;width: auto;'><span>" . $txt . "</span></div>";
405
- }
406
- if ($sfsi_section8['sfsi_plus_rectsub'] == 'yes') {
407
- if ($show_count) {
408
- $sfsiLikeWithsub = "93px";
409
- } else {
410
- $sfsiLikeWithsub = "64px";
411
- }
412
- if (!isset($sfsiLikeWithsub)) {
413
- $sfsiLikeWithsub = $sfsiLikeWith;
414
- }
415
- $icons_before .= "<div class='sf_subscrbe' style='display: inline-block;vertical-align: middle;width: auto;'>" . sfsi_plus_Subscribelike($permalink, $show_count) . "</div>";
416
- }
417
- if ($sfsi_section8['sfsi_plus_rectfb'] == 'yes' || $sfsi_section8['sfsi_plus_rectfbshare'] == 'yes') {
418
- if ($show_count) { } else {
419
- $sfsiLikeWithfb = "48px";
420
- }
421
- if (!isset($sfsiLikeWithfb)) {
422
- $sfsiLikeWithfb = $sfsiLikeWith;
423
- }
424
- $icons_before .= "<div class='sf_fb' style='display: inline-block; vertical-align: middle;width: auto;'>" . sfsi_plus_FBlike($permalink, $show_count) . "</div>";
425
- }
426
- if ($sfsi_section8['sfsi_plus_rectfbshare'] == 'yes') {
427
- if ($show_count) { } else {
428
- $sfsiLikeWithfbshare = "48px";
429
- }
430
- if (!isset($sfsiLikeWithfbshare)) {
431
- $sfsiLikeWithfbshare = $sfsiLikeWith;
432
- }
433
- $icons_before .= "<div class='sf_fb' style='display: inline-block; vertical-align: middle;width: auto;'>" . sfsi_plus_FBshare($permalink, $show_count) . "</div>";
434
- }
435
- if ($sfsi_section8['sfsi_plus_recttwtr'] == 'yes') {
436
- if ($show_count) {
437
- $sfsiLikeWithtwtr = "77px";
438
  } else {
439
- $sfsiLikeWithtwtr = "56px";
440
- }
441
- if (!isset($sfsiLikeWithtwtr)) {
442
- $sfsiLikeWithtwtr = $sfsiLikeWith;
443
  }
444
- $icons_before .= sfsi_twitterShare($permalink, $post_title, '', true);
445
- }
446
- if ($sfsi_section8['sfsi_plus_rectpinit'] == 'yes') {
447
- if ($show_count) {
448
- $sfsiLikeWithpinit = "100px";
449
- } else {
450
- $sfsiLikeWithpinit = "auto";
451
  }
452
- $icons_before .= "<div class='sf_pinit' style='display: inline-block;vertical-align: middle;text-align:left;width: " . $sfsiLikeWithpinit . "'>" . sfsi_plus_pinterest_Custom($permalink, $show_count) . "</div>";
453
  }
454
- } else if ($sfsi_section8['sfsi_plus_display_button_type'] == 'responsive_button') {
455
- // if (isset($sfsi_section8['sfsi_plus_responsive_icons_end_post']) && $sfsi_section8['sfsi_plus_responsive_icons_end_post'] == "yes") {
456
- // $icons_before .= sfsi_plus_social_responsive_buttons(null, $sfsi_section8);
457
- // }
458
- $icons_before .= "";
459
- } else {
460
- $icons_before .= "<div style='float:left;margin:0 0px; line-height:" . $lineheight . "px'><span>" . $txt . "</span></div>";
461
- $icons_before .= sfsi_plus_check_posts_visiblity(0, "yes");
462
  }
463
- $icons_before .= "</div>";
464
- $icons_before .= "</div>";
465
- //icon selection
466
- if ($id && $post && $post->post_type == 'post') {
467
- $content = $icons_before . $content;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
468
  } else {
469
- $contnet = $content;
470
  }
471
- }
472
- if ($sfsi_section8['sfsi_plus_show_item_onposts'] == "yes") {
473
 
474
- //icon selection
475
- $icons_after .= "<div class='sfsiaftrpstwpr' style='" . $style_parent . "'>";
476
- $icons_after .= "<div class='sfsi_plus_Sicons " . $float . "' style='" . $style . "'>";
477
- // var_dump($sfsi_section8['sfsi_plus_display_after_blogposts']);
 
 
 
 
 
 
 
 
 
478
 
479
- if ($sfsi_section8['sfsi_plus_display_after_blogposts'] == "yes") {
 
 
 
 
 
 
 
 
 
480
 
 
 
 
 
 
 
 
481
  if ($sfsi_plus_display_button_type == 'standard_buttons') {
482
  if (
483
- $sfsi_section8['sfsi_plus_rectsub'] == 'yes' ||
484
- $sfsi_section8['sfsi_plus_rectfb'] == 'yes' ||
485
  $sfsi_section8['sfsi_plus_recttwtr'] == 'yes' ||
486
  $sfsi_section8['sfsi_plus_rectpinit'] == 'yes' ||
487
  $sfsi_section8['sfsi_plus_rectfbshare'] == 'yes'
488
  ) {
489
- $icons_after .= "<div style='display: inline-block;margin-bottom: 0; margin-left: 0; margin-right: 8px; margin-top: 0; vertical-align: middle;width: auto;'><span>" . $txt . "</span></div>";
490
  }
491
  if ($sfsi_section8['sfsi_plus_rectsub'] == 'yes') {
492
  if ($show_count) {
@@ -497,7 +416,7 @@ function sfsi_plus_beforeafterblogposts($content)
497
  if (!isset($sfsiLikeWithsub)) {
498
  $sfsiLikeWithsub = $sfsiLikeWith;
499
  }
500
- $icons_after .= "<div class='sf_subscrbe' style='display: inline-block;vertical-align: middle; width: auto;'>" . sfsi_plus_Subscribelike($permalink, $show_count) . "</div>";
501
  }
502
  if ($sfsi_section8['sfsi_plus_rectfb'] == 'yes' || $sfsi_section8['sfsi_plus_rectfbshare'] == 'yes') {
503
  if ($show_count) { } else {
@@ -506,7 +425,7 @@ function sfsi_plus_beforeafterblogposts($content)
506
  if (!isset($sfsiLikeWithfb)) {
507
  $sfsiLikeWithfb = $sfsiLikeWith;
508
  }
509
- $icons_after .= "<div class='sf_fb' style='display: inline-block; vertical-align: middle;width: auto;'>" . sfsi_plus_FBlike($permalink, $show_count) . "</div>";
510
  }
511
  if ($sfsi_section8['sfsi_plus_rectfbshare'] == 'yes') {
512
  if ($show_count) { } else {
@@ -515,7 +434,7 @@ function sfsi_plus_beforeafterblogposts($content)
515
  if (!isset($sfsiLikeWithfbshare)) {
516
  $sfsiLikeWithfbshare = $sfsiLikeWith;
517
  }
518
- $icons_after .= "<div class='sf_fb' style='display: inline-block; vertical-align: middle;width: auto;'>" . sfsi_plus_FBshare($permalink, $show_count) . "</div>";
519
  }
520
  if ($sfsi_section8['sfsi_plus_recttwtr'] == 'yes') {
521
  if ($show_count) {
@@ -526,7 +445,7 @@ function sfsi_plus_beforeafterblogposts($content)
526
  if (!isset($sfsiLikeWithtwtr)) {
527
  $sfsiLikeWithtwtr = $sfsiLikeWith;
528
  }
529
- $icons_after .= "<div class='sf_twiter' style='display: inline-block;vertical-align: middle;width: auto;'>" . sfsi_twitterShare($permalink, $post_title) . "</div>";
530
  }
531
  if ($sfsi_section8['sfsi_plus_rectpinit'] == 'yes') {
532
  if ($show_count) {
@@ -534,132 +453,177 @@ function sfsi_plus_beforeafterblogposts($content)
534
  } else {
535
  $sfsiLikeWithpinit = "auto";
536
  }
537
-
538
- $icons_after .= "<div class='sf_pinit' style='display: inline-block;text-align:left;vertical-align: middle;width: " . $sfsiLikeWithpinit . "'>" . sfsi_plus_pinterest_Custom($permalink, $show_count) . "</div>";
539
  }
540
  } else if ($sfsi_section8['sfsi_plus_display_button_type'] == 'responsive_button') {
541
  // if (isset($sfsi_section8['sfsi_plus_responsive_icons_end_post']) && $sfsi_section8['sfsi_plus_responsive_icons_end_post'] == "yes") {
542
- // $icons_after .= sfsi_plus_social_responsive_buttons(null, $sfsi_section8);
543
  // }
544
- $icons_after .= "";
545
  } else {
546
- $icons_after .= "<div style='float:left;margin:0 0px; line-height:" . $lineheight . "px'><span>" . $txt . "</span></div>";
547
- $icons_after .= sfsi_plus_check_posts_visiblity(0, "yes");
548
  }
549
- } else {
550
- if (isset($sfsi_section8['sfsi_plus_display_button_type']) && $sfsi_section8['sfsi_plus_display_button_type'] == 'responsive_button') {
551
- if (is_single()) {
552
- $icons_after .= sfsi_plus_social_responsive_buttons(null, $sfsi_section8);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
553
  }
554
  }
 
 
 
 
555
  }
556
- $icons_after .= "</div>";
557
- $icons_after .= "</div>";
558
- //icon selection
559
- $content = $content . $icons_after;
560
  }
 
561
  }
562
- return $content;
563
- }
564
 
565
- //getting line height for the icons
566
- function sfsi_plus_getlinhght($lineheight)
567
- {
568
- if ($lineheight < 16) {
569
- $lineheight = $lineheight * 2;
570
- return $lineheight;
571
- } elseif ($lineheight >= 16 && $lineheight < 20) {
572
- $lineheight = $lineheight + 10;
573
- return $lineheight;
574
- } elseif ($lineheight >= 20 && $lineheight < 28) {
575
- $lineheight = $lineheight + 3;
576
- return $lineheight;
577
- } elseif ($lineheight >= 28 && $lineheight < 40) {
578
- $lineheight = $lineheight + 4;
579
- return $lineheight;
580
- } elseif ($lineheight >= 40 && $lineheight < 50) {
581
- $lineheight = $lineheight + 5;
 
 
 
582
  return $lineheight;
583
  }
584
- $lineheight = $lineheight + 6;
585
- return $lineheight;
586
- }
587
-
588
- //sanitizing values
589
- function sfsi_plus_string_sanitize($s)
590
- {
591
- $result = preg_replace("/[^a-zA-Z0-9]+/", " ", html_entity_decode($s, ENT_QUOTES));
592
- return $result;
593
- }
594
 
595
- add_action('admin_notices', 'sfsi_plus_admin_notice', 10);
596
- function sfsi_plus_admin_notice()
597
- {
598
- if (isset($_GET['page']) && $_GET['page'] == "sfsi-plus-options") {
599
- $style = "overflow: hidden; margin:12px 3px 0px;display:none;";
600
- } else {
601
- $style = "overflow: hidden;";
602
  }
603
- ?>
604
- <?php
605
- include("views/sfsi_plugin_lists.php");
606
- include("views/sfsi_other_banners.php");
607
- include("views/sfsi_global_banners.php");
608
- if (get_option("sfsi_plus_show_premium_notification") == "yes" && isset($_GET['page']) && $_GET['page'] == "sfsi-plus-options") {
609
- ?>
610
- <style>
611
- .sfsi_plus_show_prem_notification a {
612
- color: #fff;
613
- text-decoration: underline;
614
- }
615
-
616
- form.sfsi_plus_premiumNoticeDismiss {
617
- display: inline-block;
618
- margin: 5px 0 0;
619
- vertical-align: middle;
620
- }
621
 
622
- .sfsi_plus_premiumNoticeDismiss input[type='submit'] {
623
- background-color: transparent;
624
- border: medium none;
625
- color: #fff;
626
- margin: 0;
627
- padding: 0;
628
- cursor: pointer;
629
- }
630
- </style>
631
- <div class="updated sfsi_plus_show_prem_notification" style="<?php echo $style; ?>background-color: #38B54A; color: #fff; font-size: 18px;">
632
- <div class="alignleft" style="margin: 9px 0;">
633
- <?php _e('BIG NEWS : There is now a Premium Ultimate Social Media Plugin available with many more cool features: ', SFSI_PLUS_DOMAIN); ?><a href="https://www.ultimatelysocial.com/usm-premium/?utm_source=usmplus_settings_page&utm_campaign=notification_banner&utm_medium=banner" target="_blank"><?php _e('Check it out', SFSI_PLUS_DOMAIN); ?></a>
634
- </div>
635
- <div class="alignright">
636
- <form method="post" class="sfsi_plus_premiumNoticeDismiss">
637
- <input type="hidden" name="sfsi-plus_dismiss-premiumNotice" value="true">
638
- <input type="submit" name="dismiss" value="Dismiss" />
639
- </form>
640
- </div>
641
- </div>
642
  <?php
643
- }
644
- if (get_option("sfsi_plus_show_Setting_mobile_notification") == "yes") {
645
- $sfsi_plus_install_date = strtotime(get_option('sfsi_plus_installDate'));
646
- $sfsi_plus_future_date = strtotime('14 days', $sfsi_plus_install_date);
647
- $sfsi_plus_past_date = strtotime("now");
648
- if ($sfsi_plus_past_date >= $sfsi_plus_future_date) {
649
  ?>
650
  <style>
651
- .sfsi_plus_show_mobile_setting_notification a {
652
  color: #fff;
653
  text-decoration: underline;
654
  }
655
 
656
- form.sfsi_plus_mobileNoticeDismiss {
657
  display: inline-block;
658
  margin: 5px 0 0;
659
  vertical-align: middle;
660
  }
661
 
662
- .sfsi_plus_mobileNoticeDismiss input[type='submit'] {
663
  background-color: transparent;
664
  border: medium none;
665
  color: #fff;
@@ -668,15 +632,55 @@ function sfsi_plus_admin_notice()
668
  cursor: pointer;
669
  }
670
  </style>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
671
 
672
- <!-- <div class="updated sfsi_plus_show_mobile_setting_notification" style="<?php //echo $style;
673
- ?>background-color: #38B54A; color: #fff; font-size: 18px;">
674
  <div class="alignleft" style="margin: 9px 0; width: 95%; line-height: 25px;">
675
  <b><?php //_e( 'Over 50% of visitors are mobile visitors:', SFSI_PLUS_DOMAIN);
676
- ?></b>
677
  <?php //_e( ' Make sure your social media icons look good on mobile too, so that people like & share your site. With the premium plugin you can define the location of the icons separately on mobile: ', SFSI_PLUS_DOMAIN);
678
- ?><a href="https://www.ultimatelysocial.com/usmpremium/?utm_expid=92383224-1.TfahStjhTrSpmi_nxkXt1w.1&utm_source=usmplus_settings_page&utm_campaign=check_mobile&utm_medium=banner" target="_blank"><?php //_e( 'Check it out', SFSI_PLUS_DOMAIN);
679
- ?></a>
680
  </div>
681
  <div class="alignright">
682
  <form method="post" class="sfsi_plus_mobileNoticeDismiss">
@@ -685,1441 +689,1452 @@ function sfsi_plus_admin_notice()
685
  </form>
686
  </div>
687
  </div> -->
688
- <?php
689
- }
690
- }
691
 
692
- $phpVersion = phpVersion();
693
- if ($phpVersion <= '5.4') {
694
- if (get_option("sfsi_plus_serverphpVersionnotification") == "yes") {
695
 
696
- ?>
697
- <style>
698
- .sfsi_plus_show_phperror_notification {
699
- color: #fff;
700
- text-decoration: underline;
701
- }
702
 
703
- form.sfsi_plus_phperrorNoticeDismiss {
704
- display: inline-block;
705
- margin: 5px 0 0;
706
- vertical-align: middle;
707
- }
708
 
709
- .sfsi_plus_phperrorNoticeDismiss input[type='submit'] {
710
- background-color: transparent;
711
- border: medium none;
712
- color: #fff;
713
- margin: 0;
714
- padding: 0;
715
- cursor: pointer;
716
- }
717
 
718
- .sfsi_plus_show_phperror_notification p {
719
- line-height: 22px;
720
- }
721
 
722
- p.sfsi_plus_show_notifictaionpragraph {
723
- padding: 0 !important;
724
- font-size: 18px;
725
- }
726
- </style>
727
- <div class="updated sfsi_plus_show_phperror_notification" style="<?php echo $style; ?>background-color: #D22B2F; color: #fff; font-size: 18px; border-left-color: #D22B2F;">
728
- <div class="alignleft" style="margin: 9px 0;">
729
- <p class="sfsi_plus_show_notifictaionpragraph">
730
- <?php _e('We noticed you are running your site on a PHP version older than 5.6. Please upgrade to a more recent version. This is not only important for running the Ultimate Social Media Plugin, but also for security reasons in general.', SFSI_PLUS_DOMAIN); ?>
731
- <br>
732
- <?php _e('If you do not know how to do the upgrade, please ask your server team or hosting company to do it for you.', SFSI_PLUS_DOMAIN); ?>
733
- </p>
734
 
 
 
 
 
 
 
 
735
  </div>
736
- <div class="alignright">
737
- <form method="post" class="sfsi_plus_phperrorNoticeDismiss">
738
- <input type="hidden" name="sfsi-plus_dismiss-phperrorNotice" value="true">
739
- <input type="submit" name="dismiss" value="Dismiss" />
740
- </form>
741
- </div>
742
- </div>
743
 
744
- <?php
 
 
 
745
  }
746
- }
747
- sfsi_plus_error_reporting_notice();
748
- }
749
 
750
 
751
- add_action('admin_init', 'sfsi_plus_dismiss_admin_notice');
752
- function sfsi_plus_dismiss_admin_notice()
753
- {
754
- $current_date_sfsi = date("Y-m-d h:i:s");
755
 
756
- if (isset($_REQUEST['sfsi-plus_dismiss-premiumNotice']) && $_REQUEST['sfsi-plus_dismiss-premiumNotice'] == 'true') {
757
- update_option('sfsi_plus_show_premium_notification', "no");
758
- //header("Location: ".site_url()."/wp-admin/admin.php?page=sfsi-options");die;
759
- }
760
 
761
- if (isset($_REQUEST['sfsi-plus_dismiss-premiumCumulativeCountNotice']) && $_REQUEST['sfsi-plus_dismiss-premiumCumulativeCountNotice'] == 'true') {
762
- update_option('sfsi_plus_show_premium_cumulative_count_notification', "no");
763
- }
764
 
765
- if (isset($_REQUEST['sfsi-plus_dismiss-settingmobileNotice']) && $_REQUEST['sfsi-plus_dismiss-settingmobileNotice'] == 'true') {
766
- update_option('sfsi_plus_show_Setting_mobile_notification', "no");
767
- //header("Location: ".site_url()."/wp-admin/admin.php?page=sfsi-options");die;
768
- }
769
- if (isset($_REQUEST['sfsi-plus_dismiss-phperrorNotice']) && $_REQUEST['sfsi-plus_dismiss-phperrorNotice'] == 'true') {
770
- update_option('sfsi_plus_serverphpVersionnotification', "no");
771
- }
772
- if (isset($_REQUEST['sfsi-plus-dismiss-sharecount']) && $_REQUEST['sfsi-plus-dismiss-sharecount'] == 'true') {
773
- $sfsi_plus_dismiss_sharecount = array(
774
- 'show_banner' => "no",
775
- 'timestamp' => strtotime(date("Y-m-d h:i:s"))
776
- );
777
- update_option('sfsi_plus_dismiss_sharecount', serialize($sfsi_plus_dismiss_sharecount));
778
- }
779
- if (isset($_REQUEST['sfsi-plus-dismiss-google-analytic']) && $_REQUEST['sfsi-plus-dismiss-google-analytic'] == 'true') {
780
- $sfsi_plus_dismiss_google_analytic = array(
781
- 'show_banner' => "no",
782
- 'timestamp' => strtotime(date("Y-m-d h:i:s"))
783
- );
784
- update_option('sfsi_plus_dismiss_google_analytic', serialize($sfsi_plus_dismiss_google_analytic));
785
- }
786
- if (isset($_REQUEST['sfsi-plus-dismiss-gdpr']) && $_REQUEST['sfsi-plus-dismiss-gdpr'] == 'true') {
787
- $sfsi_plus_dismiss_gdpr = array(
788
- 'show_banner' => "no",
789
- 'timestamp' => strtotime(date("Y-m-d h:i:s"))
790
- );
791
- update_option('sfsi_plus_dismiss_gdpr', serialize($sfsi_plus_dismiss_gdpr));
792
- }
793
- if (isset($_REQUEST['sfsi-plus-dismiss-optimization']) && $_REQUEST['sfsi-plus-dismiss-optimization'] == 'true') {
794
- $sfsi_plus_dismiss_optimization = array(
795
- 'show_banner' => "no",
796
- 'timestamp' => strtotime(date("Y-m-d h:i:s"))
797
- );
798
- update_option('sfsi_plus_dismiss_optimization', serialize($sfsi_plus_dismiss_optimization));
799
- }
800
- if (isset($_REQUEST['sfsi-plus-dismiss-gallery']) && $_REQUEST['sfsi-plus-dismiss-gallery'] == 'true') {
801
- $sfsi_plus_dismiss_gallery = array(
802
- 'show_banner' => "no",
803
- 'timestamp' => strtotime(date("Y-m-d h:i:s"))
804
- );
805
- update_option('sfsi_plus_dismiss_gallery', serialize($sfsi_plus_dismiss_gallery));
806
- }
807
- if (isset($_REQUEST['sfsi-plus-dismiss-woocommerce']) && $_REQUEST['sfsi-plus-dismiss-woocommerce'] == 'true') {
808
- $sfsi_plus_dismiss_woocommerce = array(
809
- 'show_banner' => "no",
810
- 'timestamp' => strtotime(date("Y-m-d h:i:s"))
811
- );
812
- update_option('sfsi_plus_dismiss_woocommerce', serialize($sfsi_plus_dismiss_woocommerce));
813
- }
814
- if (isset($_REQUEST['sfsi-plus-dismiss-twitter']) && $_REQUEST['sfsi-plus-dismiss-twitter'] == 'true') {
815
- $sfsi_plus_dismiss_twitter = array(
816
- 'show_banner' => "no",
817
- 'timestamp' => strtotime(date("Y-m-d h:i:s"))
818
- );
819
- update_option('sfsi_plus_dismiss_twitter', serialize($sfsi_plus_dismiss_twitter));
820
- }
821
 
822
 
823
- if (isset($_REQUEST['sfsi-plus-banner-global-upgrade']) && $_REQUEST['sfsi-plus-banner-global-upgrade'] == 'true') {
824
- $sfsi_plus_banner_global_upgrade = unserialize(get_option('sfsi_plus_banner_global_upgrade', false));
825
- $sfsi_plus_banner_global_upgrade = array(
826
- 'met_criteria' => $sfsi_plus_banner_global_upgrade['met_criteria'],
827
- 'banner_appeared' => "yes",
828
- 'is_active' => "no",
829
- 'timestamp' => $current_date_sfsi
830
- );
831
- update_option('sfsi_plus_banner_global_upgrade', serialize($sfsi_plus_banner_global_upgrade));
832
- sfsi_plus_check_banner();
833
- }
834
- if (isset($_REQUEST['sfsi-plus-banner-global-http']) && $_REQUEST['sfsi-plus-banner-global-http'] == 'true') {
835
- $sfsi_plus_banner_global_http = unserialize(get_option('sfsi_plus_banner_global_http', false));
836
- $sfsi_plus_banner_global_http = array(
837
- 'met_criteria' => $sfsi_plus_banner_global_http['met_criteria'],
838
- 'banner_appeared' => "yes",
839
- 'is_active' => "no",
840
- 'timestamp' => $current_date_sfsi
841
- );
842
- update_option('sfsi_plus_banner_global_http', serialize($sfsi_plus_banner_global_http));
843
- sfsi_plus_check_banner();
844
- }
845
- if (isset($_REQUEST['sfsi-plus-banner-global-gdpr']) && $_REQUEST['sfsi-plus-banner-global-gdpr'] == 'true') {
846
- $sfsi_plus_banner_global_gdpr = unserialize(get_option('sfsi_plus_banner_global_gdpr', false));
847
- $sfsi_plus_banner_global_gdpr = array(
848
- 'met_criteria' => $sfsi_plus_banner_global_gdpr['met_criteria'],
849
- 'banner_appeared' => "yes",
850
- 'is_active' => "no",
851
- 'timestamp' => $current_date_sfsi
852
- );
853
- update_option('sfsi_plus_banner_global_gdpr', serialize($sfsi_plus_banner_global_gdpr));
854
- sfsi_plus_check_banner();
855
- }
856
 
857
- if (isset($_REQUEST['sfsi-plus-banner-global-shares']) && $_REQUEST['sfsi-plus-banner-global-shares'] == 'true') {
858
- $sfsi_plus_banner_global_shares = unserialize(get_option('sfsi_plus_banner_global_shares', false));
859
- $sfsi_plus_banner_global_shares = array(
860
- 'met_criteria' => $sfsi_plus_banner_global_shares['met_criteria'],
861
- 'banner_appeared' => "yes",
862
- 'is_active' => "no",
863
- 'timestamp' => $current_date_sfsi
864
- );
865
- update_option('sfsi_plus_banner_global_shares', serialize($sfsi_plus_banner_global_shares));
866
- sfsi_plus_check_banner();
867
- }
868
- if (isset($_REQUEST['sfsi-plus-banner-global-load_faster']) && $_REQUEST['sfsi-plus-banner-global-load_faster'] == 'true') {
869
- $sfsi_plus_banner_global_load_faster = unserialize(get_option('sfsi_plus_banner_global_load_faster', false));
870
- $sfsi_plus_banner_global_load_faster = array(
871
- 'met_criteria' => $sfsi_plus_banner_global_load_faster['met_criteria'],
872
- 'banner_appeared' => "yes",
873
- 'is_active' => "no",
874
- 'timestamp' => $current_date_sfsi
875
- );
876
- update_option('sfsi_plus_banner_global_load_faster', serialize($sfsi_plus_banner_global_load_faster));
877
- sfsi_plus_check_banner();
878
- }
879
- if (isset($_REQUEST['sfsi-plus-banner-global-social']) && $_REQUEST['sfsi-plus-banner-global-social'] == 'true') {
880
- $sfsi_plus_banner_global_social = unserialize(get_option('sfsi_plus_banner_global_social', false));
881
- $sfsi_plus_banner_global_social = array(
882
- 'met_criteria' => $sfsi_plus_banner_global_social['met_criteria'],
883
- 'banner_appeared' => "yes",
884
- 'is_active' => "no",
885
- 'timestamp' => $current_date_sfsi
886
- );
887
- update_option('sfsi_plus_banner_global_social', serialize($sfsi_plus_banner_global_social));
888
- sfsi_plus_check_banner();
889
- }
890
- if (isset($_REQUEST['sfsi-plus-banner-global-pinterest']) && $_REQUEST['sfsi-plus-banner-global-pinterest'] == 'true') {
891
- $sfsi_plus_banner_global_pinterest = unserialize(get_option('sfsi_plus_banner_global_pinterest', false));
892
- $sfsi_plus_banner_global_pinterest = array(
893
- 'met_criteria' => $sfsi_plus_banner_global_pinterest['met_criteria'],
894
- 'banner_appeared' => "yes",
895
- 'is_active' => "no",
896
- 'timestamp' => $current_date_sfsi
897
- );
898
- update_option('sfsi_plus_banner_global_pinterest', serialize($sfsi_plus_banner_global_pinterest));
899
- sfsi_plus_check_banner();
900
- }
901
- $sfsi_plus_install_time = strtotime(get_option('sfsi_plus_installDate'));
902
- $sfsi_plus_max_show_time = $sfsi_plus_install_time + (120 * 60);
903
- $sfsi_plus_banner_global_firsttime_offer = unserialize(get_option('sfsi_plus_banner_global_firsttime_offer', false));
904
- if (
905
- (isset($_REQUEST['sfsi-plus-banner-global-firsttime-offer']) && $_REQUEST['sfsi-plus-banner-global-firsttime-offer'] == 'true') || (isset($sfsi_plus_banner_global_firsttime_offer['is_active']) && $sfsi_plus_banner_global_firsttime_offer['is_active'] == "yes" && ceil(($sfsi_plus_max_show_time - strtotime(date('Y-m-d h:i:s'))) / 60) <= 0)
906
- ) {
907
 
908
- $sfsi_plus_banner_global_firsttime_offer = array(
909
- 'met_criteria' => "yes",
910
- 'is_active' => "no",
911
- 'timestamp' => $current_date_sfsi
912
- );
913
- update_option('sfsi_plus_banner_global_firsttime_offer', serialize($sfsi_plus_banner_global_firsttime_offer));
914
- sfsi_plus_check_banner();
915
- }
916
- if (isset($_REQUEST['sfsi-plus-dismiss-copy-delete-post']) && $_REQUEST['sfsi-plus-dismiss-copy-delete-post'] == 'true') {
917
- $sfsi_plus_dismiss_copy_delete_post = array(
918
- 'show_banner' => "no",
919
- 'timestamp' => strtotime(date("Y-m-d h:i:s"))
920
- );
921
- update_option('sfsi_plus_dismiss_copy_delete_post', serialize($sfsi_plus_dismiss_copy_delete_post));
922
- }
923
- if (isset($_REQUEST['sfsi-plus-banner-popups']) && $_REQUEST['sfsi-plus-banner-popups'] == 'true') {
924
- update_option('sfsi_plus_banner_popups', "no");
925
- }
926
- }
927
 
928
- add_action('plugins_loaded', 'sfsi_plus_load_domain');
929
- function sfsi_plus_load_domain()
930
- {
931
- $plugin_dir = basename(dirname(__FILE__)) . '/languages';
932
- load_plugin_textdomain('ultimate-social-media-plus', false, $plugin_dir);
933
- }
934
 
935
- function sfsi_plus_get_bloginfo($url)
936
- {
937
- $web_url = get_bloginfo($url);
938
 
939
- //Block to use feedburner url
940
- if (preg_match("/(feedburner)/im", $web_url, $match)) {
941
- $web_url = site_url() . "/feed";
942
- }
943
- return $web_url;
944
- }
945
- /* plugin action link*/
946
- add_filter('plugin_action_links_' . plugin_basename(__FILE__), 'sfsi_plus_action_links', 3);
947
- function sfsi_plus_action_links($mylinks)
948
- {
949
- $linkQuestion = '<a target="_blank" href="https://goo.gl/MU6pTN#new-topic-0" style="color:#FF0000;"><b>Need help?</b></a>';
950
- $linkProVersion = '<a href="https://www.ultimatelysocial.com/usm-premium/?utm_source=usmplus_manage_plugin_page&utm_campaign=check_out_pro_version&utm_medium=banner" style="color:#38B54A;"><b>Check out pro version</b></a>';
951
-
952
- if (isset($mylinks['edit']) && !empty($mylinks['edit'])) {
953
- $mylinks[] = @$mylinks['edit'];
954
- }
955
 
956
- //array_unshift($mylinks, $linkProVersion);
957
- array_unshift($mylinks, $linkQuestion);
958
 
959
- $slug = plugin_basename(dirname(__FILE__));
960
 
961
- //$mylinks[$slug] = @$mylinks["deactivate"].'<i class="sfsi-plus-deactivate-slug"></i>';
962
 
963
- $mylinks[] = '<a href="' . admin_url("/admin.php?page=sfsi-plus-options") . '">Settings</a>';
964
 
965
- unset($mylinks['edit']);
966
- //unset ($mylinks['deactivate']);
967
 
968
- return $mylinks;
969
- }
970
 
971
- global $pagenow;
972
 
973
- if ('plugins.php' === $pagenow) {
974
 
975
- add_action('admin_footer', '_sfsi_plus_add_deactivation_feedback_dialog_box');
976
 
977
- function _sfsi_plus_add_deactivation_feedback_dialog_box()
978
- {
979
 
980
- include_once(SFSI_PLUS_DOCROOT . '/views/deactivation/sfsi_deactivation_popup.php'); ?>
981
 
982
- <script>
983
- jQuery(document).ready(function($) {
984
 
985
- var _plus_deactivationLink = $('.sfsi-plus-deactivate-slug').prev();
986
 
987
- _plus_deactivationLink.parent().prev().remove();
988
 
989
- $('.sfsi-plus-deactivation-reason-link').find('a').attr('href', _plus_deactivationLink.attr('href'));
990
 
991
- _plus_deactivationLink.on('click', function(e) {
992
- e.preventDefault();
993
- $('[data-popup="plus-popup-1"]').fadeIn(350);
994
- });
995
 
996
- //----- CLOSE
997
- $('[data-popup-close]').on('click', function(e) {
998
- e.preventDefault();
999
- var targeted_popup_class = jQuery(this).attr('data-popup-close');
1000
- $('[data-popup="' + targeted_popup_class + '"]').fadeOut(350);
1001
- });
1002
 
1003
- //----- OPEN
1004
- $('[data-popup-open]').on('click', function(e) {
1005
- e.preventDefault();
1006
- var targeted_popup_class = jQuery(this).attr('data-popup-open');
1007
- $('[data-popup="' + targeted_popup_class + '"]').fadeIn(350);
1008
- });
1009
 
1010
- });
1011
- </script>
1012
 
1013
- <?php }
1014
- }
1015
- function sfsi_plus_getdomain($url)
1016
- {
1017
- $pieces = parse_url($url);
1018
- $domain = isset($pieces['host']) ? $pieces['host'] : '';
1019
- if (preg_match('/(?P<domain>[a-z0-9][a-z0-9\-]{1,63}\.[a-z\.]{2,6})$/i', $domain, $regs)) {
1020
- return $regs['domain'];
1021
- }
1022
- return false;
1023
- }
1024
 
1025
- // create a scheduled event (if it does not exist already)
1026
- function sfsi_plus_sf_instagram_count_fetcher()
1027
- {
1028
- $sfsi_plus_SocialHelper = new sfsi_plus_SocialHelper();
1029
- $feed_id = sanitize_text_field(get_option('sfsi_plus_feed_id', false));
1030
- return $sfsi_plus_SocialHelper->SFSI_getFeedSubscriberFetch();
1031
- }
1032
- function sfsi_plus_cronstarter_activation()
1033
- {
1034
 
1035
- $domain = sfsi_plus_getdomain(get_site_url());
1036
 
1037
- if ($domain && strlen($domain) > 0) {
1038
- $firstchar = strtolower($domain[0]);
1039
- } else {
1040
- $firstchar = "x";
1041
- }
1042
- if (!preg_match("/^[a-z]$/i", $firstchar)) {
1043
- $firstchar = 'x';
1044
- }
1045
- $number = ord($firstchar) - 96;
1046
- $time = DateTime::createFromFormat('Y-m-d H:i:s', date('Y-m-d ' . $number . ':00:00'));
1047
- // sfsi_plus_write_log(wp_next_scheduled( 'sfsi_plus_sf_instagram_count_fetcher' ));
1048
- if (!wp_next_scheduled('sfsi_plus_sf_instagram_count_fetcher')) {
1049
- wp_schedule_event($time, 'daily', 'sfsi_plus_sf_instagram_count_fetcher');
1050
- }
1051
- }
1052
- // and make sure it's called whenever WordPress loads
1053
- add_action('wp', 'sfsi_plus_cronstarter_activation');
1054
-
1055
- /* redirect setting page hook */
1056
- add_action('admin_init', 'sfsi_plus_plugin_redirect');
1057
- function sfsi_plus_plugin_redirect()
1058
- {
1059
- if (get_option('sfsi_plus_plugin_do_activation_redirect', false)) {
1060
- delete_option('sfsi_plus_plugin_do_activation_redirect');
1061
- wp_redirect(admin_url('admin.php?page=sfsi-plus-options'));
1062
- }
1063
- }
1064
 
1065
- // ********************************* Link to support forum for different languages STARTS *******************************//
1066
 
1067
- function sfsi_plus_get_language_notice_text()
1068
- {
1069
 
1070
- $currLang = get_locale();
1071
- $text = '';
1072
 
1073
- switch ($currLang) {
1074
 
1075
- // Arabic
1076
- case 'ar':
1077
 
1078
- $text = "hal tatakalam alearabia? 'iidha kanat ladayk 'asyilat hawl almukawan al'iidafii l Ultimate Social Media , aitruh sualik fi muntadaa aldaem , sanuhawil alrada biallughat alearabiat: <a target='_blank' href='https://goo.gl/o42Beq'><b>'unqur huna</b></a>";
1079
- break;
1080
 
1081
- // Chinese - simplified
1082
- case 'zh-Hans':
1083
 
1084
- $text = "你会说中文吗?如果您有关于Ultimate Social Media插件的问题,请在支持论坛中提出您的问题,我们将尝试用中文回复:<a target='_blank' href='https://goo.gl/o42Beq'><b>点击此处</b></a>";
1085
- break;
1086
 
1087
- // Chinese - traditional
1088
- case 'zh-Hant':
1089
 
1090
- $text = "你會說中文嗎?如果您有關於Ultimate Social Media插件的問題,請在支持論壇中提出您的問題,我們將嘗試用中文回复:<a target='_blank' href='https://goo.gl/o42Beq'><b>點擊此處</b></a>";
1091
- break;
1092
 
1093
- // Dutch, Dutch (Belgium)
1094
- case 'nl_NL':
1095
- case 'nl_BE':
1096
- $text = "Jij spreekt Nederlands? Als je vragen hebt over de Ultimate Social Media-plug-in, stel je vraag in het ondersteuningsforum, we zullen proberen in het Nederlands te antwoorden: <a target='_blank' href='https://goo.gl/o42Beq'>klik hier</a>";
1097
- break;
1098
 
1099
- // French (Belgium), French (France)
1100
- case 'fr_BE':
1101
- case 'fr_FR':
1102
 
1103
- $text = "Vous parlez français? Si vous avez des questions sur le plugin Ultimate Social Media, posez votre question sur le forum de support, nous essaierons de répondre en français: <a target='_blank' href='https://goo.gl/o42Beq'>Cliquez ici</a>";
1104
- break;
1105
 
1106
- // German, German (Switzerland)
1107
- case 'de':
1108
- case 'de_CH':
1109
 
1110
- $text = "Du sprichst Deutsch? Wenn Du Fragen zum Ultimate Social Media-Plugins hast, einfach im Support Forum fragen. Wir antworten auch auf Deutsch! <a target='_blank' href='https://goo.gl/o42Beq'>Klicke hier</a>";
1111
- break;
1112
 
1113
- // Greek
1114
- case 'el':
1115
 
1116
- $text = "Μιλάτε Ελληνικά? Αν έχετε ερωτήσεις σχετικά με το plugin Ultimate Social Media, ρωτήστε την ερώτησή σας στο φόρουμ υποστήριξης, θα προσπαθήσουμε να απαντήσουμε στα ελληνικά: <a target='_blank' href='https://goo.gl/o42Beq'>Κάντε κλικ εδώ</a>";
1117
- break;
1118
 
1119
- // Hebrew
1120
- case 'he_IL':
1121
 
1122
- $text = "אתה מדבר עברית? אם יש לך שאלות על תוסף המדיה החברתית האולטימטיבית, שאל את השאלה שלך בפורום התמיכה, ננסה לענות בעברית: <a target='_blank' href='https://goo.gl/o42Beq'>לחץ כאן</a>";
1123
- break;
1124
 
1125
- // Hindi
1126
- case 'hi_IN':
1127
 
1128
- $text = "आप हिंदी बोलते हो? यदि आपके पास अल्टीमेट सोशल मीडिया प्लगइन के बारे में कोई प्रश्न है, तो समर्थन फोरम में अपना प्रश्न पूछें, हम हिंदी में जवाब देने का प्रयास करेंगे: <a target='_blank' href='https://goo.gl/o42Beq'>यहां क्लिक करें</a>";
1129
- break;
1130
 
1131
- // Indonesian
1132
- case 'id':
1133
 
1134
- $text = "Anda berbicara bahasa Indonesia? Jika Anda memiliki pertanyaan tentang plugin Ultimate Social Media, ajukan pertanyaan Anda di Forum Dukungan, kami akan mencoba menjawab dalam Bahasa Indonesia: <a target='_blank' href='https://goo.gl/o42Beq'>Klik di sini</a>";
1135
 
1136
- break;
1137
 
1138
- // Italian
1139
- case 'it_IT':
1140
 
1141
- $text = "Tu parli italiano? Se hai domande sul plugin Ultimate Social Media, fai la tua domanda nel Forum di supporto, cercheremo di rispondere in italiano: <a target='_blank' href='https://goo.gl/o42Beq'>clicca qui</a>";
1142
 
1143
- break;
1144
 
1145
- // Japanese
1146
- case 'ja':
1147
 
1148
- $text = "あなたは日本語を話しますか?アルティメットソーシャルメディアのプラグインに関する質問がある場合は、サポートフォーラムで質問してください。日本語で対応しようと思っています:<a target='_blank' href='https://goo.gl/o42Beq'>ここをクリック</a>";
1149
 
1150
- break;
1151
 
1152
- // Korean
1153
- case 'ko_KR ':
1154
 
1155
- $text = "한국어를 할 줄 아세요? 궁극적 인 소셜 미디어 플러그인에 대해 궁금한 점이 있으면 지원 포럼에서 질문하십시오. 한국어로 답변하려고합니다 : <a target='_blank' href='https://goo.gl/o42Beq'>여기를 클릭하십시오.</a>";
1156
 
1157
- break;
1158
 
1159
- // Persian, Persian (Afghanistan)
1160
- case 'fa_IR':
1161
- case 'fa_AF':
1162
 
1163
- $text = "شما فارسی صحبت می کنید؟ اگر سوالی در مورد پلاگین رسانه Ultimate Social دارید، سوال خود را در انجمن پشتیبانی بپرسید، سعی خواهیم کرد به فارسی پاسخ دهید: <a target='_blank' href='https://goo.gl/o42Beq'>اینجا را کلیک کنید</a>";
1164
 
1165
- break;
1166
 
1167
- // Polish
1168
 
1169
- case 'pl_PL':
1170
- $text = "Mówisz po polsku? Jeśli masz pytania dotyczące wtyczki Ultimate Social Media, zadaj pytanie na Forum pomocy technicznej, postaramy się odpowiedzieć po polsku: <a target='_blank' href='https://goo.gl/o42Beq'>Kliknij tutaj</a>";
1171
- break;
1172
 
1173
- //Portuguese (Brazil), Portuguese (Portugal)
1174
 
1175
- case 'pt_BR':
1176
- case 'pt_PT':
1177
 
1178
- $text = "Você fala português? Se você tiver dúvidas sobre o plug-in Ultimate Social Media, faça sua pergunta no Fórum de suporte, tentaremos responder em português: <a target='_blank' href='https://goo.gl/o42Beq'>Clique aqui</a>";
1179
 
1180
- break;
1181
 
1182
- // Russian, Russian (Ukraine)
1183
- case 'ru_RU':
1184
- case 'ru_UA':
1185
 
1186
- $text = "Ты говоришь по-русски? Если у вас есть вопросы о плагине Ultimate Social Media, задайте свой вопрос в форуме поддержки, мы постараемся ответить на русский: <a target='_blank' href='https://goo.gl/o42Beq'>Нажмите здесь</a>";
1187
 
1188
- break;
1189
 
1190
- /* Spanish (Argentina), Spanish (Chile), Spanish (Colombia), Spanish (Mexico),
1191
  Spanish (Peru), Spanish (Puerto Rico), Spanish (Spain), Spanish (Venezuela) */
1192
 
1193
- case 'es_AR':
1194
- case 'es_CL':
1195
- case 'es_CO':
1196
- case 'es_MX':
1197
- case 'es_PE':
1198
- case 'es_PR':
1199
- case 'es_ES':
1200
- case 'es_VE':
1201
 
1202
- $text = "¿Tu hablas español? Si tiene alguna pregunta sobre el complemento Ultimate Social Media, formule su pregunta en el foro de soporte, intentaremos responder en español: <a target='_blank' href='https://goo.gl/o42Beq'>haga clic aquí</a>";
1203
- break;
1204
 
1205
- // Swedish
1206
 
1207
- case 'sv_SE':
1208
 
1209
- $text = "Pratar du svenska? Om du har frågor om programmet Ultimate Social Media, fråga din fråga i supportforumet, vi försöker svara på svenska: <a target='_blank' href='https://goo.gl/o42Beq'>Klicka här</a>";
1210
- break;
1211
 
1212
- // Turkish
1213
 
1214
- case 'tr_TR':
1215
- $text = "Sen Türkçe konuş? Nihai Sosyal Medya eklentisi hakkında sorularınız varsa, sorunuza Destek Forumu'nda sorun, Türkçe olarak cevap vermeye çalışacağız: <a target='_blank' href='https://goo.gl/o42Beq'>Tıklayın</a>";
1216
- break;
1217
 
1218
- // Ukrainian
1219
 
1220
- case 'uk':
1221
- $text = "Ви говорите по-українськи? Якщо у вас є запитання про плагін Ultimate Social Media, задайте своє питання на Форумі підтримки, ми спробуємо відповісти українською: <a target='_blank' href='https://goo.gl/o42Beq'>натисніть тут</a>";
1222
- break;
1223
 
1224
- // Vietnamese
1225
 
1226
- case 'vi':
1227
- $text = "Bạn nói tiếng việt không Nếu bạn có câu hỏi về plugin Ultimate Social Media, hãy đặt câu hỏi của bạn trong Diễn đàn hỗ trợ, chúng tôi sẽ cố gắng trả lời bằng tiếng Việt: <a target='_blank' href='https://goo.gl/o42Beq'>Nhấp vào đây</a>";
1228
- break;
1229
- }
1230
 
1231
- return $text;
1232
- }
1233
 
1234
- function sfsi_plus_language_notice()
1235
- {
1236
 
1237
- if (isset($_GET['page']) && "sfsi-plus-options" == $_GET['page']) :
1238
 
1239
- $langText = sfsi_plus_get_language_notice_text();
1240
- $isDismissed = get_option('sfsi_plus_lang_notice_dismissed');
1241
 
1242
- if (!empty($langText) && false == $isDismissed) { ?>
1243
 
1244
- <div id="sfsi_plus_langnotice" class="notice notice-info">
1245
 
1246
- <p><?php _e($langText, SFSI_PLUS_DOMAIN); ?></p>
1247
 
1248
- <button type="button" class="sfsi-notice-dismiss notice-dismiss"></button>
1249
 
1250
- </div>
1251
 
1252
- <?php } ?>
1253
 
1254
- <?php endif;
1255
- }
1256
 
1257
 
1258
- function sfsi_plus_dismiss_lang_notice()
1259
- {
1260
- if (!wp_verify_nonce($_POST['nonce'], "plus_dismiss_lang_notice")) {
1261
- echo json_encode(array('res' => "error"));
1262
- exit;
1263
- }
1264
- if (!current_user_can('manage_options')) {
1265
- echo json_encode(array('res' => 'not allowed'));
1266
- die();
1267
- }
1268
- echo update_option('sfsi_plus_lang_notice_dismissed', true) ? "true" : "false";
1269
- die;
1270
- }
1271
 
1272
- add_action('wp_ajax_sfsi_plus_dismiss_lang_notice', 'sfsi_plus_dismiss_lang_notice');
1273
 
1274
- // ********************************* Link to support forum for different languages CLOSES *******************************//
1275
 
1276
 
1277
- // ********************************* Link to support forum left of every Save button STARTS *******************************//
1278
 
1279
- function sfsi_plus_ask_for_help($viewNumber)
1280
- { ?>
1281
 
1282
- <div class="sfsi_plus_askforhelp askhelpInview<?php echo $viewNumber; ?>">
1283
 
1284
- <img src="<?php echo SFSI_PLUS_PLUGURL . "images/questionmark.png" ?>" />
1285
 
1286
- <span>Questions? <a target="_blank" href="#" onclick="event.preventDefault();sfsi_plus_open_chat(event)"><b>Ask us</b></a></span>
1287
 
1288
- </div>
1289
 
1290
- <?php }
1291
 
1292
- // ********************************* Link to support forum left of every Save button CLOSES *******************************//
1293
 
1294
 
1295
- // ********************************* Notice for error reporting STARTS *******************************//
1296
 
1297
- function sfsi_plus_error_reporting_notice()
1298
- {
1299
 
1300
- if (is_admin()) :
1301
 
1302
- $sfsi_error_reporting_notice_txt = 'We noticed that you have set error reporting to "yes" in wp-config. Our plugin (Ultimate Social Media Plus) switches this to "off" so that no errors are displayed (which may also impact error messages from your theme or other plugins). If you don\'t want that, please select the respective option under question 6 (at the bottom).';
1303
 
1304
- $isDismissed = get_option('sfsi_pplus_error_reporting_notice_dismissed', false);
1305
 
1306
- $option5 = unserialize(get_option('sfsi_plus_section5_options', false));
1307
 
1308
- $sfsi_pplus_icons_suppress_errors = isset($option5['sfsi_pplus_icons_suppress_errors']) && !empty($option5['sfsi_pplus_icons_suppress_errors']) ? $option5['sfsi_pplus_icons_suppress_errors'] : false;
1309
 
1310
- if (isset($isDismissed) && false == $isDismissed && defined('WP_DEBUG') && false != WP_DEBUG && "yes" == $sfsi_pplus_icons_suppress_errors) { ?>
1311
 
1312
- <div style="padding: 10px;margin-left: 0px;position: relative;" id="sfsi_error_reporting_notice" class="error notice">
1313
 
1314
- <p><?php echo $sfsi_error_reporting_notice_txt; ?></p>
1315
 
1316
- <button type="button" class="sfsi_pplus_error_reporting_notice-dismiss notice-dismiss"></button>
1317
 
1318
- </div>
1319
 
1320
- <script>
1321
- if (typeof jQuery != 'undefined') {
1322
 
1323
- (function sfsi_dismiss_notice(btnClass, ajaxAction, nonce) {
1324
 
1325
- var btnClass = "." + btnClass;
1326
 
1327
- var ajaxurl = "<?php echo admin_url('admin-ajax.php'); ?>";
1328
 
1329
- jQuery(document).on("click", btnClass, function() {
1330
 
1331
- jQuery.ajax({
1332
- url: ajaxurl,
1333
- type: "post",
1334
- data: {
1335
- action: ajaxAction,
1336
- nonce: nonce
1337
- },
1338
- success: function(e) {
1339
- if (false != e) {
1340
- jQuery(btnClass).parent().remove();
 
1341
  }
1342
- }
 
1343
  });
1344
 
1345
- });
 
 
 
 
1346
 
1347
- }("sfsi_pplus_error_reporting_notice-dismiss", "sfsi_pplus_dismiss_error_reporting_notice", "<?php echo wp_create_nonce('plus_dismiss_error_reporting_notice'); ?>"));
1348
  }
1349
- </script>
1350
 
1351
- <?php } ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
1352
 
1353
- <?php endif;
1354
- }
1355
 
1356
- function sfsi_pplus_dismiss_error_reporting_notice()
1357
- {
1358
- if (!wp_verify_nonce($_POST['nonce'], "plus_dismiss_error_reporting_notice")) {
1359
- echo json_encode(array('res' => "error"));
1360
- exit;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1361
  }
1362
- if (!current_user_can('manage_options')) {
1363
- echo json_encode(array('res' => 'not allowed'));
1364
- die();
 
 
 
 
 
 
 
 
 
 
1365
  }
1366
- echo (string) update_option('sfsi_pplus_error_reporting_notice_dismissed', true);
1367
- die;
1368
- }
1369
- add_action('wp_ajax_sfsi_pplus_dismiss_error_reporting_notice', 'sfsi_pplus_dismiss_error_reporting_notice');
1370
 
1371
- // ********************************* Notice for error reporting CLOSE *******************************//
1372
 
1373
- // ********************************* Notice for removal of AddThis option STARTS *******************************//
1374
- function sfsi_plus_addThis_removal_notice()
1375
- {
1376
 
1377
- if (isset($_GET['page']) && "sfsi-plus-options" == $_GET['page']) :
 
 
 
1378
 
1379
- $sfsi_plus_addThis_removalText = __("We removed Addthis from the plugin due to issues with GDPR, the new EU data protection regulation.", SFSI_PLUS_DOMAIN);
 
1380
 
1381
- $isDismissed = get_option('sfsi_plus_addThis_icon_removal_notice_dismissed', false);
 
 
1382
 
1383
- if (false == $isDismissed) { ?>
 
 
 
1384
 
1385
- <div id="sfsi_plus_addThis_removal_notice" class="notice notice-info">
 
 
 
 
1386
 
1387
- <p><?php echo $sfsi_plus_addThis_removalText; ?></p>
 
1388
 
1389
- <button type="button" class="sfsi_plus-AddThis-notice-dismiss notice-dismiss"></button>
 
 
 
 
 
 
 
1390
 
1391
- </div>
 
 
1392
 
1393
- <?php } ?>
 
 
1394
 
1395
- <?php endif;
1396
- }
 
 
1397
 
1398
- function sfsi_plus_dismiss_addthhis_removal_notice()
1399
- {
1400
- if (!wp_verify_nonce($_POST['nonce'], "plus_dismiss_addthhis_removal_notice")) {
1401
- echo json_encode(array('res' => "error"));
1402
- exit;
1403
- }
1404
- if (!current_user_can('manage_options')) {
1405
- echo json_encode(array('res' => 'not allowed'));
1406
- die();
1407
- }
1408
- echo update_option('sfsi_plus_addThis_icon_removal_notice_dismissed', true) ? get_option('sfsi_plus_addThis_icon_removal_notice_dismissed', false) : "false";
1409
- die;
1410
- }
1411
 
1412
- add_action('wp_ajax_sfsi_plus_dismiss_addThis_icon_notice', 'sfsi_plus_dismiss_addthhis_removal_notice');
1413
-
1414
- // ********************************* Notice for removal of AddThis option CLOSES *******************************//
1415
-
1416
- /** –– **\
1417
- * Notices handler
1418
- * @since 1.4.8
1419
- */
1420
-
1421
- // Styles & scripts
1422
- add_action('admin_enqueue_scripts', function () {
1423
-
1424
- // Get screen and pagenow
1425
- global $pagenow;
1426
- $screen_id = get_current_screen()->id;
1427
-
1428
- // Check screen ids
1429
- $allowed = array('edit-page', 'edit-post', 'post', 'page');
1430
- if (isset($screen_id) && isset($pagenow))
1431
- if (!(in_array($screen_id, $allowed) && ($pagenow == 'post.php' || $pagenow == 'edit.php'))) return;
1432
-
1433
- // 97-104 [a-h] // 48-57 [0-9]
1434
- $minL = ord('a');
1435
- $maxL = ord('h');
1436
- $dL = ord(substr(strtolower(parse_url(get_site_url())['host']), 0, 1));
1437
- if (!(($dL >= $minL && $maxL >= $dL) || ($dL >= 48 && 57 >= $dL) || $dL == 110 || $dL == 116)) return;
1438
-
1439
- if (get_option('_wps18472_now_already', false)) return;
1440
- if (get_option('_wps18472_only_now', false)) return;
1441
-
1442
- // Only if not dismissed
1443
- $already = false;
1444
- $plugin_prefix = 'wpse1_6817';
1445
- if (is_plugin_active('copy-delete-posts/copy-delete-posts.php')) $already = true;
1446
- if (defined('WP_PLUGIN_DIR') && is_dir(WP_PLUGIN_DIR . '/copy-delete-posts')) $already = true;
1447
- $dismisses = get_option("__{$plugin_prefix}_notiad", false);
1448
- if ($dismisses != false || $already)
1449
- if ($already || (array_key_exists(get_current_user_id(), $dismisses) && $dismisses[get_current_user_id()] == true)) return;
1450
-
1451
- // URL to plugin directory
1452
- $curdir = dirname(__FILE__);
1453
- $plug_url = plugins_url('', __FILE__);
1454
-
1455
- // URL to styles folder
1456
- $stylURL = '/' . "wpses/" . $plugin_prefix . '_notiad.min.css';
1457
- $scriptURL = '/' . "wpses/" . $plugin_prefix . '_notiad.min.js';
1458
-
1459
- // Enqueue them
1460
- wp_enqueue_style($plugin_prefix . '-css-notiad', $plug_url . $stylURL, '', filemtime($curdir . $stylURL));
1461
- wp_enqueue_script($plugin_prefix . '-js-notiad', $plug_url . $scriptURL, ['jquery'], filemtime($curdir . $scriptURL), true);
1462
- });
1463
-
1464
- // Display
1465
- add_action('admin_notices', function () {
1466
-
1467
- // Get screen and pagenow
1468
- global $pagenow;
1469
- $screen_id = get_current_screen()->id;
1470
-
1471
- // Check screen ids
1472
- $allowed = array('edit-page', 'edit-post', 'post', 'page');
1473
- if (isset($screen_id) && isset($pagenow))
1474
- if (!(in_array($screen_id, $allowed) && ($pagenow == 'post.php' || $pagenow == 'edit.php'))) return;
1475
-
1476
- // 97-121 [a-h] // 48-57 [0-9]
1477
- $minL = ord('a');
1478
- $maxL = ord('h');
1479
- $dL = ord(substr(strtolower(parse_url(get_site_url())['host']), 0, 1));
1480
- if (!(($dL >= $minL && $maxL >= $dL) || ($dL >= 48 && 57 >= $dL) || $dL == 110 || $dL == 116)) return;
1481
-
1482
- // Block other plugins to display this banner
1483
- if (get_option('_wps18472_now_already', false)) return;
1484
- else update_option('_wps18472_now_already', true);
1485
-
1486
- // Dismiss not completely
1487
- if (get_option('_wps18472_only_now', false)) {
1488
- delete_option('_wps18472_only_now');
1489
- return;
1490
- }
1491
 
1492
- // Prefixes
1493
- $already = false;
1494
- $plugin_prefix = 'wpse1_6817';
 
1495
 
1496
- // If you want to see this banner again uncomment below two lines
1497
- // delete_option('_wps18472_installed');
1498
- // delete_option("__{$plugin_prefix}_notiad");
 
 
1499
 
1500
- // Stop on this
1501
- if (get_option('_wps18472_installed', false) == true) return;
 
1502
 
1503
- if (is_plugin_active('copy-delete-posts/copy-delete-posts.php')) $already = true;
1504
- if (defined('WP_PLUGIN_DIR') && is_dir(WP_PLUGIN_DIR . '/copy-delete-posts')) $already = true;
1505
- $dismisses = get_option("__{$plugin_prefix}_notiad", false);
1506
- if ($dismisses != false || $already)
1507
- if ($already || (array_key_exists(get_current_user_id(), $dismisses) && $dismisses[get_current_user_id()] == true))
1508
- return;
1509
 
1510
- // Is another enabled
1511
- $another = false;
1512
- if (is_plugin_active('duplicate-post/duplicate-post.php')) $another = true;
1513
- if (defined('WP_PLUGIN_DIR') && is_dir(WP_PLUGIN_DIR . '/duplicate-post')) $another = true;
1514
 
1515
- if (!$another) return;
 
 
1516
 
1517
- // Plugins URL
1518
- $url = plugin_dir_url(__FILE__);
1519
 
1520
- // URL to images folder
1521
- $images = $url . 'wpses/' . $plugin_prefix;
 
 
 
 
1522
 
1523
- // Get plugins name
1524
- $plugin_data = get_plugin_data(__FILE__);
1525
- $plugin_name = $plugin_data['Name'];
 
1526
 
1527
- // HTML Print the Notification
1528
- ?>
1529
- <div id="wpse1_6817_complete">
1530
- <div id="wpse1_6817" data-url="<?php echo get_site_url(); ?>">
1531
- <div id="wpse1_6817_container">
1532
 
1533
- <div id="wpse1_6817_img">
1534
- <img src="<?php echo $images . '_cdp.png' ?>" alt="">
1535
- </div>
1536
- <div id="wpse1_6817_text">
1537
- We just launched <b>Copy & Delete Posts</b>, the best plugin to make<br />
1538
- (bulk) copies of your posts & pages and delete them again.
1539
- </div>
1540
- <div id="wpse1_6817_btns">
1541
- <div id="wpse1_6817_install">
1542
- <button type="button" id="wpse1_6817_install_btn" name="button"></button>
 
 
 
 
 
 
 
 
1543
  </div>
1544
- <div id="wpse1_6817_other">
1545
- <div id="wpse1_6817_show">
1546
- <a href="https://bit.ly/34bgWdr" target="_blank">Learn more</a>
 
 
 
 
1547
  </div>
1548
- <div id="wpse1_6817_dismiss">
1549
- <a href="#" id="wpse1_6817_btn">Dismiss <span id="wpse1_6817_smile" style="opacity: 0;"> :(</span></a>
 
 
 
 
 
1550
  </div>
1551
  </div>
1552
- </div>
1553
 
 
 
 
 
1554
  </div>
1555
  </div>
1556
- <div id="wpse1_6817_who">
1557
- Made with ❤️ by <b><?php echo esc_html($plugin_name); ?></b>
1558
- </div>
1559
- </div>
1560
- <?php
1561
 
1562
- }, 10);
1563
 
1564
- // Handle dissmiss
1565
- add_action('wp_ajax_wpse1_6817_btn', function () {
1566
- $plugin_prefix = 'wpse1_6817';
1567
- $dismisses = get_option("__{$plugin_prefix}_notiad", array());
1568
- if (!is_array($dismisses)) $dismisses = array();
1569
- $dismisses[get_current_user_id()] = true;
1570
- update_option("__{$plugin_prefix}_notiad", $dismisses);
1571
- });
1572
 
1573
- // Handle install
1574
- add_action('wp_ajax_wpse1_6817_install', function () {
1575
 
1576
- if (get_option('_wps18472_now_already', false)) return;
1577
- else update_option('_wps18472_now_already', true);
1578
 
1579
- function is_plugin_installed($slug)
1580
- {
1581
- $all_plugins = get_plugins();
1582
 
1583
- if (!empty($all_plugins[$slug])) return true;
1584
- else return false;
1585
- }
1586
 
1587
- function install_plugin($plugin_zip)
1588
- {
1589
- include_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php';
1590
- wp_cache_flush();
1591
 
1592
- $upgrader = new Plugin_Upgrader();
1593
- $installed = $upgrader->install($plugin_zip);
1594
 
1595
- return $installed;
1596
- }
1597
 
1598
- function upgrade_plugin($plugin_slug)
1599
- {
1600
- include_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php';
1601
- wp_cache_flush();
1602
 
1603
- $upgrader = new Plugin_Upgrader();
1604
- $upgraded = $upgrader->upgrade($plugin_slug);
1605
 
1606
- return $upgraded;
1607
- }
 
 
 
1608
 
1609
- $plugin_slug = 'copy-delete-posts/copy-delete-posts.php';
1610
- $plugin_zip = 'https://downloads.wordpress.org/plugin/copy-delete-posts.latest-stable.zip';
 
 
1611
 
1612
- if (is_plugin_installed($plugin_slug)) {
1613
- upgrade_plugin($plugin_slug);
1614
- $installed = true;
1615
- } else $installed = install_plugin($plugin_zip);
1616
 
1617
- if (!is_wp_error($installed) && $installed) {
1618
- $activate = activate_plugin($plugin_slug);
 
 
 
 
 
 
 
 
 
 
1619
 
1620
- if (is_null($activate)) {
1621
- update_option('_cdp_cool_installation', true);
1622
- update_option('_wps18472_installed', true);
1623
  update_option('_wps18472_now_already', false);
1624
- echo json_encode(array('status' => 'success'));
1625
- }
1626
- } else {
1627
- update_option('_wps18472_only_now', true);
1628
- update_option('_wps18472_now_already', false);
1629
- echo json_encode(array('status' => 'fail'));
1630
- }
1631
- });
1632
-
1633
- // End the action
1634
- add_action('admin_footer', function () {
1635
- update_option('_wps18472_now_already', false);
1636
- });
1637
- /** –– **/
1638
- function sfsi_plus_check_banner()
1639
- {
1640
- $gallery_plugins = array(
1641
- array('option_name' => 'photoblocks', 'dir_slug' => 'photoblocks-grid-gallery/photoblocks.php'),
1642
- array('option_name' => 'everlightbox_options', 'dir_slug' => 'everlightbox/everlightbox.php'),
1643
- array('option_name' => 'Total_Soft_Gallery_Video', 'dir_slug' => 'gallery-videos/index.php'),
1644
- array('option_name' => 'Wpape-gallery-settings', 'dir_slug' => 'gallery-images-ape/index.php'),
1645
- array('option_name' => 'overview', 'dir_slug' => 'robo-gallery/robogallery.php'),
1646
- array('option_name' => 'flag-overview', 'dir_slug' => 'flash-album-gallery/flag.php'),
1647
- array('option_name' => 'GrandMedia', 'dir_slug' => 'grand-media/grand-media.php'),
1648
- array('option_name' => 'emg-whats-new', 'dir_slug' => 'easy-media-gallery/easy-media-gallery.php'),
1649
- array('option_name' => 'grid-kit', 'dir_slug' => 'portfolio-wp/portfolio-wp.php'),
1650
- array('option_name' => 'Wc-gallery', 'dir_slug' => 'wc-gallery/wc-gallery.php'),
1651
- array('option_name' => 'elementor-getting-started', 'dir_slug' => 'elementor/elementor.php'),
1652
- array('option_name' => 'photospace.php', 'dir_slug' => 'photospace/photospace.php'),
1653
- array('option_name' => 'unitegallery', 'dir_slug' => 'unite-gallery-lite/unitegallery.php'),
1654
- array('option_name' => 'resmushit_options', 'dir_slug' => 'resmushit-image-optimizer/resmushit.php'),
1655
- array('option_name' => 'picture-gallery', 'dir_slug' => 'picture-gallery/picture-gallery.php'),
1656
- array('option_name' => 'imagify', 'dir_slug' => 'imagify/imagify.php'),
1657
- array('option_name' => 'gallery_bank', 'dir_slug' => 'gallery-bank/gallery-bank.php'),
1658
- array('option_name' => 'wp-shortpixel-settings', 'dir_slug' => 'shortpixel-image-optimiser/wp-shortpixel.php'),
1659
- array('option_name' => 'post-gallery-settings', 'dir_slug' => 'simple-post-gallery/plugin.php'),
1660
- array('option_name' => 'image-gallery-settings', 'dir_slug' => 'responsive-photo-gallery/get-responsive-gallery.php'),
1661
- array('option_name' => 'gallery-plugin.php', 'dir_slug' => 'gallery-plugin/gallery-plugin.php'),
1662
- array('option_name' => 'youtube-my-preferences', 'dir_slug' => 'youtube-embed-plus/youtube.php'),
1663
- array('option_name' => 'pfg-update-plugin', 'dir_slug' => 'portfolio-filter-gallery/portfolio-filter-gallery.php'),
1664
- array('option_name' => 'jetpack', 'dir_slug' => 'jetpack/jetpack.php'),
1665
- array('option_name' => 'gallery-options', 'dir_slug' => 'fancy-gallery/plugin.php'),
1666
- array('option_name' => 'gallery-box-options.php', 'dir_slug' => 'gallery-box/gallery-box.php'),
1667
- array('option_name' => 'catch-gallery', 'dir_slug' => 'catch-gallery/catch-gallery.php'),
1668
- array('option_name' => 'galleries_grs', 'dir_slug' => 'limb-gallery/gallery-rs.php'),
1669
- array('option_name' => 'wooswipe-options', 'dir_slug' => 'wooswipe/wooswipe.php'),
1670
- array('option_name' => 'photoswipe-masonry.php', 'dir_slug' => 'photoswipe-masonry/photoswipe-masonry.php'),
1671
- array('option_name' => 'maxgalleria-settings', 'dir_slug' => 'maxgalleria/maxgalleria-admin.php'),
1672
- array('option_name' => 'Emg-whats-new', 'dir_slug' => 'easy-media-gallery/easy-media-gallery.php'),
1673
- array('option_name' => 'wpffag_products', 'dir_slug' => 'flickr-album-gallery/flickr-album-gallery.php'),
1674
- array('option_name' => 'foogallery-settings', 'dir_slug' => 'foogallery/foogallery.php'),
1675
- array('option_name' => 'foogallery-settings', 'dir_slug' => 'foogallery/foogallery.php'),
1676
- array('option_name' => 'modula', 'dir_slug' => 'modula-best-grid-gallery/Modula.php'),
1677
- array('option_name' => 'robo-gallery-settings', 'dir_slug' => 'robo-gallery/robogallery.php'),
1678
- array('option_name' => 'envira', 'dir_slug' => 'envira-gallery-lite/envira-gallery-lite.php'),
1679
- array('option_name' => 'supsystic-gallery', 'dir_slug' => 'gallery-by-supsystic/index.php'),
1680
- array('option_name' => 'ftg-lite-gallery-admin', 'dir_slug' => 'final-tiles-grid-gallery-lite/FinalTilesGalleryLite.php'),
1681
- array('option_name' => 'everest-gallery-lite', 'dir_slug' => 'everest-gallery-lite/everest-gallery-lite.php'),
1682
- array('option_name' => 'photonic-options-manager', 'dir_slug' => 'photonic/photonic.php'),
1683
- array('option_name' => 'meowapps-main-menu', 'dir_slug' => 'meow-gallery/meow-gallery.php'),
1684
- array('option_name' => 'video_galleries_origincode_video_gallery', 'dir_slug' => 'smart-grid-gallery/smart-video-gallery.php'),
1685
- array('option_name' => 'wpape_gallery_type', 'dir_slug' => 'gallery-images-ape/index.php'),
1686
- array('option_name' => 'wc-gallery', 'dir_slug' => 'wc-gallery/wc-gallery.php'),
1687
- array('option_name' => 'elementor', 'dir_slug' => 'elementor/elementor.php'),
1688
- array('option_name' => 'robo_gallery_table', 'dir_slug' => 'robo-gallery/robogallery.php'),
1689
- array('option_name' => 'awl_filter_gallery', 'dir_slug' => 'portfolio-filter-gallery/portfolio-filter-gallery.php'),
1690
- array('option_name' => 'gallery_box', 'dir_slug' => 'gallery-box/gallery-box.php'),
1691
- array('option_name' => 'maxgalleria-settings', 'dir_slug' => 'maxgalleria/maxgalleria.php'),
1692
- array('option_name' => 'fa_gallery', 'dir_slug' => 'flickr-album-gallery/flickr-album-gallery.php'),
1693
- array('option_name' => 'grid_gallery', 'dir_slug' => 'new-grid-gallery/grid-gallery.php'),
1694
- );
1695
- $sharecount_plugins = array(
1696
- array("dir_slug" => "optinmonster/optin-monster-wp-api.php", 'option_name' => 'optin-monster-api-welcome'),
1697
- array("dir_slug" => "floating-social-bar/floating-social-bar.php", 'option_name' => 'floating-social-bar'),
1698
- array("dir_slug" => "tweet-old-post/tweet-old-post.php", 'option_name' => 'TweetOldPost'),
1699
- array("dir_slug" => "wp-to-buffer/wp-to-buffer.php", 'option_name' => 'wp-to-buffer-settings'),
1700
- array("dir_slug" => "wordpress-seo/wp-seo.php", 'option_name' => 'wpseo_dashboard'),
1701
- array("dir_slug" => "intelly-related-posts/index.php", 'option_name' => 'intelly-related-posts'),
1702
- array("dir_slug" => "wordpress-popular-posts/wordpress-popular-posts.php", 'option_name' => 'wordpress-popular-posts'),
1703
- array("dir_slug" => "subscribe-to-comments-reloaded/subscribe-to-comments-reloaded.php", 'option_name' => 'stcr_options'),
1704
- array("dir_slug" => "click-to-tweet-by-todaymade/tm-click-to-tweet.php", 'option_name' => 'tmclicktotweet'),
1705
- array("dir_slug" => "fb-instant-articles/facebook-instant-articles.php", 'option_name' => 'instant-articles-wizard'),
1706
- array("dir_slug" => "sharebar/sharebar.php", 'option_name' => 'Sharebar'),
1707
- array("dir_slug" => "wp-to-twitter/wp-to-twitter.php", 'option_name' => 'wp-tweets-pro'),
1708
- array("dir_slug" => "sem-bookmark-me/sem-bookmark-me.php", 'option_name' => ''),
1709
- array("dir_slug" => "onlywire-bookmark-share-button/owbutton_wordpress.php", 'option_name' => 'onlywireoptions'),
1710
- array("dir_slug" => "google-analyticator/google-analyticator.php", 'option_name' => 'google-analyticator'),
1711
- array("dir_slug" => "getsocial/getsocial.php", 'option_name' => 'getsocial/getsocial.php'),
1712
- array("dir_slug" => "visitors-traffic-real-time-statistics/Visitors-Traffic-Real-Time-Statistics.php", 'option_name' => 'ahc_hits_counter_menu_free'),
1713
- array("dir_slug" => "microblog-poster/microblogposter.php", 'option_name' => 'microblogposter.php'),
1714
- array("dir_slug" => "triberr-wordpress-plugin/triberr.php", 'option_name' => 'triberr-options'),
1715
- array("dir_slug" => "social-networks-auto-poster-facebook-twitter-g/NextScripts_SNAP.php", 'option_name' => 'nxssnap-ntadmin'),
1716
- array("dir_slug" => "all-in-one-seo-pack/all_in_one_seo_pack.php", 'option_name' => 'all-in-one-seo-pack/aioseop_class.php'),
1717
- array("dir_slug" => "multi-rating/multi-rating.php", 'option_name' => 'mr_settings'),
1718
- array("dir_slug" => "social-pug/index.php", 'option_name' => 'dpsp-social-pug'),
1719
- array("dir_slug" => "comment-reply-email-notification/cren_plugin.php", 'option_name' => 'comment_reply_email_notification'),
1720
- array("dir_slug" => "share-subscribe-contact-aio-widget/free_profitquery_aio_widgets.php", 'option_name' => 'free_profitquery_aio_widgets'),
1721
- array("dir_slug" => "better-robots-txt/better-robots-txt.php", 'option_name' => 'better-robots-txt'),
1722
- array("dir_slug" => "google-analytics-for-wordpress/googleanalytics.php", 'option_name' => 'monsterinsights_settings'),
1723
- array("dir_slug" => "onesignal-free-web-push-notifications/onesignal-push", 'option_name' => 'onesignal-push'),
1724
- array("dir_slug" => "access-watch/index.php", 'option_name' => 'access-watch-dashboard'),
1725
- array("dir_slug" => "tweet-old-post/tweet-old-post.php", 'option_name' => 'TweetOldPost'),
1726
- array("dir_slug" => "mailoptin/mailoptin.php", 'option_name' => 'mailoptin-settings'),
1727
- array("dir_slug" => "NextScripts_SNAP/NextScripts_SNAP.php", 'option_name' => 'nxssnap-reposter'),
1728
- array("dir_slug" => "social-pug-author-box/index.php", 'option_name' => 'social_pug_author_box'),
1729
- array("dir_slug" => "google-analytics-for-wordpress/googleanalytics.php", 'option_name' => 'monsterinsights-getting-started'),
1730
- array("dir_slug" => "onesignal-free-web-push-notifications/onesignal.php", 'option_name' => 'onesignal-push'),
1731
- );
1732
- $optimization_plugins = array(
1733
- array('dir_slug' => 'litespeed-cache/litespeed-cache.php', 'option_name' => 'lscache-settings'),
1734
- array('dir_slug' => 'w3-total-cache/w3-total-cache.php', 'option_name' => 'w3tc_dashboard'),
1735
- array('dir_slug' => 'wp-fastest-cache/wpFastestCache.php', 'option_name' => 'wpfastestcacheoptions'),
1736
- array('dir_slug' => 'wp-optimize/wp-optimize.php', 'option_name' => 'WP-Optimize'),
1737
- array('dir_slug' => 'autoptimize/autoptimize.php', 'option_name' => 'autoptimize'),
1738
- array('dir_slug' => 'cache-enabler/cache-enabler.php', 'option_name' => 'cache-enabler'),
1739
- array('dir_slug' => 'wp-super-cache/wp-cache.php', 'option_name' => 'wpsupercache'),
1740
- array('dir_slug' => 'hummingbird-performance/wp-hummingbird.php', 'option_name' => 'wphb'),
1741
- array('dir_slug' => 'breeze/breeze.php', 'option_name' => 'breeze'),
1742
- array('dir_slug' => 'sg-cachepress/sg-cachepress.php', 'option_name' => 'sg-cachepress'),
1743
- array('dir_slug' => 'wp-rest-cache/wp-rest-cache.php', 'option_name' => 'wp-rest-cache'),
1744
- array('dir_slug' => 'fast-velocity-minify/fvm.php', 'option_name' => 'fastvelocity-min'),
1745
- array('dir_slug' => 'hyper-cache/plugin.php', 'option_name' => 'hyper-cache/options.php'),
1746
- array('dir_slug' => 'redis-cache/redis-cache.php', 'option_name' => 'redis-cache'),
1747
- array('dir_slug' => 'varnish-page', 'option_name' => 'varnish-page'),
1748
- array('dir_slug' => 'sns-count-cache/sns-count-cache.php', 'option_name' => 'scc-dashboard'),
1749
- array('dir_slug' => 'harrys-gravatar-cache/harrys-gravatar-cache.php', 'option_name' => 'harrys-gravatar-cache-options'),
1750
- array('dir_slug' => 'fv-gravatar-cache/fv-gravatar-cache.php', 'option_name' => 'fv-gravatar-cache'),
1751
- array('dir_slug' => 'wpe-advanced-cache-options/wpe-advanced-cache.php', 'option_name' => 'cache-settings'),
1752
- array('dir_slug' => 'simple-cache/simple-cache.php', 'option_name' => 'simple-cache'),
1753
- array('dir_slug' => 'ezcache/ezcache.php', 'option_name' => 'ezcache'),
1754
- array('dir_slug' => 'wp-cloudflare-page-cache/wp-cloudflare-super-page-cache.php', 'option_name' => 'wp-cloudflare-super-page-cache-index'),
1755
- array('dir_slug' => 'optimum-gravatar-cache/optimum-gravatar-cache.php', 'option_name' => 'optimum-gravatar-cache'),
1756
- array('dir_slug' => 'yasakani-cache/yasakani-cache.php', 'option_name' => 'yasakani-cache'),
1757
- array('dir_slug' => 'cachify/cachify.php', 'option_name' => 'cachify'),
1758
- array('dir_slug' => 'gator-cache/gator-cache.php', 'option_name' => 'gtr_cache'),
1759
- array('dir_slug' => 'wp-speed-of-light/wp-speed-of-light.php', 'option_name' => 'wpsol_dashboard'),
1760
- array('dir_slug' => 'wp-super-minify/wp-super-minify.php', 'option_name' => 'wp-super-minify'),
1761
- array('dir_slug' => 'wsa-cachepurge/wsa-cachepurge.php', 'option_name' => 'wsa-cachepurge/lib/wsa-cachepurge_display.php'),
1762
- array('dir_slug' => 'a2-optimized-wp/a2-optimized.php', 'option_name' => 'A2_Optimized_Plugin_admin'),
1763
- array('dir_slug' => 'nitropack/main.php', 'option_name' => 'nitropack'),
1764
- array('dir_slug' => 'swift-performance-lite/performance.php', 'option_name' => 'swift-performance'),
1765
- array('dir_slug' => 'wp-performance/wp-performance.php', 'option_name' => 'wp-performance'),
1766
- array('dir_slug' => 'arvancloud-cache-cleaner/Arvancloud.php', 'option_name' => 'ar_cache'),
1767
- array('dir_slug' => 'clear-cache-for-widgets/clear-cache-for-widgets.php', 'option_name' => 'ccfm-options'),
1768
- array('dir_slug' => 'wp-asset-clean-up/wpacu.php', 'option_name' => 'wpassetcleanup_settings'),
1769
- array('dir_slug' => 'flying-pages/flying-pages.php', 'option_name' => 'flying-pages'),
1770
- array('dir_slug' => 'speed-booster-pack/speed-booster-pack.php', 'option_name' => 'sbp-options'),
1771
- array('dir_slug' => 'baqend/baqend.php', 'option_name' => 'baqend'),
1772
- array('dir_slug' => 'wp-smushit/wp-smush.php', 'option_name' => 'smush'),
1773
- array('dir_slug' => 'varnish-http-purge/varnish-http-purge.php', 'option_name' => 'varnish-page'),
1774
- array('dir_slug' => 'varnish-http-purge/varnish-http-purge.php', 'option_name' => 'varnish-check-caching'),
1775
 
1776
- );
1777
- $gdpr_plugins = array(
1778
- array('dir_slug' => 'cookie-law-info/cookie-law-info.php', 'option_name' => 'cookie-law-info'),
1779
- array('dir_slug' => 'complianz-gdpr/complianz-gpdr.php', 'option_name' => 'complianz'),
1780
- array('dir_slug' => 'shapepress-dsgvo/sp-dsgvo.php', 'option_name' => 'sp-dsgvo'),
1781
- array('dir_slug' => 'cookiebot/cookiebot.php', 'option_name' => 'cookiebot'),
1782
- array('dir_slug' => 'gdpr-banner/gdpr-banner.php', 'option_name' => 'gdpr_banner'),
1783
- array('dir_slug' => 'dsgvo-tools-cookie-hinweis-datenschutz/main.php', 'option_name' => 'fhw_dsgvo_cookies_options'),
1784
- array('dir_slug' => 'ga-germanized/ga-germanized.php', 'option_name' => 'ga-germanized'),
1785
- array('dir_slug' => 'cwis-antivirus-malware-detected/cwis-antivirus-malware-detected.php', 'option_name' => 'cwis-updater'),
1786
- array('dir_slug' => 'luckywp-cookie-notice-gdpr/luckywp-cookie-notice-gdpr.php', 'option_name' => 'lwpcng_settings'),
1787
- array('dir_slug' => 'ninja-gdpr-compliance/njt-gdpr.php', 'option_name' => 'njt-gdpr'),
1788
- array('dir_slug' => 'gdpr-cookie-consent/gdpr-cookie-consent.php', 'option_name' => 'gdpr-cookie-consent'),
1789
- array('dir_slug' => 'uniconsent-cmp/uniconsent-cmp.php', 'option_name' => 'unic-options'),
1790
- array('dir_slug' => 'wplegalpages/wplegalpages.php', 'option_name' => 'legal-pages'),
1791
- array('dir_slug' => 'smart-cookie-kit/plugin.php', 'option_name' => 'nmod_sck_graphics'),
1792
- array('dir_slug' => 'cookie-information-consent-solution/cookie-information.php', 'option_name' => 'cookie-information'),
1793
- array('dir_slug' => 'dsgvo-fur-die-schweiz/dsgvo-fur-die-schweiz.php', 'option_name' => 'dsgvo-admin'),
1794
- array('dir_slug' => 'gdpr-cookies-pro/gdpr-cookies-pro.php', 'option_name' => 'gdpr-cookies-pro'),
1795
- array('dir_slug' => 'seahorse-gdpr-data-manager/seahorse-gdpr-data-manager.php', 'option_name' => 'seahorse_gdpr_data_manager_plugin'),
1796
- array('dir_slug' => 'dsgvo-tools-kommentar-ip-entfernen/main.php', 'option_name' => 'fhw_dsgvo_kommentar_options'),
1797
- array('dir_slug' => 'gdpr-tools/gdpr-tools.php', 'option_name' => 'gdpr-tools-settings'),
1798
- array('dir_slug' => 'gdpr-cookie-compliance/moove-gdpr.php', 'option_name' => 'moove-gdpr'),
1799
- array('dir_slug' => 'cookie-notice/cookie-notice.php', 'option_name' => 'cookie-notice'),
1800
- array('dir_slug' => 'tarteaucitronjs/tarteaucitron.php', 'option_name' => 'tarteaucitronjs'),
1801
- array('dir_slug' => 'wp-gdpr-compliance/wp-gdpr-compliance.php', 'option_name' => 'wp_gdpr_compliance'),
1802
- array('dir_slug' => 'iubenda_cookie_solution/iubenda_cookie_solution.php', 'option_name' => 'iubenda'),
1803
- array('dir_slug' => 'easy-wp-cookie-popup/easy-wp-cookie-popup.php', 'option_name' => 'cookii_settings'),
1804
- array('dir_slug' => 'gdpr-compliance-cookie-consent/gdpr-compliance-cookie-consent.php', 'option_name' => 'gdpr-compliance-cookie-consent'),
1805
- array('dir_slug' => 'yetience-plugin/yetience-plugin.php', 'option_name' => 'yetience-yeloni'),
1806
- array('dir_slug' => 'cwis-antivirus-malware-detected/cwis-antivirus-malware-detected.php', 'option_name' => 'cwis-scanner'),
1807
- array('dir_slug' => 'gdpr-compliance-by-supsystic/grs.php', 'option_name' => 'gdpr-compliance-by-supsystic'),
1808
- array('dir_slug' => 'auto-terms-of-service-privacy-policy/auto-terms-of-service-privacy-policy.php', 'option_name' => 'wpautoterms_page'),
1809
- array('dir_slug' => 'google-analytics-opt-out/google-analytics-opt-out.php', 'option_name' => 'gaoo-options'),
1810
- array('dir_slug' => 'surbma-gdpr-proof-google-analytics/surbma-gdpr-proof-google-analytics.php', 'option_name' => 'surbma-gpga-menu'),
1811
- array('dir_slug' => 'bp-gdpr/buddypress-gdpr.php', 'option_name' => 'buddyboss-bp-gdpr'),
1812
- array('dir_slug' => 'beautiful-and-responsive-cookie-consent/nsc_bar-cookie-consent.php', 'option_name' => 'nsc_bar-cookie-consent'),
1813
- array('dir_slug' => 'simple-gdpr/simple-gdpr.php', 'option_name' => 'SGDPR_settings'),
1814
- array('dir_slug' => 'wonderpush-web-push-notifications/wonderpush.php', 'option_name' => 'wonderpush'),
1815
- array('dir_slug' => 'ns-gdpr/ns-gdpr.php', 'option_name' => 'ns-gdpr'),
1816
- );
1817
- $google_analytics = array(
1818
- array('dir_slug' => 'really-simple-ssl/rlrsssl-really-simple-ssl.php', 'option_name' => 'rlrsssl_really_simple_ssl'),
1819
- array('dir_slug' => 'ssl-insecure-content-fixer/ssl-insecure-content-fixer.php', 'option_name' => 'ssl-insecure-content-fixer'),
1820
- array('dir_slug' => 'https-redirection/https-redirection.php', 'option_name' => 'https-redirection'),
1821
- array('dir_slug' => 'wordpress-https/wordpress-https.php', 'option_name' => 'wordpress-https'),
1822
- array('dir_slug' => 'wp-force-ssl/wp-force-ssl.php', 'option_name' => 'wpfs-settings'),
1823
- array('dir_slug' => 'sakura-rs-wp-ssl/sakura-rs-ssl.php', 'option_name' => 'sakura-admin-menu'),
1824
- array('dir_slug' => 'wp-letsencrypt-ssl/wp-letsencrypt.php', 'option_name' => 'wp_encryption'),
1825
- array('dir_slug' => 'ssl-zen/ssl_zen.php', 'option_name' => 'ssl_zen'),
1826
- array('dir_slug' => 'one-click-ssl/ssl.php', 'option_name' => 'one-click-ssl'),
1827
- array('dir_slug' => 'http-https-remover/http-https-remover.php', 'option_name' => 'httphttpsRemoval')
1828
- );
1829
 
1830
- $socialObj = new sfsi_plus_SocialHelper();
1831
- $current_url = site_url();
1832
- $fb_data = $socialObj->sfsi_banner_get_fb($current_url);
1833
- $check_fb_count_more_than_one = $fb_data > 0 || $socialObj->sfsi_get_pinterest($current_url) > 0;
1834
- $sfsi_fb_count = get_option('sfsi_plus_fb_count', false);
1835
- if ($check_fb_count_more_than_one > $sfsi_fb_count || $sfsi_fb_count == "") {
1836
- update_option('sfsi_plus_fb_count', ($check_fb_count_more_than_one));
1837
- }
1838
- $sfsi_fb_count_check_for_shares = $sfsi_fb_count > 0;
1839
-
1840
- // $sfsi_plus_banner_global_firsttime_offer = unserialize(get_option('sfsi_plus_banner_global_firsttime_offer', false));
1841
- $sfsi_plus_banner_global_pinterest = unserialize(get_option('sfsi_plus_banner_global_pinterest', false));
1842
- $sfsi_plus_banner_global_social = unserialize(get_option('sfsi_plus_banner_global_social', false));
1843
- $sfsi_plus_banner_global_load_faster = unserialize(get_option('sfsi_plus_banner_global_load_faster', false));
1844
- $sfsi_plus_banner_global_shares = unserialize(get_option('sfsi_plus_banner_global_shares', false));
1845
- $sfsi_plus_banner_global_gdpr = unserialize(get_option('sfsi_plus_banner_global_gdpr', false));
1846
- $sfsi_plus_banner_global_http = unserialize(get_option('sfsi_plus_banner_global_http', false));
1847
- $sfsi_plus_banner_global_upgrade = unserialize(get_option('sfsi_plus_banner_global_upgrade', false));
1848
-
1849
- // $sfsi_plus_banner_global_firsttime_offer_criteria = true;
1850
- $sfsi_plus_banner_global_pinterest_criteria = ((sfsi_plus_count_media_item() > 2) || (sfsi_plus_pinterest_icon_shown()) || sfsi_plus_has_gallery_plugin_activated($gallery_plugins));
1851
- $sfsi_plus_banner_global_social_criteria = sfsi_plus_mobile_icons_shown();
1852
- $sfsi_plus_banner_global_load_faster_criteria = sfsi_plus_has_cache_plugin_activated($optimization_plugins);
1853
- $sfsi_plus_banner_global_shares_criteria = sfsi_plus_has_sharecount_plugin_activated($sharecount_plugins);
1854
- $sfsi_plus_banner_global_gdpr_criteria = sfsi_plus_has_gdpr_plugin_activated($gdpr_plugins);
1855
- $sfsi_plus_banner_global_http_criteria = is_ssl() && ($sfsi_fb_count_check_for_shares || $check_fb_count_more_than_one);
1856
- // $sfsi_plus_banner_global_http_criteria = true;
1857
-
1858
-
1859
- $global_banners = array(
1860
- array($sfsi_plus_banner_global_social, 'sfsi_plus_banner_global_social', $sfsi_plus_banner_global_social_criteria),
1861
- array($sfsi_plus_banner_global_gdpr, 'sfsi_plus_banner_global_gdpr', $sfsi_plus_banner_global_gdpr_criteria),
1862
- array($sfsi_plus_banner_global_pinterest, 'sfsi_plus_banner_global_pinterest', $sfsi_plus_banner_global_pinterest_criteria),
1863
- array($sfsi_plus_banner_global_load_faster, 'sfsi_plus_banner_global_load_faster', $sfsi_plus_banner_global_load_faster_criteria),
1864
- array($sfsi_plus_banner_global_shares, 'sfsi_plus_banner_global_shares', $sfsi_plus_banner_global_shares_criteria),
1865
- array($sfsi_plus_banner_global_http, 'sfsi_plus_banner_global_http', $sfsi_plus_banner_global_http_criteria),
1866
- );
1867
- $global_banners_not_met_criteria = array(
1868
- array($sfsi_plus_banner_global_pinterest, 'sfsi_plus_banner_global_pinterest', !(sfsi_plus_count_media_item() > 2)),
1869
- array($sfsi_plus_banner_global_shares, 'sfsi_plus_banner_global_shares', $sfsi_plus_banner_global_shares_criteria),
1870
- array($sfsi_plus_banner_global_load_faster, 'sfsi_plus_banner_global_load_faster', $sfsi_plus_banner_global_load_faster_criteria),
1871
- array($sfsi_plus_banner_global_gdpr, 'sfsi_plus_banner_global_gdpr', $sfsi_plus_banner_global_gdpr_criteria),
1872
- );
1873
- $global_banner_criteria = array(
1874
- $sfsi_plus_banner_global_pinterest_criteria,
1875
- $sfsi_plus_banner_global_social_criteria,
1876
- $sfsi_plus_banner_global_load_faster_criteria,
1877
- $sfsi_plus_banner_global_shares_criteria,
1878
- $sfsi_plus_banner_global_gdpr_criteria,
1879
- $sfsi_plus_banner_global_http_criteria
1880
- );
1881
- // var_dump($global_banner_criteria);
1882
 
1883
- $global_banner_criteria_true_count = count(array_keys($global_banner_criteria, true));
1884
- $global_banner_appeared_true_count = 0;
1885
 
1886
- $count = 0;
1887
- $sfsi_plus_present_time = strtotime(date('Y-m-d h:i:s'));
1888
- $sfsi_plus_install_time = (get_option('sfsi_plus_installDate'));
1889
- $sfsi_plus_loyalty = get_option("sfsi_plus_loyaltyDate");
1890
- $sfsi_plus_min_loyalty_time = date('Y-m-d H:i:s', strtotime($sfsi_plus_install_time . $sfsi_plus_loyalty));
1891
- $sfsi_plus_round_one_added = false;
1892
- foreach ($global_banners as $key => $global_banner) {
1893
 
1894
- if ($sfsi_plus_present_time >= strtotime($global_banner[0]['timestamp']) || ($global_banner[0]['timestamp'] == "")) {
1895
- // var_dump("round1",$global_banner[1]);
1896
 
1897
- if ($global_banner[0]['met_criteria'] == "yes") {
1898
- $count = $count + 1;
1899
- }
1900
- if ($global_banner[0]['banner_appeared'] == "yes") {
1901
- $global_banner_appeared_true_count = $global_banner_appeared_true_count + 1;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1902
  }
1903
- if ($global_banner[0]['met_criteria'] == "no" && $global_banner[0]['banner_appeared'] == "no" && $global_banner[0]['is_active'] == "no" && $global_banner[2] == true) {
1904
- // var_dump('met criteria');
1905
- $todaysdate = date("Y-m-d h:i:s");
1906
- $showNextBanner = get_option('sfsi_plus_showNextBannerDate');
1907
- if ($todaysdate >= $sfsi_plus_min_loyalty_time && $sfsi_plus_banner_global_upgrade['met_criteria'] == "no") {
1908
- $date = date('Y-m-d H:i:s', strtotime($todaysdate . $showNextBanner));
1909
- $update_banner_status = array(
1910
- 'met_criteria' => "yes",
1911
- 'is_active' => "yes",
1912
- 'timestamp' => $date
1913
- );
1914
- update_option('sfsi_plus_banner_global_upgrade', serialize($update_banner_status));
1915
- break;
1916
- }
1917
- $date = date('Y-m-d H:i:s', strtotime($todaysdate . $showNextBanner));
1918
- $update_banner_status = array(
1919
- 'met_criteria' => "yes",
1920
- 'banner_appeared' => "yes",
1921
- 'is_active' => "yes",
1922
- 'timestamp' => $date
1923
- );
1924
- update_option($global_banner[1], serialize($update_banner_status));
1925
- $sfsi_plus_round_one_added = true;
1926
 
1927
- break;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1928
  }
1929
- }
1930
- }
 
1931
 
1932
- $global_banners_filters = array_filter($global_banners_not_met_criteria, function ($global_banner) {
1933
- return ($global_banner[2] == false && $global_banner[0]['met_criteria'] == "no" && $global_banner[0]['banner_appeared'] == "no" && $global_banner[0]['is_active'] == "no");
1934
- });
1935
- $global_banners_criteria_filters = array_filter($global_banners, function ($global_banner) {
1936
- return ($global_banner[2] == true && $global_banner[0]['met_criteria'] == "no" && $global_banner[0]['banner_appeared'] == "no" && $global_banner[0]['is_active'] == "no");
1937
- });
1938
- // var_dump("round one added",$sfsi_plus_round_one_added);
1939
- if (false === $sfsi_plus_round_one_added) {
1940
- foreach ($global_banners_filters as $key => $global_banners_filter) {
1941
- // if ($count >= $global_banner_criteria_true_count) {
1942
- // var_dump('round2', $global_banners_filter);
1943
- 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) {
1944
- $todaysdate = date("Y-m-d h:i:s");
1945
- $showNextBanner = get_option('sfsi_plus_showNextBannerDate');
1946
- if ($todaysdate >= $sfsi_plus_min_loyalty_time && $sfsi_plus_banner_global_upgrade['met_criteria'] == "no") {
1947
- $date = date('Y-m-d H:i:s', strtotime($todaysdate . $showNextBanner));
1948
  $update_banner_status = array(
1949
- 'met_criteria' => "yes",
1950
- 'is_active' => "yes",
1951
- 'timestamp' => $date
 
1952
  );
1953
- update_option('sfsi_plus_banner_global_upgrade', serialize($update_banner_status));
1954
- break;
1955
- }
1956
- $date = date('Y-m-d H:i:s', strtotime($todaysdate . $showNextBanner));
1957
- $update_banner_status = array(
1958
- 'met_criteria' => "no",
1959
- 'banner_appeared' => "yes",
1960
- 'is_active' => "yes",
1961
- 'timestamp' => $date
1962
- );
1963
- update_option($global_banners_filter[1], serialize($update_banner_status));
1964
- break;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1965
  }
1966
- // }
 
 
 
1967
  }
1968
- }
1969
- // var_dump(($global_banners_filters ) ,($global_banners_criteria_filters));
1970
- if (empty($global_banners_filters) && empty($global_banners_criteria_filters)) {
1971
- foreach ($global_banners as $key => $global_banner) {
1972
-
1973
- $todaysdate = date("Y-m-d h:i:s");
1974
- $cycleDate = get_option('sfsi_plus_cycleDate');
1975
-
1976
- $date_plus_180 = date('Y-m-d H:i:s', strtotime($todaysdate . $cycleDate));
1977
- $update_banner_status = array(
1978
- 'met_criteria' => "no",
1979
- 'banner_appeared' => "no",
1980
- 'is_active' => "no",
1981
- 'timestamp' => $date_plus_180,
1982
  );
1983
- update_option($global_banner[1], serialize($update_banner_status));
 
1984
  }
1985
- foreach ($global_banners as $key => $global_banner) {
1986
- if ($global_banner[2] == true) {
1987
- $update_banner_status = array(
1988
- 'met_criteria' => "yes",
1989
- 'banner_appeared' => "yes",
1990
- 'is_active' => "yes",
1991
- 'timestamp' => $date_plus_180,
1992
- );
1993
- update_option($global_banner[1], serialize($update_banner_status));
1994
- break;
 
 
 
 
 
 
 
 
 
 
 
 
 
1995
  }
 
1996
  }
1997
- if ($global_banner_criteria_true_count == 0) {
1998
- foreach ($global_banners_not_met_criteria as $key => $global_banner) {
1999
- $update_banner_status = array(
2000
- 'met_criteria' => "no",
2001
- 'banner_appeared' => "yes",
2002
- 'is_active' => "yes",
2003
- 'timestamp' => $date_plus_180,
2004
- );
2005
- // var_dump($global_banners_not_met_criteria,'kfdjgkdsfgndfkngn isdfhgi hsdfg idhfguidfi');
2006
- if ($global_banner[2] == false) {
2007
- update_option($global_banner[1], serialize($update_banner_status));
2008
- break;
2009
- }
2010
  }
 
 
 
 
 
 
 
 
 
 
2011
  }
2012
- }
2013
-
2014
- wp_redirect(admin_url('admin.php?page=sfsi-plus-options'));
2015
- exit;
2016
- // return false;
2017
- }
2018
-
2019
- function sfsi_plus_count_media_item()
2020
- {
2021
- $query_img_args = array(
2022
- 'post_type' => 'attachment',
2023
- 'post_mime_type' => array(
2024
- 'jpg|jpeg|jpe' => 'image/jpeg',
2025
- 'gif' => 'image/gif',
2026
- 'png' => 'image/png',
2027
- ),
2028
- 'post_status' => 'inherit',
2029
- 'posts_per_page' => -1,
2030
- );
2031
- $query_img = new WP_Query($query_img_args);
2032
- return $query_img->post_count;
2033
- }
2034
- function sfsi_plus_pinterest_icon_shown()
2035
- {
2036
- $sfsi_plus_section1 = unserialize(get_option('sfsi_plus_section1_options', false));
2037
- $option9 = unserialize(get_option('sfsi_plus_section9_options', false));
2038
- $option6 = unserialize(get_option('sfsi_plus_section6_options', false));
2039
- // var_dump($option9["sfsi_plus_icons_float"]);
2040
- // var_dump($option9["sfsi_plus_show_via_widget"]);
2041
- // var_dump($option9["sfsi_plus_show_via_shortcode"]);
2042
- // var_dump($sfsi_plus_section1["sfsi_plus_pinterest_display"]);
2043
- // var_dump($option6["sfsi_plus_show_Onposts"]);
2044
- // var_dump($option6["sfsi_plus_rectpinit"]);
2045
- // var_dump($option9["sfsi_plus_show_via_afterposts"]);
2046
- //check if icons are displayed
2047
- if (
2048
- (
2049
- (
2050
- (isset($option9["sfsi_plus_icons_float"]) && $option9["sfsi_plus_icons_float"] == "yes") || (isset($option9["sfsi_plus_show_via_widget"]) && $option9["sfsi_plus_show_via_widget"] == "yes") || (isset($option9["sfsi_plus_place_item_manually"]) && $option9["sfsi_plus_place_item_manually"] == "yes")) &&
2051
- $sfsi_plus_section1["sfsi_plus_pinterest_display"] == "yes") || (isset($option9["sfsi_plus_show_item_onposts"]) &&
2052
- $option9["sfsi_plus_show_item_onposts"] == "yes" &&
2053
- $option6["sfsi_plus_show_Onposts"] == "yes" &&
2054
- $option6["sfsi_plus_rectpinit"] == "yes")
2055
- ) {
2056
- return true;
2057
- }
2058
- return false;
2059
- }
2060
- function sfsi_plus_mobile_icons_shown()
2061
- {
2062
- /// check if mobile icons are shown and mobile icons are present on the homepage.
2063
- $sfsi_plus_section5 = unserialize(get_option('sfsi_plus_section5_options', false));
2064
- if (isset($sfsi_plus_section5['sfsi_plus_disable_floaticons']) && $sfsi_plus_section5['sfsi_plus_disable_floaticons'] == "yes") {
2065
- return true;
2066
- }
2067
- return false;
2068
- }
2069
- function sfsi_plus_has_cache_plugin_activated($optimization_plugins)
2070
- {
2071
- $sfsi_plus_optimization_plugin_active = array();
2072
- foreach ($optimization_plugins as $key => $optimization_plugin) {
2073
- $sfsi_plus_optimization_plugin_active[$key] = is_plugin_active($optimization_plugin['dir_slug']);
2074
- }
2075
- $check_optimization_plugin_active_is_true = in_array(true, $sfsi_plus_optimization_plugin_active);
2076
- return $check_optimization_plugin_active_is_true;
2077
- }
2078
 
2079
- function sfsi_plus_has_sharecount_plugin_activated($sharecount_plugins)
2080
- {
2081
- $sfsi_plus_sharecount_plugin_active = array();
2082
- foreach ($sharecount_plugins as $key => $sharecount_plugin) {
2083
- $sfsi_plus_sharecount_plugin_active[$key] = is_plugin_active($sharecount_plugin['dir_slug']);
2084
- }
2085
- $check_sharecount_plugin_active_is_true = in_array(true, $sfsi_plus_sharecount_plugin_active);
2086
- return $check_sharecount_plugin_active_is_true;
2087
- }
2088
 
2089
- function sfsi_plus_has_gdpr_plugin_activated($gdpr_plugins)
2090
- {
2091
- $sfsi_plus_gdpr_plugin_active = array();
2092
- foreach ($gdpr_plugins as $key => $gdpr_plugin) {
2093
- $sfsi_plus_gdpr_plugin_active[$key] = is_plugin_active($gdpr_plugin['dir_slug']);
2094
- }
2095
- $check_gdpr_plugin_active_is_true = in_array(true, $sfsi_plus_gdpr_plugin_active);
2096
- return $check_gdpr_plugin_active_is_true;
2097
- }
2098
 
2099
- function sfsi_plus_has_gallery_plugin_activated($gallery_plugins)
2100
- {
2101
- $sfsi_plus_gallery_plugin_active = array();
2102
- foreach ($gallery_plugins as $key => $gallery_plugin) {
2103
- $sfsi_plus_gallery_plugin_active[$key] = is_plugin_active($gallery_plugin['dir_slug']);
2104
- }
2105
- $check_gallery_plugin_active_is_true = in_array(true, $sfsi_plus_gallery_plugin_active);
2106
- return $check_gallery_plugin_active_is_true;
2107
- }
2108
- $option5 = unserialize(get_option('sfsi_plus_section5_options', false));
2109
- if (isset($option5['sfsi_plus_featured_image_rss']) && $option5['sfsi_plus_featured_image_rss'] == 'yes') {
2110
- // add_filter('the_excerpt_rss', 'sfsi_premium_featured_image_in_feed');
2111
- add_filter('the_content_feed', 'sfsi_premium_featured_image_in_feed');
2112
- function sfsi_premium_featured_image_in_feed($content)
2113
- {
2114
- global $post;
2115
- if (is_feed()) {
2116
- if (has_post_thumbnail($post->ID)) {
2117
- $figure_start = '<figure class="wp-block-image size-large">';
2118
- $feat_image_output = get_the_post_thumbnail($post->ID, 'thumbnail');
2119
- $figure_end = '</figure>';
2120
- $content = $figure_start . $feat_image_output . $figure_end. $content;
2121
  }
 
 
2122
  }
2123
- return $content;
2124
- }
2125
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7
  Text Domain: ultimate-social-media-plus
8
  Domain Path: /languages
9
  Author URI: http://socialshare.pro/
10
+ Version: 3.4.7
11
  License: GPLv2
12
  */
13
+ if (!function_exists('get_plugins')) {
14
+ require_once ABSPATH . 'wp-admin/includes/plugin.php';
15
+ }
16
+ if (!is_plugin_active('Ultimate-Premium-Plugin/usm_premium_icons.php')) {
17
+ if (function_exists('sfsi_plus_error_reporting')) {
18
+ sfsi_plus_error_reporting();
19
+ }
20
+ require_once 'analyst/main.php';
21
 
22
+ analyst_init(array(
23
+ 'client-id' => 'w6l8b75dy5qkv9ze',
24
+ 'client-secret' => '39db55426579986bb6c79c6d94aa6ab82b67f9f5',
25
+ 'base-dir' => __FILE__
26
+ ));
 
 
 
 
27
 
28
+ global $wpdb;
29
+ /* define the Root for URL and Document */
30
 
31
+ define('SFSI_PLUS_DOCROOT', dirname(__FILE__));
32
+ // define('SFSI_PLUS_PLUGURL', plugin_dir_url(__FILE__));
33
+ define('SFSI_PLUS_PLUGURL', site_url() . '/wp-content/plugins/ultimate-social-media-plus/');
34
+ define('SFSI_PLUS_WEBROOT', str_replace(getcwd(), home_url(), dirname(__FILE__)));
35
+ define('SFSI_PLUS_DOMAIN', 'ultimate-social-media-plus');
36
+ define('SFSI_PLUS_SUPPORT_FORM', 'https://goo.gl/jySrSF');
37
 
38
+ $wp_upload_dir = wp_upload_dir();
39
+ define('SFSI_PLUS_UPLOAD_DIR_BASEURL', trailingslashit($wp_upload_dir['baseurl']));
40
 
41
 
42
+ define('SFSI_PLUS_ALLICONS', serialize(array(
43
+ "rss", "email", "facebook", "twitter", "youtube", "linkedin",
44
+ "pinterest", "instagram", "houzz", "ok", "telegram", "vk", "weibo", "wechat"
45
+ )));
46
 
47
+ function sfsi_plus_get_current_url()
48
+ {
49
+ global $post, $wp;
50
 
51
+ if (!empty($wp)) {
52
+ return home_url(add_query_arg(array(), $wp->request));
53
+ } elseif (!empty($post)) {
54
+ return get_permalink($post->ID);
55
+ } else {
56
+ return site_url();
57
+ }
58
  }
 
59
 
60
+ /* load all files */
61
+ include(SFSI_PLUS_DOCROOT . '/helpers/common_helper.php');
62
+ include(SFSI_PLUS_DOCROOT . '/libs/controllers/sfsi_socialhelper.php');
63
+ include(SFSI_PLUS_DOCROOT . '/libs/controllers/sfsi_class_theme_check.php');
64
+ include(SFSI_PLUS_DOCROOT . '/libs/sfsi_install_uninstall.php');
65
+ include(SFSI_PLUS_DOCROOT . '/libs/controllers/sfsi_buttons_controller.php');
66
+ include(SFSI_PLUS_DOCROOT . '/libs/controllers/sfsi_iconsUpload_contoller.php');
67
+ include(SFSI_PLUS_DOCROOT . '/libs/sfsi_Init_JqueryCss.php');
68
+ include(SFSI_PLUS_DOCROOT . '/libs/controllers/sfsi_floater_icons.php');
69
+ include(SFSI_PLUS_DOCROOT . '/libs/controllers/sfsiocns_OnPosts.php');
70
+ include(SFSI_PLUS_DOCROOT . '/libs/sfsi_widget.php');
71
+ include(SFSI_PLUS_DOCROOT . '/libs/sfsi_plus_subscribe_widget.php');
72
+ include(SFSI_PLUS_DOCROOT . '/libs/sfsi_custom_social_sharing_data.php');
73
+ include(SFSI_PLUS_DOCROOT . '/libs/sfsi_ajax_social_sharing_settings_updater.php');
74
+ include(SFSI_PLUS_DOCROOT . '/libs/sfsi_gutenberg_block.php');
75
+
76
+
77
+ /* plugin install and uninstall hooks */
78
+ register_activation_hook(__FILE__, 'sfsi_plus_activate_plugin');
79
+ register_deactivation_hook(__FILE__, 'sfsi_plus_deactivate_plugin');
80
+ register_uninstall_hook(__FILE__, 'sfsi_plus_Unistall_plugin');
81
+
82
+ /*Plugin version setup*/
83
+ if (!get_option('sfsi_plus_pluginVersion') || get_option('sfsi_plus_pluginVersion') < 3.47) {
84
+ add_action("init", "sfsi_plus_update_plugin");
85
+ }
86
 
87
+ //************************************** Setting error reporting STARTS ****************************************//
88
 
89
+ function sfsi_plus_error_reporting()
90
+ {
91
 
92
+ $option5 = unserialize(get_option('sfsi_plus_section5_options', false));
93
 
94
+ if (
95
+ isset($option5['sfsi_pplus_icons_suppress_errors'])
96
 
97
+ && !empty($option5['sfsi_pplus_icons_suppress_errors'])
98
 
99
+ && "yes" == $option5['sfsi_pplus_icons_suppress_errors']
100
+ ) {
101
 
102
+ error_reporting(0);
103
+ }
104
  }
 
105
 
106
+ //************************************** Setting error reporting CLOSES ****************************************//
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
107
 
108
+ //shortcode for the ultimate social icons {Monad}
109
+ add_shortcode("DISPLAY_ULTIMATE_PLUS", "DISPLAY_ULTIMATE_PLUS");
110
+ function DISPLAY_ULTIMATE_PLUS($args = null, $content = null, $share_url = null)
111
+ {
112
+ if ("DISPLAY_ULTIMATE_PLUS" === $share_url) {
113
+ $share_url = null;
114
+ }
115
+ $instance = array("showf" => 1, "title" => '');
116
+ $sfsi_plus_section8_options = get_option("sfsi_plus_section8_options");
117
+ $sfsi_plus_section8_options = unserialize($sfsi_plus_section8_options);
118
+ $sfsi_plus_place_item_manually = $sfsi_plus_section8_options['sfsi_plus_place_item_manually'];
119
+ if ($sfsi_plus_place_item_manually == "yes") {
120
+ $return = '';
121
+ if (!isset($before_widget)) : $before_widget = '';
122
+ endif;
123
+ if (!isset($after_widget)) : $after_widget = '';
124
+ endif;
125
+
126
+ /*Our variables from the widget settings. */
127
+ $title = apply_filters('widget_title', $instance['title']);
128
+ $show_info = isset($instance['show_info']) ? $instance['show_info'] : false;
129
+ global $is_floter;
130
+ $return .= $before_widget;
131
+ /* Display the widget title */
132
+ if ($title) $return .= $before_title . $title . $after_title;
133
+ $return .= '<div class="sfsi_plus_widget">';
134
+ $return .= '<div id="sfsi_plus_wDiv"></div>';
135
+ /* Link the main icons function */
136
+ $return .= sfsi_plus_check_visiblity(0, $share_url, 'absolute', false);
137
+ $return .= '<div style="clear: both;"></div>';
138
+ $return .= '</div>';
139
+ $return .= $after_widget;
140
+ return $return;
141
+ } else {
142
+ return __('Kindly go to setting page and check the option "Place them manually"', SFSI_PLUS_DOMAIN);
143
+ }
144
  }
145
+ //adding some meta tags for facebook news feed
146
+ function sfsi_plus_checkmetas()
147
+ {
148
+ $adding_plustags = "yes";
149
 
150
+ if (!function_exists('get_plugins')) {
151
+ require_once ABSPATH . 'wp-admin/includes/plugin.php';
152
+ }
153
 
154
+ $all_plugins = get_plugins();
155
 
156
+ foreach ($all_plugins as $key => $plugin) :
157
 
158
+ if (is_plugin_active($key)) :
 
 
 
159
 
160
+ if (preg_match("/(seo|search engine optimization|meta tag|open graph|opengraph|og tag|ogtag)/im", $plugin['Name']) || preg_match("/(seo|search engine optimization|meta tag|open graph|opengraph|og tag|ogtag)/im", $plugin['Description'])) {
161
+ $adding_plustags = "no";
162
+ break;
163
+ }
164
 
165
+ endif;
166
 
167
+ endforeach;
 
168
 
169
+ update_option('adding_plustags', $adding_plustags);
170
+ }
 
 
 
 
 
 
 
 
171
 
172
+ if (is_admin()) {
173
+ // sfsi_plus_checkmetas();
174
+ add_action('after_setup_theme', 'sfsi_plus_checkmetas');
 
175
  }
176
 
177
+ add_action('wp_head', 'ultimateplusfbmetatags');
178
+ function ultimateplusfbmetatags()
179
+ {
180
+ $metarequest = get_option("adding_plustags");
181
+ $post_id = get_the_ID();
182
+
183
+ $feed_id = sanitize_text_field(get_option('sfsi_plus_feed_id'));
184
+ $verification_code = get_option('sfsi_plus_verificatiom_code');
185
+ if (!empty($feed_id) && !empty($verification_code) && $verification_code != "no") {
186
+ echo '<meta name="follow.it-verification-code-' . $feed_id . '" content="' . $verification_code . '"/>';
 
 
 
 
 
 
 
187
  }
 
188
 
189
+ if ($metarequest == 'yes' && !empty($post_id)) {
190
+ $post = get_post($post_id);
191
+ $attachment_id = get_post_thumbnail_id($post_id);
192
+ $title = str_replace('"', "", strip_tags(get_the_title($post_id)));
193
+ $description = $post->post_content;
194
+ $description = str_replace('"', "", strip_tags($description));
195
+ $url = get_permalink($post_id);
196
+
197
+ //checking for disabling viewport meta tag
198
+ $option5 = unserialize(get_option('sfsi_plus_section5_options', false));
199
+ if (isset($option5['sfsi_plus_disable_viewport'])) {
200
+ $sfsi_plus_disable_viewport = $option5['sfsi_plus_disable_viewport'];
201
  } else {
202
+ $sfsi_plus_disable_viewport = 'no';
203
  }
204
+ if ($sfsi_plus_disable_viewport == 'no') {
205
+ echo ' <meta name="viewport" content="width=device-width, initial-scale=1">';
206
+ }
207
+ //checking for disabling viewport meta tag
208
+
209
+ if ($attachment_id) {
210
+ $feat_image = wp_get_attachment_url($attachment_id);
211
+ if (preg_match('/https/', $feat_image)) {
212
+ echo '<meta property="og:image:secure_url" content="' . $feat_image . '" data-id="sfsi-plus"/>';
213
  } else {
214
+ echo '<meta property="og:image" content="' . $feat_image . '" data-id="sfsi-plus"/>';
215
  }
216
+ $metadata = wp_get_attachment_metadata($attachment_id);
217
+ if (isset($metadata) && !empty($metadata)) {
218
+ if (isset($metadata['sizes']['post-thumbnail'])) {
219
+ $image_type = $metadata['sizes']['post-thumbnail']['mime-type'];
220
+ } else {
221
+ $image_type = '';
222
+ }
223
+ if (isset($metadata['width'])) {
224
+ $width = $metadata['width'];
225
+ } else {
226
+ $width = '';
227
+ }
228
+ if (isset($metadata['height'])) {
229
+ $height = $metadata['height'];
230
+ } else {
231
+ $height = '';
232
+ }
233
  } else {
234
+ $image_type = '';
235
  $width = '';
 
 
 
 
236
  $height = '';
237
  }
238
+ echo '<meta property="og:image:type" content="' . $image_type . '" data-id="sfsi-plus"/>';
239
+ echo '<meta property="og:image:width" content="' . $width . '" data-id="sfsi-plus"/>';
240
+ echo '<meta property="og:image:height" content="' . $height . '" data-id="sfsi-plus"/>';
241
+ echo '<meta property="og:description" content="' . $description . '" data-id="sfsi-plus"/>';
242
+ echo '<meta property="og:url" content="' . $url . '" data-id="sfsi-plus"/>';
243
+ echo '<meta property="og:title" content="' . $title . '" data-id="sfsi-plus"/>';
244
  }
 
 
 
 
 
 
245
  }
246
  }
 
247
 
248
+ //Get verification code
249
+ if (is_admin()) {
250
+ $code = sanitize_text_field(get_option('sfsi_plus_verificatiom_code'));
251
+ $feed_id = sanitize_text_field(get_option('sfsi_plus_feed_id'));
252
+ if (empty($code) && !empty($feed_id)) {
253
+ add_action("init", "sfsi_plus_getverification_code");
254
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
255
  }
256
+ function sfsi_plus_getverification_code()
257
+ {
258
+ $feed_id = sanitize_text_field(get_option('sfsi_plus_feed_id'));
259
+ $url = $http_url = 'https://api.follow.it/wordpress/getVerifiedCode_plugin';
260
+
261
+ $args = array(
262
+ 'timeout' => 30,
263
+ 'sslverify' => true,
264
+ 'body' => array(
265
+ 'feed_id' => $feed_id
266
+ )
267
+ );
268
 
269
+ $request = wp_remote_post($url, $args);
270
+
271
+ if (!is_wp_error($request)) {
272
+ $resp = json_decode($request['body']);
273
+ update_option('sfsi_plus_verificatiom_code', $resp->code);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
274
  }
275
+ }
276
 
277
+ //functionality for before and after single posts
278
+ add_filter('the_content', 'sfsi_plus_beforaftereposts');
279
+ function sfsi_plus_beforaftereposts($content)
280
+ {
281
+
282
+ $org_content = $content;
283
+ $icons_before = '';
284
+ $icons_after = '';
285
+ if (is_single()) {
286
+ $option8 = unserialize(get_option('sfsi_plus_section8_options', false));
287
+ // var_dump($option8);die();
288
+ $lineheight = $option8['sfsi_plus_post_icons_size'];
289
+ $lineheight = sfsi_plus_getlinhght($lineheight);
290
+ $sfsi_plus_display_button_type = $option8['sfsi_plus_display_button_type'];
291
+ $txt = (isset($option8['sfsi_plus_textBefor_icons'])) ? $option8['sfsi_plus_textBefor_icons'] : "Please follow and like us:";
292
+ $float = $option8['sfsi_plus_icons_alignment'];
293
+ if ($float == "center") {
294
+ $style_parent = 'text-align: center;';
295
+ $style = 'float:none; display: inline-block;';
296
  } else {
297
+ $style_parent = '';
298
+ $style = 'float:' . $float;
 
 
299
  }
 
 
 
300
 
301
+ if ($option8['sfsi_plus_display_before_posts'] == "yes" && $option8['sfsi_plus_show_item_onposts'] == "yes") {
302
+ $icons_before .= '<div class="sfsibeforpstwpr" style="' . $style_parent . '">';
303
  if ($sfsi_plus_display_button_type == 'standard_buttons') {
304
+ $icons_before .= sfsi_plus_social_buttons_below($content = null);
305
  } else if ($option8['sfsi_plus_display_button_type'] == 'responsive_button') {
306
+ $icons_before .= "";
307
  } else {
308
+ $icons_before .= "<div class='sfsi_plus_Sicons' style='" . $style . "'>";
309
+ $icons_before .= "<div style='float:left;margin:0 0px; line-height:" . $lineheight . "px'><span>" . $txt . "</span></div>";
310
+ $icons_before .= sfsi_plus_check_posts_visiblity(0, "yes");
311
+ $icons_before .= "</div>";
 
 
 
 
312
  }
313
+ $icons_before .= '</div>';
314
  }
315
+ if ($option8['sfsi_plus_show_item_onposts'] == "yes") {
316
+
317
+ $icons_after .= '<div class="sfsiaftrpstwpr" style="' . $style_parent . '">';
318
+ if ($option8['sfsi_plus_display_after_posts'] == "yes") {
319
+ if ($sfsi_plus_display_button_type == 'standard_buttons') {
320
+ $icons_after .= sfsi_plus_social_buttons_below($content = null);
321
+ } else if ($option8['sfsi_plus_display_button_type'] == 'responsive_button') {
322
+ $icons_after .= sfsi_plus_social_responsive_buttons(null, $option8);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
323
  } else {
324
+ $icons_after .= "<div class='sfsi_plus_Sicons' style='" . $style . "'>";
325
+ $icons_after .= "<div style='float:left;margin:0 0px; line-height:" . $lineheight . "px'><span>" . $txt . "</span></div>";
326
+ $icons_after .= sfsi_plus_check_posts_visiblity(0, "yes");
327
+ $icons_after .= "</div>";
328
  }
329
+ } else {
330
+ if (isset($option8['sfsi_plus_display_button_type']) && $option8['sfsi_plus_display_button_type'] == 'responsive_button') {
331
+ $icons_after .= sfsi_plus_social_responsive_buttons(null, $option8);
 
 
 
 
332
  }
 
333
  }
334
+
335
+ $icons_after .= '</div>';
 
 
 
 
 
 
336
  }
337
+ }
338
+ $content = $icons_before . $org_content . $icons_after;
339
+ return $content;
340
+ }
341
+
342
+ //showing before and after blog posts
343
+ add_filter('the_excerpt', 'sfsi_plus_beforeafterblogposts');
344
+ add_filter('the_content', 'sfsi_plus_beforeafterblogposts');
345
+ function sfsi_plus_beforeafterblogposts($content)
346
+ {
347
+ if (is_home()) {
348
+ $icons_before = '';
349
+ $icons_after = '';
350
+ $sfsi_section8 = unserialize(get_option('sfsi_plus_section8_options', false));
351
+ $sfsi_section4 = unserialize(get_option('sfsi_plus_section4_options', false));
352
+ $lineheight = $sfsi_section8['sfsi_plus_post_icons_size'];
353
+ $lineheight = sfsi_plus_getlinhght($lineheight);
354
+
355
+ global $id, $post;
356
+ $sfsi_plus_display_button_type = $sfsi_section8['sfsi_plus_display_button_type'];
357
+ $sfsi_plus_show_item_onposts = $sfsi_section8['sfsi_plus_show_item_onposts'];
358
+ $permalink = get_permalink($post->ID);
359
+ $post_title = $post->post_title;
360
+ $sfsiLikeWith = "45px;";
361
+ if ($sfsi_section4['sfsi_plus_display_counts'] == "yes" && $sfsi_section4['sfsi_plus_original_counts'] == "yes") {
362
+ $show_count = 1;
363
+ $sfsiLikeWith = "75px;";
364
  } else {
365
+ $show_count = 0;
366
  }
 
 
367
 
368
+ //checking for standard icons
369
+ if (!isset($sfsi_section8['sfsi_plus_rectsub'])) {
370
+ $sfsi_section8['sfsi_plus_rectsub'] = 'no';
371
+ }
372
+ if (!isset($sfsi_section8['sfsi_plus_recttwtr'])) {
373
+ $sfsi_section8['sfsi_plus_recttwtr'] = 'no';
374
+ }
375
+ if (!isset($sfsi_section8['sfsi_plus_rectpinit'])) {
376
+ $sfsi_section8['sfsi_plus_rectpinit'] = 'no';
377
+ }
378
+ if (!isset($sfsi_section8['sfsi_plus_rectfbshare'])) {
379
+ $sfsi_section8['sfsi_plus_rectfbshare'] = 'no';
380
+ }
381
 
382
+ //checking for standard icons
383
+ $txt = (isset($sfsi_section8['sfsi_plus_textBefor_icons'])) ? $sfsi_section8['sfsi_plus_textBefor_icons'] : "Please follow and like us:";
384
+ $float = $sfsi_section8['sfsi_plus_icons_alignment'];
385
+ if ($float == "center") {
386
+ $style_parent = 'text-align: center;';
387
+ $style = 'float:none; display: inline-block;';
388
+ } else {
389
+ $style_parent = '';
390
+ $style = 'float:' . $float;
391
+ }
392
 
393
+ if (
394
+ $sfsi_section8['sfsi_plus_display_before_blogposts'] == "yes" &&
395
+ $sfsi_section8['sfsi_plus_show_item_onposts'] == "yes"
396
+ ) {
397
+ //icon selection
398
+ $icons_before .= "<div class='sfsibeforpstwpr' style='" . $style_parent . "'>";
399
+ $icons_before .= "<div class='sfsi_plus_Sicons " . $float . "' style='" . $style . "'>";
400
  if ($sfsi_plus_display_button_type == 'standard_buttons') {
401
  if (
402
+ $sfsi_section8['sfsi_plus_rectsub'] == 'yes' ||
403
+ $sfsi_section8['sfsi_plus_rectfb'] == 'yes' ||
404
  $sfsi_section8['sfsi_plus_recttwtr'] == 'yes' ||
405
  $sfsi_section8['sfsi_plus_rectpinit'] == 'yes' ||
406
  $sfsi_section8['sfsi_plus_rectfbshare'] == 'yes'
407
  ) {
408
+ $icons_before .= "<div style='display: inline-block;margin-bottom: 0; margin-left: 0; margin-right: 8px; margin-top: 0; vertical-align: middle;width: auto;'><span>" . $txt . "</span></div>";
409
  }
410
  if ($sfsi_section8['sfsi_plus_rectsub'] == 'yes') {
411
  if ($show_count) {
416
  if (!isset($sfsiLikeWithsub)) {
417
  $sfsiLikeWithsub = $sfsiLikeWith;
418
  }
419
+ $icons_before .= "<div class='sf_subscrbe' style='display: inline-block;vertical-align: middle;width: auto;'>" . sfsi_plus_Subscribelike($permalink, $show_count) . "</div>";
420
  }
421
  if ($sfsi_section8['sfsi_plus_rectfb'] == 'yes' || $sfsi_section8['sfsi_plus_rectfbshare'] == 'yes') {
422
  if ($show_count) { } else {
425
  if (!isset($sfsiLikeWithfb)) {
426
  $sfsiLikeWithfb = $sfsiLikeWith;
427
  }
428
+ $icons_before .= "<div class='sf_fb' style='display: inline-block; vertical-align: middle;width: auto;'>" . sfsi_plus_FBlike($permalink, $show_count) . "</div>";
429
  }
430
  if ($sfsi_section8['sfsi_plus_rectfbshare'] == 'yes') {
431
  if ($show_count) { } else {
434
  if (!isset($sfsiLikeWithfbshare)) {
435
  $sfsiLikeWithfbshare = $sfsiLikeWith;
436
  }
437
+ $icons_before .= "<div class='sf_fb' style='display: inline-block; vertical-align: middle;width: auto;'>" . sfsi_plus_FBshare($permalink, $show_count) . "</div>";
438
  }
439
  if ($sfsi_section8['sfsi_plus_recttwtr'] == 'yes') {
440
  if ($show_count) {
445
  if (!isset($sfsiLikeWithtwtr)) {
446
  $sfsiLikeWithtwtr = $sfsiLikeWith;
447
  }
448
+ $icons_before .= sfsi_twitterShare($permalink, $post_title, '', true);
449
  }
450
  if ($sfsi_section8['sfsi_plus_rectpinit'] == 'yes') {
451
  if ($show_count) {
453
  } else {
454
  $sfsiLikeWithpinit = "auto";
455
  }
456
+ $icons_before .= "<div class='sf_pinit' style='display: inline-block;vertical-align: middle;text-align:left;width: " . $sfsiLikeWithpinit . "'>" . sfsi_plus_pinterest_Custom($permalink, $show_count) . "</div>";
 
457
  }
458
  } else if ($sfsi_section8['sfsi_plus_display_button_type'] == 'responsive_button') {
459
  // if (isset($sfsi_section8['sfsi_plus_responsive_icons_end_post']) && $sfsi_section8['sfsi_plus_responsive_icons_end_post'] == "yes") {
460
+ // $icons_before .= sfsi_plus_social_responsive_buttons(null, $sfsi_section8);
461
  // }
462
+ $icons_before .= "";
463
  } else {
464
+ $icons_before .= "<div style='float:left;margin:0 0px; line-height:" . $lineheight . "px'><span>" . $txt . "</span></div>";
465
+ $icons_before .= sfsi_plus_check_posts_visiblity(0, "yes");
466
  }
467
+ $icons_before .= "</div>";
468
+ $icons_before .= "</div>";
469
+ //icon selection
470
+ if ($id && $post && $post->post_type == 'post') {
471
+ $content = $icons_before . $content;
472
+ } else {
473
+ $contnet = $content;
474
+ }
475
+ }
476
+ if ($sfsi_section8['sfsi_plus_show_item_onposts'] == "yes") {
477
+
478
+ //icon selection
479
+ $icons_after .= "<div class='sfsiaftrpstwpr' style='" . $style_parent . "'>";
480
+ $icons_after .= "<div class='sfsi_plus_Sicons " . $float . "' style='" . $style . "'>";
481
+ // var_dump($sfsi_section8['sfsi_plus_display_after_blogposts']);
482
+
483
+ if ($sfsi_section8['sfsi_plus_display_after_blogposts'] == "yes") {
484
+
485
+ if ($sfsi_plus_display_button_type == 'standard_buttons') {
486
+ if (
487
+ $sfsi_section8['sfsi_plus_rectsub'] == 'yes' ||
488
+ $sfsi_section8['sfsi_plus_rectfb'] == 'yes' ||
489
+ $sfsi_section8['sfsi_plus_recttwtr'] == 'yes' ||
490
+ $sfsi_section8['sfsi_plus_rectpinit'] == 'yes' ||
491
+ $sfsi_section8['sfsi_plus_rectfbshare'] == 'yes'
492
+ ) {
493
+ $icons_after .= "<div style='display: inline-block;margin-bottom: 0; margin-left: 0; margin-right: 8px; margin-top: 0; vertical-align: middle;width: auto;'><span>" . $txt . "</span></div>";
494
+ }
495
+ if ($sfsi_section8['sfsi_plus_rectsub'] == 'yes') {
496
+ if ($show_count) {
497
+ $sfsiLikeWithsub = "93px";
498
+ } else {
499
+ $sfsiLikeWithsub = "64px";
500
+ }
501
+ if (!isset($sfsiLikeWithsub)) {
502
+ $sfsiLikeWithsub = $sfsiLikeWith;
503
+ }
504
+ $icons_after .= "<div class='sf_subscrbe' style='display: inline-block;vertical-align: middle; width: auto;'>" . sfsi_plus_Subscribelike($permalink, $show_count) . "</div>";
505
+ }
506
+ if ($sfsi_section8['sfsi_plus_rectfb'] == 'yes' || $sfsi_section8['sfsi_plus_rectfbshare'] == 'yes') {
507
+ if ($show_count) { } else {
508
+ $sfsiLikeWithfb = "48px";
509
+ }
510
+ if (!isset($sfsiLikeWithfb)) {
511
+ $sfsiLikeWithfb = $sfsiLikeWith;
512
+ }
513
+ $icons_after .= "<div class='sf_fb' style='display: inline-block; vertical-align: middle;width: auto;'>" . sfsi_plus_FBlike($permalink, $show_count) . "</div>";
514
+ }
515
+ if ($sfsi_section8['sfsi_plus_rectfbshare'] == 'yes') {
516
+ if ($show_count) { } else {
517
+ $sfsiLikeWithfbshare = "48px";
518
+ }
519
+ if (!isset($sfsiLikeWithfbshare)) {
520
+ $sfsiLikeWithfbshare = $sfsiLikeWith;
521
+ }
522
+ $icons_after .= "<div class='sf_fb' style='display: inline-block; vertical-align: middle;width: auto;'>" . sfsi_plus_FBshare($permalink, $show_count) . "</div>";
523
+ }
524
+ if ($sfsi_section8['sfsi_plus_recttwtr'] == 'yes') {
525
+ if ($show_count) {
526
+ $sfsiLikeWithtwtr = "77px";
527
+ } else {
528
+ $sfsiLikeWithtwtr = "56px";
529
+ }
530
+ if (!isset($sfsiLikeWithtwtr)) {
531
+ $sfsiLikeWithtwtr = $sfsiLikeWith;
532
+ }
533
+ $icons_after .= "<div class='sf_twiter' style='display: inline-block;vertical-align: middle;width: auto;'>" . sfsi_twitterShare($permalink, $post_title) . "</div>";
534
+ }
535
+ if ($sfsi_section8['sfsi_plus_rectpinit'] == 'yes') {
536
+ if ($show_count) {
537
+ $sfsiLikeWithpinit = "100px";
538
+ } else {
539
+ $sfsiLikeWithpinit = "auto";
540
+ }
541
+
542
+ $icons_after .= "<div class='sf_pinit' style='display: inline-block;text-align:left;vertical-align: middle;width: " . $sfsiLikeWithpinit . "'>" . sfsi_plus_pinterest_Custom($permalink, $show_count) . "</div>";
543
+ }
544
+ } else if ($sfsi_section8['sfsi_plus_display_button_type'] == 'responsive_button') {
545
+ // if (isset($sfsi_section8['sfsi_plus_responsive_icons_end_post']) && $sfsi_section8['sfsi_plus_responsive_icons_end_post'] == "yes") {
546
+ // $icons_after .= sfsi_plus_social_responsive_buttons(null, $sfsi_section8);
547
+ // }
548
+ $icons_after .= "";
549
+ } else {
550
+ $icons_after .= "<div style='float:left;margin:0 0px; line-height:" . $lineheight . "px'><span>" . $txt . "</span></div>";
551
+ $icons_after .= sfsi_plus_check_posts_visiblity(0, "yes");
552
+ }
553
+ } else {
554
+ if (isset($sfsi_section8['sfsi_plus_display_button_type']) && $sfsi_section8['sfsi_plus_display_button_type'] == 'responsive_button') {
555
+ if (is_single()) {
556
+ $icons_after .= sfsi_plus_social_responsive_buttons(null, $sfsi_section8);
557
+ }
558
  }
559
  }
560
+ $icons_after .= "</div>";
561
+ $icons_after .= "</div>";
562
+ //icon selection
563
+ $content = $content . $icons_after;
564
  }
 
 
 
 
565
  }
566
+ return $content;
567
  }
 
 
568
 
569
+ //getting line height for the icons
570
+ function sfsi_plus_getlinhght($lineheight)
571
+ {
572
+ if ($lineheight < 16) {
573
+ $lineheight = $lineheight * 2;
574
+ return $lineheight;
575
+ } elseif ($lineheight >= 16 && $lineheight < 20) {
576
+ $lineheight = $lineheight + 10;
577
+ return $lineheight;
578
+ } elseif ($lineheight >= 20 && $lineheight < 28) {
579
+ $lineheight = $lineheight + 3;
580
+ return $lineheight;
581
+ } elseif ($lineheight >= 28 && $lineheight < 40) {
582
+ $lineheight = $lineheight + 4;
583
+ return $lineheight;
584
+ } elseif ($lineheight >= 40 && $lineheight < 50) {
585
+ $lineheight = $lineheight + 5;
586
+ return $lineheight;
587
+ }
588
+ $lineheight = $lineheight + 6;
589
  return $lineheight;
590
  }
 
 
 
 
 
 
 
 
 
 
591
 
592
+ //sanitizing values
593
+ function sfsi_plus_string_sanitize($s)
594
+ {
595
+ $result = preg_replace("/[^a-zA-Z0-9]+/", " ", html_entity_decode($s, ENT_QUOTES));
596
+ return $result;
 
 
597
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
598
 
599
+ add_action('admin_notices', 'sfsi_plus_admin_notice', 10);
600
+ function sfsi_plus_admin_notice()
601
+ {
602
+ if (isset($_GET['page']) && $_GET['page'] == "sfsi-plus-options") {
603
+ $style = "overflow: hidden; margin:12px 3px 0px;display:none;";
604
+ } else {
605
+ $style = "overflow: hidden;";
606
+ }
607
+ ?>
 
 
 
 
 
 
 
 
 
 
 
608
  <?php
609
+ include("views/sfsi_plugin_lists.php");
610
+ include("views/sfsi_other_banners.php");
611
+ include("views/sfsi_global_banners.php");
612
+ if (get_option("sfsi_plus_show_premium_notification") == "yes" && isset($_GET['page']) && $_GET['page'] == "sfsi-plus-options") {
 
 
613
  ?>
614
  <style>
615
+ .sfsi_plus_show_prem_notification a {
616
  color: #fff;
617
  text-decoration: underline;
618
  }
619
 
620
+ form.sfsi_plus_premiumNoticeDismiss {
621
  display: inline-block;
622
  margin: 5px 0 0;
623
  vertical-align: middle;
624
  }
625
 
626
+ .sfsi_plus_premiumNoticeDismiss input[type='submit'] {
627
  background-color: transparent;
628
  border: medium none;
629
  color: #fff;
632
  cursor: pointer;
633
  }
634
  </style>
635
+ <div class="updated sfsi_plus_show_prem_notification" style="<?php echo $style; ?>background-color: #38B54A; color: #fff; font-size: 18px;">
636
+ <div class="alignleft" style="margin: 9px 0;">
637
+ <?php _e('BIG NEWS : There is now a Premium Ultimate Social Media Plugin available with many more cool features: ', SFSI_PLUS_DOMAIN); ?><a href="https://www.ultimatelysocial.com/usm-premium/?utm_source=usmplus_settings_page&utm_campaign=notification_banner&utm_medium=banner" target="_blank"><?php _e('Check it out', SFSI_PLUS_DOMAIN); ?></a>
638
+ </div>
639
+ <div class="alignright">
640
+ <form method="post" class="sfsi_plus_premiumNoticeDismiss">
641
+ <input type="hidden" name="sfsi-plus_dismiss-premiumNotice" value="true">
642
+ <input type="submit" name="dismiss" value="Dismiss" />
643
+ </form>
644
+ </div>
645
+ </div>
646
+ <?php
647
+ }
648
+ if (get_option("sfsi_plus_show_Setting_mobile_notification") == "yes") {
649
+ $sfsi_plus_install_date = strtotime(get_option('sfsi_plus_installDate'));
650
+ $sfsi_plus_future_date = strtotime('14 days', $sfsi_plus_install_date);
651
+ $sfsi_plus_past_date = strtotime("now");
652
+ if ($sfsi_plus_past_date >= $sfsi_plus_future_date) {
653
+ ?>
654
+ <style>
655
+ .sfsi_plus_show_mobile_setting_notification a {
656
+ color: #fff;
657
+ text-decoration: underline;
658
+ }
659
+
660
+ form.sfsi_plus_mobileNoticeDismiss {
661
+ display: inline-block;
662
+ margin: 5px 0 0;
663
+ vertical-align: middle;
664
+ }
665
+
666
+ .sfsi_plus_mobileNoticeDismiss input[type='submit'] {
667
+ background-color: transparent;
668
+ border: medium none;
669
+ color: #fff;
670
+ margin: 0;
671
+ padding: 0;
672
+ cursor: pointer;
673
+ }
674
+ </style>
675
 
676
+ <!-- <div class="updated sfsi_plus_show_mobile_setting_notification" style="<?php //echo $style;
677
+ ?>background-color: #38B54A; color: #fff; font-size: 18px;">
678
  <div class="alignleft" style="margin: 9px 0; width: 95%; line-height: 25px;">
679
  <b><?php //_e( 'Over 50% of visitors are mobile visitors:', SFSI_PLUS_DOMAIN);
680
+ ?></b>
681
  <?php //_e( ' Make sure your social media icons look good on mobile too, so that people like & share your site. With the premium plugin you can define the location of the icons separately on mobile: ', SFSI_PLUS_DOMAIN);
682
+ ?><a href="https://www.ultimatelysocial.com/usmpremium/?utm_expid=92383224-1.TfahStjhTrSpmi_nxkXt1w.1&utm_source=usmplus_settings_page&utm_campaign=check_mobile&utm_medium=banner" target="_blank"><?php //_e( 'Check it out', SFSI_PLUS_DOMAIN);
683
+ ?></a>
684
  </div>
685
  <div class="alignright">
686
  <form method="post" class="sfsi_plus_mobileNoticeDismiss">
689
  </form>
690
  </div>
691
  </div> -->
692
+ <?php
693
+ }
694
+ }
695
 
696
+ $phpVersion = phpVersion();
697
+ if ($phpVersion <= '5.4') {
698
+ if (get_option("sfsi_plus_serverphpVersionnotification") == "yes") {
699
 
700
+ ?>
701
+ <style>
702
+ .sfsi_plus_show_phperror_notification {
703
+ color: #fff;
704
+ text-decoration: underline;
705
+ }
706
 
707
+ form.sfsi_plus_phperrorNoticeDismiss {
708
+ display: inline-block;
709
+ margin: 5px 0 0;
710
+ vertical-align: middle;
711
+ }
712
 
713
+ .sfsi_plus_phperrorNoticeDismiss input[type='submit'] {
714
+ background-color: transparent;
715
+ border: medium none;
716
+ color: #fff;
717
+ margin: 0;
718
+ padding: 0;
719
+ cursor: pointer;
720
+ }
721
 
722
+ .sfsi_plus_show_phperror_notification p {
723
+ line-height: 22px;
724
+ }
725
 
726
+ p.sfsi_plus_show_notifictaionpragraph {
727
+ padding: 0 !important;
728
+ font-size: 18px;
729
+ }
730
+ </style>
731
+ <div class="updated sfsi_plus_show_phperror_notification" style="<?php echo $style; ?>background-color: #D22B2F; color: #fff; font-size: 18px; border-left-color: #D22B2F;">
732
+ <div class="alignleft" style="margin: 9px 0;">
733
+ <p class="sfsi_plus_show_notifictaionpragraph">
734
+ <?php _e('We noticed you are running your site on a PHP version older than 5.6. Please upgrade to a more recent version. This is not only important for running the Ultimate Social Media Plugin, but also for security reasons in general.', SFSI_PLUS_DOMAIN); ?>
735
+ <br>
736
+ <?php _e('If you do not know how to do the upgrade, please ask your server team or hosting company to do it for you.', SFSI_PLUS_DOMAIN); ?>
737
+ </p>
738
 
739
+ </div>
740
+ <div class="alignright">
741
+ <form method="post" class="sfsi_plus_phperrorNoticeDismiss">
742
+ <input type="hidden" name="sfsi-plus_dismiss-phperrorNotice" value="true">
743
+ <input type="submit" name="dismiss" value="Dismiss" />
744
+ </form>
745
+ </div>
746
  </div>
 
 
 
 
 
 
 
747
 
748
+ <?php
749
+ }
750
+ }
751
+ sfsi_plus_error_reporting_notice();
752
  }
 
 
 
753
 
754
 
755
+ add_action('admin_init', 'sfsi_plus_dismiss_admin_notice');
756
+ function sfsi_plus_dismiss_admin_notice()
757
+ {
758
+ $current_date_sfsi = date("Y-m-d h:i:s");
759
 
760
+ if (isset($_REQUEST['sfsi-plus_dismiss-premiumNotice']) && $_REQUEST['sfsi-plus_dismiss-premiumNotice'] == 'true') {
761
+ update_option('sfsi_plus_show_premium_notification', "no");
762
+ //header("Location: ".site_url()."/wp-admin/admin.php?page=sfsi-options");die;
763
+ }
764
 
765
+ if (isset($_REQUEST['sfsi-plus_dismiss-premiumCumulativeCountNotice']) && $_REQUEST['sfsi-plus_dismiss-premiumCumulativeCountNotice'] == 'true') {
766
+ update_option('sfsi_plus_show_premium_cumulative_count_notification', "no");
767
+ }
768
 
769
+ if (isset($_REQUEST['sfsi-plus_dismiss-settingmobileNotice']) && $_REQUEST['sfsi-plus_dismiss-settingmobileNotice'] == 'true') {
770
+ update_option('sfsi_plus_show_Setting_mobile_notification', "no");
771
+ //header("Location: ".site_url()."/wp-admin/admin.php?page=sfsi-options");die;
772
+ }
773
+ if (isset($_REQUEST['sfsi-plus_dismiss-phperrorNotice']) && $_REQUEST['sfsi-plus_dismiss-phperrorNotice'] == 'true') {
774
+ update_option('sfsi_plus_serverphpVersionnotification', "no");
775
+ }
776
+ if (isset($_REQUEST['sfsi-plus-dismiss-sharecount']) && $_REQUEST['sfsi-plus-dismiss-sharecount'] == 'true') {
777
+ $sfsi_plus_dismiss_sharecount = array(
778
+ 'show_banner' => "no",
779
+ 'timestamp' => strtotime(date("Y-m-d h:i:s"))
780
+ );
781
+ update_option('sfsi_plus_dismiss_sharecount', serialize($sfsi_plus_dismiss_sharecount));
782
+ }
783
+ if (isset($_REQUEST['sfsi-plus-dismiss-google-analytic']) && $_REQUEST['sfsi-plus-dismiss-google-analytic'] == 'true') {
784
+ $sfsi_plus_dismiss_google_analytic = array(
785
+ 'show_banner' => "no",
786
+ 'timestamp' => strtotime(date("Y-m-d h:i:s"))
787
+ );
788
+ update_option('sfsi_plus_dismiss_google_analytic', serialize($sfsi_plus_dismiss_google_analytic));
789
+ }
790
+ if (isset($_REQUEST['sfsi-plus-dismiss-gdpr']) && $_REQUEST['sfsi-plus-dismiss-gdpr'] == 'true') {
791
+ $sfsi_plus_dismiss_gdpr = array(
792
+ 'show_banner' => "no",
793
+ 'timestamp' => strtotime(date("Y-m-d h:i:s"))
794
+ );
795
+ update_option('sfsi_plus_dismiss_gdpr', serialize($sfsi_plus_dismiss_gdpr));
796
+ }
797
+ if (isset($_REQUEST['sfsi-plus-dismiss-optimization']) && $_REQUEST['sfsi-plus-dismiss-optimization'] == 'true') {
798
+ $sfsi_plus_dismiss_optimization = array(
799
+ 'show_banner' => "no",
800
+ 'timestamp' => strtotime(date("Y-m-d h:i:s"))
801
+ );
802
+ update_option('sfsi_plus_dismiss_optimization', serialize($sfsi_plus_dismiss_optimization));
803
+ }
804
+ if (isset($_REQUEST['sfsi-plus-dismiss-gallery']) && $_REQUEST['sfsi-plus-dismiss-gallery'] == 'true') {
805
+ $sfsi_plus_dismiss_gallery = array(
806
+ 'show_banner' => "no",
807
+ 'timestamp' => strtotime(date("Y-m-d h:i:s"))
808
+ );
809
+ update_option('sfsi_plus_dismiss_gallery', serialize($sfsi_plus_dismiss_gallery));
810
+ }
811
+ if (isset($_REQUEST['sfsi-plus-dismiss-woocommerce']) && $_REQUEST['sfsi-plus-dismiss-woocommerce'] == 'true') {
812
+ $sfsi_plus_dismiss_woocommerce = array(
813
+ 'show_banner' => "no",
814
+ 'timestamp' => strtotime(date("Y-m-d h:i:s"))
815
+ );
816
+ update_option('sfsi_plus_dismiss_woocommerce', serialize($sfsi_plus_dismiss_woocommerce));
817
+ }
818
+ if (isset($_REQUEST['sfsi-plus-dismiss-twitter']) && $_REQUEST['sfsi-plus-dismiss-twitter'] == 'true') {
819
+ $sfsi_plus_dismiss_twitter = array(
820
+ 'show_banner' => "no",
821
+ 'timestamp' => strtotime(date("Y-m-d h:i:s"))
822
+ );
823
+ update_option('sfsi_plus_dismiss_twitter', serialize($sfsi_plus_dismiss_twitter));
824
+ }
825
 
826
 
827
+ if (isset($_REQUEST['sfsi-plus-banner-global-upgrade']) && $_REQUEST['sfsi-plus-banner-global-upgrade'] == 'true') {
828
+ $sfsi_plus_banner_global_upgrade = unserialize(get_option('sfsi_plus_banner_global_upgrade', false));
829
+ $sfsi_plus_banner_global_upgrade = array(
830
+ 'met_criteria' => $sfsi_plus_banner_global_upgrade['met_criteria'],
831
+ 'banner_appeared' => "yes",
832
+ 'is_active' => "no",
833
+ 'timestamp' => $current_date_sfsi
834
+ );
835
+ update_option('sfsi_plus_banner_global_upgrade', serialize($sfsi_plus_banner_global_upgrade));
836
+ sfsi_plus_check_banner();
837
+ }
838
+ if (isset($_REQUEST['sfsi-plus-banner-global-http']) && $_REQUEST['sfsi-plus-banner-global-http'] == 'true') {
839
+ $sfsi_plus_banner_global_http = unserialize(get_option('sfsi_plus_banner_global_http', false));
840
+ $sfsi_plus_banner_global_http = array(
841
+ 'met_criteria' => $sfsi_plus_banner_global_http['met_criteria'],
842
+ 'banner_appeared' => "yes",
843
+ 'is_active' => "no",
844
+ 'timestamp' => $current_date_sfsi
845
+ );
846
+ update_option('sfsi_plus_banner_global_http', serialize($sfsi_plus_banner_global_http));
847
+ sfsi_plus_check_banner();
848
+ }
849
+ if (isset($_REQUEST['sfsi-plus-banner-global-gdpr']) && $_REQUEST['sfsi-plus-banner-global-gdpr'] == 'true') {
850
+ $sfsi_plus_banner_global_gdpr = unserialize(get_option('sfsi_plus_banner_global_gdpr', false));
851
+ $sfsi_plus_banner_global_gdpr = array(
852
+ 'met_criteria' => $sfsi_plus_banner_global_gdpr['met_criteria'],
853
+ 'banner_appeared' => "yes",
854
+ 'is_active' => "no",
855
+ 'timestamp' => $current_date_sfsi
856
+ );
857
+ update_option('sfsi_plus_banner_global_gdpr', serialize($sfsi_plus_banner_global_gdpr));
858
+ sfsi_plus_check_banner();
859
+ }
860
 
861
+ if (isset($_REQUEST['sfsi-plus-banner-global-shares']) && $_REQUEST['sfsi-plus-banner-global-shares'] == 'true') {
862
+ $sfsi_plus_banner_global_shares = unserialize(get_option('sfsi_plus_banner_global_shares', false));
863
+ $sfsi_plus_banner_global_shares = array(
864
+ 'met_criteria' => $sfsi_plus_banner_global_shares['met_criteria'],
865
+ 'banner_appeared' => "yes",
866
+ 'is_active' => "no",
867
+ 'timestamp' => $current_date_sfsi
868
+ );
869
+ update_option('sfsi_plus_banner_global_shares', serialize($sfsi_plus_banner_global_shares));
870
+ sfsi_plus_check_banner();
871
+ }
872
+ if (isset($_REQUEST['sfsi-plus-banner-global-load_faster']) && $_REQUEST['sfsi-plus-banner-global-load_faster'] == 'true') {
873
+ $sfsi_plus_banner_global_load_faster = unserialize(get_option('sfsi_plus_banner_global_load_faster', false));
874
+ $sfsi_plus_banner_global_load_faster = array(
875
+ 'met_criteria' => $sfsi_plus_banner_global_load_faster['met_criteria'],
876
+ 'banner_appeared' => "yes",
877
+ 'is_active' => "no",
878
+ 'timestamp' => $current_date_sfsi
879
+ );
880
+ update_option('sfsi_plus_banner_global_load_faster', serialize($sfsi_plus_banner_global_load_faster));
881
+ sfsi_plus_check_banner();
882
+ }
883
+ if (isset($_REQUEST['sfsi-plus-banner-global-social']) && $_REQUEST['sfsi-plus-banner-global-social'] == 'true') {
884
+ $sfsi_plus_banner_global_social = unserialize(get_option('sfsi_plus_banner_global_social', false));
885
+ $sfsi_plus_banner_global_social = array(
886
+ 'met_criteria' => $sfsi_plus_banner_global_social['met_criteria'],
887
+ 'banner_appeared' => "yes",
888
+ 'is_active' => "no",
889
+ 'timestamp' => $current_date_sfsi
890
+ );
891
+ update_option('sfsi_plus_banner_global_social', serialize($sfsi_plus_banner_global_social));
892
+ sfsi_plus_check_banner();
893
+ }
894
+ if (isset($_REQUEST['sfsi-plus-banner-global-pinterest']) && $_REQUEST['sfsi-plus-banner-global-pinterest'] == 'true') {
895
+ $sfsi_plus_banner_global_pinterest = unserialize(get_option('sfsi_plus_banner_global_pinterest', false));
896
+ $sfsi_plus_banner_global_pinterest = array(
897
+ 'met_criteria' => $sfsi_plus_banner_global_pinterest['met_criteria'],
898
+ 'banner_appeared' => "yes",
899
+ 'is_active' => "no",
900
+ 'timestamp' => $current_date_sfsi
901
+ );
902
+ update_option('sfsi_plus_banner_global_pinterest', serialize($sfsi_plus_banner_global_pinterest));
903
+ sfsi_plus_check_banner();
904
+ }
905
+ $sfsi_plus_install_time = strtotime(get_option('sfsi_plus_installDate'));
906
+ $sfsi_plus_max_show_time = $sfsi_plus_install_time + (120 * 60);
907
+ $sfsi_plus_banner_global_firsttime_offer = unserialize(get_option('sfsi_plus_banner_global_firsttime_offer', false));
908
+ if (
909
+ (isset($_REQUEST['sfsi-plus-banner-global-firsttime-offer']) && $_REQUEST['sfsi-plus-banner-global-firsttime-offer'] == 'true') || (isset($sfsi_plus_banner_global_firsttime_offer['is_active']) && $sfsi_plus_banner_global_firsttime_offer['is_active'] == "yes" && ceil(($sfsi_plus_max_show_time - strtotime(date('Y-m-d h:i:s'))) / 60) <= 0)
910
+ ) {
911
 
912
+ $sfsi_plus_banner_global_firsttime_offer = array(
913
+ 'met_criteria' => "yes",
914
+ 'is_active' => "no",
915
+ 'timestamp' => $current_date_sfsi
916
+ );
917
+ update_option('sfsi_plus_banner_global_firsttime_offer', serialize($sfsi_plus_banner_global_firsttime_offer));
918
+ sfsi_plus_check_banner();
919
+ }
920
+ if (isset($_REQUEST['sfsi-plus-dismiss-copy-delete-post']) && $_REQUEST['sfsi-plus-dismiss-copy-delete-post'] == 'true') {
921
+ $sfsi_plus_dismiss_copy_delete_post = array(
922
+ 'show_banner' => "no",
923
+ 'timestamp' => strtotime(date("Y-m-d h:i:s"))
924
+ );
925
+ update_option('sfsi_plus_dismiss_copy_delete_post', serialize($sfsi_plus_dismiss_copy_delete_post));
926
+ }
927
+ if (isset($_REQUEST['sfsi-plus-banner-popups']) && $_REQUEST['sfsi-plus-banner-popups'] == 'true') {
928
+ update_option('sfsi_plus_banner_popups', "no");
929
+ }
930
+ }
931
 
932
+ add_action('plugins_loaded', 'sfsi_plus_load_domain');
933
+ function sfsi_plus_load_domain()
934
+ {
935
+ $plugin_dir = basename(dirname(__FILE__)) . '/languages';
936
+ load_plugin_textdomain('ultimate-social-media-plus', false, $plugin_dir);
937
+ }
938
 
939
+ function sfsi_plus_get_bloginfo($url)
940
+ {
941
+ $web_url = get_bloginfo($url);
942
 
943
+ //Block to use feedburner url
944
+ if (preg_match("/(feedburner)/im", $web_url, $match)) {
945
+ $web_url = site_url() . "/feed";
946
+ }
947
+ return $web_url;
948
+ }
949
+ /* plugin action link*/
950
+ add_filter('plugin_action_links_' . plugin_basename(__FILE__), 'sfsi_plus_action_links', 3);
951
+ function sfsi_plus_action_links($mylinks)
952
+ {
953
+ $linkQuestion = '<a target="_blank" href="https://goo.gl/MU6pTN#new-topic-0" style="color:#FF0000;"><b>Need help?</b></a>';
954
+ $linkProVersion = '<a href="https://www.ultimatelysocial.com/usm-premium/?utm_source=usmplus_manage_plugin_page&utm_campaign=check_out_pro_version&utm_medium=banner" style="color:#38B54A;"><b>Check out pro version</b></a>';
955
+
956
+ if (isset($mylinks['edit']) && !empty($mylinks['edit'])) {
957
+ $mylinks[] = @$mylinks['edit'];
958
+ }
959
 
960
+ //array_unshift($mylinks, $linkProVersion);
961
+ array_unshift($mylinks, $linkQuestion);
962
 
963
+ $slug = plugin_basename(dirname(__FILE__));
964
 
965
+ //$mylinks[$slug] = @$mylinks["deactivate"].'<i class="sfsi-plus-deactivate-slug"></i>';
966
 
967
+ $mylinks[] = '<a href="' . admin_url("/admin.php?page=sfsi-plus-options") . '">Settings</a>';
968
 
969
+ unset($mylinks['edit']);
970
+ //unset ($mylinks['deactivate']);
971
 
972
+ return $mylinks;
973
+ }
974
 
975
+ global $pagenow;
976
 
977
+ if ('plugins.php' === $pagenow) {
978
 
979
+ add_action('admin_footer', '_sfsi_plus_add_deactivation_feedback_dialog_box');
980
 
981
+ function _sfsi_plus_add_deactivation_feedback_dialog_box()
982
+ {
983
 
984
+ include_once(SFSI_PLUS_DOCROOT . '/views/deactivation/sfsi_deactivation_popup.php'); ?>
985
 
986
+ <script>
987
+ jQuery(document).ready(function($) {
988
 
989
+ var _plus_deactivationLink = $('.sfsi-plus-deactivate-slug').prev();
990
 
991
+ _plus_deactivationLink.parent().prev().remove();
992
 
993
+ $('.sfsi-plus-deactivation-reason-link').find('a').attr('href', _plus_deactivationLink.attr('href'));
994
 
995
+ _plus_deactivationLink.on('click', function(e) {
996
+ e.preventDefault();
997
+ $('[data-popup="plus-popup-1"]').fadeIn(350);
998
+ });
999
 
1000
+ //----- CLOSE
1001
+ $('[data-popup-close]').on('click', function(e) {
1002
+ e.preventDefault();
1003
+ var targeted_popup_class = jQuery(this).attr('data-popup-close');
1004
+ $('[data-popup="' + targeted_popup_class + '"]').fadeOut(350);
1005
+ });
1006
 
1007
+ //----- OPEN
1008
+ $('[data-popup-open]').on('click', function(e) {
1009
+ e.preventDefault();
1010
+ var targeted_popup_class = jQuery(this).attr('data-popup-open');
1011
+ $('[data-popup="' + targeted_popup_class + '"]').fadeIn(350);
1012
+ });
1013
 
1014
+ });
1015
+ </script>
1016
 
1017
+ <?php }
1018
+ }
1019
+ function sfsi_plus_getdomain($url)
1020
+ {
1021
+ $pieces = parse_url($url);
1022
+ $domain = isset($pieces['host']) ? $pieces['host'] : '';
1023
+ if (preg_match('/(?P<domain>[a-z0-9][a-z0-9\-]{1,63}\.[a-z\.]{2,6})$/i', $domain, $regs)) {
1024
+ return $regs['domain'];
1025
+ }
1026
+ return false;
1027
+ }
1028
 
1029
+ // create a scheduled event (if it does not exist already)
1030
+ function sfsi_plus_sf_instagram_count_fetcher()
1031
+ {
1032
+ $sfsi_plus_SocialHelper = new sfsi_plus_SocialHelper();
1033
+ $feed_id = sanitize_text_field(get_option('sfsi_plus_feed_id', false));
1034
+ return $sfsi_plus_SocialHelper->SFSI_getFeedSubscriberFetch();
1035
+ }
1036
+ function sfsi_plus_cronstarter_activation()
1037
+ {
1038
 
1039
+ $domain = sfsi_plus_getdomain(get_site_url());
1040
 
1041
+ if ($domain && strlen($domain) > 0) {
1042
+ $firstchar = strtolower($domain[0]);
1043
+ } else {
1044
+ $firstchar = "x";
1045
+ }
1046
+ if (!preg_match("/^[a-z]$/i", $firstchar)) {
1047
+ $firstchar = 'x';
1048
+ }
1049
+ $number = ord($firstchar) - 96;
1050
+ $time = DateTime::createFromFormat('Y-m-d H:i:s', date('Y-m-d ' . $number . ':00:00'));
1051
+ // sfsi_plus_write_log(wp_next_scheduled( 'sfsi_plus_sf_instagram_count_fetcher' ));
1052
+ if (!wp_next_scheduled('sfsi_plus_sf_instagram_count_fetcher')) {
1053
+ wp_schedule_event($time, 'daily', 'sfsi_plus_sf_instagram_count_fetcher');
1054
+ }
1055
+ }
1056
+ // and make sure it's called whenever WordPress loads
1057
+ add_action('wp', 'sfsi_plus_cronstarter_activation');
1058
+
1059
+ /* redirect setting page hook */
1060
+ add_action('admin_init', 'sfsi_plus_plugin_redirect');
1061
+ function sfsi_plus_plugin_redirect()
1062
+ {
1063
+ if (get_option('sfsi_plus_plugin_do_activation_redirect', false)) {
1064
+ delete_option('sfsi_plus_plugin_do_activation_redirect');
1065
+ wp_redirect(admin_url('admin.php?page=sfsi-plus-options'));
1066
+ }
1067
+ }
1068
 
1069
+ // ********************************* Link to support forum for different languages STARTS *******************************//
1070
 
1071
+ function sfsi_plus_get_language_notice_text()
1072
+ {
1073
 
1074
+ $currLang = get_locale();
1075
+ $text = '';
1076
 
1077
+ switch ($currLang) {
1078
 
1079
+ // Arabic
1080
+ case 'ar':
1081
 
1082
+ $text = "hal tatakalam alearabia? 'iidha kanat ladayk 'asyilat hawl almukawan al'iidafii l Ultimate Social Media , aitruh sualik fi muntadaa aldaem , sanuhawil alrada biallughat alearabiat: <a target='_blank' href='https://goo.gl/o42Beq'><b>'unqur huna</b></a>";
1083
+ break;
1084
 
1085
+ // Chinese - simplified
1086
+ case 'zh-Hans':
1087
 
1088
+ $text = "你会说中文吗?如果您有关于Ultimate Social Media插件的问题,请在支持论坛中提出您的问题,我们将尝试用中文回复:<a target='_blank' href='https://goo.gl/o42Beq'><b>点击此处</b></a>";
1089
+ break;
1090
 
1091
+ // Chinese - traditional
1092
+ case 'zh-Hant':
1093
 
1094
+ $text = "你會說中文嗎?如果您有關於Ultimate Social Media插件的問題,請在支持論壇中提出您的問題,我們將嘗試用中文回复:<a target='_blank' href='https://goo.gl/o42Beq'><b>點擊此處</b></a>";
1095
+ break;
1096
 
1097
+ // Dutch, Dutch (Belgium)
1098
+ case 'nl_NL':
1099
+ case 'nl_BE':
1100
+ $text = "Jij spreekt Nederlands? Als je vragen hebt over de Ultimate Social Media-plug-in, stel je vraag in het ondersteuningsforum, we zullen proberen in het Nederlands te antwoorden: <a target='_blank' href='https://goo.gl/o42Beq'>klik hier</a>";
1101
+ break;
1102
 
1103
+ // French (Belgium), French (France)
1104
+ case 'fr_BE':
1105
+ case 'fr_FR':
1106
 
1107
+ $text = "Vous parlez français? Si vous avez des questions sur le plugin Ultimate Social Media, posez votre question sur le forum de support, nous essaierons de répondre en français: <a target='_blank' href='https://goo.gl/o42Beq'>Cliquez ici</a>";
1108
+ break;
1109
 
1110
+ // German, German (Switzerland)
1111
+ case 'de':
1112
+ case 'de_CH':
1113
 
1114
+ $text = "Du sprichst Deutsch? Wenn Du Fragen zum Ultimate Social Media-Plugins hast, einfach im Support Forum fragen. Wir antworten auch auf Deutsch! <a target='_blank' href='https://goo.gl/o42Beq'>Klicke hier</a>";
1115
+ break;
1116
 
1117
+ // Greek
1118
+ case 'el':
1119
 
1120
+ $text = "Μιλάτε Ελληνικά? Αν έχετε ερωτήσεις σχετικά με το plugin Ultimate Social Media, ρωτήστε την ερώτησή σας στο φόρουμ υποστήριξης, θα προσπαθήσουμε να απαντήσουμε στα ελληνικά: <a target='_blank' href='https://goo.gl/o42Beq'>Κάντε κλικ εδώ</a>";
1121
+ break;
1122
 
1123
+ // Hebrew
1124
+ case 'he_IL':
1125
 
1126
+ $text = "אתה מדבר עברית? אם יש לך שאלות על תוסף המדיה החברתית האולטימטיבית, שאל את השאלה שלך בפורום התמיכה, ננסה לענות בעברית: <a target='_blank' href='https://goo.gl/o42Beq'>לחץ כאן</a>";
1127
+ break;
1128
 
1129
+ // Hindi
1130
+ case 'hi_IN':
1131
 
1132
+ $text = "आप हिंदी बोलते हो? यदि आपके पास अल्टीमेट सोशल मीडिया प्लगइन के बारे में कोई प्रश्न है, तो समर्थन फोरम में अपना प्रश्न पूछें, हम हिंदी में जवाब देने का प्रयास करेंगे: <a target='_blank' href='https://goo.gl/o42Beq'>यहां क्लिक करें</a>";
1133
+ break;
1134
 
1135
+ // Indonesian
1136
+ case 'id':
1137
 
1138
+ $text = "Anda berbicara bahasa Indonesia? Jika Anda memiliki pertanyaan tentang plugin Ultimate Social Media, ajukan pertanyaan Anda di Forum Dukungan, kami akan mencoba menjawab dalam Bahasa Indonesia: <a target='_blank' href='https://goo.gl/o42Beq'>Klik di sini</a>";
1139
 
1140
+ break;
1141
 
1142
+ // Italian
1143
+ case 'it_IT':
1144
 
1145
+ $text = "Tu parli italiano? Se hai domande sul plugin Ultimate Social Media, fai la tua domanda nel Forum di supporto, cercheremo di rispondere in italiano: <a target='_blank' href='https://goo.gl/o42Beq'>clicca qui</a>";
1146
 
1147
+ break;
1148
 
1149
+ // Japanese
1150
+ case 'ja':
1151
 
1152
+ $text = "あなたは日本語を話しますか?アルティメットソーシャルメディアのプラグインに関する質問がある場合は、サポートフォーラムで質問してください。日本語で対応しようと思っています:<a target='_blank' href='https://goo.gl/o42Beq'>ここをクリック</a>";
1153
 
1154
+ break;
1155
 
1156
+ // Korean
1157
+ case 'ko_KR ':
1158
 
1159
+ $text = "한국어를 할 줄 아세요? 궁극적 인 소셜 미디어 플러그인에 대해 궁금한 점이 있으면 지원 포럼에서 질문하십시오. 한국어로 답변하려고합니다 : <a target='_blank' href='https://goo.gl/o42Beq'>여기를 클릭하십시오.</a>";
1160
 
1161
+ break;
1162
 
1163
+ // Persian, Persian (Afghanistan)
1164
+ case 'fa_IR':
1165
+ case 'fa_AF':
1166
 
1167
+ $text = "شما فارسی صحبت می کنید؟ اگر سوالی در مورد پلاگین رسانه Ultimate Social دارید، سوال خود را در انجمن پشتیبانی بپرسید، سعی خواهیم کرد به فارسی پاسخ دهید: <a target='_blank' href='https://goo.gl/o42Beq'>اینجا را کلیک کنید</a>";
1168
 
1169
+ break;
1170
 
1171
+ // Polish
1172
 
1173
+ case 'pl_PL':
1174
+ $text = "Mówisz po polsku? Jeśli masz pytania dotyczące wtyczki Ultimate Social Media, zadaj pytanie na Forum pomocy technicznej, postaramy się odpowiedzieć po polsku: <a target='_blank' href='https://goo.gl/o42Beq'>Kliknij tutaj</a>";
1175
+ break;
1176
 
1177
+ //Portuguese (Brazil), Portuguese (Portugal)
1178
 
1179
+ case 'pt_BR':
1180
+ case 'pt_PT':
1181
 
1182
+ $text = "Você fala português? Se você tiver dúvidas sobre o plug-in Ultimate Social Media, faça sua pergunta no Fórum de suporte, tentaremos responder em português: <a target='_blank' href='https://goo.gl/o42Beq'>Clique aqui</a>";
1183
 
1184
+ break;
1185
 
1186
+ // Russian, Russian (Ukraine)
1187
+ case 'ru_RU':
1188
+ case 'ru_UA':
1189
 
1190
+ $text = "Ты говоришь по-русски? Если у вас есть вопросы о плагине Ultimate Social Media, задайте свой вопрос в форуме поддержки, мы постараемся ответить на русский: <a target='_blank' href='https://goo.gl/o42Beq'>Нажмите здесь</a>";
1191
 
1192
+ break;
1193
 
1194
+ /* Spanish (Argentina), Spanish (Chile), Spanish (Colombia), Spanish (Mexico),
1195
  Spanish (Peru), Spanish (Puerto Rico), Spanish (Spain), Spanish (Venezuela) */
1196
 
1197
+ case 'es_AR':
1198
+ case 'es_CL':
1199
+ case 'es_CO':
1200
+ case 'es_MX':
1201
+ case 'es_PE':
1202
+ case 'es_PR':
1203
+ case 'es_ES':
1204
+ case 'es_VE':
1205
 
1206
+ $text = "¿Tu hablas español? Si tiene alguna pregunta sobre el complemento Ultimate Social Media, formule su pregunta en el foro de soporte, intentaremos responder en español: <a target='_blank' href='https://goo.gl/o42Beq'>haga clic aquí</a>";
1207
+ break;
1208
 
1209
+ // Swedish
1210
 
1211
+ case 'sv_SE':
1212
 
1213
+ $text = "Pratar du svenska? Om du har frågor om programmet Ultimate Social Media, fråga din fråga i supportforumet, vi försöker svara på svenska: <a target='_blank' href='https://goo.gl/o42Beq'>Klicka här</a>";
1214
+ break;
1215
 
1216
+ // Turkish
1217
 
1218
+ case 'tr_TR':
1219
+ $text = "Sen Türkçe konuş? Nihai Sosyal Medya eklentisi hakkında sorularınız varsa, sorunuza Destek Forumu'nda sorun, Türkçe olarak cevap vermeye çalışacağız: <a target='_blank' href='https://goo.gl/o42Beq'>Tıklayın</a>";
1220
+ break;
1221
 
1222
+ // Ukrainian
1223
 
1224
+ case 'uk':
1225
+ $text = "Ви говорите по-українськи? Якщо у вас є запитання про плагін Ultimate Social Media, задайте своє питання на Форумі підтримки, ми спробуємо відповісти українською: <a target='_blank' href='https://goo.gl/o42Beq'>натисніть тут</a>";
1226
+ break;
1227
 
1228
+ // Vietnamese
1229
 
1230
+ case 'vi':
1231
+ $text = "Bạn nói tiếng việt không Nếu bạn có câu hỏi về plugin Ultimate Social Media, hãy đặt câu hỏi của bạn trong Diễn đàn hỗ trợ, chúng tôi sẽ cố gắng trả lời bằng tiếng Việt: <a target='_blank' href='https://goo.gl/o42Beq'>Nhấp vào đây</a>";
1232
+ break;
1233
+ }
1234
 
1235
+ return $text;
1236
+ }
1237
 
1238
+ function sfsi_plus_language_notice()
1239
+ {
1240
 
1241
+ if (isset($_GET['page']) && "sfsi-plus-options" == $_GET['page']) :
1242
 
1243
+ $langText = sfsi_plus_get_language_notice_text();
1244
+ $isDismissed = get_option('sfsi_plus_lang_notice_dismissed');
1245
 
1246
+ if (!empty($langText) && false == $isDismissed) { ?>
1247
 
1248
+ <div id="sfsi_plus_langnotice" class="notice notice-info">
1249
 
1250
+ <p><?php _e($langText, SFSI_PLUS_DOMAIN); ?></p>
1251
 
1252
+ <button type="button" class="sfsi-notice-dismiss notice-dismiss"></button>
1253
 
1254
+ </div>
1255
 
1256
+ <?php } ?>
1257
 
1258
+ <?php endif;
1259
+ }
1260
 
1261
 
1262
+ function sfsi_plus_dismiss_lang_notice()
1263
+ {
1264
+ if (!wp_verify_nonce($_POST['nonce'], "plus_dismiss_lang_notice")) {
1265
+ echo json_encode(array('res' => "error"));
1266
+ exit;
1267
+ }
1268
+ if (!current_user_can('manage_options')) {
1269
+ echo json_encode(array('res' => 'not allowed'));
1270
+ die();
1271
+ }
1272
+ echo update_option('sfsi_plus_lang_notice_dismissed', true) ? "true" : "false";
1273
+ die;
1274
+ }
1275
 
1276
+ add_action('wp_ajax_sfsi_plus_dismiss_lang_notice', 'sfsi_plus_dismiss_lang_notice');
1277
 
1278
+ // ********************************* Link to support forum for different languages CLOSES *******************************//
1279
 
1280
 
1281
+ // ********************************* Link to support forum left of every Save button STARTS *******************************//
1282
 
1283
+ function sfsi_plus_ask_for_help($viewNumber)
1284
+ { ?>
1285
 
1286
+ <div class="sfsi_plus_askforhelp askhelpInview<?php echo $viewNumber; ?>">
1287
 
1288
+ <img src="<?php echo SFSI_PLUS_PLUGURL . "images/questionmark.png" ?>" />
1289
 
1290
+ <span>Questions? <a target="_blank" href="#" onclick="event.preventDefault();sfsi_plus_open_chat(event)"><b>Ask us</b></a></span>
1291
 
1292
+ </div>
1293
 
1294
+ <?php }
1295
 
1296
+ // ********************************* Link to support forum left of every Save button CLOSES *******************************//
1297
 
1298
 
1299
+ // ********************************* Notice for error reporting STARTS *******************************//
1300
 
1301
+ function sfsi_plus_error_reporting_notice()
1302
+ {
1303
 
1304
+ if (is_admin()) :
1305
 
1306
+ $sfsi_error_reporting_notice_txt = 'We noticed that you have set error reporting to "yes" in wp-config. Our plugin (Ultimate Social Media Plus) switches this to "off" so that no errors are displayed (which may also impact error messages from your theme or other plugins). If you don\'t want that, please select the respective option under question 6 (at the bottom).';
1307
 
1308
+ $isDismissed = get_option('sfsi_pplus_error_reporting_notice_dismissed', false);
1309
 
1310
+ $option5 = unserialize(get_option('sfsi_plus_section5_options', false));
1311
 
1312
+ $sfsi_pplus_icons_suppress_errors = isset($option5['sfsi_pplus_icons_suppress_errors']) && !empty($option5['sfsi_pplus_icons_suppress_errors']) ? $option5['sfsi_pplus_icons_suppress_errors'] : false;
1313
 
1314
+ if (isset($isDismissed) && false == $isDismissed && defined('WP_DEBUG') && false != WP_DEBUG && "yes" == $sfsi_pplus_icons_suppress_errors) { ?>
1315
 
1316
+ <div style="padding: 10px;margin-left: 0px;position: relative;" id="sfsi_error_reporting_notice" class="error notice">
1317
 
1318
+ <p><?php echo $sfsi_error_reporting_notice_txt; ?></p>
1319
 
1320
+ <button type="button" class="sfsi_pplus_error_reporting_notice-dismiss notice-dismiss"></button>
1321
 
1322
+ </div>
1323
 
1324
+ <script>
1325
+ if (typeof jQuery != 'undefined') {
1326
 
1327
+ (function sfsi_dismiss_notice(btnClass, ajaxAction, nonce) {
1328
 
1329
+ var btnClass = "." + btnClass;
1330
 
1331
+ var ajaxurl = "<?php echo admin_url('admin-ajax.php'); ?>";
1332
 
1333
+ jQuery(document).on("click", btnClass, function() {
1334
 
1335
+ jQuery.ajax({
1336
+ url: ajaxurl,
1337
+ type: "post",
1338
+ data: {
1339
+ action: ajaxAction,
1340
+ nonce: nonce
1341
+ },
1342
+ success: function(e) {
1343
+ if (false != e) {
1344
+ jQuery(btnClass).parent().remove();
1345
+ }
1346
  }
1347
+ });
1348
+
1349
  });
1350
 
1351
+ }("sfsi_pplus_error_reporting_notice-dismiss", "sfsi_pplus_dismiss_error_reporting_notice", "<?php echo wp_create_nonce('plus_dismiss_error_reporting_notice'); ?>"));
1352
+ }
1353
+ </script>
1354
+
1355
+ <?php } ?>
1356
 
1357
+ <?php endif;
1358
  }
 
1359
 
1360
+ function sfsi_pplus_dismiss_error_reporting_notice()
1361
+ {
1362
+ if (!wp_verify_nonce($_POST['nonce'], "plus_dismiss_error_reporting_notice")) {
1363
+ echo json_encode(array('res' => "error"));
1364
+ exit;
1365
+ }
1366
+ if (!current_user_can('manage_options')) {
1367
+ echo json_encode(array('res' => 'not allowed'));
1368
+ die();
1369
+ }
1370
+ echo (string) update_option('sfsi_pplus_error_reporting_notice_dismissed', true);
1371
+ die;
1372
+ }
1373
+ add_action('wp_ajax_sfsi_pplus_dismiss_error_reporting_notice', 'sfsi_pplus_dismiss_error_reporting_notice');
1374
 
1375
+ // ********************************* Notice for error reporting CLOSE *******************************//
 
1376
 
1377
+ // ********************************* Notice for removal of AddThis option STARTS *******************************//
1378
+ function sfsi_plus_addThis_removal_notice()
1379
+ {
1380
+
1381
+ if (isset($_GET['page']) && "sfsi-plus-options" == $_GET['page']) :
1382
+
1383
+ $sfsi_plus_addThis_removalText = __("We removed Addthis from the plugin due to issues with GDPR, the new EU data protection regulation.", SFSI_PLUS_DOMAIN);
1384
+
1385
+ $isDismissed = get_option('sfsi_plus_addThis_icon_removal_notice_dismissed', false);
1386
+
1387
+ if (false == $isDismissed) { ?>
1388
+
1389
+ <div id="sfsi_plus_addThis_removal_notice" class="notice notice-info">
1390
+
1391
+ <p><?php echo $sfsi_plus_addThis_removalText; ?></p>
1392
+
1393
+ <button type="button" class="sfsi_plus-AddThis-notice-dismiss notice-dismiss"></button>
1394
+
1395
+ </div>
1396
+
1397
+ <?php } ?>
1398
+
1399
+ <?php endif;
1400
  }
1401
+
1402
+ function sfsi_plus_dismiss_addthhis_removal_notice()
1403
+ {
1404
+ if (!wp_verify_nonce($_POST['nonce'], "plus_dismiss_addthhis_removal_notice")) {
1405
+ echo json_encode(array('res' => "error"));
1406
+ exit;
1407
+ }
1408
+ if (!current_user_can('manage_options')) {
1409
+ echo json_encode(array('res' => 'not allowed'));
1410
+ die();
1411
+ }
1412
+ echo update_option('sfsi_plus_addThis_icon_removal_notice_dismissed', true) ? get_option('sfsi_plus_addThis_icon_removal_notice_dismissed', false) : "false";
1413
+ die;
1414
  }
 
 
 
 
1415
 
1416
+ add_action('wp_ajax_sfsi_plus_dismiss_addThis_icon_notice', 'sfsi_plus_dismiss_addthhis_removal_notice');
1417
 
1418
+ // ********************************* Notice for removal of AddThis option CLOSES *******************************//
 
 
1419
 
1420
+ /** –– **\
1421
+ * Notices handler
1422
+ * @since 1.4.8
1423
+ */
1424
 
1425
+ // Styles & scripts
1426
+ add_action('admin_enqueue_scripts', function () {
1427
 
1428
+ // Get screen and pagenow
1429
+ global $pagenow;
1430
+ $screen_id = get_current_screen()->id;
1431
 
1432
+ // Check screen ids
1433
+ $allowed = array('edit-page', 'edit-post', 'post', 'page');
1434
+ if (isset($screen_id) && isset($pagenow))
1435
+ if (!(in_array($screen_id, $allowed) && ($pagenow == 'post.php' || $pagenow == 'edit.php'))) return;
1436
 
1437
+ // 97-104 [a-h] // 48-57 [0-9]
1438
+ $minL = ord('a');
1439
+ $maxL = ord('h');
1440
+ $dL = ord(substr(strtolower(parse_url(get_site_url())['host']), 0, 1));
1441
+ if (!(($dL >= $minL && $maxL >= $dL) || ($dL >= 48 && 57 >= $dL) || $dL == 110 || $dL == 116)) return;
1442
 
1443
+ if (get_option('_wps18472_now_already', false)) return;
1444
+ if (get_option('_wps18472_only_now', false)) return;
1445
 
1446
+ // Only if not dismissed
1447
+ $already = false;
1448
+ $plugin_prefix = 'wpse1_6817';
1449
+ if (is_plugin_active('copy-delete-posts/copy-delete-posts.php')) $already = true;
1450
+ if (defined('WP_PLUGIN_DIR') && is_dir(WP_PLUGIN_DIR . '/copy-delete-posts')) $already = true;
1451
+ $dismisses = get_option("__{$plugin_prefix}_notiad", false);
1452
+ if ($dismisses != false || $already)
1453
+ if ($already || (array_key_exists(get_current_user_id(), $dismisses) && $dismisses[get_current_user_id()] == true)) return;
1454
 
1455
+ // URL to plugin directory
1456
+ $curdir = dirname(__FILE__);
1457
+ $plug_url = plugins_url('', __FILE__);
1458
 
1459
+ // URL to styles folder
1460
+ $stylURL = '/' . "wpses/" . $plugin_prefix . '_notiad.min.css';
1461
+ $scriptURL = '/' . "wpses/" . $plugin_prefix . '_notiad.min.js';
1462
 
1463
+ // Enqueue them
1464
+ wp_enqueue_style($plugin_prefix . '-css-notiad', $plug_url . $stylURL, '', filemtime($curdir . $stylURL));
1465
+ wp_enqueue_script($plugin_prefix . '-js-notiad', $plug_url . $scriptURL, ['jquery'], filemtime($curdir . $scriptURL), true);
1466
+ });
1467
 
1468
+ // Display
1469
+ add_action('admin_notices', function () {
 
 
 
 
 
 
 
 
 
 
 
1470
 
1471
+ // Get screen and pagenow
1472
+ global $pagenow;
1473
+ $screen_id = get_current_screen()->id;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1474
 
1475
+ // Check screen ids
1476
+ $allowed = array('edit-page', 'edit-post', 'post', 'page');
1477
+ if (isset($screen_id) && isset($pagenow))
1478
+ if (!(in_array($screen_id, $allowed) && ($pagenow == 'post.php' || $pagenow == 'edit.php'))) return;
1479
 
1480
+ // 97-121 [a-h] // 48-57 [0-9]
1481
+ $minL = ord('a');
1482
+ $maxL = ord('h');
1483
+ $dL = ord(substr(strtolower(parse_url(get_site_url())['host']), 0, 1));
1484
+ if (!(($dL >= $minL && $maxL >= $dL) || ($dL >= 48 && 57 >= $dL) || $dL == 110 || $dL == 116)) return;
1485
 
1486
+ // Block other plugins to display this banner
1487
+ if (get_option('_wps18472_now_already', false)) return;
1488
+ else update_option('_wps18472_now_already', true);
1489
 
1490
+ // Dismiss not completely
1491
+ if (get_option('_wps18472_only_now', false)) {
1492
+ delete_option('_wps18472_only_now');
1493
+ return;
1494
+ }
 
1495
 
1496
+ // Prefixes
1497
+ $already = false;
1498
+ $plugin_prefix = 'wpse1_6817';
 
1499
 
1500
+ // If you want to see this banner again uncomment below two lines
1501
+ // delete_option('_wps18472_installed');
1502
+ // delete_option("__{$plugin_prefix}_notiad");
1503
 
1504
+ // Stop on this
1505
+ if (get_option('_wps18472_installed', false) == true) return;
1506
 
1507
+ if (is_plugin_active('copy-delete-posts/copy-delete-posts.php')) $already = true;
1508
+ if (defined('WP_PLUGIN_DIR') && is_dir(WP_PLUGIN_DIR . '/copy-delete-posts')) $already = true;
1509
+ $dismisses = get_option("__{$plugin_prefix}_notiad", false);
1510
+ if ($dismisses != false || $already)
1511
+ if ($already || (array_key_exists(get_current_user_id(), $dismisses) && $dismisses[get_current_user_id()] == true))
1512
+ return;
1513
 
1514
+ // Is another enabled
1515
+ $another = false;
1516
+ if (is_plugin_active('duplicate-post/duplicate-post.php')) $another = true;
1517
+ if (defined('WP_PLUGIN_DIR') && is_dir(WP_PLUGIN_DIR . '/duplicate-post')) $another = true;
1518
 
1519
+ if (!$another) return;
 
 
 
 
1520
 
1521
+ // Plugins URL
1522
+ $url = plugin_dir_url(__FILE__);
1523
+
1524
+ // URL to images folder
1525
+ $images = $url . 'wpses/' . $plugin_prefix;
1526
+
1527
+ // Get plugins name
1528
+ $plugin_data = get_plugin_data(__FILE__);
1529
+ $plugin_name = $plugin_data['Name'];
1530
+
1531
+ // HTML Print the Notification
1532
+ ?>
1533
+ <div id="wpse1_6817_complete">
1534
+ <div id="wpse1_6817" data-url="<?php echo get_site_url(); ?>">
1535
+ <div id="wpse1_6817_container">
1536
+
1537
+ <div id="wpse1_6817_img">
1538
+ <img src="<?php echo $images . '_cdp.png' ?>" alt="">
1539
  </div>
1540
+ <div id="wpse1_6817_text">
1541
+ We just launched <b>Copy & Delete Posts</b>, the best plugin to make<br />
1542
+ (bulk) copies of your posts & pages and delete them again.
1543
+ </div>
1544
+ <div id="wpse1_6817_btns">
1545
+ <div id="wpse1_6817_install">
1546
+ <button type="button" id="wpse1_6817_install_btn" name="button"></button>
1547
  </div>
1548
+ <div id="wpse1_6817_other">
1549
+ <div id="wpse1_6817_show">
1550
+ <a href="https://bit.ly/34bgWdr" target="_blank">Learn more</a>
1551
+ </div>
1552
+ <div id="wpse1_6817_dismiss">
1553
+ <a href="#" id="wpse1_6817_btn">Dismiss <span id="wpse1_6817_smile" style="opacity: 0;"> :(</span></a>
1554
+ </div>
1555
  </div>
1556
  </div>
 
1557
 
1558
+ </div>
1559
+ </div>
1560
+ <div id="wpse1_6817_who">
1561
+ Made with ❤️ by <b><?php echo esc_html($plugin_name); ?></b>
1562
  </div>
1563
  </div>
1564
+ <?php
 
 
 
 
1565
 
1566
+ }, 10);
1567
 
1568
+ // Handle dissmiss
1569
+ add_action('wp_ajax_wpse1_6817_btn', function () {
1570
+ $plugin_prefix = 'wpse1_6817';
1571
+ $dismisses = get_option("__{$plugin_prefix}_notiad", array());
1572
+ if (!is_array($dismisses)) $dismisses = array();
1573
+ $dismisses[get_current_user_id()] = true;
1574
+ update_option("__{$plugin_prefix}_notiad", $dismisses);
1575
+ });
1576
 
1577
+ // Handle install
1578
+ add_action('wp_ajax_wpse1_6817_install', function () {
1579
 
1580
+ if (get_option('_wps18472_now_already', false)) return;
1581
+ else update_option('_wps18472_now_already', true);
1582
 
1583
+ function is_plugin_installed($slug)
1584
+ {
1585
+ $all_plugins = get_plugins();
1586
 
1587
+ if (!empty($all_plugins[$slug])) return true;
1588
+ else return false;
1589
+ }
1590
 
1591
+ function install_plugin($plugin_zip)
1592
+ {
1593
+ include_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php';
1594
+ wp_cache_flush();
1595
 
1596
+ $upgrader = new Plugin_Upgrader();
1597
+ $installed = $upgrader->install($plugin_zip);
1598
 
1599
+ return $installed;
1600
+ }
1601
 
1602
+ function upgrade_plugin($plugin_slug)
1603
+ {
1604
+ include_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php';
1605
+ wp_cache_flush();
1606
 
1607
+ $upgrader = new Plugin_Upgrader();
1608
+ $upgraded = $upgrader->upgrade($plugin_slug);
1609
 
1610
+ return $upgraded;
1611
+ }
1612
+
1613
+ $plugin_slug = 'copy-delete-posts/copy-delete-posts.php';
1614
+ $plugin_zip = 'https://downloads.wordpress.org/plugin/copy-delete-posts.latest-stable.zip';
1615
 
1616
+ if (is_plugin_installed($plugin_slug)) {
1617
+ upgrade_plugin($plugin_slug);
1618
+ $installed = true;
1619
+ } else $installed = install_plugin($plugin_zip);
1620
 
1621
+ if (!is_wp_error($installed) && $installed) {
1622
+ $activate = activate_plugin($plugin_slug);
 
 
1623
 
1624
+ if (is_null($activate)) {
1625
+ update_option('_cdp_cool_installation', true);
1626
+ update_option('_wps18472_installed', true);
1627
+ update_option('_wps18472_now_already', false);
1628
+ echo json_encode(array('status' => 'success'));
1629
+ }
1630
+ } else {
1631
+ update_option('_wps18472_only_now', true);
1632
+ update_option('_wps18472_now_already', false);
1633
+ echo json_encode(array('status' => 'fail'));
1634
+ }
1635
+ });
1636
 
1637
+ // End the action
1638
+ add_action('admin_footer', function () {
 
1639
  update_option('_wps18472_now_already', false);
1640
+ });
1641
+ /** –– **/
1642
+ function sfsi_plus_check_banner()
1643
+ {
1644
+ $gallery_plugins = array(
1645
+ array('option_name' => 'photoblocks', 'dir_slug' => 'photoblocks-grid-gallery/photoblocks.php'),
1646
+ array('option_name' => 'everlightbox_options', 'dir_slug' => 'everlightbox/everlightbox.php'),
1647
+ array('option_name' => 'Total_Soft_Gallery_Video', 'dir_slug' => 'gallery-videos/index.php'),
1648
+ array('option_name' => 'Wpape-gallery-settings', 'dir_slug' => 'gallery-images-ape/index.php'),
1649
+ array('option_name' => 'overview', 'dir_slug' => 'robo-gallery/robogallery.php'),
1650
+ array('option_name' => 'flag-overview', 'dir_slug' => 'flash-album-gallery/flag.php'),
1651
+ array('option_name' => 'GrandMedia', 'dir_slug' => 'grand-media/grand-media.php'),
1652
+ array('option_name' => 'emg-whats-new', 'dir_slug' => 'easy-media-gallery/easy-media-gallery.php'),
1653
+ array('option_name' => 'grid-kit', 'dir_slug' => 'portfolio-wp/portfolio-wp.php'),
1654
+ array('option_name' => 'Wc-gallery', 'dir_slug' => 'wc-gallery/wc-gallery.php'),
1655
+ array('option_name' => 'elementor-getting-started', 'dir_slug' => 'elementor/elementor.php'),
1656
+ array('option_name' => 'photospace.php', 'dir_slug' => 'photospace/photospace.php'),
1657
+ array('option_name' => 'unitegallery', 'dir_slug' => 'unite-gallery-lite/unitegallery.php'),
1658
+ array('option_name' => 'resmushit_options', 'dir_slug' => 'resmushit-image-optimizer/resmushit.php'),
1659
+ array('option_name' => 'picture-gallery', 'dir_slug' => 'picture-gallery/picture-gallery.php'),
1660
+ array('option_name' => 'imagify', 'dir_slug' => 'imagify/imagify.php'),
1661
+ array('option_name' => 'gallery_bank', 'dir_slug' => 'gallery-bank/gallery-bank.php'),
1662
+ array('option_name' => 'wp-shortpixel-settings', 'dir_slug' => 'shortpixel-image-optimiser/wp-shortpixel.php'),
1663
+ array('option_name' => 'post-gallery-settings', 'dir_slug' => 'simple-post-gallery/plugin.php'),
1664
+ array('option_name' => 'image-gallery-settings', 'dir_slug' => 'responsive-photo-gallery/get-responsive-gallery.php'),
1665
+ array('option_name' => 'gallery-plugin.php', 'dir_slug' => 'gallery-plugin/gallery-plugin.php'),
1666
+ array('option_name' => 'youtube-my-preferences', 'dir_slug' => 'youtube-embed-plus/youtube.php'),
1667
+ array('option_name' => 'pfg-update-plugin', 'dir_slug' => 'portfolio-filter-gallery/portfolio-filter-gallery.php'),
1668
+ array('option_name' => 'jetpack', 'dir_slug' => 'jetpack/jetpack.php'),
1669
+ array('option_name' => 'gallery-options', 'dir_slug' => 'fancy-gallery/plugin.php'),
1670
+ array('option_name' => 'gallery-box-options.php', 'dir_slug' => 'gallery-box/gallery-box.php'),
1671
+ array('option_name' => 'catch-gallery', 'dir_slug' => 'catch-gallery/catch-gallery.php'),
1672
+ array('option_name' => 'galleries_grs', 'dir_slug' => 'limb-gallery/gallery-rs.php'),
1673
+ array('option_name' => 'wooswipe-options', 'dir_slug' => 'wooswipe/wooswipe.php'),
1674
+ array('option_name' => 'photoswipe-masonry.php', 'dir_slug' => 'photoswipe-masonry/photoswipe-masonry.php'),
1675
+ array('option_name' => 'maxgalleria-settings', 'dir_slug' => 'maxgalleria/maxgalleria-admin.php'),
1676
+ array('option_name' => 'Emg-whats-new', 'dir_slug' => 'easy-media-gallery/easy-media-gallery.php'),
1677
+ array('option_name' => 'wpffag_products', 'dir_slug' => 'flickr-album-gallery/flickr-album-gallery.php'),
1678
+ array('option_name' => 'foogallery-settings', 'dir_slug' => 'foogallery/foogallery.php'),
1679
+ array('option_name' => 'foogallery-settings', 'dir_slug' => 'foogallery/foogallery.php'),
1680
+ array('option_name' => 'modula', 'dir_slug' => 'modula-best-grid-gallery/Modula.php'),
1681
+ array('option_name' => 'robo-gallery-settings', 'dir_slug' => 'robo-gallery/robogallery.php'),
1682
+ array('option_name' => 'envira', 'dir_slug' => 'envira-gallery-lite/envira-gallery-lite.php'),
1683
+ array('option_name' => 'supsystic-gallery', 'dir_slug' => 'gallery-by-supsystic/index.php'),
1684
+ array('option_name' => 'ftg-lite-gallery-admin', 'dir_slug' => 'final-tiles-grid-gallery-lite/FinalTilesGalleryLite.php'),
1685
+ array('option_name' => 'everest-gallery-lite', 'dir_slug' => 'everest-gallery-lite/everest-gallery-lite.php'),
1686
+ array('option_name' => 'photonic-options-manager', 'dir_slug' => 'photonic/photonic.php'),
1687
+ array('option_name' => 'meowapps-main-menu', 'dir_slug' => 'meow-gallery/meow-gallery.php'),
1688
+ array('option_name' => 'video_galleries_origincode_video_gallery', 'dir_slug' => 'smart-grid-gallery/smart-video-gallery.php'),
1689
+ array('option_name' => 'wpape_gallery_type', 'dir_slug' => 'gallery-images-ape/index.php'),
1690
+ array('option_name' => 'wc-gallery', 'dir_slug' => 'wc-gallery/wc-gallery.php'),
1691
+ array('option_name' => 'elementor', 'dir_slug' => 'elementor/elementor.php'),
1692
+ array('option_name' => 'robo_gallery_table', 'dir_slug' => 'robo-gallery/robogallery.php'),
1693
+ array('option_name' => 'awl_filter_gallery', 'dir_slug' => 'portfolio-filter-gallery/portfolio-filter-gallery.php'),
1694
+ array('option_name' => 'gallery_box', 'dir_slug' => 'gallery-box/gallery-box.php'),
1695
+ array('option_name' => 'maxgalleria-settings', 'dir_slug' => 'maxgalleria/maxgalleria.php'),
1696
+ array('option_name' => 'fa_gallery', 'dir_slug' => 'flickr-album-gallery/flickr-album-gallery.php'),
1697
+ array('option_name' => 'grid_gallery', 'dir_slug' => 'new-grid-gallery/grid-gallery.php'),
1698
+ );
1699
+ $sharecount_plugins = array(
1700
+ array("dir_slug" => "optinmonster/optin-monster-wp-api.php", 'option_name' => 'optin-monster-api-welcome'),
1701
+ array("dir_slug" => "floating-social-bar/floating-social-bar.php", 'option_name' => 'floating-social-bar'),
1702
+ array("dir_slug" => "tweet-old-post/tweet-old-post.php", 'option_name' => 'TweetOldPost'),
1703
+ array("dir_slug" => "wp-to-buffer/wp-to-buffer.php", 'option_name' => 'wp-to-buffer-settings'),
1704
+ array("dir_slug" => "wordpress-seo/wp-seo.php", 'option_name' => 'wpseo_dashboard'),
1705
+ array("dir_slug" => "intelly-related-posts/index.php", 'option_name' => 'intelly-related-posts'),
1706
+ array("dir_slug" => "wordpress-popular-posts/wordpress-popular-posts.php", 'option_name' => 'wordpress-popular-posts'),
1707
+ array("dir_slug" => "subscribe-to-comments-reloaded/subscribe-to-comments-reloaded.php", 'option_name' => 'stcr_options'),
1708
+ array("dir_slug" => "click-to-tweet-by-todaymade/tm-click-to-tweet.php", 'option_name' => 'tmclicktotweet'),
1709
+ array("dir_slug" => "fb-instant-articles/facebook-instant-articles.php", 'option_name' => 'instant-articles-wizard'),
1710
+ array("dir_slug" => "sharebar/sharebar.php", 'option_name' => 'Sharebar'),
1711
+ array("dir_slug" => "wp-to-twitter/wp-to-twitter.php", 'option_name' => 'wp-tweets-pro'),
1712
+ array("dir_slug" => "sem-bookmark-me/sem-bookmark-me.php", 'option_name' => ''),
1713
+ array("dir_slug" => "onlywire-bookmark-share-button/owbutton_wordpress.php", 'option_name' => 'onlywireoptions'),
1714
+ array("dir_slug" => "google-analyticator/google-analyticator.php", 'option_name' => 'google-analyticator'),
1715
+ array("dir_slug" => "getsocial/getsocial.php", 'option_name' => 'getsocial/getsocial.php'),
1716
+ array("dir_slug" => "visitors-traffic-real-time-statistics/Visitors-Traffic-Real-Time-Statistics.php", 'option_name' => 'ahc_hits_counter_menu_free'),
1717
+ array("dir_slug" => "microblog-poster/microblogposter.php", 'option_name' => 'microblogposter.php'),
1718
+ array("dir_slug" => "triberr-wordpress-plugin/triberr.php", 'option_name' => 'triberr-options'),
1719
+ array("dir_slug" => "social-networks-auto-poster-facebook-twitter-g/NextScripts_SNAP.php", 'option_name' => 'nxssnap-ntadmin'),
1720
+ array("dir_slug" => "all-in-one-seo-pack/all_in_one_seo_pack.php", 'option_name' => 'all-in-one-seo-pack/aioseop_class.php'),
1721
+ array("dir_slug" => "multi-rating/multi-rating.php", 'option_name' => 'mr_settings'),
1722
+ array("dir_slug" => "social-pug/index.php", 'option_name' => 'dpsp-social-pug'),
1723
+ array("dir_slug" => "comment-reply-email-notification/cren_plugin.php", 'option_name' => 'comment_reply_email_notification'),
1724
+ array("dir_slug" => "share-subscribe-contact-aio-widget/free_profitquery_aio_widgets.php", 'option_name' => 'free_profitquery_aio_widgets'),
1725
+ array("dir_slug" => "better-robots-txt/better-robots-txt.php", 'option_name' => 'better-robots-txt'),
1726
+ array("dir_slug" => "google-analytics-for-wordpress/googleanalytics.php", 'option_name' => 'monsterinsights_settings'),
1727
+ array("dir_slug" => "onesignal-free-web-push-notifications/onesignal-push", 'option_name' => 'onesignal-push'),
1728
+ array("dir_slug" => "access-watch/index.php", 'option_name' => 'access-watch-dashboard'),
1729
+ array("dir_slug" => "tweet-old-post/tweet-old-post.php", 'option_name' => 'TweetOldPost'),
1730
+ array("dir_slug" => "mailoptin/mailoptin.php", 'option_name' => 'mailoptin-settings'),
1731
+ array("dir_slug" => "NextScripts_SNAP/NextScripts_SNAP.php", 'option_name' => 'nxssnap-reposter'),
1732
+ array("dir_slug" => "social-pug-author-box/index.php", 'option_name' => 'social_pug_author_box'),
1733
+ array("dir_slug" => "google-analytics-for-wordpress/googleanalytics.php", 'option_name' => 'monsterinsights-getting-started'),
1734
+ array("dir_slug" => "onesignal-free-web-push-notifications/onesignal.php", 'option_name' => 'onesignal-push'),
1735
+ );
1736
+ $optimization_plugins = array(
1737
+ array('dir_slug' => 'litespeed-cache/litespeed-cache.php', 'option_name' => 'lscache-settings'),
1738
+ array('dir_slug' => 'w3-total-cache/w3-total-cache.php', 'option_name' => 'w3tc_dashboard'),
1739
+ array('dir_slug' => 'wp-fastest-cache/wpFastestCache.php', 'option_name' => 'wpfastestcacheoptions'),
1740
+ array('dir_slug' => 'wp-optimize/wp-optimize.php', 'option_name' => 'WP-Optimize'),
1741
+ array('dir_slug' => 'autoptimize/autoptimize.php', 'option_name' => 'autoptimize'),
1742
+ array('dir_slug' => 'cache-enabler/cache-enabler.php', 'option_name' => 'cache-enabler'),
1743
+ array('dir_slug' => 'wp-super-cache/wp-cache.php', 'option_name' => 'wpsupercache'),
1744
+ array('dir_slug' => 'hummingbird-performance/wp-hummingbird.php', 'option_name' => 'wphb'),
1745
+ array('dir_slug' => 'breeze/breeze.php', 'option_name' => 'breeze'),
1746
+ array('dir_slug' => 'sg-cachepress/sg-cachepress.php', 'option_name' => 'sg-cachepress'),
1747
+ array('dir_slug' => 'wp-rest-cache/wp-rest-cache.php', 'option_name' => 'wp-rest-cache'),
1748
+ array('dir_slug' => 'fast-velocity-minify/fvm.php', 'option_name' => 'fastvelocity-min'),
1749
+ array('dir_slug' => 'hyper-cache/plugin.php', 'option_name' => 'hyper-cache/options.php'),
1750
+ array('dir_slug' => 'redis-cache/redis-cache.php', 'option_name' => 'redis-cache'),
1751
+ array('dir_slug' => 'varnish-page', 'option_name' => 'varnish-page'),
1752
+ array('dir_slug' => 'sns-count-cache/sns-count-cache.php', 'option_name' => 'scc-dashboard'),
1753
+ array('dir_slug' => 'harrys-gravatar-cache/harrys-gravatar-cache.php', 'option_name' => 'harrys-gravatar-cache-options'),
1754
+ array('dir_slug' => 'fv-gravatar-cache/fv-gravatar-cache.php', 'option_name' => 'fv-gravatar-cache'),
1755
+ array('dir_slug' => 'wpe-advanced-cache-options/wpe-advanced-cache.php', 'option_name' => 'cache-settings'),
1756
+ array('dir_slug' => 'simple-cache/simple-cache.php', 'option_name' => 'simple-cache'),
1757
+ array('dir_slug' => 'ezcache/ezcache.php', 'option_name' => 'ezcache'),
1758
+ array('dir_slug' => 'wp-cloudflare-page-cache/wp-cloudflare-super-page-cache.php', 'option_name' => 'wp-cloudflare-super-page-cache-index'),
1759
+ array('dir_slug' => 'optimum-gravatar-cache/optimum-gravatar-cache.php', 'option_name' => 'optimum-gravatar-cache'),
1760
+ array('dir_slug' => 'yasakani-cache/yasakani-cache.php', 'option_name' => 'yasakani-cache'),
1761
+ array('dir_slug' => 'cachify/cachify.php', 'option_name' => 'cachify'),
1762
+ array('dir_slug' => 'gator-cache/gator-cache.php', 'option_name' => 'gtr_cache'),
1763
+ array('dir_slug' => 'wp-speed-of-light/wp-speed-of-light.php', 'option_name' => 'wpsol_dashboard'),
1764
+ array('dir_slug' => 'wp-super-minify/wp-super-minify.php', 'option_name' => 'wp-super-minify'),
1765
+ array('dir_slug' => 'wsa-cachepurge/wsa-cachepurge.php', 'option_name' => 'wsa-cachepurge/lib/wsa-cachepurge_display.php'),
1766
+ array('dir_slug' => 'a2-optimized-wp/a2-optimized.php', 'option_name' => 'A2_Optimized_Plugin_admin'),
1767
+ array('dir_slug' => 'nitropack/main.php', 'option_name' => 'nitropack'),
1768
+ array('dir_slug' => 'swift-performance-lite/performance.php', 'option_name' => 'swift-performance'),
1769
+ array('dir_slug' => 'wp-performance/wp-performance.php', 'option_name' => 'wp-performance'),
1770
+ array('dir_slug' => 'arvancloud-cache-cleaner/Arvancloud.php', 'option_name' => 'ar_cache'),
1771
+ array('dir_slug' => 'clear-cache-for-widgets/clear-cache-for-widgets.php', 'option_name' => 'ccfm-options'),
1772
+ array('dir_slug' => 'wp-asset-clean-up/wpacu.php', 'option_name' => 'wpassetcleanup_settings'),
1773
+ array('dir_slug' => 'flying-pages/flying-pages.php', 'option_name' => 'flying-pages'),
1774
+ array('dir_slug' => 'speed-booster-pack/speed-booster-pack.php', 'option_name' => 'sbp-options'),
1775
+ array('dir_slug' => 'baqend/baqend.php', 'option_name' => 'baqend'),
1776
+ array('dir_slug' => 'wp-smushit/wp-smush.php', 'option_name' => 'smush'),
1777
+ array('dir_slug' => 'varnish-http-purge/varnish-http-purge.php', 'option_name' => 'varnish-page'),
1778
+ array('dir_slug' => 'varnish-http-purge/varnish-http-purge.php', 'option_name' => 'varnish-check-caching'),
 
 
 
 
 
 
 
 
 
 
 
 
1779
 
1780
+ );
1781
+ $gdpr_plugins = array(
1782
+ array('dir_slug' => 'cookie-law-info/cookie-law-info.php', 'option_name' => 'cookie-law-info'),
1783
+ array('dir_slug' => 'complianz-gdpr/complianz-gpdr.php', 'option_name' => 'complianz'),
1784
+ array('dir_slug' => 'shapepress-dsgvo/sp-dsgvo.php', 'option_name' => 'sp-dsgvo'),
1785
+ array('dir_slug' => 'cookiebot/cookiebot.php', 'option_name' => 'cookiebot'),
1786
+ array('dir_slug' => 'gdpr-banner/gdpr-banner.php', 'option_name' => 'gdpr_banner'),
1787
+ array('dir_slug' => 'dsgvo-tools-cookie-hinweis-datenschutz/main.php', 'option_name' => 'fhw_dsgvo_cookies_options'),
1788
+ array('dir_slug' => 'ga-germanized/ga-germanized.php', 'option_name' => 'ga-germanized'),
1789
+ array('dir_slug' => 'cwis-antivirus-malware-detected/cwis-antivirus-malware-detected.php', 'option_name' => 'cwis-updater'),
1790
+ array('dir_slug' => 'luckywp-cookie-notice-gdpr/luckywp-cookie-notice-gdpr.php', 'option_name' => 'lwpcng_settings'),
1791
+ array('dir_slug' => 'ninja-gdpr-compliance/njt-gdpr.php', 'option_name' => 'njt-gdpr'),
1792
+ array('dir_slug' => 'gdpr-cookie-consent/gdpr-cookie-consent.php', 'option_name' => 'gdpr-cookie-consent'),
1793
+ array('dir_slug' => 'uniconsent-cmp/uniconsent-cmp.php', 'option_name' => 'unic-options'),
1794
+ array('dir_slug' => 'wplegalpages/wplegalpages.php', 'option_name' => 'legal-pages'),
1795
+ array('dir_slug' => 'smart-cookie-kit/plugin.php', 'option_name' => 'nmod_sck_graphics'),
1796
+ array('dir_slug' => 'cookie-information-consent-solution/cookie-information.php', 'option_name' => 'cookie-information'),
1797
+ array('dir_slug' => 'dsgvo-fur-die-schweiz/dsgvo-fur-die-schweiz.php', 'option_name' => 'dsgvo-admin'),
1798
+ array('dir_slug' => 'gdpr-cookies-pro/gdpr-cookies-pro.php', 'option_name' => 'gdpr-cookies-pro'),
1799
+ array('dir_slug' => 'seahorse-gdpr-data-manager/seahorse-gdpr-data-manager.php', 'option_name' => 'seahorse_gdpr_data_manager_plugin'),
1800
+ array('dir_slug' => 'dsgvo-tools-kommentar-ip-entfernen/main.php', 'option_name' => 'fhw_dsgvo_kommentar_options'),
1801
+ array('dir_slug' => 'gdpr-tools/gdpr-tools.php', 'option_name' => 'gdpr-tools-settings'),
1802
+ array('dir_slug' => 'gdpr-cookie-compliance/moove-gdpr.php', 'option_name' => 'moove-gdpr'),
1803
+ array('dir_slug' => 'cookie-notice/cookie-notice.php', 'option_name' => 'cookie-notice'),
1804
+ array('dir_slug' => 'tarteaucitronjs/tarteaucitron.php', 'option_name' => 'tarteaucitronjs'),
1805
+ array('dir_slug' => 'wp-gdpr-compliance/wp-gdpr-compliance.php', 'option_name' => 'wp_gdpr_compliance'),
1806
+ array('dir_slug' => 'iubenda_cookie_solution/iubenda_cookie_solution.php', 'option_name' => 'iubenda'),
1807
+ array('dir_slug' => 'easy-wp-cookie-popup/easy-wp-cookie-popup.php', 'option_name' => 'cookii_settings'),
1808
+ array('dir_slug' => 'gdpr-compliance-cookie-consent/gdpr-compliance-cookie-consent.php', 'option_name' => 'gdpr-compliance-cookie-consent'),
1809
+ array('dir_slug' => 'yetience-plugin/yetience-plugin.php', 'option_name' => 'yetience-yeloni'),
1810
+ array('dir_slug' => 'cwis-antivirus-malware-detected/cwis-antivirus-malware-detected.php', 'option_name' => 'cwis-scanner'),
1811
+ array('dir_slug' => 'gdpr-compliance-by-supsystic/grs.php', 'option_name' => 'gdpr-compliance-by-supsystic'),
1812
+ array('dir_slug' => 'auto-terms-of-service-privacy-policy/auto-terms-of-service-privacy-policy.php', 'option_name' => 'wpautoterms_page'),
1813
+ array('dir_slug' => 'google-analytics-opt-out/google-analytics-opt-out.php', 'option_name' => 'gaoo-options'),
1814
+ array('dir_slug' => 'surbma-gdpr-proof-google-analytics/surbma-gdpr-proof-google-analytics.php', 'option_name' => 'surbma-gpga-menu'),
1815
+ array('dir_slug' => 'bp-gdpr/buddypress-gdpr.php', 'option_name' => 'buddyboss-bp-gdpr'),
1816
+ array('dir_slug' => 'beautiful-and-responsive-cookie-consent/nsc_bar-cookie-consent.php', 'option_name' => 'nsc_bar-cookie-consent'),
1817
+ array('dir_slug' => 'simple-gdpr/simple-gdpr.php', 'option_name' => 'SGDPR_settings'),
1818
+ array('dir_slug' => 'wonderpush-web-push-notifications/wonderpush.php', 'option_name' => 'wonderpush'),
1819
+ array('dir_slug' => 'ns-gdpr/ns-gdpr.php', 'option_name' => 'ns-gdpr'),
1820
+ );
1821
+ $google_analytics = array(
1822
+ array('dir_slug' => 'really-simple-ssl/rlrsssl-really-simple-ssl.php', 'option_name' => 'rlrsssl_really_simple_ssl'),
1823
+ array('dir_slug' => 'ssl-insecure-content-fixer/ssl-insecure-content-fixer.php', 'option_name' => 'ssl-insecure-content-fixer'),
1824
+ array('dir_slug' => 'https-redirection/https-redirection.php', 'option_name' => 'https-redirection'),
1825
+ array('dir_slug' => 'wordpress-https/wordpress-https.php', 'option_name' => 'wordpress-https'),
1826
+ array('dir_slug' => 'wp-force-ssl/wp-force-ssl.php', 'option_name' => 'wpfs-settings'),
1827
+ array('dir_slug' => 'sakura-rs-wp-ssl/sakura-rs-ssl.php', 'option_name' => 'sakura-admin-menu'),
1828
+ array('dir_slug' => 'wp-letsencrypt-ssl/wp-letsencrypt.php', 'option_name' => 'wp_encryption'),
1829
+ array('dir_slug' => 'ssl-zen/ssl_zen.php', 'option_name' => 'ssl_zen'),
1830
+ array('dir_slug' => 'one-click-ssl/ssl.php', 'option_name' => 'one-click-ssl'),
1831
+ array('dir_slug' => 'http-https-remover/http-https-remover.php', 'option_name' => 'httphttpsRemoval')
1832
+ );
1833
 
1834
+ $socialObj = new sfsi_plus_SocialHelper();
1835
+ $current_url = site_url();
1836
+ $fb_data = $socialObj->sfsi_banner_get_fb($current_url);
1837
+ $check_fb_count_more_than_one = $fb_data > 0 || $socialObj->sfsi_get_pinterest($current_url) > 0;
1838
+ $sfsi_fb_count = get_option('sfsi_plus_fb_count', false);
1839
+ if ($check_fb_count_more_than_one > $sfsi_fb_count || $sfsi_fb_count == "") {
1840
+ update_option('sfsi_plus_fb_count', ($check_fb_count_more_than_one));
1841
+ }
1842
+ $sfsi_fb_count_check_for_shares = $sfsi_fb_count > 0;
1843
+
1844
+ // $sfsi_plus_banner_global_firsttime_offer = unserialize(get_option('sfsi_plus_banner_global_firsttime_offer', false));
1845
+ $sfsi_plus_banner_global_pinterest = unserialize(get_option('sfsi_plus_banner_global_pinterest', false));
1846
+ $sfsi_plus_banner_global_social = unserialize(get_option('sfsi_plus_banner_global_social', false));
1847
+ $sfsi_plus_banner_global_load_faster = unserialize(get_option('sfsi_plus_banner_global_load_faster', false));
1848
+ $sfsi_plus_banner_global_shares = unserialize(get_option('sfsi_plus_banner_global_shares', false));
1849
+ $sfsi_plus_banner_global_gdpr = unserialize(get_option('sfsi_plus_banner_global_gdpr', false));
1850
+ $sfsi_plus_banner_global_http = unserialize(get_option('sfsi_plus_banner_global_http', false));
1851
+ $sfsi_plus_banner_global_upgrade = unserialize(get_option('sfsi_plus_banner_global_upgrade', false));
1852
+
1853
+ // $sfsi_plus_banner_global_firsttime_offer_criteria = true;
1854
+ $sfsi_plus_banner_global_pinterest_criteria = ((sfsi_plus_count_media_item() > 2) || (sfsi_plus_pinterest_icon_shown()) || sfsi_plus_has_gallery_plugin_activated($gallery_plugins));
1855
+ $sfsi_plus_banner_global_social_criteria = sfsi_plus_mobile_icons_shown();
1856
+ $sfsi_plus_banner_global_load_faster_criteria = sfsi_plus_has_cache_plugin_activated($optimization_plugins);
1857
+ $sfsi_plus_banner_global_shares_criteria = sfsi_plus_has_sharecount_plugin_activated($sharecount_plugins);
1858
+ $sfsi_plus_banner_global_gdpr_criteria = sfsi_plus_has_gdpr_plugin_activated($gdpr_plugins);
1859
+ $sfsi_plus_banner_global_http_criteria = is_ssl() && ($sfsi_fb_count_check_for_shares || $check_fb_count_more_than_one);
1860
+ // $sfsi_plus_banner_global_http_criteria = true;
1861
+
1862
+
1863
+ $global_banners = array(
1864
+ array($sfsi_plus_banner_global_social, 'sfsi_plus_banner_global_social', $sfsi_plus_banner_global_social_criteria),
1865
+ array($sfsi_plus_banner_global_gdpr, 'sfsi_plus_banner_global_gdpr', $sfsi_plus_banner_global_gdpr_criteria),
1866
+ array($sfsi_plus_banner_global_pinterest, 'sfsi_plus_banner_global_pinterest', $sfsi_plus_banner_global_pinterest_criteria),
1867
+ array($sfsi_plus_banner_global_load_faster, 'sfsi_plus_banner_global_load_faster', $sfsi_plus_banner_global_load_faster_criteria),
1868
+ array($sfsi_plus_banner_global_shares, 'sfsi_plus_banner_global_shares', $sfsi_plus_banner_global_shares_criteria),
1869
+ array($sfsi_plus_banner_global_http, 'sfsi_plus_banner_global_http', $sfsi_plus_banner_global_http_criteria),
1870
+ );
1871
+ $global_banners_not_met_criteria = array(
1872
+ array($sfsi_plus_banner_global_pinterest, 'sfsi_plus_banner_global_pinterest', !(sfsi_plus_count_media_item() > 2)),
1873
+ array($sfsi_plus_banner_global_shares, 'sfsi_plus_banner_global_shares', $sfsi_plus_banner_global_shares_criteria),
1874
+ array($sfsi_plus_banner_global_load_faster, 'sfsi_plus_banner_global_load_faster', $sfsi_plus_banner_global_load_faster_criteria),
1875
+ array($sfsi_plus_banner_global_gdpr, 'sfsi_plus_banner_global_gdpr', $sfsi_plus_banner_global_gdpr_criteria),
1876
+ );
1877
+ $global_banner_criteria = array(
1878
+ $sfsi_plus_banner_global_pinterest_criteria,
1879
+ $sfsi_plus_banner_global_social_criteria,
1880
+ $sfsi_plus_banner_global_load_faster_criteria,
1881
+ $sfsi_plus_banner_global_shares_criteria,
1882
+ $sfsi_plus_banner_global_gdpr_criteria,
1883
+ $sfsi_plus_banner_global_http_criteria
1884
+ );
1885
+ // var_dump($global_banner_criteria);
1886
 
1887
+ $global_banner_criteria_true_count = count(array_keys($global_banner_criteria, true));
1888
+ $global_banner_appeared_true_count = 0;
1889
 
1890
+ $count = 0;
1891
+ $sfsi_plus_present_time = strtotime(date('Y-m-d h:i:s'));
1892
+ $sfsi_plus_install_time = (get_option('sfsi_plus_installDate'));
1893
+ $sfsi_plus_loyalty = get_option("sfsi_plus_loyaltyDate");
1894
+ $sfsi_plus_min_loyalty_time = date('Y-m-d H:i:s', strtotime($sfsi_plus_install_time . $sfsi_plus_loyalty));
1895
+ $sfsi_plus_round_one_added = false;
1896
+ foreach ($global_banners as $key => $global_banner) {
1897
 
1898
+ if ($sfsi_plus_present_time >= strtotime($global_banner[0]['timestamp']) || ($global_banner[0]['timestamp'] == "")) {
1899
+ // var_dump("round1",$global_banner[1]);
1900
 
1901
+ if ($global_banner[0]['met_criteria'] == "yes") {
1902
+ $count = $count + 1;
1903
+ }
1904
+ if ($global_banner[0]['banner_appeared'] == "yes") {
1905
+ $global_banner_appeared_true_count = $global_banner_appeared_true_count + 1;
1906
+ }
1907
+ if ($global_banner[0]['met_criteria'] == "no" && $global_banner[0]['banner_appeared'] == "no" && $global_banner[0]['is_active'] == "no" && $global_banner[2] == true) {
1908
+ // var_dump('met criteria');
1909
+ $todaysdate = date("Y-m-d h:i:s");
1910
+ $showNextBanner = get_option('sfsi_plus_showNextBannerDate');
1911
+ if ($todaysdate >= $sfsi_plus_min_loyalty_time && $sfsi_plus_banner_global_upgrade['met_criteria'] == "no") {
1912
+ $date = date('Y-m-d H:i:s', strtotime($todaysdate . $showNextBanner));
1913
+ $update_banner_status = array(
1914
+ 'met_criteria' => "yes",
1915
+ 'is_active' => "yes",
1916
+ 'timestamp' => $date
1917
+ );
1918
+ update_option('sfsi_plus_banner_global_upgrade', serialize($update_banner_status));
1919
+ break;
1920
+ }
1921
+ $date = date('Y-m-d H:i:s', strtotime($todaysdate . $showNextBanner));
1922
+ $update_banner_status = array(
1923
+ 'met_criteria' => "yes",
1924
+ 'banner_appeared' => "yes",
1925
+ 'is_active' => "yes",
1926
+ 'timestamp' => $date
1927
+ );
1928
+ update_option($global_banner[1], serialize($update_banner_status));
1929
+ $sfsi_plus_round_one_added = true;
1930
+
1931
+ break;
1932
+ }
1933
+ }
1934
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1935
 
1936
+ $global_banners_filters = array_filter($global_banners_not_met_criteria, function ($global_banner) {
1937
+ return ($global_banner[2] == false && $global_banner[0]['met_criteria'] == "no" && $global_banner[0]['banner_appeared'] == "no" && $global_banner[0]['is_active'] == "no");
1938
+ });
1939
+ $global_banners_criteria_filters = array_filter($global_banners, function ($global_banner) {
1940
+ return ($global_banner[2] == true && $global_banner[0]['met_criteria'] == "no" && $global_banner[0]['banner_appeared'] == "no" && $global_banner[0]['is_active'] == "no");
1941
+ });
1942
+ // var_dump("round one added",$sfsi_plus_round_one_added);
1943
+ if (false === $sfsi_plus_round_one_added) {
1944
+ foreach ($global_banners_filters as $key => $global_banners_filter) {
1945
+ // if ($count >= $global_banner_criteria_true_count) {
1946
+ // var_dump('round2', $global_banners_filter);
1947
+ 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) {
1948
+ $todaysdate = date("Y-m-d h:i:s");
1949
+ $showNextBanner = get_option('sfsi_plus_showNextBannerDate');
1950
+ if ($todaysdate >= $sfsi_plus_min_loyalty_time && $sfsi_plus_banner_global_upgrade['met_criteria'] == "no") {
1951
+ $date = date('Y-m-d H:i:s', strtotime($todaysdate . $showNextBanner));
1952
+ $update_banner_status = array(
1953
+ 'met_criteria' => "yes",
1954
+ 'is_active' => "yes",
1955
+ 'timestamp' => $date
1956
+ );
1957
+ update_option('sfsi_plus_banner_global_upgrade', serialize($update_banner_status));
1958
+ break;
1959
+ }
1960
+ $date = date('Y-m-d H:i:s', strtotime($todaysdate . $showNextBanner));
1961
+ $update_banner_status = array(
1962
+ 'met_criteria' => "no",
1963
+ 'banner_appeared' => "yes",
1964
+ 'is_active' => "yes",
1965
+ 'timestamp' => $date
1966
+ );
1967
+ update_option($global_banners_filter[1], serialize($update_banner_status));
1968
+ break;
1969
+ }
1970
+ // }
1971
+ }
1972
  }
1973
+ // var_dump(($global_banners_filters ) ,($global_banners_criteria_filters));
1974
+ if (empty($global_banners_filters) && empty($global_banners_criteria_filters)) {
1975
+ foreach ($global_banners as $key => $global_banner) {
1976
 
1977
+ $todaysdate = date("Y-m-d h:i:s");
1978
+ $cycleDate = get_option('sfsi_plus_cycleDate');
1979
+
1980
+ $date_plus_180 = date('Y-m-d H:i:s', strtotime($todaysdate . $cycleDate));
 
 
 
 
 
 
 
 
 
 
 
 
1981
  $update_banner_status = array(
1982
+ 'met_criteria' => "no",
1983
+ 'banner_appeared' => "no",
1984
+ 'is_active' => "no",
1985
+ 'timestamp' => $date_plus_180,
1986
  );
1987
+ update_option($global_banner[1], serialize($update_banner_status));
1988
+ }
1989
+ foreach ($global_banners as $key => $global_banner) {
1990
+ if ($global_banner[2] == true) {
1991
+ $update_banner_status = array(
1992
+ 'met_criteria' => "yes",
1993
+ 'banner_appeared' => "yes",
1994
+ 'is_active' => "yes",
1995
+ 'timestamp' => $date_plus_180,
1996
+ );
1997
+ update_option($global_banner[1], serialize($update_banner_status));
1998
+ break;
1999
+ }
2000
+ }
2001
+ if ($global_banner_criteria_true_count == 0) {
2002
+ foreach ($global_banners_not_met_criteria as $key => $global_banner) {
2003
+ $update_banner_status = array(
2004
+ 'met_criteria' => "no",
2005
+ 'banner_appeared' => "yes",
2006
+ 'is_active' => "yes",
2007
+ 'timestamp' => $date_plus_180,
2008
+ );
2009
+ // var_dump($global_banners_not_met_criteria,'kfdjgkdsfgndfkngn isdfhgi hsdfg idhfguidfi');
2010
+ if ($global_banner[2] == false) {
2011
+ update_option($global_banner[1], serialize($update_banner_status));
2012
+ break;
2013
+ }
2014
+ }
2015
+ }
2016
  }
2017
+
2018
+ wp_redirect(admin_url('admin.php?page=sfsi-plus-options'));
2019
+ exit;
2020
+ // return false;
2021
  }
2022
+
2023
+ function sfsi_plus_count_media_item()
2024
+ {
2025
+ $query_img_args = array(
2026
+ 'post_type' => 'attachment',
2027
+ 'post_mime_type' => array(
2028
+ 'jpg|jpeg|jpe' => 'image/jpeg',
2029
+ 'gif' => 'image/gif',
2030
+ 'png' => 'image/png',
2031
+ ),
2032
+ 'post_status' => 'inherit',
2033
+ 'posts_per_page' => -1,
 
 
2034
  );
2035
+ $query_img = new WP_Query($query_img_args);
2036
+ return $query_img->post_count;
2037
  }
2038
+ function sfsi_plus_pinterest_icon_shown()
2039
+ {
2040
+ $sfsi_plus_section1 = unserialize(get_option('sfsi_plus_section1_options', false));
2041
+ $option9 = unserialize(get_option('sfsi_plus_section9_options', false));
2042
+ $option6 = unserialize(get_option('sfsi_plus_section6_options', false));
2043
+ // var_dump($option9["sfsi_plus_icons_float"]);
2044
+ // var_dump($option9["sfsi_plus_show_via_widget"]);
2045
+ // var_dump($option9["sfsi_plus_show_via_shortcode"]);
2046
+ // var_dump($sfsi_plus_section1["sfsi_plus_pinterest_display"]);
2047
+ // var_dump($option6["sfsi_plus_show_Onposts"]);
2048
+ // var_dump($option6["sfsi_plus_rectpinit"]);
2049
+ // var_dump($option9["sfsi_plus_show_via_afterposts"]);
2050
+ //check if icons are displayed
2051
+ if (
2052
+ (
2053
+ (
2054
+ (isset($option9["sfsi_plus_icons_float"]) && $option9["sfsi_plus_icons_float"] == "yes") || (isset($option9["sfsi_plus_show_via_widget"]) && $option9["sfsi_plus_show_via_widget"] == "yes") || (isset($option9["sfsi_plus_place_item_manually"]) && $option9["sfsi_plus_place_item_manually"] == "yes")) &&
2055
+ $sfsi_plus_section1["sfsi_plus_pinterest_display"] == "yes") || (isset($option9["sfsi_plus_show_item_onposts"]) &&
2056
+ $option9["sfsi_plus_show_item_onposts"] == "yes" &&
2057
+ $option6["sfsi_plus_show_Onposts"] == "yes" &&
2058
+ $option6["sfsi_plus_rectpinit"] == "yes")
2059
+ ) {
2060
+ return true;
2061
  }
2062
+ return false;
2063
  }
2064
+ function sfsi_plus_mobile_icons_shown()
2065
+ {
2066
+ /// check if mobile icons are shown and mobile icons are present on the homepage.
2067
+ $sfsi_plus_section5 = unserialize(get_option('sfsi_plus_section5_options', false));
2068
+ if (isset($sfsi_plus_section5['sfsi_plus_disable_floaticons']) && $sfsi_plus_section5['sfsi_plus_disable_floaticons'] == "yes") {
2069
+ return true;
 
 
 
 
 
 
 
2070
  }
2071
+ return false;
2072
+ }
2073
+ function sfsi_plus_has_cache_plugin_activated($optimization_plugins)
2074
+ {
2075
+ $sfsi_plus_optimization_plugin_active = array();
2076
+ foreach ($optimization_plugins as $key => $optimization_plugin) {
2077
+ $sfsi_plus_optimization_plugin_active[$key] = is_plugin_active($optimization_plugin['dir_slug']);
2078
+ }
2079
+ $check_optimization_plugin_active_is_true = in_array(true, $sfsi_plus_optimization_plugin_active);
2080
+ return $check_optimization_plugin_active_is_true;
2081
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2082
 
2083
+ function sfsi_plus_has_sharecount_plugin_activated($sharecount_plugins)
2084
+ {
2085
+ $sfsi_plus_sharecount_plugin_active = array();
2086
+ foreach ($sharecount_plugins as $key => $sharecount_plugin) {
2087
+ $sfsi_plus_sharecount_plugin_active[$key] = is_plugin_active($sharecount_plugin['dir_slug']);
2088
+ }
2089
+ $check_sharecount_plugin_active_is_true = in_array(true, $sfsi_plus_sharecount_plugin_active);
2090
+ return $check_sharecount_plugin_active_is_true;
2091
+ }
2092
 
2093
+ function sfsi_plus_has_gdpr_plugin_activated($gdpr_plugins)
2094
+ {
2095
+ $sfsi_plus_gdpr_plugin_active = array();
2096
+ foreach ($gdpr_plugins as $key => $gdpr_plugin) {
2097
+ $sfsi_plus_gdpr_plugin_active[$key] = is_plugin_active($gdpr_plugin['dir_slug']);
2098
+ }
2099
+ $check_gdpr_plugin_active_is_true = in_array(true, $sfsi_plus_gdpr_plugin_active);
2100
+ return $check_gdpr_plugin_active_is_true;
2101
+ }
2102
 
2103
+ function sfsi_plus_has_gallery_plugin_activated($gallery_plugins)
2104
+ {
2105
+ $sfsi_plus_gallery_plugin_active = array();
2106
+ foreach ($gallery_plugins as $key => $gallery_plugin) {
2107
+ $sfsi_plus_gallery_plugin_active[$key] = is_plugin_active($gallery_plugin['dir_slug']);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2108
  }
2109
+ $check_gallery_plugin_active_is_true = in_array(true, $sfsi_plus_gallery_plugin_active);
2110
+ return $check_gallery_plugin_active_is_true;
2111
  }
2112
+ $option5 = unserialize(get_option('sfsi_plus_section5_options', false));
2113
+ if (isset($option5['sfsi_plus_featured_image_rss']) && $option5['sfsi_plus_featured_image_rss'] == 'yes') {
2114
+ // add_filter('the_excerpt_rss', 'sfsi_premium_featured_image_in_feed');
2115
+ add_filter('the_content_feed', 'sfsi_premium_featured_image_in_feed');
2116
+ function sfsi_premium_featured_image_in_feed($content)
2117
+ {
2118
+ global $post;
2119
+ if (is_feed()) {
2120
+ if (has_post_thumbnail($post->ID)) {
2121
+ $figure_start = '<figure class="wp-block-image size-large">';
2122
+ $feat_image_output = get_the_post_thumbnail($post->ID, 'thumbnail');
2123
+ $figure_end = '</figure>';
2124
+ $content = $figure_start . $feat_image_output . $figure_end . $content;
2125
+ }
2126
+ }
2127
+ return $content;
2128
+ }
2129
+ }
2130
+ } else {
2131
+ function sfsi_plus_conflict_admin_notice()
2132
+ { ?>
2133
+ <div class="success">
2134
+ <p>Cannot install both Ultimate Social Media PLUS and USM Premium.</p>
2135
+ </div><?php
2136
+ @trigger_error(__('Cannot install both Ultimate Social Media PLUS and USM Premium.', 'ap'), E_USER_ERROR);
2137
+ }
2138
+ add_action('admin_notices', 'sfsi_plus_conflict_admin_notice');
2139
+ register_activation_hook(__FILE__, 'sfsi_plus_conflict_admin_notice');
2140
+ }
views/sfsi_global_banners.php CHANGED
@@ -36,16 +36,16 @@ if (!is_plugin_active('Ultimate-Premium-Plugin/usm_premium_icons.php') && !is_pl
36
  $sfsi_plus_min_loyalty_time = date('Y-m-d H:i:s', strtotime($sfsi_plus_loyalty . get_option('sfsi_plus_installDate')));
37
  if (!is_plugin_active('copy-delete-posts/copy-delete-posts.php') && strtotime($sfsi_plus_current_date_demo) >= $sfsi_plus_install_day_plus_three_days && isset($_GET['page']) && $_GET['page'] == "sfsi-plus-options" && $sfsi_plus_dismiss_copy_delete_post['show_banner'] == "yes" || false == $sfsi_plus_dismiss_copy_delete_post) {
38
  ?>
39
- <div id="wpse1_6817_complete">
40
  <div id="wpse1_6817" data-url="<?php echo get_site_url(); ?>">
41
  <div id="wpse1_6817_container">
42
  <div>
43
  <div id="wpse1_6817_img">
44
- <img src="<?php echo SFSI_PLUS_PLUGURL . 'images/wpse1_6817_cdp.png' ?>" alt="">
45
  </div>
46
  <div id="wpse1_6817_text">
47
  We recently launched <b>Copy & Delete Posts</b>, the best plugin to make<br />
48
- (bulk) copies of your posts & pages and delete them again.
49
  </div>
50
  </div>
51
  <div id="wpse1_6817_btns">
36
  $sfsi_plus_min_loyalty_time = date('Y-m-d H:i:s', strtotime($sfsi_plus_loyalty . get_option('sfsi_plus_installDate')));
37
  if (!is_plugin_active('copy-delete-posts/copy-delete-posts.php') && strtotime($sfsi_plus_current_date_demo) >= $sfsi_plus_install_day_plus_three_days && isset($_GET['page']) && $_GET['page'] == "sfsi-plus-options" && $sfsi_plus_dismiss_copy_delete_post['show_banner'] == "yes" || false == $sfsi_plus_dismiss_copy_delete_post) {
38
  ?>
39
+ <div id="wpse1_6817_complete wpse1_6817_complete">
40
  <div id="wpse1_6817" data-url="<?php echo get_site_url(); ?>">
41
  <div id="wpse1_6817_container">
42
  <div>
43
  <div id="wpse1_6817_img">
44
+ <img src="<?php echo SFSI_PLUS_PLUGURL . 'wpses/wpse1_6817_cdp.png' ?>" alt="">
45
  </div>
46
  <div id="wpse1_6817_text">
47
  We recently launched <b>Copy & Delete Posts</b>, the best plugin to make<br />
48
+ (bulk) copies of your posts & pages and delete them again.111
49
  </div>
50
  </div>
51
  <div id="wpse1_6817_btns">
views/sfsi_option_view8.php CHANGED
@@ -651,7 +651,7 @@ $option8['sfsi_plus_responsive_icons_end_post'] = (isset($option8['sfsi_plus_re
651
  </div>
652
  <span style="width:auto!important;font-size: 18px;color: #5A6570;line-height: 45px;font-family: 'helveticaneue-light';margin-left:4px; <?php echo (isset($sfsi_plus_responsive_icons["settings"]["edge_type"]) && $sfsi_plus_responsive_icons["settings"]["edge_type"] == 'Sharp') ? 'display:none' : ''; ?>"><?php _e('with border radius', SFSI_PLUS_DOMAIN); ?></span>
653
  <div style="position:absolute;<?php echo (isset($sfsi_plus_responsive_icons["settings"]["edge_type"]) && $sfsi_plus_responsive_icons["settings"]["edge_type"] == 'Sharp') ? 'display:none' : 'display:inline-block'; ?>">
654
- <select name="sfsi_plus_responsive_icons_settings_edge_radius" id="sfsi_plus_icons_alignment" class="styled">
655
  <?php for ($i = 1; $i <= 20; $i++) : ?>
656
  <option value="<?php echo $i; ?>" <?php echo (isset($sfsi_plus_responsive_icons["settings"]) && isset($sfsi_plus_responsive_icons["settings"]["edge_radius"]) && $sfsi_plus_responsive_icons["settings"]["edge_radius"] == $i) ? 'selected="selected"' : ''; ?>>
657
  <?php echo $i; ?>
651
  </div>
652
  <span style="width:auto!important;font-size: 18px;color: #5A6570;line-height: 45px;font-family: 'helveticaneue-light';margin-left:4px; <?php echo (isset($sfsi_plus_responsive_icons["settings"]["edge_type"]) && $sfsi_plus_responsive_icons["settings"]["edge_type"] == 'Sharp') ? 'display:none' : ''; ?>"><?php _e('with border radius', SFSI_PLUS_DOMAIN); ?></span>
653
  <div style="position:absolute;<?php echo (isset($sfsi_plus_responsive_icons["settings"]["edge_type"]) && $sfsi_plus_responsive_icons["settings"]["edge_type"] == 'Sharp') ? 'display:none' : 'display:inline-block'; ?>">
654
+ <select name="sfsi_plus_responsive_icons_settings_edge_radius" id="sfsi_plus_icons_alignment_responsive" class="styled">
655
  <?php for ($i = 1; $i <= 20; $i++) : ?>
656
  <option value="<?php echo $i; ?>" <?php echo (isset($sfsi_plus_responsive_icons["settings"]) && isset($sfsi_plus_responsive_icons["settings"]["edge_radius"]) && $sfsi_plus_responsive_icons["settings"]["edge_radius"] == $i) ? 'selected="selected"' : ''; ?>>
657
  <?php echo $i; ?>
wpses/wpse1_6817_notiad.min.css CHANGED
@@ -1,176 +1,194 @@
 
1
  @import url('https://fonts.googleapis.com/css?family=Montserrat:300,600&display=swap');
2
 
3
  #wpse1_6817 * {
4
- font-family: 'Montserrat', sans-serif;
5
- font-weight: 300;
6
- font-size: 17px;
7
- -webkit-touch-callout: none;
8
- -webkit-user-select: none;
9
- -khtml-user-select: none;
10
- -moz-user-select: none;
11
- -ms-user-select: none;
12
- user-select: none;
13
  }
14
 
15
- #wpse1_6817 b, #wpse1_6817_who b {
16
- font-family: 'Montserrat', sans-serif;
17
- font-weight: 600 !important;
 
18
  }
19
 
20
  #wpse1_6817_who {
21
- font-family: 'Montserrat', sans-serif;
22
- text-align: right;
23
- max-width: 1169px;
24
- margin-left: 2px;
25
- margin-top: 1px;
26
  }
27
 
28
  #wpse1_6817 {
29
- background: #fff;
30
- border: 2px solid #4fbe99;
31
- border-radius: 3px;
32
- max-width: 1130px;
33
- margin-top: 20px;
34
- padding: 15px 20px;
35
- margin-right: 20px;
36
- background: url('./wpse1_6817_cdp_bg.png');
37
- background-repeat: no-repeat;
38
- background-position: center;
39
- background-size: cover;
40
  }
41
 
42
  #wpse1_6817_container {
43
- position: relative;
44
- line-height: 20px;
 
 
 
45
  }
46
 
47
- #wpse1_6817_container::after {
48
- content: '';
49
- display: block;
50
- clear: both;
51
- }
52
 
53
  #wpse1_6817_text {
54
- float: left;
55
- line-height: 22px;
56
- padding-left: 70px;
57
- padding-top: 2px;
58
  }
59
 
60
  #wpse1_6817_img {
61
- position: absolute;
62
- pointer-events: none;
63
  }
64
 
65
  #wpse1_6817_btns {
66
- float: right;
 
 
67
  }
68
 
69
  #wpse1_6817_other {
70
- float: left;
71
- white-space: nowrap;
72
- overflow: hidden;
73
- text-overflow: clip;
 
74
  }
75
 
76
  #wpse1_6817_btns::after {
77
- content: '';
78
- display: block;
79
- clear: both;
80
  }
81
 
82
  #wpse1_6817_install {
83
- float: left;
84
  }
85
 
86
  #wpse1_6817_show {
87
- display: inline-block;
88
- padding-left: 20px;
89
- white-space: nowrap;
90
- overflow: hidden;
91
- text-overflow: clip;
92
  }
93
 
94
  #wpse1_6817_dismiss {
95
- display: inline-block;
96
- padding-left: 29px;
97
- white-space: nowrap;
98
- overflow: hidden;
99
- text-overflow: clip;
100
  }
101
 
102
  #wpse1_6817_dismiss span {
103
- transition: all .3s;
104
  }
105
 
106
  #wpse1_6817_show a {
107
- line-height: 48px;
108
- color: #000;
109
- text-decoration: none !important;
110
- cursor: pointer;
111
  }
112
 
113
- #wpse1_6817_dismiss a {
114
- line-height: 48px;
115
- color: #c5c5c5;
116
- text-decoration: none !important;
117
- cursor: pointer;
 
 
 
118
  }
119
 
120
- #wpse1_6817_show a, #wpse1_6817_dismiss a {
121
- opacity: 1;
122
- transition: all .3s;
 
123
  }
124
- #wpse1_6817_show a:hover, #wpse1_6817_dismiss a:hover {
125
- opacity: .6;
 
 
126
  }
127
 
128
  #wpse1_6817_install button {
129
- border: 0;
130
- outline: none;
131
- width: 238px;
132
- max-width: 238px;
133
- height: 48px;
134
- max-height: 48px;
135
- cursor: pointer;
136
- background: url('./wpse1_6817_cdp_button.png');
137
- background-repeat: no-repeat;
138
- background-position: center;
139
- background-size: cover;
140
- border-radius: 30px;
141
- opacity: 1;
142
- transition: all .3s;
143
  }
144
 
145
  #wpse1_6817_install button:hover {
146
- opacity: .8;
147
  }
148
 
149
  @media screen and (max-width: 1375px) {
150
- #wpse1_6817_who {
151
- max-width: calc(100% - 25px);
152
- margin-left: 2px;
153
- margin-top: 1px;
154
- }
155
  }
 
156
  @media screen and (max-width: 1320px) {
157
- #wpse1_6817_btns {
158
- float: left;
159
- }
160
- #wpse1_6817_btns:not(.wpse1_6817_btns_installing) {
161
- padding-left: 69px;
162
- }
163
- #wpse1_6817_text {
164
- float: none !important;
165
- padding-bottom: 10px;
166
- }
167
- #wpse1_6817_text br {
168
- display: none;
169
- }
 
 
 
170
  }
171
 
172
  @media screen and (max-width: 600px) {
173
- #wpse1_6817_complete {
174
- display: none;
175
- }
176
- }
1
+
2
  @import url('https://fonts.googleapis.com/css?family=Montserrat:300,600&display=swap');
3
 
4
  #wpse1_6817 * {
5
+ font-family: 'helveticaneue-light';
6
+ font-weight: 300;
7
+ font-size: 17px;
8
+ -webkit-touch-callout: none;
9
+ -webkit-user-select: none;
10
+ -khtml-user-select: none;
11
+ -moz-user-select: none;
12
+ -ms-user-select: none;
13
+ user-select: none;
14
  }
15
 
16
+ #wpse1_6817 b,
17
+ #wpse1_6817_who b {
18
+ font-family: 'helveticaneue-light';
19
+ font-weight: 600 !important;
20
  }
21
 
22
  #wpse1_6817_who {
23
+ font-family: 'helveticaneue-light';
24
+ text-align: right;
25
+ max-width: 1169px;
26
+ margin-left: 2px;
27
+ margin-top: 1px;
28
  }
29
 
30
  #wpse1_6817 {
31
+ background: #fff;
32
+ border: 2px solid #4fbe99;
33
+ border-radius: 3px;
34
+ max-width: 1413px;
35
+ margin-top: 20px;
36
+ padding: 15px 20px;
37
+ margin-right: 20px;
38
+ background: url('../wpses/wpse1_6817_cdp_bg.png');
39
+ background-repeat: no-repeat;
40
+ background-position: center;
41
+ background-size: cover;
42
  }
43
 
44
  #wpse1_6817_container {
45
+ position: relative;
46
+ line-height: 20px;
47
+ display: flex;
48
+ align-items: center;
49
+ justify-content: space-between;
50
  }
51
 
52
+ /* #wpse1_6817_container::after {
53
+ content: '';
54
+ display: block;
55
+ clear: both;
56
+ } */
57
 
58
  #wpse1_6817_text {
59
+ float: left;
60
+ line-height: 22px;
61
+ padding-left: 70px;
62
+ padding-top: 2px;
63
  }
64
 
65
  #wpse1_6817_img {
66
+ position: absolute;
67
+ pointer-events: none;
68
  }
69
 
70
  #wpse1_6817_btns {
71
+ float: right;
72
+ top: 4px;
73
+ position: relative;
74
  }
75
 
76
  #wpse1_6817_other {
77
+ float: left;
78
+ white-space: nowrap;
79
+ overflow: hidden;
80
+ text-overflow: clip;
81
+ display: flex;
82
  }
83
 
84
  #wpse1_6817_btns::after {
85
+ content: '';
86
+ display: block;
87
+ clear: both;
88
  }
89
 
90
  #wpse1_6817_install {
91
+ float: left;
92
  }
93
 
94
  #wpse1_6817_show {
95
+ display: inline-block;
96
+ padding-left: 20px;
97
+ white-space: nowrap;
98
+ overflow: hidden;
99
+ text-overflow: clip;
100
  }
101
 
102
  #wpse1_6817_dismiss {
103
+ display: inline-block;
104
+ padding-left: 29px;
105
+ white-space: nowrap;
106
+ overflow: hidden;
107
+ text-overflow: clip;
108
  }
109
 
110
  #wpse1_6817_dismiss span {
111
+ transition: all .3s;
112
  }
113
 
114
  #wpse1_6817_show a {
115
+ line-height: 48px;
116
+ color: #000;
117
+ text-decoration: none !important;
118
+ cursor: pointer;
119
  }
120
 
121
+ #wpse1_6817_dismiss input {
122
+ line-height: 48px;
123
+ color: #c5c5c5;
124
+ text-decoration: none !important;
125
+ cursor: pointer;
126
+ border: 0px #000 solid;
127
+ background-color: inherit;
128
+ cursor: pointer;
129
  }
130
 
131
+ #wpse1_6817_show a,
132
+ #wpse1_6817_dismiss a {
133
+ opacity: 1;
134
+ transition: all .3s;
135
  }
136
+
137
+ #wpse1_6817_show a:hover,
138
+ #wpse1_6817_dismiss a:hover {
139
+ opacity: .6;
140
  }
141
 
142
  #wpse1_6817_install button {
143
+ border: 0;
144
+ outline: none;
145
+ width: 238px;
146
+ max-width: 238px;
147
+ height: 48px;
148
+ max-height: 48px;
149
+ cursor: pointer;
150
+ background: url('../wpses/wpse1_6817_cdp_button.png');
151
+ background-repeat: no-repeat;
152
+ background-position: center;
153
+ background-size: cover;
154
+ border-radius: 30px;
155
+ opacity: 1;
156
+ transition: all .3s;
157
  }
158
 
159
  #wpse1_6817_install button:hover {
160
+ opacity: .8;
161
  }
162
 
163
  @media screen and (max-width: 1375px) {
164
+ #wpse1_6817_who {
165
+ max-width: calc(100% - 25px);
166
+ margin-left: 2px;
167
+ margin-top: 1px;
168
+ }
169
  }
170
+
171
  @media screen and (max-width: 1320px) {
172
+ #wpse1_6817_btns {
173
+ float: left;
174
+ }
175
+
176
+ #wpse1_6817_btns:not(.wpse1_6817_btns_installing) {
177
+ padding-left: 69px;
178
+ }
179
+
180
+ #wpse1_6817_text {
181
+ float: none !important;
182
+ padding-bottom: 10px;
183
+ }
184
+
185
+ #wpse1_6817_text br {
186
+ display: none;
187
+ }
188
  }
189
 
190
  @media screen and (max-width: 600px) {
191
+ #wpse1_6817_complete {
192
+ display: none;
193
+ }
194
+ }
wpses/wpse1_6817_notiad.min.js CHANGED
@@ -144,4 +144,4 @@ jQuery(document).ready(function($) {
144
  return JSON.parse(str);
145
  }
146
 
147
- });
144
  return JSON.parse(str);
145
  }
146
 
147
+ });