Addons for Elementor - Version 2.7.5

Version Description

  • Added - Support for Related Posts and Current Query in Posts Grid and Posts Carousel modules. These modules can now be effectively used in Elementor Theme builder templates.
  • Added - Support for FontAwesome 5 Icon Library in all relevant modules where icons are used.
Download this release

Release Info

Developer livemesh
Plugin Icon 128x128 Addons for Elementor
Version 2.7.5
Comparing to
See all releases

Code changes from version 2.7.4 to 2.7.5

addons-for-elementor.php CHANGED
@@ -8,7 +8,7 @@
8
* Author URI: https://livemeshelementor.com
9
* License: GPL3
10
* License URI: https://www.gnu.org/licenses/gpl-3.0.txt
11
- * Version: 2.7.4
12
* Text Domain: livemesh-el-addons
13
* Domain Path: languages
14
*
@@ -35,7 +35,7 @@ if ( !defined( 'ABSPATH' ) ) {
35
36
if ( !function_exists( 'lae_fs' ) ) {
37
// Plugin version
38
- define( 'LAE_VERSION', '2.7.4' );
39
// Plugin Root File
40
define( 'LAE_PLUGIN_FILE', __FILE__ );
41
// Plugin Folder Path
8
* Author URI: https://livemeshelementor.com
9
* License: GPL3
10
* License URI: https://www.gnu.org/licenses/gpl-3.0.txt
11
+ * Version: 2.7.5
12
* Text Domain: livemesh-el-addons
13
* Domain Path: languages
14
*
35
36
if ( !function_exists( 'lae_fs' ) ) {
37
// Plugin version
38
+ define( 'LAE_VERSION', '2.7.5' );
39
// Plugin Root File
40
define( 'LAE_PLUGIN_FILE', __FILE__ );
41
// Plugin Folder Path
admin/views/documentation.php CHANGED
@@ -1165,6 +1165,11 @@ else {
1165
1166
<h2>Change Log for the Premium Version</h2>
1167
1168
<h3>2.7.4</h3>
1169
<ul>
1170
<li>Added - Support for external page link in services, services carousel, features and team member modules.</li>
1165
1166
<h2>Change Log for the Premium Version</h2>
1167
1168
+ <h3>2.7.5</h3>
1169
+ <ul>
1170
+ <li>Added - Support for Related Posts and Current Query in Posts Grid, Posts Carousel and Posts Block modules. These modules can now be effectively used in Elementor Theme builder templates.</li>
1171
+ <li>Added - Support for FontAwesome 5 Icon Library in all relevant modules where icons are used.</li>
1172
+ </ul>
1173
<h3>2.7.4</h3>
1174
<ul>
1175
<li>Added - Support for external page link in services, services carousel, features and team member modules.</li>
assets/css/lae-widgets.css CHANGED
@@ -518,9 +518,8 @@
518
.lae-odometers .lae-odometer .lae-stats-title span {
519
float: left;
520
margin-right: 15px; }
521
- .lae-odometers .lae-odometer .lae-stats-title .lae-icon-wrapper {
522
font-size: 32px;
523
- margin-right: 10px;
524
vertical-align: middle;
525
color: #ccc; }
526
@@ -691,12 +690,12 @@
691
clear: both; }
692
.lae-services .lae-service {
693
margin-bottom: 50px; }
694
- .lae-services .lae-service .lae-icon-wrapper span {
695
-webkit-transition: color .4s ease-in-out 0s;
696
transition: color .4s ease-in-out 0s; }
697
- .lae-services .lae-service .lae-icon-wrapper span:hover {
698
color: #555; }
699
- .lae-dark-bg .lae-services .lae-service .lae-icon-wrapper span:hover {
700
color: #d5d5d5; }
701
.lae-services .lae-service .lae-service-text {
702
font-size: 15px;
@@ -714,7 +713,7 @@
714
color: #c5c5c5; }
715
716
/* Style 1 */
717
- .lae-services-style1 .lae-service .lae-icon-wrapper span {
718
display: block;
719
text-align: center;
720
font-size: 96px;
@@ -723,9 +722,9 @@
723
-webkit-transition: color .4s ease-in-out 0s;
724
transition: color .4s ease-in-out 0s;
725
color: #888; }
726
- .lae-dark-bg .lae-services-style1 .lae-service .lae-icon-wrapper span {
727
color: #a5a5a5; }
728
- .lae-dark-bg .lae-services-style1 .lae-service .lae-icon-wrapper span:hover {
729
color: #c5c5c5; }
730
.lae-services-style1 .lae-service .lae-image-wrapper img {
731
display: block;
@@ -754,15 +753,15 @@
754
transform: scale(0.9, 0.9); }
755
756
/* Style 2 */
757
- .lae-services-style2 .lae-service .lae-image-wrapper img, .lae-services-style2 .lae-service .lae-icon-wrapper span {
758
float: left;
759
margin-right: 18px;
760
color: #888; }
761
- .lae-dark-bg .lae-services-style2 .lae-service .lae-image-wrapper img, .lae-dark-bg .lae-services-style2 .lae-service .lae-icon-wrapper span {
762
color: #a5a5a5; }
763
- .lae-dark-bg .lae-services-style2 .lae-service .lae-image-wrapper img:hover, .lae-dark-bg .lae-services-style2 .lae-service .lae-icon-wrapper span:hover {
764
color: #c5c5c5; }
765
- .lae-services-style2 .lae-service .lae-icon-wrapper span {
766
font-size: 24px;
767
line-height: 32px; }
768
.lae-services-style2 .lae-service .lae-service-text .lae-title {
@@ -778,18 +777,18 @@
778
margin-bottom: 20px; }
779
780
/* Style 3 */
781
- .lae-services-style3 .lae-service .lae-icon-wrapper span {
782
display: block;
783
text-align: left;
784
font-size: 80px;
785
line-height: 1;
786
margin-bottom: 25px;
787
color: #555; }
788
- .lae-services-style3 .lae-service .lae-icon-wrapper span:hover {
789
color: #888; }
790
- .lae-dark-bg .lae-services-style3 .lae-service .lae-icon-wrapper span {
791
color: #c5c5c5; }
792
- .lae-dark-bg .lae-services-style3 .lae-service .lae-icon-wrapper span:hover {
793
color: #e5e5e5; }
794
.lae-services-style3 .lae-service .lae-image-wrapper img {
795
display: block;
@@ -1161,9 +1160,9 @@
1161
max-width: none; }
1162
1163
/* ---------------------------------- Button Widget ---------------------------------- */
1164
- input.lae-button.lae-with-icon span, input.lae-button.lae-with-icon img.lae-thumbnail, button.lae-button.lae-with-icon span, button.lae-button.lae-with-icon img.lae-thumbnail, a.lae-button.lae-with-icon span, a.lae-button.lae-with-icon img.lae-thumbnail, .lae-button.lae-with-icon:active span, .lae-button.lae-with-icon:active img.lae-thumbnail, .lae-button.lae-with-icon:visited span, .lae-button.lae-with-icon:visited img.lae-thumbnail {
1165
margin-right: 15px; }
1166
- input.lae-button.lae-with-icon span, button.lae-button.lae-with-icon span, a.lae-button.lae-with-icon span, .lae-button.lae-with-icon:active span, .lae-button.lae-with-icon:visited span {
1167
color: #fff;
1168
font-size: 24px;
1169
vertical-align: middle;
518
.lae-odometers .lae-odometer .lae-stats-title span {
519
float: left;
520
margin-right: 15px; }
521
+ .lae-odometers .lae-odometer .lae-stats-title .lae-icon-wrapper i {
522
font-size: 32px;
523
vertical-align: middle;
524
color: #ccc; }
525
690
clear: both; }
691
.lae-services .lae-service {
692
margin-bottom: 50px; }
693
+ .lae-services .lae-service .lae-icon-wrapper i {
694
-webkit-transition: color .4s ease-in-out 0s;
695
transition: color .4s ease-in-out 0s; }
696
+ .lae-services .lae-service .lae-icon-wrapper i:hover {
697
color: #555; }
698
+ .lae-dark-bg .lae-services .lae-service .lae-icon-wrapper i:hover {
699
color: #d5d5d5; }
700
.lae-services .lae-service .lae-service-text {
701
font-size: 15px;
713
color: #c5c5c5; }
714
715
/* Style 1 */
716
+ .lae-services-style1 .lae-service .lae-icon-wrapper i {
717
display: block;
718
text-align: center;
719
font-size: 96px;
722
-webkit-transition: color .4s ease-in-out 0s;
723
transition: color .4s ease-in-out 0s;
724
color: #888; }
725
+ .lae-dark-bg .lae-services-style1 .lae-service .lae-icon-wrapper i {
726
color: #a5a5a5; }
727
+ .lae-dark-bg .lae-services-style1 .lae-service .lae-icon-wrapper i:hover {
728
color: #c5c5c5; }
729
.lae-services-style1 .lae-service .lae-image-wrapper img {
730
display: block;
753
transform: scale(0.9, 0.9); }
754
755
/* Style 2 */
756
+ .lae-services-style2 .lae-service .lae-image-wrapper img, .lae-services-style2 .lae-service .lae-icon-wrapper i {
757
float: left;
758
margin-right: 18px;
759
color: #888; }
760
+ .lae-dark-bg .lae-services-style2 .lae-service .lae-image-wrapper img, .lae-dark-bg .lae-services-style2 .lae-service .lae-icon-wrapper i {
761
color: #a5a5a5; }
762
+ .lae-dark-bg .lae-services-style2 .lae-service .lae-image-wrapper img:hover, .lae-dark-bg .lae-services-style2 .lae-service .lae-icon-wrapper i:hover {
763
color: #c5c5c5; }
764
+ .lae-services-style2 .lae-service .lae-icon-wrapper i {
765
font-size: 24px;
766
line-height: 32px; }
767
.lae-services-style2 .lae-service .lae-service-text .lae-title {
777
margin-bottom: 20px; }
778
779
/* Style 3 */
780
+ .lae-services-style3 .lae-service .lae-icon-wrapper i {
781
display: block;
782
text-align: left;
783
font-size: 80px;
784
line-height: 1;
785
margin-bottom: 25px;
786
color: #555; }
787
+ .lae-services-style3 .lae-service .lae-icon-wrapper i:hover {
788
color: #888; }
789
+ .lae-dark-bg .lae-services-style3 .lae-service .lae-icon-wrapper i {
790
color: #c5c5c5; }
791
+ .lae-dark-bg .lae-services-style3 .lae-service .lae-icon-wrapper i:hover {
792
color: #e5e5e5; }
793
.lae-services-style3 .lae-service .lae-image-wrapper img {
794
display: block;
1160
max-width: none; }
1161
1162
/* ---------------------------------- Button Widget ---------------------------------- */
1163
+ input.lae-button.lae-with-icon i, input.lae-button.lae-with-icon img.lae-thumbnail, button.lae-button.lae-with-icon i, button.lae-button.lae-with-icon img.lae-thumbnail, a.lae-button.lae-with-icon i, a.lae-button.lae-with-icon img.lae-thumbnail, .lae-button.lae-with-icon:active i, .lae-button.lae-with-icon:active img.lae-thumbnail, .lae-button.lae-with-icon:visited i, .lae-button.lae-with-icon:visited img.lae-thumbnail {
1164
margin-right: 15px; }
1165
+ input.lae-button.lae-with-icon i, button.lae-button.lae-with-icon i, a.lae-button.lae-with-icon i, .lae-button.lae-with-icon:active i, .lae-button.lae-with-icon:visited i {
1166
color: #fff;
1167
font-size: 24px;
1168
vertical-align: middle;
assets/css/lae-widgets.css.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["lae-widgets.scss","_lae-lib.scss","../../../../bower_components/bourbon/app/assets/stylesheets/addons/_prefixer.scss","../../../../bower_components/neat/core/neat/mixins/_grid-media.scss","../../../../bower_components/bourbon/app/assets/stylesheets/css3/_flex-box.scss"],"names":[],"mappings":"AAKA,4FAA4F;AAE5F;EACE,YAAW,EAAA;EAGT;IACE,iBAAgB,EAAA;IAEhB;MACE,gBAAe;MACf,mBAAkB,EAAA;MAElB;QACE,YAAW;QACX,6CAAoC;QAApC,qCAAoC,EAAA;QACpC;UACE,YAAW,EAAA;EAKnB;ICuGF,gBAAe;IACf,kBAAiB,EAAA;EDnGb;ICsFJ,gBAAe;IACf,kBAAiB;IACjB,oBA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A;IAGpB;MACE,aAAY;MACZ,gBAAe,EAAA;IAGjB;MACE,cAAa,EAAA;IAGf;ME1jEF,4CAA4B;MAgB5B,oCAAoB;MF4iEhB,mBAAkB,EAAA;IAGpB;MACE,eAAc,EAAA;EAKpB;IACE,oBAAmB;IACnB,WAAU,EAAA;IAEV;MACE,YAAW;MACX,YAAW;MACX,iBAAgB;MAChB,eAAc;MACd,YAAW;MACX,mBAAkB;MAClB,oBAAmB,EAAA;IAGrB;MACE,YAAW,EAAA;MAEX;QACE,oBAAmB,EAAA","file":"lae-widgets.css"}
1
+ {"version":3,"sources":["lae-widgets.scss","_lae-lib.scss","../../../../bower_components/bourbon/app/assets/stylesheets/addons/_prefixer.scss","../../../../bower_components/neat/core/neat/mixins/_grid-media.scss","../../../../bower_components/bourbon/app/assets/stylesheets/css3/_flex-box.scss"],"names":[],"mappings":"AAKA,4FAA4F;AAE5F;EACE,YAAW,EAAA;EAGT;IACE,iBAAgB,EAAA;IAEhB;MACE,gBAAe;MACf,mBAAkB,EAAA;MAElB;QACE,YAAW;QACX,6CAAoC;QAApC,qCAAoC,EAAA;QACpC;UACE,YAAW,EAAA;EAKnB;ICuGF,gBAAe;IACf,kBAAiB,EAAA;EDnGb;ICsFJ,gBAAe;IACf,kBAAiB;IACjB,oBAAmB;IACnB,kBAAiB;IACjB,YAAW;IACX,0BAAyB;IACzB,YAAW;IACX,cAAa;IACb,oBAAmB,EAAA;ED3Ff;IACE,6CAAoC;IAApC,qCAAoC,EAAA;EAEtC;IACE,YAAW,EAAA;EAGb;IACE,gBAAe;IACf,kBAAiB;IACjB,mBAAkB;IAClB,YAAW;IACX,oBAAmB,EAAA;;AAO3B,qCAAqC;AAGnC;EACE,YAAW;EACX,cAAa,EAAA;AAGf;EACE,iBAAgB;EAChB,oBAAmB,EAAA;EAEnB;IACE,mBAAkB;IAClB,mBAAkB,EAAA;IAElB;MACE,gBAAe;MACf,oBAAmB;MACnB,mBAAkB;MAClB,2CAAkC;MAAlC,mCAA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A;QAGnB;UACE,gBAAe;UACf,YAAW;UACX,2CAAkC;UAAlC,mCAAkC;UAClC,qCAAoC,EAAA;UAEpC;YACE,8BAA6B,EAAA;MAKnC;QACE,eAAc;QACd,eAAc;QACd,gBAAe;QACf,kBAAiB;QACjB,WAAU;QACV,+CAAsC;QAAtC,uCAAsC,EAAA;QAEtC;UACE,YAAW;UACX,mBAAkB;UAClB,gBAAe;UACf,QAAO;UACP,gBAAe;UACf,kBAAiB;UACjB,mBAAkB;UAClB,2CAAkC;UAAlC,mCAAkC,EAAA;UAElC;YACE,YAAW,EAAA;IAQf;MACE,WAAU,EAAA;EAOlB;IACE,mBAAkB;IAClB,iBAAgB;IAChB,oBAAmB,EAAA;EAGrB;IACE,gBAAe;IACf,kBAAiB;IACjB,oBAAmB;IACnB,oBAAmB,EAAA;IAEnB;MACE,cAAa,EAAA;IAGf;MACE,2CAAkC;MAAlC,mCAAkC;MAClC,YAAW,EAAA;MAEX;QACE,YAAW,EAAA;IAKb;MACE,eAAc,EAAA;MAEd;QACE,YAAW,EAAA;EAOjB;IACE,sBAAqB;IACrB,WAAU;IACV,UAAS;IACT,mBAAkB;IAClB,YAAW,EAAA;IAEX;MACE,cAAa;MACb,kBAAiB;MACjB,mBAAkB,EAAA;IAGpB;MACE,aAAY;MACZ,gBAAe,EAAA;IAGjB;MACE,cAAa,EAAA;IAGf;MEzjEF,4CAA4B;MAgB5B,oCAAoB;MF2iEhB,mBAAkB,EAAA;IAGpB;MACE,eAAc,EAAA;EAKpB;IACE,oBAAmB;IACnB,WAAU,EAAA;IAEV;MACE,YAAW;MACX,YAAW;MACX,iBAAgB;MAChB,eAAc;MACd,YAAW;MACX,mBAAkB;MAClB,oBAAmB,EAAA;IAGrB;MACE,YAAW,EAAA;MAEX;QACE,oBAAmB,EAAA","file":"lae-widgets.css"}
assets/css/lae-widgets.scss CHANGED
@@ -765,9 +765,8 @@ $theme_color: #f94213;
765
margin-right: 15px;
766
}
767
768
- .lae-icon-wrapper {
769
font-size: 32px;
770
- margin-right: 10px;
771
vertical-align: middle;
772
color: #ccc;
773
}
@@ -1021,7 +1020,7 @@ $theme_color: #f94213;
1021
.lae-service {
1022
margin-bottom: 50px;
1023
1024
- .lae-icon-wrapper span {
1025
transition: color .4s ease-in-out 0s;
1026
1027
&:hover {
@@ -1065,7 +1064,7 @@ $theme_color: #f94213;
1065
/* Style 1 */
1066
.lae-services-style1 {
1067
.lae-service {
1068
- .lae-icon-wrapper span {
1069
display: block;
1070
text-align: center;
1071
font-size: 96px;
@@ -1114,7 +1113,7 @@ $theme_color: #f94213;
1114
1115
.lae-services-style2 {
1116
.lae-service {
1117
- .lae-image-wrapper img, .lae-icon-wrapper span {
1118
float: left;
1119
margin-right: 18px;
1120
color: #888;
@@ -1128,7 +1127,7 @@ $theme_color: #f94213;
1128
}
1129
}
1130
1131
- .lae-icon-wrapper span {
1132
font-size: 24px;
1133
line-height: 32px;
1134
}
@@ -1144,7 +1143,7 @@ $theme_color: #f94213;
1144
1145
.lae-services-style3 {
1146
.lae-service {
1147
- .lae-icon-wrapper span {
1148
display: block;
1149
text-align: left;
1150
font-size: 80px;
@@ -1705,11 +1704,11 @@ $theme_color: #f94213;
1705
/* ---------------------------------- Button Widget ---------------------------------- */
1706
1707
input.lae-button.lae-with-icon, button.lae-button.lae-with-icon, a.lae-button.lae-with-icon, .lae-button.lae-with-icon:active, .lae-button.lae-with-icon:visited {
1708
- span, img.lae-thumbnail {
1709
margin-right: 15px;
1710
}
1711
1712
- span {
1713
color: #fff;
1714
font-size: 24px;
1715
vertical-align: middle;
765
margin-right: 15px;
766
}
767
768
+ .lae-icon-wrapper i {
769
font-size: 32px;
770
vertical-align: middle;
771
color: #ccc;
772
}
1020
.lae-service {
1021
margin-bottom: 50px;
1022
1023
+ .lae-icon-wrapper i {
1024
transition: color .4s ease-in-out 0s;
1025
1026
&:hover {
1064
/* Style 1 */
1065
.lae-services-style1 {
1066
.lae-service {
1067
+ .lae-icon-wrapper i {
1068
display: block;
1069
text-align: center;
1070
font-size: 96px;
1113
1114
.lae-services-style2 {
1115
.lae-service {
1116
+ .lae-image-wrapper img, .lae-icon-wrapper i {
1117
float: left;
1118
margin-right: 18px;
1119
color: #888;
1127
}
1128
}
1129
1130
+ .lae-icon-wrapper i {
1131
font-size: 24px;
1132
line-height: 32px;
1133
}
1143
1144
.lae-services-style3 {
1145
.lae-service {
1146
+ .lae-icon-wrapper i {
1147
display: block;
1148
text-align: left;
1149
font-size: 80px;
1704
/* ---------------------------------- Button Widget ---------------------------------- */
1705
1706
input.lae-button.lae-with-icon, button.lae-button.lae-with-icon, a.lae-button.lae-with-icon, .lae-button.lae-with-icon:active, .lae-button.lae-with-icon:visited {
1707
+ i, img.lae-thumbnail {
1708
margin-right: 15px;
1709
}
1710
1711
+ i {
1712
color: #fff;
1713
font-size: 24px;
1714
vertical-align: middle;
freemius/includes/class-freemius.php CHANGED
@@ -1,23283 +1,23283 @@
1
- <?php
2
- /**
3
- * @package Freemius
4
- * @copyright Copyright (c) 2015, Freemius, Inc.
5
- * @license https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3
6
- * @since 1.0.3
7
- */
8
- if ( ! defined( 'ABSPATH' ) ) {
9
- exit;
10
- }
11
-
12
- // "final class"
13
- class Freemius extends Freemius_Abstract {
14
- /**
15
- * SDK Version
16
- *
17
- * @var string
18
- */
19
- public $version = WP_FS__SDK_VERSION;
20
-
21
- #region Plugin Info
22
-
23
- /**
24
- * @since 1.0.1
25
- *
26
- * @var string
27
- */
28
- private $_slug;
29
-
30
- /**
31
- * @since 1.0.0
32
- *
33
- * @var string
34
- */
35
- private $_plugin_basename;
36
- /**
37
- * @since 2.2.1
38
- *
39
- * @var string
40
- */
41
- private $_premium_plugin_basename;
42
- /**
43
- * @since 1.0.0
44
- *
45
- * @var string
46
- */
47
- private $_free_plugin_basename;
48
- /**
49
- * @since 1.0.0
50
- *
51
- * @var string
52
- */
53
- private $_plugin_dir_path;
54
- /**
55
- * @since 1.0.0
56
- *
57
- * @var string
58
- */
59
- private $_plugin_dir_name;
60
- /**
61
- * @since 1.0.0
62
- *
63
- * @var string
64
- */
65
- private $_plugin_main_file_path;
66
- /**
67
- * @var string[]
68
- */
69
- private $_plugin_data;
70
- /**
71
- * @since 1.0.9
72
- *
73
- * @var string
74
- */
75
- private $_plugin_name;
76
- /**
77
- * @since 1.2.2
78
- *
79
- * @var string
80
- */
81
- private $_module_type;
82
-
83
- #endregion Plugin Info
84
-
85
- /**
86
- * @since 1.0.9
87
- *
88
- * @var bool If false, don't turn Freemius on.
89
- */
90
- private $_is_on;
91
-
92
- /**
93
- * @since 1.1.3
94
- *
95
- * @var bool If false, don't turn Freemius on.
96
- */
97
- private $_is_anonymous;
98
-
99
- /**
100
- * @since 1.0.9
101
- * @var bool If false, issues with connectivity to Freemius API.
102
- */
103
- private $_has_api_connection;
104
-
105
- /**
106
- * @since 1.0.9
107
- * @since 2.0.0 Default to true since we need the property during the instance construction, prior to the dynamic_init() execution.
108
- * @var bool Hints the SDK if plugin can support anonymous mode (if skip connect is visible).
109
- */
110
- private $_enable_anonymous = true;
111
-
112
- /**
113
- * @since 1.1.7.5
114
- * @var bool Hints the SDK if plugin should run in anonymous mode (only adds feedback form).
115
- */
116
- private $_anonymous_mode;
117
-
118
- /**
119
- * @since 1.1.9
120
- * @var bool Hints the SDK if plugin have any free plans.
121
- */
122
- private $_is_premium_only;
123
-
124
- /**
125
- * @since 1.2.1.6
126
- * @var bool Hints the SDK if plugin have premium code version at all.
127
- */
128
- private $_has_premium_version;
129
-
130
- /**
131
- * @since 1.2.1.6
132
- * @var bool Hints the SDK if plugin should ignore pending mode by simulating a skip.
133
- */
134
- private $_ignore_pending_mode;
135
-
136
- /**
137
- * @since 1.0.8
138
- * @var bool Hints the SDK if the plugin has any paid plans.
139
- */
140
- private $_has_paid_plans;
141
-
142
- /**
143
- * @since 1.2.1.5
144
- * @var int Hints the SDK if the plugin offers a trial period. If negative, no trial, if zero - has a trial but
145
- * without a specified period, if positive - the number of trial days.
146
- */
147
- private $_trial_days = - 1;
148
-
149
- /**
150
- * @since 1.2.1.5
151
- * @var bool Hints the SDK if the trial requires a payment method or not.
152
- */
153
- private $_is_trial_require_payment = false;
154
-
155
- /**
156
- * @since 1.0.7
157
- * @var bool Hints the SDK if the plugin is WordPress.org compliant.
158
- */
159
- private $_is_org_compliant;
160
-
161
- /**
162
- * @since 1.0.7
163
- * @var bool Hints the SDK if the plugin is has add-ons.
164
- */
165
- private $_has_addons;
166
-
167
- /**
168
- * @since 1.1.6
169
- * @var string[]bool.
170
- */
171
- private $_permissions;
172
-
173
- /**
174
- * @var FS_Storage
175
- */
176
- private $_storage;
177
-
178
- /**
179
- * @since 1.2.2.7
180
- * @var FS_Cache_Manager
181
- */
182
- private $_cache;
183
-
184
- /**
185
- * @since 1.0.0
186
- *
187
- * @var FS_Logger
188
- */
189
- private $_logger;
190
- /**
191
- * @since 1.0.4
192
- *
193
- * @var FS_Plugin
194
- */
195
- private $_plugin = false;
196
- /**
197
- * @since 1.0.4
198
- *
199
- * @var FS_Plugin|false
200
- */
201
- private $_parent_plugin = false;
202
- /**
203
- * @since 1.1.1
204
- *
205
- * @var Freemius
206
- */
207
- private $_parent = false;
208
- /**
209
- * @since 1.0.1
210
- *
211
- * @var FS_User
212
- */
213
- private $_user = false;
214
- /**
215
- * @since 1.0.1
216
- *
217
- * @var FS_Site
218
- */
219
- private $_site = false;
220
- /**
221
- * @since 1.0.1
222
- *
223
- * @var FS_Plugin_License
224
- */
225
- private $_license;
226
- /**
227
- * @since 1.0.2
228
- *
229
- * @var FS_Plugin_Plan[]
230
- */
231
- private $_plans = false;
232
- /**
233
- * @var FS_Plugin_License[]
234
- * @since 1.0.5
235
- */
236
- private $_licenses = false;
237
-
238
- /**
239
- * @since 1.0.1
240
- *
241
- * @var FS_Admin_Menu_Manager
242
- */
243
- private $_menu;
244
-
245
- /**
246
- * @var FS_Admin_Notices
247
- */
248
- private $_admin_notices;
249
-
250
- /**
251
- * @since 1.1.6
252
- *
253
- * @var FS_Admin_Notices
254
- */
255
- private static $_global_admin_notices;
256
-
257
- /**
258
- * @var FS_Logger
259
- * @since 1.0.0
260
- */
261
- private static $_static_logger;
262
-
263
- /**
264
- * @var FS_Options
265
- * @since 1.0.2
266
- */
267
- private static $_accounts;
268
-
269
- /**
270
- * @since 1.2.2
271
- *
272
- * @var number
273
- */
274
- private $_module_id;
275
-
276
- /**
277
- * @var Freemius[]
278
- */
279
- private static $_instances = array();
280
-
281
- /**
282
- * @since 1.2.3
283
- *
284
- * @var FS_Affiliate
285
- */
286
- private $affiliate = null;
287
-
288
- /**
289
- * @since 1.2.3
290
- *
291
- * @var FS_AffiliateTerms
292
- */
293
- private $plugin_affiliate_terms = null;
294
-
295
- /**
296
- * @since 1.2.3
297
- *
298
- * @var FS_AffiliateTerms
299
- */
300
- private $custom_affiliate_terms = null;
301
-
302
- /**
303
- * @since 2.0.0
304
- *
305
- * @var bool
306
- */
307
- private $_is_multisite_integrated;
308
-
309
- /**
310
- * @since 2.0.0
311
- *
312
- * @var bool True if the current request is for a network admin screen and the plugin is network active.
313
- */
314
- private $_is_network_active;
315
-
316
- /**
317
- * @since 2.0.0
318
- *
319
- * @var int|null The original blog ID the plugin was loaded with.
320
- */
321
- private $_blog_id = null;
322
-
323
- /**
324
- * @since 2.0.0
325
- *
326
- * @var int|null The current execution context. When true, run on network context. When int, run on the specified blog context.
327
- */
328
- private $_context_is_network_or_blog_id = null;
329
-
330
- /**
331
- * @since 2.0.0
332
- *
333
- * @var string
334
- */
335
- private $_dynamically_added_top_level_page_hook_name = '';
336
-
337
- #region Uninstall Reasons IDs
338
-
339
- const REASON_NO_LONGER_NEEDED = 1;
340
- const REASON_FOUND_A_BETTER_PLUGIN = 2;
341
- const REASON_NEEDED_FOR_A_SHORT_PERIOD = 3;
342
- const REASON_BROKE_MY_SITE = 4;
343
- const REASON_SUDDENLY_STOPPED_WORKING = 5;
344
- const REASON_CANT_PAY_ANYMORE = 6;
345
- const REASON_OTHER = 7;
346
- const REASON_DIDNT_WORK = 8;
347
- const REASON_DONT_LIKE_TO_SHARE_MY_INFORMATION = 9;
348
- const REASON_COULDNT_MAKE_IT_WORK = 10;
349
- const REASON_GREAT_BUT_NEED_SPECIFIC_FEATURE = 11;
350
- const REASON_NOT_WORKING = 12;
351
- const REASON_NOT_WHAT_I_WAS_LOOKING_FOR = 13;
352
- const REASON_DIDNT_WORK_AS_EXPECTED = 14;
353
- const REASON_TEMPORARY_DEACTIVATION = 15;
354
-
355
- #endregion
356
-
357
- /* Ctor
358
- ------------------------------------------------------------------------------------------------------------------*/
359
-
360
- /**
361
- * Main singleton instance.
362
- *
363
- * @author Vova Feldman (@svovaf)
364
- * @since 1.0.0
365
- *
366
- * @param number $module_id
367
- * @param string|bool $slug
368
- * @param bool $is_init Since 1.2.1 Is initiation sequence.
369
- */
370
- private function __construct( $module_id, $slug = false, $is_init = false ) {
371
- if ( $is_init && is_numeric( $module_id ) && is_string( $slug ) ) {
372
- $this->store_id_slug_type_path_map( $module_id, $slug );
373
- }
374
-
375
- $this->_module_id = $module_id;
376
- $this->_slug = $this->get_slug();
377
- $this->_module_type = $this->get_module_type();
378
-
379
- $this->_blog_id = is_multisite() ? get_current_blog_id() : null;
380
-
381
- $this->_storage = FS_Storage::instance( $this->_module_type, $this->_slug );
382
-
383
- $this->_cache = FS_Cache_Manager::get_manager( WP_FS___OPTION_PREFIX . "cache_{$module_id}" );
384
-
385
- $this->_logger = FS_Logger::get_logger( WP_FS__SLUG . '_' . $this->get_unique_affix(), WP_FS__DEBUG_SDK, WP_FS__ECHO_DEBUG_SDK );
386
-
387
- $this->_plugin_main_file_path = $this->_find_caller_plugin_file( $is_init );
388
- $this->_plugin_dir_path = plugin_dir_path( $this->_plugin_main_file_path );
389
- $this->_plugin_basename = $this->get_plugin_basename();
390
- $this->_free_plugin_basename = str_replace( '-premium/', '/', $this->_plugin_basename );
391
-
392
- $this->_is_multisite_integrated = (
393
- defined( "WP_FS__PRODUCT_{$module_id}_MULTISITE" ) &&
394
- ( true === constant( "WP_FS__PRODUCT_{$module_id}_MULTISITE" ) )
395
- );
396
-
397
- $this->_is_network_active = (
398
- is_multisite() &&
399
- $this->_is_multisite_integrated &&
400
- // Themes are always network activated, but the ACTUAL activation is per site.
401
- $this->is_plugin() &&
402
- (
403
- is_plugin_active_for_network( $this->_plugin_basename ) ||
404
- // Plugin network level activation or uninstall.
405
- ( fs_is_network_admin() && is_plugin_inactive( $this->_plugin_basename ) )
406
- )
407
- );
408
-
409
- $this->_storage->set_network_active(
410
- $this->_is_network_active,
411
- $this->is_delegated_connection()
412
- );
413
-
414
- if ( ! isset( $this->_storage->is_network_activated ) ) {
415
- $this->_storage->is_network_activated = $this->_is_network_active;
416
- }
417
-
418
- if ( $this->_storage->is_network_activated != $this->_is_network_active ) {
419
- // Update last activation level.
420
- $this->_storage->is_network_activated = $this->_is_network_active;
421
-
422
- $this->maybe_adjust_storage();
423
- }
424
-
425
- #region Migration
426
-
427
- if ( is_multisite() ) {
428
- /**
429
- * If the install_timestamp exists on the site level but doesn't exist on the
430
- * network level storage, it means that we need to process the storage with migration.
431
- *
432
- * The code in this `if` scope will only be executed once and only for the first site that will execute it because once we migrate the storage data, install_timestamp will be already set in the network level storage.
433
- *
434
- * @author Vova Feldman (@svovaf)
435
- * @since 2.0.0
436
- */
437
- if ( false === $this->_storage->get( 'install_timestamp', false, true ) &&
438
- false !== $this->_storage->get( 'install_timestamp', false, false )
439
- ) {
440
- // Initiate storage migration.
441
- $this->_storage->migrate_to_network();
442
-
443
- // Migrate module cache to network level storage.
444
- $this->_cache->migrate_to_network();
445
- }
446
- }
447
-
448
- #endregion
449
-
450
- $base_name_split = explode( '/', $this->_plugin_basename );
451
- $this->_plugin_dir_name = $base_name_split[0];
452
-
453
- if ( $this->_logger->is_on() ) {
454
- $this->_logger->info( 'plugin_main_file_path = ' . $this->_plugin_main_file_path );
455
- $this->_logger->info( 'plugin_dir_path = ' . $this->_plugin_dir_path );
456
- $this->_logger->info( 'plugin_basename = ' . $this->_plugin_basename );
457
- $this->_logger->info( 'free_plugin_basename = ' . $this->_free_plugin_basename );
458
- $this->_logger->info( 'plugin_dir_name = ' . $this->_plugin_dir_name );
459
- }
460
-
461
- // Remember link between file to slug.
462
- $this->store_file_slug_map();
463
-
464
- // Store plugin's initial install timestamp.
465
- if ( ! isset( $this->_storage->install_timestamp ) ) {
466
- $this->_storage->install_timestamp = WP_FS__SCRIPT_START_TIME;
467
- }
468
-
469
- if ( ! is_object( $this->_plugin ) ) {
470
- $this->_plugin = FS_Plugin_Manager::instance( $this->_module_id )->get();
471
- }
472
-
473
- $this->_admin_notices = FS_Admin_Notices::instance(
474
- $this->_slug . ( $this->is_theme() ? ':theme' : '' ),
475
- /**
476
- * Ensure that the admin notice will always have a title by using the stored plugin title if available and
477
- * retrieving the title via the "get_plugin_name" method if there is no stored plugin title available.
478
- *
479
- * @author Leo Fajardo (@leorw)
480
- * @since 1.2.2
481
- */
482
- ( is_object( $this->_plugin ) ? $this->_plugin->title : $this->get_plugin_name() ),
483
- $this->get_unique_affix()
484
- );
485
-
486
- if ( 'true' === fs_request_get( 'fs_clear_api_cache' ) ||
487
- 'true' === fs_request_is_action( 'restart_freemius' )
488
- ) {
489
- FS_Api::clear_cache();
490
- $this->_cache->clear();
491
- }
492
-
493
- $this->_register_hooks();
494
-
495
- /**
496
- * Starting from version 2.0.0, `FS_Site` entities no longer have the `plan` property and have `plan_id`
497
- * instead. This should be called before calling `_load_account()`, otherwise, `$this->_site` will not be
498
- * loaded in `_load_account` for versions of SDK starting from 2.0.0.
499
- *
500
- * @author Leo Fajardo (@leorw)
501
- */
502
- self::migrate_install_plan_to_plan_id( $this->_storage );
503
-
504
- $this->_load_account();
505
-
506
- $this->_version_updates_handler();
507
- }
508
-
509
- /**
510
- * @author Leo Fajardo (@leorw)
511
- * @since 2.3.0
512
- */
513
- private function maybe_adjust_storage() {
514
- $install_timestamp = null;
515
- $prev_is_premium = null;
516
-
517
- $options_to_update = array();
518
-
519
- $is_network_admin = fs_is_network_admin();
520
-
521
- $network_install_timestamp = $this->_storage->get( 'install_timestamp', null, true );
522
-
523
- if ( ! $is_network_admin ) {
524
- if ( is_null( $network_install_timestamp ) ) {
525
- // Plugin was not network-activated before.
526
- return;
527
- }
528
-
529
- if ( is_null( $this->_storage->get( 'install_timestamp', null, false ) ) ) {
530
- // Set the `install_timestamp` only if it's not yet set.
531
- $install_timestamp = $network_install_timestamp;
532
- }
533
-
534
- $prev_is_premium = $this->_storage->get( 'prev_is_premium', null, true );
535
- } else {
536
- $current_wp_user = self::_get_current_wp_user();
537
- $current_fs_user = self::_get_user_by_email( $current_wp_user->user_email );
538
- $network_user_info = array();
539
-
540
- $skips_count = 0;
541
-
542
- $sites = self::get_sites();
543
- $sites_count = count( $sites );
544
-
545
- $blog_id_2_install_map = array();
546
-
547
- $is_first_non_ignored_blog = true;
548
-
549
- foreach ( $sites as $site ) {
550
- $blog_id = self::get_site_blog_id( $site );
551
-
552
- $blog_install_timestamp = $this->_storage->get( 'install_timestamp', null, $blog_id );
553
-
554
- if ( is_null( $blog_install_timestamp ) ) {
555
- // Plugin has not been installed on this blog.
556
- continue;
557
- }
558
-
559
- $is_earlier_install = (
560
- ! is_null( $install_timestamp ) &&
561
- $blog_install_timestamp < $install_timestamp
562
- );
563
-
564
- $install = $this->get_install_by_blog_id( $blog_id );
565
-
566
- $update_network_user_info = false;
567
-
568
- if ( ! is_object( $install ) ) {
569
- if ( ! $this->_storage->get( 'is_anonymous', false, $blog_id ) ) {
570
- // The opt-in decision (whether to skip or opt in) is yet to be made.
571
- continue;
572
- }
573
-
574
- $skips_count ++;
575
- } else {
576
- $blog_id_2_install_map[ $blog_id ] = $install;
577
-
578
- if ( empty( $network_user_info ) ) {
579
- // Set the network user info for the 1st time. Choose any user information whether or not it is for the current WP user.
580
- $update_network_user_info = true;
581
- }
582
-
583
- if ( ! $update_network_user_info &&
584
- is_object( $current_fs_user ) &&
585
- $network_user_info['user_id'] != $current_fs_user->id &&
586
- $install->user_id == $current_fs_user->id
587
- ) {
588
- // If an install that is owned by the current WP user is found, use its user information instead.
589
- $update_network_user_info = true;
590
- }
591
-
592
- if ( ! $update_network_user_info &&
593
- $is_earlier_install &&
594
- ( ! is_object( $current_fs_user ) || $current_fs_user->id == $install->user_id )
595
- ) {
596
- // Update to the earliest install info if there's no install found so far that is owned by the current WP user; OR only if the found install is owned by the current WP user.
597
- $update_network_user_info = true;
598
- }
599
- }
600
-
601
- if ( $update_network_user_info ) {
602
- $network_user_info = array(
603
- 'user_id' => $install->user_id,
604
- 'blog_id' => $blog_id
605
- );
606
- }
607
-
608
- $site_prev_is_premium = $this->_storage->get( 'prev_is_premium', null, $blog_id );
609
-
610
- if ( $is_first_non_ignored_blog ) {
611
- $prev_is_premium = $site_prev_is_premium;
612
-
613
- if ( is_null( $network_install_timestamp ) ) {
614
- $install_timestamp = $blog_install_timestamp;
615
- }
616
-
617
- $is_first_non_ignored_blog = false;
618
-
619
- continue;
620
- }
621
-
622
- if ( ! is_null( $prev_is_premium ) && $prev_is_premium !== $site_prev_is_premium ) {
623
- // If a different `$site_prev_is_premium` value is found, do not include the option in the collection of options to update.
624
- $prev_is_premium = null;
625
- }
626
-
627
- if ( $is_earlier_install ) {
628
- // If an earlier install timestamp is found.
629
- $install_timestamp = $blog_install_timestamp;
630
- }
631
- }
632
-
633
- $installs_count = count( $blog_id_2_install_map );
634
-
635
- if ( $sites_count === ( $installs_count + $skips_count ) ) {
636
- if ( ! empty( $network_user_info ) ) {
637
- $options_to_update['network_user_id'] = $network_user_info['user_id'];
638
- $options_to_update['network_install_blog_id'] = $network_user_info['blog_id'];
639
-
640
- foreach ( $blog_id_2_install_map as $blog_id => $install ) {
641
- if ( $install->user_id == $network_user_info['user_id'] ) {
642
- continue;
643
- }
644
-
645
- $this->_storage->store( 'is_delegated_connection', true, $blog_id );
646
- }
647
- }
648
-
649
- if ( $sites_count === $skips_count ) {
650
- /**
651
- * Assume network-level skipping as the intended action if all actions identified were only
652
- * skipping of the connection (i.e., no opt-ins and delegated connections so far).
653
- */
654
- $options_to_update['is_anonymous_ms'] = true;
655
- } else if ( $sites_count === $installs_count ) {
656
- /**
657
- * Assume network-level opt-in as the intended action if all actions identified were only opt-ins
658
- * (i.e., no delegation and skipping of the connections so far).
659
- */
660
- $options_to_update['is_network_connected'] = true;
661
- }
662
- }
663
- }
664
-
665
- if ( ! is_null( $install_timestamp ) ) {
666
- $options_to_update['install_timestamp'] = $install_timestamp;
667
- }
668
-
669
- if ( ! is_null( $prev_is_premium ) ) {
670
- $options_to_update['prev_is_premium'] = $prev_is_premium;
671
- }
672
-
673
- if ( ! empty( $options_to_update ) ) {
674
- $this->adjust_storage( $options_to_update, $is_network_admin );
675
- }
676
- }
677
-
678
- /**
679
- * @author Leo Fajardo (@leorw)
680
- * @since 2.3.0
681
- *
682
- * @param array $options
683
- * @param bool $is_network_admin
684
- */
685
- private function adjust_storage( $options, $is_network_admin ) {
686
- foreach ( $options as $name => $value ) {
687
- $this->_storage->store( $name, $value, $is_network_admin ? true : null );
688
- }
689
- }
690
-
691
- /**
692
- * Checks whether this module has a settings menu.
693
- *
694
- * @author Leo Fajardo (@leorw)
695
- * @since 1.2.2
696
- *
697
- * @return bool
698
- */
699
- function has_settings_menu() {
700
- return ( $this->_is_network_active && fs_is_network_admin() ) ?
701
- $this->_menu->has_network_menu() :
702
- $this->_menu->has_menu();
703
- }
704
-
705
- /**
706
- * Check if the context module is free wp.org theme.
707
- *
708
- * This method is helpful because:
709
- * 1. wp.org themes are limited to a single submenu item,
710
- * and sub-submenu items are most likely not allowed (never verified).
711
- * 2. wp.org themes are not allowed to redirect the user
712
- * after the theme activation, therefore, the agreed UX
713
- * is showing the opt-in as a modal dialog box after
714
- * activation (approved by @otto42, @emiluzelac, @greenshady, @grapplerulrich).
715
- *
716
- * @author Vova Feldman (@svovaf)
717
- * @since 1.2.2.7
718
- *
719
- * @return bool
720
- */
721
- function is_free_wp_org_theme() {
722
- return (
723
- $this->is_theme() &&
724
- $this->is_org_repo_compliant() &&
725
- ! $this->is_premium()
726
- );
727
- }
728
-
729
- /**
730
- * Checks whether this a submenu item is visible.
731
- *
732
- * @author Vova Feldman (@svovaf)
733
- * @since 1.2.2.6
734
- * @since 1.2.2.7 Even if the menu item was specified to be hidden, when it is the context page, then show the submenu item so the user will have the right context page.
735
- *
736
- * @param string $slug
737
- * @param bool $ignore_free_wp_org_theme_context This is used to decide if the associated tab should be shown
738
- * or hidden.
739
- *
740
- * @return bool
741
- */
742
- function is_submenu_item_visible( $slug, $ignore_free_wp_org_theme_context = false ) {
743
- if ( $this->is_admin_page( $slug ) ) {
744
- /**
745
- * It is the current context page, so show the submenu item
746
- * so the user will have the right context page, even if it
747
- * was set to hidden.
748
- */
749
- return true;
750
- }
751
-
752
- if ( ! $this->has_settings_menu() ) {
753
- // No menu settings at all.
754
- return false;
755
- }
756
-
757
- if ( ! $ignore_free_wp_org_theme_context && $this->is_free_wp_org_theme() ) {
758
- /**
759
- * wp.org themes are limited to a single submenu item, and
760
- * sub-submenu items are most likely not allowed (never verified).
761
- */
762
- return false;
763
- }
764
-
765
- return $this->_menu->is_submenu_item_visible( $slug );
766
- }
767
-
768
- /**
769
- * Check if a Freemius page should be accessible via the UI.
770
- *
771
- * @author Vova Feldman (@svovaf)
772
- * @since 1.2.2.7
773
- *
774
- * @param string $slug
775
- *
776
- * @return bool
777
- */
778
- function is_page_visible( $slug ) {
779
- if ( $this->is_admin_page( $slug ) ) {
780
- return true;
781
- }
782
-
783
- return $this->_menu->is_submenu_item_visible( $slug, true, true );
784
- }
785
-
786
- /**
787
- * @author Vova Feldman (@svovaf)
788
- * @since 1.0.9
789
- */
790
- private function _version_updates_handler() {
791
- if ( ! isset( $this->_storage->sdk_version ) || $this->_storage->sdk_version != $this->version ) {
792
- // Freemius version upgrade mode.
793
- $this->_storage->sdk_last_version = $this->_storage->sdk_version;
794
- $this->_storage->sdk_version = $this->version;
795
-
796
- if ( empty( $this->_storage->sdk_last_version ) ||
797
- version_compare( $this->_storage->sdk_last_version, $this->version, '<' )
798
- ) {
799
- $this->_storage->sdk_upgrade_mode = true;
800
- $this->_storage->sdk_downgrade_mode = false;
801
- } else {
802
- $this->_storage->sdk_downgrade_mode = true;
803
- $this->_storage->sdk_upgrade_mode = false;
804
-
805
- }
806
-
807
- $this->do_action( 'sdk_version_update', $this->_storage->sdk_last_version, $this->version );
808
- }
809
-
810
- $plugin_version = $this->get_plugin_version();
811
- if ( ! isset( $this->_storage->plugin_version ) || $this->_storage->plugin_version != $plugin_version ) {
812
- // Plugin version upgrade mode.
813
- $this->_storage->plugin_last_version = $this->_storage->plugin_version;
814
- $this->_storage->plugin_version = $plugin_version;
815
-
816
- if ( empty( $this->_storage->plugin_last_version ) ||
817
- version_compare( $this->_storage->plugin_last_version, $plugin_version, '<' )
818
- ) {
819
- $this->_storage->plugin_upgrade_mode = true;
820
- $this->_storage->plugin_downgrade_mode = false;
821
- } else {
822
- $this->_storage->plugin_downgrade_mode = true;
823
- $this->_storage->plugin_upgrade_mode = false;
824
- }
825
-
826
- if ( ! empty( $this->_storage->plugin_last_version ) ) {
827
- // Different version of the plugin was installed before, therefore it's an update.
828
- $this->_storage->is_plugin_new_install = false;
829
- }
830
-
831
- $this->do_action( 'plugin_version_update', $this->_storage->plugin_last_version, $plugin_version );
832
- }
833
- }
834
-
835
- #--------------------------------------------------------------------------------
836
- #region Data Migration on SDK Update
837
- #--------------------------------------------------------------------------------
838
-
839
- /**
840
- * @author Vova Feldman (@svovaf)
841
- * @since 1.1.5
842
- *
843
- * @param string $sdk_prev_version
844
- * @param string $sdk_version
845
- */
846
- function _sdk_version_update( $sdk_prev_version, $sdk_version ) {
847
- /**
848
- * @since 1.1.7.3 Fixed unwanted connectivity test cleanup.
849
- */
850
- if ( empty( $sdk_prev_version ) ) {
851
- return;
852
- }
853
-
854
- if ( version_compare( $sdk_prev_version, '2.1.0', '<' ) &&
855
- version_compare( $sdk_version, '2.1.0', '>=' )
856
- ) {
857
- $this->_storage->handle_gdpr_admin_notice = true;
858
- }
859
-
860
- if ( version_compare( $sdk_prev_version, '2.0.0', '<' ) &&
861
- version_compare( $sdk_version, '2.0.0', '>=' )
862
- ) {
863
- $this->migrate_to_subscriptions_collection();
864
-
865
- $this->consolidate_licenses();
866
-
867
- // Clear trial_plan since it's now loaded from the plans collection when needed.
868
- $this->_storage->remove( 'trial_plan', true, false );
869
- }
870
-
871
- if ( version_compare( $sdk_prev_version, '1.2.3', '<' ) &&
872
- version_compare( $sdk_version, '1.2.3', '>=' )
873
- ) {
874
- /**
875
- * Starting from version 1.2.3, paths are stored as relative instead of absolute and some of them can be
876
- * invalid.
877
- *
878
- * @author Leo Fajardo (@leorw)
879
- */
880
- $this->remove_invalid_paths();
881
- }
882
-
883
- if ( version_compare( $sdk_prev_version, '1.1.5', '<' ) &&
884
- version_compare( $sdk_version, '1.1.5', '>=' )
885
- ) {
886
- // On version 1.1.5 merged connectivity and is_on data.
887
- if ( isset( $this->_storage->connectivity_test ) ) {
888
- if ( ! isset( $this->_storage->is_on ) ) {
889
- unset( $this->_storage->connectivity_test );
890
- } else {
891
- $connectivity_data = $this->_storage->connectivity_test;
892
- $connectivity_data['is_active'] = $this->_storage->is_on['is_active'];
893
- $connectivity_data['timestamp'] = $this->_storage->is_on['timestamp'];
894
-
895
- // Override.
896
- $this->_storage->connectivity_test = $connectivity_data;
897
-
898
- // Remove previous structure.
899
- unset( $this->_storage->is_on );
900
- }
901
-
902
- }
903
- }
904
-
905
- if (
906
- version_compare( $sdk_prev_version, '2.2.1', '<' ) &&
907
- version_compare( $sdk_version, '2.2.1', '>=' )
908
- ) {
909
- /**
910
- * Clear the file cache without storing the previous path since it could be a wrong path. For example,
911
- * in the versions of the SDK lower than 2.2.1, it's possible for the path of an add-on to be the same
912
- * as the parent plugin's when the add-on was auto-installed since the relevant method names were not
913
- * skipped in the logic that determines the right path in the `get_caller_main_file_and_type` method
914
- * (e.g. `try_activate_plugin`). Since it was an auto-installation, the caller was the parent plugin
915
- * and so its path was used. In case the stored path is wrong, clearing the cache will resolve issues
916
- * related to data mix-up between plugins (e.g. titles and versions of an add-on and its parent plugin).
917
- *
918
- * @author Leo Fajardo (@leorw)
919
- * @since 2.2.1
920
- */
921
- $this->clear_module_main_file_cache( false );
922
- }
923
- }
924
-
925
- /**
926
- * @author Leo Fajardo (@leorw)
927
- * @since 2.0.0
928
- *
929
- * @param \FS_Storage $storage
930
- * @param bool|int|null $blog_id
931
- */
932
- private static function migrate_install_plan_to_plan_id( FS_Storage $storage, $blog_id = null ) {
933
- if ( empty( $storage->sdk_version ) ) {
934
- // New installation of the plugin, no need to upgrade.
935
- return;
936
- }
937
-
938
- if ( ! version_compare( $storage->sdk_version, '2.0.0', '<' ) ) {
939
- // Previous version is >= 2.0.0, so no need to migrate.
940
- return;
941
- }
942
-
943
- // Alias.
944
- $module_type = $storage->get_module_type();
945
- $module_slug = $storage->get_module_slug();
946
-
947
- $installs = self::get_all_sites( $module_type, $blog_id );
948
- $install = isset( $installs[ $module_slug ] ) ? $installs[ $module_slug ] : null;
949
-
950
- if ( ! is_object( $install ) ) {
951
- return;
952
- }
953
-
954
- if ( isset( $install->plan ) && is_object( $install->plan ) ) {
955
- if ( isset( $install->plan->id ) && ! empty( $install->plan->id ) ) {
956
- $install->plan_id = self::_decrypt( $install->plan->id );
957
- }
958
-
959
- unset( $install->plan );
960
-
961
- $installs[ $module_slug ] = clone $install;
962
-
963
- self::set_account_option_by_module(
964
- $module_type,
965
- 'sites',
966
- $installs,
967
- true,
968
- $blog_id
969
- );
970
- }
971
- }
972
-
973
- /**
974
- * @author Leo Fajardo (@leorw)
975
- * @since 2.0.0
976
- */
977
- private function migrate_to_subscriptions_collection() {
978
- if ( ! is_object( $this->_site ) ) {
979
- return;
980
- }
981
-
982
- if ( isset( $this->_storage->subscription ) && is_object( $this->_storage->subscription ) ) {
983
- $this->_storage->subscriptions = array( $this->_storage->subscription );
984
- }
985
- }
986
-
987
- /**
988
- * @author Leo Fajardo (@leorw)
989
- * @since 2.0.0
990
- */
991
- private function consolidate_licenses() {
992
- $plugin_licenses = self::get_account_option( 'licenses', WP_FS__MODULE_TYPE_PLUGIN );
993
- if ( isset( $plugin_licenses[ $this->_slug ] ) ) {
994
- $plugin_licenses = $plugin_licenses[ $this->_slug ];
995
- } else {
996
- $plugin_licenses = array();
997
- }
998
-
999
- $theme_licenses = self::get_account_option( 'licenses', WP_FS__MODULE_TYPE_THEME );
1000
- if ( isset( $theme_licenses[ $this->_slug ] ) ) {
1001
- $theme_licenses = $theme_licenses[ $this->_slug ];
1002
- } else {
1003
- $theme_licenses = array();
1004
- }
1005
-
1006
- if ( empty( $plugin_licenses ) && empty( $theme_licenses ) ) {
1007
- return;
1008
- }
1009
-
1010
- $all_licenses = array();
1011
- $user_id_license_ids_map = array();
1012
-
1013
- foreach ( $plugin_licenses as $user_id => $user_licenses ) {
1014
- if ( is_array( $user_licenses ) ) {
1015
- if ( ! isset( $user_license_ids[ $user_id ] ) ) {
1016
- $user_id_license_ids_map[ $user_id ] = array();
1017
- }
1018
-
1019
- foreach ( $user_licenses as $user_license ) {
1020
- $all_licenses[] = $user_license;
1021
- $user_id_license_ids_map[ $user_id ][] = $user_license->id;
1022
- }
1023
- }
1024
- }
1025
-
1026
- foreach ( $theme_licenses as $user_id => $user_licenses ) {
1027
- if ( is_array( $user_licenses ) ) {
1028
- if ( ! isset( $user_license_ids[ $user_id ] ) ) {
1029
- $user_id_license_ids_map[ $user_id ] = array();
1030
- }
1031
-
1032
- foreach ( $user_licenses as $user_license ) {
1033
- $all_licenses[] = $user_license;
1034
- $user_id_license_ids_map[ $user_id ][] = $user_license->id;
1035
- }
1036
- }
1037
- }
1038
-
1039
- self::store_user_id_license_ids_map(
1040
- $user_id_license_ids_map,
1041
- $this->_module_id
1042
- );
1043
-
1044
- $this->_store_licenses( true, $this->_module_id, $all_licenses );
1045
- }
1046
-
1047
- /**
1048
- * Remove invalid paths.
1049
- *
1050
- * @author Leo Fajardo (@leorw)
1051
- * @since 1.2.3
1052
- */
1053
- private function remove_invalid_paths() {
1054
- // Remove invalid path that is still associated with the current slug if there's any.
1055
- $file_slug_map = self::$_accounts->get_option( 'file_slug_map', array() );
1056
- foreach ( $file_slug_map as $plugin_basename => $slug ) {
1057
- if ( $slug === $this->_slug &&
1058
- $plugin_basename !== $this->_plugin_basename &&
1059
- ! file_exists( $this->get_absolute_path( $plugin_basename ) )
1060
- ) {
1061
- unset( $file_slug_map[ $plugin_basename ] );
1062
- self::$_accounts->set_option( 'file_slug_map', $file_slug_map, true );
1063
-
1064
- break;
1065
- }
1066
- }
1067
- }
1068
-
1069
- /**
1070
- * @author Vova Feldman (@svovaf)
1071
- * @since 1.2.2.7
1072
- *
1073
- * @param string $plugin_prev_version
1074
- * @param string $plugin_version
1075
- */
1076
- function _after_version_update( $plugin_prev_version, $plugin_version ) {
1077
- if ( $this->is_theme() ) {
1078
- // Expire the cache of the previous tabs since the theme may
1079
- // have setting updates.
1080
- $this->_cache->expire( 'tabs' );
1081
- $this->_cache->expire( 'tabs_stylesheets' );
1082
- }
1083
- }
1084
-
1085
- /**
1086
- * A special migration logic for the $_accounts, executed for all the plugins in the system:
1087
- * - Moves some data to the network level storage.
1088
- * - If the plugin's connection was skipped for all sites, set the plugin as if it was network skipped.
1089
- * - If the plugin's connection was ignored for all sites, don't do anything in terms of the network connection.
1090
- * - If the plugin was connected to all sites by the same super-admin, set the plugin as if was network opted-in for all sites.
1091
- * - If there's at least one site that was connected by a super-admin, find the "main super-admin" (the one that installed the majority of the plugin installs) and set the plugin as if was network activated with the main super-admin, set all the sites that were skipped or opted-in with a different user to delegated mode. Then, prompt the currently logged super-admin to choose what to do with the ignored sites.
1092
- * - If there are any sites in the network which the connection decision was not yet taken for, set this plugin into network activation mode so a super-admin can choose what to do with the rest of the sites.
1093
- *
1094
- * @author Vova Feldman (@svovaf)
1095
- * @since 2.0.0
1096
- */
1097
- private static function migrate_accounts_to_network() {
1098
- $sites = self::get_sites();
1099
- $sites_count = count( $sites );
1100
- $connection_status = array();
1101
- $plugin_slugs = array();
1102
- foreach ( $sites as $site ) {
1103
- $blog_id = self::get_site_blog_id( $site );
1104
-
1105
- self::$_accounts->migrate_to_network( $blog_id );
1106
-
1107
- /**
1108
- * Build a list of all Freemius powered plugins slugs.
1109
- */
1110
- $id_slug_type_path_map = self::$_accounts->get_option( 'id_slug_type_path_map', array(), $blog_id );
1111
- foreach ( $id_slug_type_path_map as $module_id => $data ) {
1112
- if ( WP_FS__MODULE_TYPE_PLUGIN === $data['type'] ) {
1113
- $plugin_slugs[ $data['slug'] ] = true;
1114
- }
1115
- }
1116
-
1117
- $installs = self::get_account_option( 'sites', WP_FS__MODULE_TYPE_PLUGIN, $blog_id );
1118
-
1119
- if ( is_array( $installs ) ) {
1120
- foreach ( $installs as $slug => $install ) {
1121
- if ( ! isset( $connection_status[ $slug ] ) ) {
1122
- $connection_status[ $slug ] = array();
1123
- }
1124
-
1125
- if ( is_object( $install ) &&
1126
- FS_Site::is_valid_id( $install->id ) &&
1127
- FS_User::is_valid_id( $install->user_id )
1128
- ) {
1129
- $connection_status[ $slug ][ $blog_id ] = $install->user_id;
1130
- }
1131
- }
1132
- }
1133
- }
1134
-
1135
- foreach ( $plugin_slugs as $slug => $true ) {
1136
- if ( ! isset( $connection_status[ $slug ] ) ) {
1137
- $connection_status[ $slug ] = array();
1138
- }
1139
-
1140
- foreach ( $sites as $site ) {
1141
- $blog_id = self::get_site_blog_id( $site );
1142
-
1143
- if ( isset( $connection_status[ $slug ][ $blog_id ] ) ) {
1144
- continue;
1145
- }
1146
-
1147
- $storage = FS_Storage::instance( WP_FS__MODULE_TYPE_PLUGIN, $slug );
1148
-
1149
- $is_anonymous = $storage->get( 'is_anonymous', null, $blog_id );
1150
-
1151
- if ( ! is_null( $is_anonymous ) ) {
1152
- // Since 1.1.3 is_anonymous is an array.
1153
- if ( is_array( $is_anonymous ) && isset( $is_anonymous['is'] ) ) {
1154
- $is_anonymous = $is_anonymous['is'];
1155
- }
1156
-
1157
- if ( is_bool( $is_anonymous ) && true === $is_anonymous ) {
1158
- $connection_status[ $slug ][ $blog_id ] = 'skipped';
1159
- }
1160
- }
1161
-
1162
- if ( ! isset( $connection_status[ $slug ][ $blog_id ] ) ) {
1163
- $connection_status[ $slug ][ $blog_id ] = 'ignored';
1164
- }
1165
- }
1166
- }
1167
-
1168
- $super_admins = array();
1169
-
1170
- foreach ( $connection_status as $slug => $blogs_status ) {
1171
- $skips = 0;
1172
- $ignores = 0;
1173
- $connections = 0;
1174
- $opted_in_users = array();
1175
- $opted_in_super_admins = array();
1176
-
1177
- $storage = FS_Storage::instance( WP_FS__MODULE_TYPE_PLUGIN, $slug );
1178
-
1179
- foreach ( $blogs_status as $blog_id => $status_or_user_id ) {
1180
- if ( 'skipped' === $status_or_user_id ) {
1181
- $skips ++;
1182
- } else if ( 'ignored' === $status_or_user_id ) {
1183
- $ignores ++;
1184
- } else if ( FS_User::is_valid_id( $status_or_user_id ) ) {
1185
- $connections ++;
1186
-
1187
- if ( ! isset( $opted_in_users[ $status_or_user_id ] ) ) {
1188
- $opted_in_users[ $status_or_user_id ] = array();
1189
- }
1190
-
1191
- $opted_in_users[ $status_or_user_id ][] = $blog_id;
1192
-
1193
- if ( isset( $super_admins[ $status_or_user_id ] ) ||
1194
- self::is_super_admin( $status_or_user_id )
1195
- ) {
1196
- // Cache super-admin data.
1197
- $super_admins[ $status_or_user_id ] = true;
1198
-
1199
- // Remember opted-in super-admins for the plugin.
1200
- $opted_in_super_admins[ $status_or_user_id ] = true;
1201
- }
1202
- }
1203
- }
1204
-
1205
- $main_super_admin_user_id = null;
1206
- $all_migrated = false;
1207
- if ( $sites_count == $skips ) {
1208
- // All sites were skipped -> network skip by copying the anonymous mode from any of the sites.
1209
- $storage->is_anonymous_ms = $storage->is_anonymous;
1210
-
1211
- $all_migrated = true;
1212
- } else if ( $sites_count == $ignores ) {
1213
- // Don't do anything, still in activation mode.
1214
-
1215
- $all_migrated = true;
1216
- } else if ( 0 < count( $opted_in_super_admins ) ) {
1217
- // Find the super-admin with the majority of installs.
1218
- $max_installs_by_super_admin = 0;
1219
- foreach ( $opted_in_super_admins as $user_id => $true ) {
1220
- $installs_count = count( $opted_in_users[ $user_id ] );
1221
-
1222
- if ( $installs_count > $max_installs_by_super_admin ) {
1223
- $max_installs_by_super_admin = $installs_count;
1224
- $main_super_admin_user_id = $user_id;
1225
- }
1226
- }
1227
-
1228
- if ( $sites_count == $connections && 1 == count( $opted_in_super_admins ) ) {
1229
- // Super-admin opted-in for all sites in the network.
1230
- $storage->is_network_connected = true;
1231
-
1232
- $all_migrated = true;
1233
- }
1234
-
1235
- // Store network user.
1236
- $storage->network_user_id = $main_super_admin_user_id;
1237
-
1238
- $storage->network_install_blog_id = ( $sites_count == $connections ) ?
1239
- // Since all sites are opted-in, associating with the main site.
1240
- get_current_blog_id() :
1241
- // Associating with the 1st found opted-in site.
1242
- $opted_in_users[ $main_super_admin_user_id ][0];
1243
-
1244
- /**
1245
- * Make sure we migrate the plan ID of the network install, otherwise, if after the migration
1246
- * the 1st page that will be loaded is the network level WP Admin and $storage->network_install_blog_id
1247
- * is different than the main site of the network, the $this->_site will not be set since the plan_id
1248
- * will be empty.
1249
- */
1250
- $storage->migrate_to_network();
1251
- self::migrate_install_plan_to_plan_id( $storage, $storage->network_install_blog_id );
1252
- } else {
1253
- // At least one opt-in. All the opt-in were created by a non-super-admin.
1254
- if ( 0 == $ignores ) {
1255
- // All sites were opted-in or skipped, all by non-super-admin. So delegate all.
1256
- $storage->store( 'is_delegated_connection', true, true );
1257
-
1258
- $all_migrated = true;
1259
- }
1260
- }
1261
-
1262
- if ( ! $all_migrated ) {
1263
- /**
1264
- * Delegate all sites that were:
1265
- * 1) Opted-in by a user that is NOT the main-super-admin.
1266
- * 2) Skipped and non of the sites was opted-in by a super-admin. If any site was opted-in by a super-admin, there will be a main-super-admin, and we consider the skip as if it was done by that user.
1267
- */
1268
- foreach ( $blogs_status as $blog_id => $status_or_user_id ) {
1269
- if ( $status_or_user_id == $main_super_admin_user_id ) {
1270
- continue;
1271
- }
1272
-
1273
- if ( FS_User::is_valid_id( $status_or_user_id ) ||
1274
- ( 'skipped' === $status_or_user_id && is_null( $main_super_admin_user_id ) )
1275
- ) {
1276
- $storage->store( 'is_delegated_connection', true, $blog_id );
1277
- }
1278
- }
1279
- }
1280
-
1281
-
1282
- if ( ( $connections + $skips > 0 ) ) {
1283
- if ( $ignores > 0 ) {
1284
- /**
1285
- * If admin already opted-in or skipped in any of the network sites, and also
1286
- * have sites which the connection decision was not yet taken, set this plugin
1287
- * into network activation mode so the super-admin can choose what to do with
1288
- * the rest of the sites.
1289
- */
1290
- self::set_network_upgrade_mode( $storage );
1291
- }
1292
- }
1293
- }
1294
- }
1295
-
1296
- /**
1297
- * Set a module into network upgrade mode.
1298
- *
1299
- * @author Vova Feldman (@svovaf)
1300
- * @since 2.0.0
1301
- *
1302
- * @param \FS_Storage $storage
1303
- *
1304
- * @return bool
1305
- */
1306
- private static function set_network_upgrade_mode( FS_Storage $storage ) {
1307
- return $storage->is_network_activation = true;
1308
- }
1309
-
1310
- /**
1311
- * Will return true after upgrading to the SDK with the network level integration,
1312
- * when the super-admin involvement is required regarding the rest of the sites.
1313
- *
1314
- * @author Vova Feldman (@svovaf)
1315
- * @since 2.0.0
1316
- *
1317
- * @return bool
1318
- */
1319
- function is_network_upgrade_mode() {
1320
- return $this->_storage->get( 'is_network_activation' );
1321
- }
1322
-
1323
- /**
1324
- * Clear flag after the upgrade mode completion.
1325
- *
1326
- * @author Vova Feldman (@svovaf)
1327
- * @since 2.0.0
1328
- *
1329
- * @return bool True if network activation was on and now completed.
1330
- */
1331
- private function network_upgrade_mode_completed() {
1332
- if ( fs_is_network_admin() && $this->is_network_upgrade_mode() ) {
1333
- $this->_storage->remove( 'is_network_activation' );
1334
-
1335
- return true;
1336
- }
1337
-
1338
- return false;
1339
- }
1340
-
1341
- #endregion
1342
-
1343
- /**
1344
- * This action is connected to the 'plugins_loaded' hook and helps to determine
1345
- * if this is a new plugin installation or a plugin update.
1346
- *
1347
- * There are 3 different use-cases:
1348
- * 1) New plugin installation right with Freemius:
1349
- * 1.1 _activate_plugin_event_hook() will be executed first
1350
- * 1.2 Since $this->_storage->is_plugin_new_install is not set,
1351
- * and $this->_storage->plugin_last_version is not set,
1352
- * $this->_storage->is_plugin_new_install will be set to TRUE.
1353
- * 1.3 When _plugins_loaded() will be executed, $this->_storage->is_plugin_new_install will
1354
- * be already set to TRUE.
1355
- *
1356
- * 2) Plugin update, didn't have Freemius before, and now have the SDK:
1357
- * 2.1 _activate_plugin_event_hook() will not be executed, because
1358
- * the activation hook do NOT fires on updates since WP 3.1.
1359
- * 2.2 When _plugins_loaded() will be executed, $this->_storage->is_plugin_new_install will
1360
- * be empty, therefore, it will be set to FALSE.
1361
- *
1362
- * 3) Plugin update, had Freemius in prev version as well:
1363
- * 3.1 _version_updates_handler() will be executed 1st, since FS was installed
1364
- * before, $this->_storage->plugin_last_version will NOT be empty,
1365
- * therefore, $this->_storage->is_plugin_new_install will be set to FALSE.
1366
- * 3.2 When _plugins_loaded() will be executed, $this->_storage->is_plugin_new_install is
1367
- * already set, therefore, it will not be modified.
1368
- *
1369
- * Use-case #3 is backward compatible, #3.1 will be executed since 1.0.9.
1370
- *
1371
- * NOTE:
1372
- * The only fallback of this mechanism is if an admin updates a plugin based on use-case #2,
1373
- * and then, the next immediate PageView is the plugin's main settings page, it will not
1374
- * show the opt-in right away. The reason it will happen is because Freemius execution
1375
- * will be turned off till the plugin is fully loaded at least once
1376
- * (till $this->_storage->was_plugin_loaded is TRUE).
1377
- *
1378
- * @author Vova Feldman (@svovaf)
1379
- * @since 1.1.9
1380
- *
1381
- */
1382
- function _plugins_loaded() {
1383
- // Update flag that plugin was loaded with Freemius at least once.
1384
- $this->_storage->was_plugin_loaded = true;
1385
-
1386
- /**
1387
- * Bug fix - only set to false when it's a plugin, due to the
1388
- * execution sequence of the theme hooks and our methods, if
1389
- * this will be set for themes, Freemius will always assume
1390
- * it's a theme update.
1391
- *
1392
- * @author Vova Feldman (@svovaf)
1393
- * @since 1.2.2.2
1394
- */
1395
- if ( $this->is_plugin() &&
1396
- ! isset( $this->_storage->is_plugin_new_install )
1397
- ) {
1398
- $this->_storage->is_plugin_new_install = false;
1399
- }
1400
- }
1401
-
1402
- /**
1403
- * Add special parameter to WP admin AJAX calls so when we
1404
- * process AJAX calls we can identify its source properly.
1405
- *
1406
- * @author Leo Fajardo (@leorw)
1407
- * @since 2.0.0
1408
- */
1409
- static function _enrich_ajax_url() {
1410
- $admin_param = is_network_admin() ?
1411
- '_fs_network_admin' :
1412
- '_fs_blog_admin';
1413
- ?>
1414
- <script type="text/javascript">
1415
- (function ($) {
1416
- $(document).ajaxSend(function (event, jqxhr, settings) {
1417
- if (settings.url &&
1418
- -1 < settings.url.indexOf('admin-ajax.php') &&
1419
- ! ( settings.url.indexOf( '<?php echo $admin_param ?>' ) > 0 )
1420
- ) {
1421
- if (settings.url.indexOf('?') > 0) {
1422
- settings.url += '&';
1423
- } else {
1424
- settings.url += '?';
1425
- }
1426
-
1427
- settings.url += '<?php echo $admin_param ?>=true';
1428
-
1429
- }
1430
- });
1431
- })(jQuery);
1432
- </script>
1433
- <?php
1434
- }
1435
-
1436
- /**
1437
- * Opens the support forum subemenu item in a new browser page.
1438
- *
1439
- * @author Vova Feldman (@svovaf)
1440
- * @since 2.1.4
1441
- */
1442
- static function _open_support_forum_in_new_page() {
1443
- ?>
1444
- <script type="text/javascript">
1445
- (function ($) {
1446
- $('.fs-submenu-item.wp-support-forum').parent().attr('target', '_blank');
1447
- })(jQuery);
1448
- </script>
1449
- <?php
1450
- }
1451
-
1452
- /**
1453
- * @author Vova Feldman (@svovaf)
1454
- * @since 1.0.9
1455
- */
1456
- private function _register_hooks() {
1457
- $this->_logger->entrance();
1458
-
1459
- if ( is_admin() ) {
1460
- add_action( 'plugins_loaded', array( &$this, '_hook_action_links_and_register_account_hooks' ) );
1461
-
1462
- if ( $this->is_plugin() ) {
1463
- if ( self::is_plugin_install_page() && true !== fs_request_get_bool( 'fs_allow_updater_and_dialog' ) ) {
1464
- /**
1465
- * Unless the `fs_allow_updater_and_dialog` URL param exists and its value is `true`, make
1466
- * Freemius-related updates unavailable on the "Add Plugins" admin page (/plugin-install.php)
1467
- * so that they won't interfere with the .org plugins' functionalities on that page (e.g.
1468
- * updating of a .org plugin).
1469
- */
1470
- add_filter( 'site_transient_update_plugins', array( 'Freemius', '_remove_fs_updates_from_plugin_install_page' ), 10, 2 );
1471
- } else if ( self::is_plugins_page() || self::is_updates_page() ) {
1472
- /**
1473
- * On the "Plugins" and "Updates" admin pages, if there are premium or non–org-compliant plugins, modify their details dialog URLs (add a Freemius-specific param) so that the SDK can determine if the plugin information dialog should show information from Freemius.
1474
- *
1475
- * @author Leo Fajardo (@leorw)
1476
- * @since 2.2.3
1477
- */
1478
- add_action( 'admin_footer', array( 'Freemius', '_prepend_fs_allow_updater_and_dialog_flag_url_param' ) );
1479
- }
1480
-
1481
- $plugin_dir = dirname( $this->_plugin_dir_path ) . '/';
1482
-
1483
- /**
1484
- * @since 1.2.2
1485
- *
1486
- * Hook to both free and premium version activations to support
1487
- * auto deactivation on the other version activation.
1488
- */
1489
- register_activation_hook(
1490
- $plugin_dir . $this->_free_plugin_basename,
1491
- array( &$this, '_activate_plugin_event_hook' )
1492
- );
1493
-
1494
- register_activation_hook(
1495
- $plugin_dir . $this->premium_plugin_basename(),
1496
- array( &$this, '_activate_plugin_event_hook' )
1497
- );
1498
- } else {
1499
- add_action( 'after_switch_theme', array( &$this, '_activate_theme_event_hook' ), 10, 2 );
1500
-
1501
- /**
1502
- * Include the required hooks to capture the theme settings' page tabs
1503
- * and cache them.
1504
- *
1505
- * @author Vova Feldman (@svovaf)
1506
- * @since 1.2.2.7
1507
- */
1508
- if ( ! $this->_cache->has_valid( 'tabs' ) ) {
1509
- add_action( 'admin_footer', array( &$this, '_tabs_capture' ) );
1510
- // Add license activation AJAX callback.
1511
- $this->add_ajax_action( 'store_tabs', array( &$this, '_store_tabs_ajax_action' ) );
1512
-
1513
- add_action( 'admin_enqueue_scripts', array( &$this, '_store_tabs_styles' ), 9999999 );
1514
- }
1515
-
1516
- add_action(
1517
- 'admin_footer',
1518
- array( &$this, '_add_freemius_tabs' ),
1519
- /**
1520
- * The tabs JS code must be executed after the tabs capture logic (_tabs_capture()).
1521
- * That's why the priority is 11 while the tabs capture logic is added
1522
- * with priority 10.
1523
- *
1524
- * @author Vova Feldman (@svovaf)
1525
- */
1526
- 11
1527
- );
1528
-
1529
- add_action( 'admin_footer', array( &$this, '_style_premium_theme' ) );
1530
- }
1531
-
1532
- /**
1533
- * Part of the mechanism to identify new plugin install vs. plugin update.
1534
- *
1535
- * @author Vova Feldman (@svovaf)
1536
- * @since 1.1.9
1537
- */
1538
- if ( empty( $this->_storage->was_plugin_loaded ) ) {
1539
- /**
1540
- * During the plugin activation (not theme), 'plugins_loaded' will be already executed
1541
- * when the logic gets here since the activation logic first add the activate plugins,
1542
- * then triggers 'plugins_loaded', and only then include the code of the plugin that
1543
- * is activated. Which means that _plugins_loaded() will NOT be executed during the
1544
- * plugin activation, and that IS intentional.
1545
- *
1546
- * @author Vova Feldman (@svovaf)
1547
- */
1548
- if ( $this->is_plugin() && $this->is_activation_mode( false ) ) {
1549
- add_action( 'plugins_loaded', array( &$this, '_plugins_loaded' ) );
1550
- } else {
1551
- // If was activated before, then it was already loaded before.
1552
- $this->_plugins_loaded();
1553
- }
1554
- }
1555
-
1556
- if ( ! self::is_ajax() ) {
1557
- if ( ! $this->is_addon() ) {
1558
- add_action( 'init', array( &$this, '_add_default_submenu_items' ), WP_FS__LOWEST_PRIORITY );
1559
- }
1560
- }
1561
-
1562
- if ( $this->_storage->handle_gdpr_admin_notice ) {
1563
- add_action( 'init', array( &$this, '_maybe_show_gdpr_admin_notice' ) );
1564
- }
1565
-
1566
- add_action( 'init', array( &$this, '_maybe_add_gdpr_optin_ajax_handler') );
1567
- }
1568
-
1569
- if ( $this->is_plugin() ) {
1570
- if ( $this->_is_network_active ) {
1571
- add_action( 'wpmu_new_blog', array( $this, '_after_new_blog_callback' ), 10, 6 );
1572
- }
1573
-
1574
- register_deactivation_hook( $this->_plugin_main_file_path, array( &$this, '_deactivate_plugin_hook' ) );
1575
- }
1576
-
1577
- if ( is_multisite() ) {
1578
- add_action( 'deactivate_blog', array( &$this, '_after_site_deactivated_callback' ) );
1579
- add_action( 'archive_blog', array( &$this, '_after_site_deactivated_callback' ) );
1580
- add_action( 'make_spam_blog', array( &$this, '_after_site_deactivated_callback' ) );
1581
- add_action( 'deleted_blog', array( &$this, '_after_site_deleted_callback' ), 10, 2 );
1582
-
1583
- add_action( 'activate_blog', array( &$this, '_after_site_reactivated_callback' ) );
1584
- add_action( 'unarchive_blog', array( &$this, '_after_site_reactivated_callback' ) );
1585
- add_action( 'make_ham_blog', array( &$this, '_after_site_reactivated_callback' ) );
1586
- }
1587
-
1588
- if ( $this->is_theme() &&
1589
- self::is_customizer() &&
1590
- $this->apply_filters( 'show_customizer_upsell', true )
1591
- ) {
1592
- // Register customizer upsell.
1593
- add_action( 'customize_register', array( &$this, '_customizer_register' ) );
1594
- }
1595
-
1596
- add_action( 'admin_init', array( &$this, '_redirect_on_clicked_menu_link' ), WP_FS__LOWEST_PRIORITY );
1597
-
1598
- if ( $this->is_theme() ) {
1599
- add_action( 'admin_init', array( &$this, '_add_tracking_links' ) );
1600
- }
1601
-
1602
- add_action( 'admin_init', array( &$this, '_add_license_activation' ) );
1603
- add_action( 'admin_init', array( &$this, '_add_premium_version_upgrade_selection' ) );
1604
- add_action( 'admin_init', array( &$this, '_add_beta_mode_update_handler' ) );
1605
-
1606
- $this->add_ajax_action( 'update_billing', array( &$this, '_update_billing_ajax_action' ) );
1607
- $this->add_ajax_action( 'start_trial', array( &$this, '_start_trial_ajax_action' ) );
1608
-
1609
- if ( $this->_is_network_active && fs_is_network_admin() ) {
1610
- $this->add_ajax_action( 'network_activate', array( &$this, '_network_activate_ajax_action' ) );
1611
- }
1612
-
1613
- $this->add_ajax_action( 'install_premium_version', array(
1614
- &$this,
1615
- '_install_premium_version_ajax_action'
1616
- ) );
1617
-
1618
- $this->add_ajax_action( 'submit_affiliate_application', array( &$this, '_submit_affiliate_application' ) );
1619
-
1620
- $this->add_action( 'after_plans_sync', array( &$this, '_check_for_trial_plans' ) );
1621
-
1622
- $this->add_action( 'sdk_version_update', array( &$this, '_sdk_version_update' ), WP_FS__DEFAULT_PRIORITY, 2 );
1623
-
1624
- $this->add_action(
1625
- 'plugin_version_update',
1626
- array( &$this, '_after_version_update' ),
1627
- WP_FS__DEFAULT_PRIORITY,
1628
- 2
1629
- );
1630
- $this->add_filter( 'after_code_type_change', array( &$this, '_after_code_type_change' ) );
1631
-
1632
- add_action( 'admin_init', array( &$this, '_add_trial_notice' ) );
1633
- add_action( 'admin_init', array( &$this, '_add_affiliate_program_notice' ) );
1634
- add_action( 'admin_enqueue_scripts', array( &$this, '_enqueue_common_css' ) );
1635
-
1636
- /**
1637
- * Handle request to reset anonymous mode for `get_reconnect_url()`.
1638
- *
1639
- * @author Vova Feldman (@svovaf)
1640
- * @since 1.2.1.5
1641
- */
1642
- if ( fs_request_is_action( 'reset_anonymous_mode' ) &&
1643
- $this->get_unique_affix() === fs_request_get( 'fs_unique_affix' )
1644
- ) {
1645
- add_action( 'admin_init', array( &$this, 'connect_again' ) );
1646
- }
1647
- }
1648
-
1649
- /**
1650
- * Makes Freemius-related updates unavailable on the "Add Plugins" admin page (/plugin-install.php) so that
1651
- * they won't interfere with the .org plugins' functionalities on that page (e.g. updating of a .org plugin).
1652
- *
1653
- * @author Leo Fajardo (@leorw)
1654
- * @since 2.2.3
1655
- *
1656
- * @param object $updates
1657
- * @param string|null $transient
1658
- *
1659
- * @return object
1660
- */
1661
- static function _remove_fs_updates_from_plugin_install_page( $updates, $transient = null ) {
1662
- if ( is_object( $updates ) && isset( $updates->response ) ) {
1663
- foreach ( $updates->response as $file => $plugin ) {
1664
- if ( isset( $plugin->package ) && false !== strpos( $plugin->package, 'api.freemius' ) ) {
1665
- unset( $updates->response[ $file ] );
1666
- }
1667
- }
1668
- }
1669
-
1670
- return $updates;
1671
- }
1672
-
1673
- /**
1674
- * Prepends the `fs_allow_updater_and_dialog` param to the plugin information URLs to tell the SDK to handle
1675
- * the information that is shown on the plugin details dialog that is shown when the relevant link is clicked.
1676
- *
1677
- * @author Leo Fajardo (@leorw)
1678
- * @since 2.2.3
1679
- *
1680
- * @return string
1681
- */
1682
- static function _prepend_fs_allow_updater_and_dialog_flag_url_param() {
1683
- $slug_basename_map = array();
1684
- foreach ( self::$_instances as $instance ) {
1685
- if ( ! $instance->is_plugin() ) {
1686
- continue;
1687
- }
1688
-
1689
- $slug_basename_map[ $instance->get_slug() ] = $instance->premium_plugin_basename();
1690
- }
1691
- ?>
1692
- <script type="text/javascript">
1693
- (function( $ ) {
1694
- var slugBasenameMap = <?php echo json_encode( $slug_basename_map ) ?>;
1695
- for ( var slug in slugBasenameMap ) {
1696
- var basename = slugBasenameMap[ slug ];
1697
-
1698
- // Try to get the plugin rows if on the "Plugins" page.
1699
- var $pluginRows = $( '.wp-list-table.plugins tr[data-plugin="' + basename + '"]');
1700
-
1701
- if ( 0 === $pluginRows.length ) {
1702
- // Try to get the plugin rows if on the "Updates" page.
1703
- var $pluginCheckbox = $( '#update-plugins-table input[type="checkbox"][value="' + basename + '"]' );
1704
- if ( 0 !== $pluginCheckbox.length ) {
1705
- $pluginRows = $pluginCheckbox.parents( 'tr:first' );
1706
- }
1707
- }
1708
-
1709
- if ( 0 === $pluginRows.length ) {
1710
- // No plugin rows found.
1711
- continue;
1712
- }
1713
-
1714
- // Find the "View details" links and add the `fs_allow_updater_and_dialog` param to the URL.
1715
- $pluginRows.find( 'a[href*="plugin-install.php?tab=plugin-information"]' ).each(function() {
1716
- var $this = $( this ),
1717
- href = $this.attr( 'href' ).replace( '?tab=', '?fs_allow_updater_and_dialog=true&tab=');
1718
-
1719
- $this.attr( 'href', href );
1720
- });
1721
- }
1722
- })( jQuery );
1723
- </script>
1724
- <?php
1725
- }
1726
-
1727
- /**
1728
- * @author Leo Fajardo (@leorw)
1729
- * @since 2.3.0
1730
- */
1731
- static function _maybe_add_beta_label_styles() {
1732
- $has_any_beta_version = false;
1733
-
1734
- foreach ( self::$_instances as $instance ) {
1735
- if ( $instance->is_beta() ) {
1736
- $has_any_beta_version = true;
1737
- break;
1738
- }
1739
- }
1740
-
1741
- if ( $has_any_beta_version ) {
1742
- fs_enqueue_local_style( 'fs_plugins', '/admin/plugins.css' );
1743
- }
1744
- }
1745
-
1746
- /**
1747
- * @author Leo Fajardo (@leorw)
1748
- * @since 2.3.0
1749
- */
1750
- static function _maybe_add_beta_label_to_plugins_and_handle_confirmation() {
1751
- $beta_data = array();
1752
-
1753
- foreach ( self::$_instances as $instance ) {
1754
- if ( ! $instance->is_premium() ) {
1755
- continue;
1756
- }
1757
-
1758
- /**
1759
- * If there's an available beta version update, a confirmation message will be shown when the
1760
- * "Update now" link on the "Plugins" or "Themes" page is clicked.
1761
- */
1762
- $has_beta_update = $instance->has_beta_update();
1763
-
1764
- $is_beta = (
1765
- // The "Beta" label is added separately for themes.
1766
- $instance->is_plugin() &&
1767
- $instance->is_beta()
1768
- );
1769
-
1770
- if ( ! $is_beta && ! $has_beta_update ) {
1771
- continue;
1772
- }
1773
-
1774
- $beta_data[ $instance->get_plugin_basename() ] = array( 'is_installed_version_beta' => $is_beta );
1775
-
1776
- if ( ! $has_beta_update ) {
1777
- continue;
1778
- }
1779
-
1780
- $beta_data[ $instance->get_plugin_basename() ]['beta_version_update_confirmation_message'] = sprintf(
1781
- '%s %s',
1782
- sprintf(
1783
- fs_esc_attr_inline(
1784
- 'An update to a Beta version will replace your installed version of %s with the latest Beta release - use with caution, and not on production sites. You have been warned.',
1785
- 'beta-version-update-caution',
1786
- $instance->get_slug()
1787
- ),
1788
- $instance->get_plugin_title()
1789
- ),
1790
- fs_esc_attr_inline( 'Would you like to proceed with the update?', 'update-confirmation', $instance->get_slug() )
1791
- );
1792
- }
1793
-
1794
- if ( empty( $beta_data ) ) {
1795
- return;
1796
- }
1797
- ?>
1798
- <script type="text/javascript">
1799
- ( function( $ ) {
1800
- var betaData = <?php echo json_encode( $beta_data ) ?>;
1801
-
1802
- for ( var pluginBasename in betaData ) {
1803
- if ( ! betaData.hasOwnProperty( pluginBasename ) ) {
1804
- continue;
1805
- }
1806
-
1807
- if ( ! betaData[ pluginBasename ].is_installed_version_beta ) {
1808
- continue;
1809
- }
1810
-
1811
- var $parentContainer = $( '.wp-list-table.plugins tr[data-plugin="' + pluginBasename + '"]' );
1812
- if ( 0 === $parentContainer.length ) {
1813
- continue;
1814
- }
1815
-
1816
- $parentContainer.find( '.plugin-title > strong:first-child').append(
1817
- '<span class="fs-tag fs-info"><?php fs_esc_js_echo_inline( 'Beta', 'beta' ) ?></span>'
1818
- );
1819
- }
1820
-
1821
- setTimeout( function() {
1822
- // Wait a little bit before adding the event handler, otherwise, it will be overridden by the core WP logic.
1823
- $( '.plugins .update-message .update-link, .themes .theme .update-message' ).on( 'click', function() {
1824
- var $parentContainer = $( this ).parents( 'tr:first' );
1825
- pluginBasename = ( 0 !== $parentContainer.length ) ?
1826
- $parentContainer.data( 'plugin' ) :
1827
- $( this ).parents( '.theme:first' ).data( 'slug' );
1828
-
1829
- if (
1830
- betaData[ pluginBasename ] &&
1831
- betaData[ pluginBasename ].beta_version_update_confirmation_message &&
1832
- ! confirm( betaData[ pluginBasename ].beta_version_update_confirmation_message )
1833
- ) {
1834
- return false;
1835
- }
1836
- } );
1837
- }, 20 );
1838
- } )( jQuery );
1839
- </script>
1840
- <?php
1841
- }
1842
-
1843
- /**
1844
- * Keeping the uninstall hook registered for free or premium plugin version may result to a fatal error that
1845
- * could happen when a user tries to uninstall either version while one of them is still active. Uninstalling a
1846
- * plugin will trigger inclusion of the free or premium version and if one of them is active during the
1847
- * uninstallation, a fatal error may occur in case the plugin's class or functions are already defined.
1848
- *
1849
- * @author Leo Fajardo (@leorw)
1850
- *
1851
- * @since 1.2.0
1852
- */
1853
- private function unregister_uninstall_hook() {
1854
- $uninstallable_plugins = (array) get_option( 'uninstall_plugins' );
1855
- unset( $uninstallable_plugins[ $this->_free_plugin_basename ] );
1856
- unset( $uninstallable_plugins[ $this->premium_plugin_basename() ] );
1857
-
1858
- update_option( 'uninstall_plugins', $uninstallable_plugins );
1859
- }
1860
-
1861
- /**
1862
- * @since 1.2.0 Invalidate module's main file cache, otherwise, FS_Plugin_Updater will not fetch updates.
1863
- *
1864
- * @param bool $store_prev_path
1865
- */
1866
- private function clear_module_main_file_cache( $store_prev_path = true ) {
1867
- if ( ! isset( $this->_storage->plugin_main_file ) ||
1868
- empty( $this->_storage->plugin_main_file->path )
1869
- ) {
1870
- return;
1871
- }
1872
-
1873
- if ( ! $store_prev_path ) {
1874
- /**
1875
- * Storing the previous path is not needed when clearing the cache after an SDK version update since
1876
- * the main purpose of the cache clearing in that event is to correct a wrong plugin main file path
1877
- * which causes data mix-up between plugins (e.g. titles and versions of an add-on and its parent plugin).
1878
- *
1879
- * @author Leo Fajardo (@leorw)
1880
- * @since 2.2.1
1881
- */
1882
- unset( $this->_storage->plugin_main_file->path );
1883
- } else {
1884
- $plugin_main_file = clone $this->_storage->plugin_main_file;
1885
-
1886
- // Store cached path (2nd layer cache).
1887
- $plugin_main_file->prev_path = $plugin_main_file->path;
1888
-
1889
- // Clear cached path.
1890
- unset( $plugin_main_file->path );
1891
-
1892
- $this->_storage->plugin_main_file = $plugin_main_file;
1893
- }
1894
-
1895
- /**
1896
- * Clear global cached path.
1897
- *
1898
- * @author Leo Fajardo (@leorw)
1899
- * @since 1.2.2
1900
- */
1901
- $id_slug_type_path_map = self::$_accounts->get_option( 'id_slug_type_path_map' );
1902
- unset( $id_slug_type_path_map[ $this->_module_id ]['path'] );
1903
- self::$_accounts->set_option( 'id_slug_type_path_map', $id_slug_type_path_map, true );
1904
- }
1905
-
1906
- /**
1907
- * @author Leo Fajardo (@leorw)
1908
- * @since 2.0.0
1909
- */
1910
- function _hook_action_links_and_register_account_hooks() {
1911
- add_action( 'admin_init', array( &$this, '_add_tracking_links' ) );
1912
-
1913
- if ( self::is_plugins_page() && $this->is_plugin() ) {
1914
- $this->hook_plugin_action_links();
1915
- }
1916
-
1917
- $this->_register_account_hooks();
1918
- }
1919
-
1920
- /**
1921
- * @author Vova Feldman (@svovaf)
1922
- * @since 1.0.9
1923
- */
1924
- private function _register_account_hooks() {
1925
- if ( ! is_admin() ) {
1926
- return;
1927
- }
1928
-
1929
- /**
1930
- * Always show the deactivation feedback form since we added
1931
- * automatic free version deactivation upon premium code activation.
1932
- *
1933
- * @since 1.2.1.6
1934
- */
1935
- $this->add_ajax_action(
1936
- 'submit_uninstall_reason',
1937
- array( &$this, '_submit_uninstall_reason_action' )
1938
- );
1939
-
1940
- $this->add_ajax_action(
1941
- 'cancel_subscription_or_trial',
1942
- array( &$this, 'cancel_subscription_or_trial_ajax_action' )
1943
- );
1944
-
1945
- if ( ! $this->is_addon() || $this->is_parent_plugin_installed() ) {
1946
- if ( ( $this->is_plugin() && self::is_plugins_page() ) ||
1947
- ( $this->is_theme() && self::is_themes_page() )
1948
- ) {
1949
- add_action( 'admin_footer', array( &$this, '_add_deactivation_feedback_dialog_box' ) );
1950
- }
1951
- }
1952
- }
1953
-
1954
- /**
1955
- * Leverage backtrace to find caller plugin file path.
1956
- *
1957
- * @author Vova Feldman (@svovaf)
1958
- * @since 1.0.6
1959
- *
1960
- * @param bool $is_init Is initiation sequence.
1961
- *
1962
- * @return string
1963
- */
1964
- private function _find_caller_plugin_file( $is_init = false ) {
1965
- // Try to load the cached value of the file path.
1966
- if ( isset( $this->_storage->plugin_main_file ) ) {
1967
- $plugin_main_file = $this->_storage->plugin_main_file;
1968
- if ( ! empty( $plugin_main_file->path ) ) {
1969
- $absolute_path = $this->get_absolute_path( $plugin_main_file->path );
1970
- if ( file_exists( $absolute_path ) ) {
1971
- return $absolute_path;
1972
- }
1973
- }
1974
- }
1975
-
1976
- /**
1977
- * @since 1.2.1
1978
- *
1979
- * `clear_module_main_file_cache()` is clearing the plugin's cached path on
1980
- * deactivation. Therefore, if any plugin/theme was initiating `Freemius`
1981
- * with that plugin's slug, it was overriding the empty plugin path with a wrong path.
1982
- *
1983
- * So, we've added a special mechanism with a 2nd layer of cache that uses `prev_path`
1984
- * when the class instantiator isn't the module.
1985
- */
1986
- if ( ! $is_init ) {
1987
- // Fetch prev path cache.
1988
- if ( isset( $this->_storage->plugin_main_file ) &&
1989
- ! empty( $this->_storage->plugin_main_file->prev_path )
1990
- ) {
1991
- $absolute_path = $this->get_absolute_path( $this->_storage->plugin_main_file->prev_path );
1992
- if ( file_exists( $absolute_path ) ) {
1993
- return $absolute_path;
1994
- }
1995
- }
1996
-
1997
- wp_die(
1998
- $this->get_text_inline( 'Freemius SDK couldn\'t find the plugin\'s main file. Please contact sdk@freemius.com with the current error.', 'failed-finding-main-path' ) .
1999
- " Module: {$this->_slug}; SDK: " . WP_FS__SDK_VERSION . ";",
2000
- $this->get_text_inline( 'Error', 'error' ),
2001
- array( 'back_link' => true )
2002
- );
2003
- }
2004
-
2005
- /**
2006
- * @since 1.2.1
2007
- *
2008
- * Only the original instantiator that calls dynamic_init can modify the module's path.
2009
- */
2010
- // Find caller module.
2011
- $id_slug_type_path_map = self::$_accounts->get_option( 'id_slug_type_path_map', array() );
2012
- $this->_storage->plugin_main_file = (object) array(
2013
- 'path' => $id_slug_type_path_map[ $this->_module_id ]['path'],
2014
- );
2015
-
2016
- return $this->get_absolute_path( $id_slug_type_path_map[ $this->_module_id ]['path'] );
2017
- }
2018
-
2019
- /**
2020
- * @author Leo Fajardo (@leorw)
2021
- * @since 1.2.3
2022
- *
2023
- * @param string $path
2024
- *
2025
- * @return string
2026
- */
2027
- private function get_relative_path( $path ) {
2028
- $module_root_dir = $this->get_module_root_dir_path();
2029
- if ( 0 === strpos( $path, $module_root_dir ) ) {
2030
- $path = substr( $path, strlen( $module_root_dir ) );
2031
- }
2032
-
2033
- return $path;
2034
- }
2035
-
2036
- /**
2037
- * @author Leo Fajardo (@leorw)
2038
- * @since 1.2.3
2039
- *
2040
- * @param string $path
2041
- * @param string|bool $module_type
2042
- *
2043
- * @return string
2044
- */
2045
- private function get_absolute_path( $path, $module_type = false ) {
2046
- $module_root_dir = $this->get_module_root_dir_path( $module_type );
2047
- if ( 0 !== strpos( $path, $module_root_dir ) ) {
2048
- $path = fs_normalize_path( $module_root_dir . $path );
2049
- }
2050
-
2051
- return $path;
2052
- }
2053
-
2054
- /**
2055
- * @author Leo Fajardo (@leorw)
2056
- * @since 1.2.3
2057
- *
2058
- * @param string|bool $module_type
2059
- *
2060
- * @return string
2061
- */
2062
- private function get_module_root_dir_path( $module_type = false ) {
2063
- $is_plugin = empty( $module_type ) ?
2064
- $this->is_plugin() :
2065
- ( WP_FS__MODULE_TYPE_PLUGIN === $module_type );
2066
-
2067
- return fs_normalize_path( trailingslashit( $is_plugin ?
2068
- WP_PLUGIN_DIR :
2069
- get_theme_root( get_stylesheet() ) ) );
2070
- }
2071
-
2072
- /**
2073
- * @author Leo Fajardo (@leorw)
2074
- *
2075
- * @param number $module_id
2076
- * @param string $slug
2077
- *
2078
- * @since 1.2.2
2079
- */
2080
- private function store_id_slug_type_path_map( $module_id, $slug ) {
2081
- $id_slug_type_path_map = self::$_accounts->get_option( 'id_slug_type_path_map', array() );
2082
-
2083
- $store_option = false;
2084
-
2085
- if ( ! isset( $id_slug_type_path_map[ $module_id ] ) ) {
2086
- $id_slug_type_path_map[ $module_id ] = array(
2087
- 'slug' => $slug
2088
- );
2089
-
2090
- $store_option = true;
2091
- }
2092
-
2093
- if ( empty( $id_slug_type_path_map[ $module_id ]['path'] ) ||
2094
- /**
2095
- * This verification is for cases when suddenly the same module
2096
- * is installed but with a different folder name.
2097
- *
2098
- * @author Vova Feldman (@svovaf)
2099
- * @since 1.2.3
2100
- */
2101
- ! file_exists( $this->get_absolute_path(
2102
- $id_slug_type_path_map[ $module_id ]['path'],
2103
- $id_slug_type_path_map[ $module_id ]['type']
2104
- ) )
2105
- ) {
2106
- $caller_main_file_and_type = $this->get_caller_main_file_and_type();
2107
-
2108
- $id_slug_type_path_map[ $module_id ]['type'] = $caller_main_file_and_type->module_type;
2109
- $id_slug_type_path_map[ $module_id ]['path'] = $caller_main_file_and_type->path;
2110
-
2111
- $store_option = true;
2112
- }
2113
-
2114
- if ( $store_option ) {
2115
- self::$_accounts->set_option( 'id_slug_type_path_map', $id_slug_type_path_map, true );
2116
- }
2117
- }
2118
-
2119
- /**
2120
- * Identifies the caller type: plugin or theme.
2121
- *
2122
- * @author Leo Fajardo (@leorw)
2123
- * @since 1.2.2
2124
- *
2125
- * @author Vova Feldman (@svovaf)
2126
- * @since 1.2.2.3 Find the earliest module in the call stack that calls to the SDK. This fix is for cases when
2127
- * add-ons are relying on loading the SDK from the parent module, and also allows themes including the
2128
- * SDK an internal file instead of directly from functions.php.
2129
- * @since 1.2.1.7 Knows how to handle cases when an add-on includes the parent module logic.
2130
- */
2131
- private function get_caller_main_file_and_type() {
2132
- self::require_plugin_essentials();
2133
-
2134
- $all_plugins = fs_get_plugins( true );
2135
- $all_plugins_paths = array();
2136
-
2137
- // Get active plugin's main files real full names (might be symlinks).
2138
- foreach ( $all_plugins as $relative_path => $data ) {
2139
- if ( false === strpos( fs_normalize_path( $relative_path ), '/' ) ) {
2140
- /**
2141
- * Ignore plugins that don't have a folder (e.g. Hello Dolly) since they
2142
- * can't really include the SDK.
2143
- *
2144
- * @author Vova Feldman
2145
- * @since 1.2.1.7
2146
- */
2147
- continue;
2148
- }
2149
-
2150
- $all_plugins_paths[] = fs_normalize_path( realpath( WP_PLUGIN_DIR . '/' . $relative_path ) );
2151
- }
2152
-
2153
- $caller_file_candidate = false;
2154
- $caller_map = array();
2155
- $module_type = WP_FS__MODULE_TYPE_PLUGIN;
2156
- $themes_dir = fs_normalize_path( get_theme_root( get_stylesheet() ) );
2157
- $plugin_dir_to_skip = false;
2158
-
2159
- for ( $i = 1, $bt = debug_backtrace(), $len = count( $bt ); $i < $len; $i ++ ) {
2160
- if ( empty( $bt[ $i ]['file'] ) ) {
2161
- continue;
2162
- }
2163
-
2164
- if ( $i > 1 && ! empty( $bt[ $i - 1 ]['file'] ) && $bt[ $i ]['file'] === $bt[ $i - 1 ]['file'] ) {
2165
- // If file same as the prev file in the stack, skip it.
2166
- continue;
2167
- }
2168
-
2169
- if ( ! empty( $bt[ $i ]['function'] ) && in_array( $bt[ $i ]['function'], array(
2170
- 'do_action',
2171
- 'apply_filter',
2172
- // The string split is stupid, but otherwise, theme check
2173
- // throws info notices.
2174
- 'requir' . 'e_once',
2175
- 'requir' . 'e',
2176
- 'includ' . 'e_once',
2177
- 'includ' . 'e',
2178
- 'install_and_activate_plugin',
2179
- 'try_activate_plugin',
2180
- 'activate_plugin'
2181
- ) )
2182
- ) {
2183
- if ( 'activate_plugin' === $bt[ $i ]['function'] ) {
2184
- /**
2185
- * Store the directory of the activator plugin so that any other file that starts with it
2186
- * cannot be mistakenly chosen as a candidate caller file.
2187
- *
2188
- * @author Leo Fajardo
2189
- *
2190
- * @since 2.3.0
2191
- */
2192
- $caller_file_path = fs_normalize_path( $bt[ $i ]['file'] );
2193
-
2194
- foreach ( $all_plugins_paths as $plugin_path ) {
2195
- $plugin_dir = fs_normalize_path( dirname( $plugin_path ) . '/' );
2196
- if ( false !== strpos( $caller_file_path, $plugin_dir ) ) {
2197
- $plugin_dir_to_skip = $plugin_dir;
2198
-
2199
- break;
2200
- }
2201
- }
2202
- }
2203
-
2204
- // Ignore call stack hooks and files inclusion.
2205
- continue;
2206
- }
2207
-
2208
- $caller_file_path = fs_normalize_path( $bt[ $i ]['file'] );
2209
-
2210
- if ( ! empty( $plugin_dir_to_skip ) ) {
2211
- /**
2212
- * Skip if it's an activator plugin file to avoid mistakenly choosing it as a candidate caller file.
2213
- *
2214
- * @author Leo Fajardo
2215
- *
2216
- * @since 2.3.0
2217
- */
2218
- if ( 0 === strpos( $caller_file_path, $plugin_dir_to_skip ) ) {
2219
- continue;
2220
- }
2221
- }
2222
-
2223
- if ( 'functions.php' === basename( $caller_file_path ) ) {
2224
- /**
2225
- * 1. Assumes that theme's starting execution file is functions.php.
2226
- * 2. This complex logic fixes symlink issues (e.g. with Vargant).
2227
- *
2228
- * @author Vova Feldman (@svovaf)
2229
- * @since 1.2.2.5
2230
- */
2231
-
2232
- if ( $caller_file_path == fs_normalize_path( realpath( trailingslashit( $themes_dir ) . basename( dirname( $caller_file_path ) ) . '/' . basename( $caller_file_path ) ) ) ) {
2233
- $module_type = WP_FS__MODULE_TYPE_THEME;
2234
-
2235
- /**
2236
- * Relative path of the theme, e.g.:
2237
- * `my-theme/functions.php`
2238
- *
2239
- * @author Leo Fajardo (@leorw)
2240
- */
2241
- $caller_file_candidate = basename( dirname( $caller_file_path ) ) .
2242
- '/' .
2243
- basename( $caller_file_path );
2244
-
2245
- continue;
2246
- }
2247
- }
2248
-
2249
- $caller_file_hash = md5( $caller_file_path );
2250
-
2251
- if ( ! isset( $caller_map[ $caller_file_hash ] ) ) {
2252
- foreach ( $all_plugins_paths as $plugin_path ) {
2253
- if ( false !== strpos( $caller_file_path, fs_normalize_path( dirname( $plugin_path ) . '/' ) ) ) {
2254
- $caller_map[ $caller_file_hash ] = fs_normalize_path( $plugin_path );
2255
- break;
2256
- }
2257
- }
2258
- }
2259
-
2260
- if ( isset( $caller_map[ $caller_file_hash ] ) ) {
2261
- $module_type = WP_FS__MODULE_TYPE_PLUGIN;
2262
- $caller_file_candidate = plugin_basename( $caller_map[ $caller_file_hash ] );
2263
- }
2264
- }
2265
-
2266
- return (object) array(
2267
- 'module_type' => $module_type,
2268
- 'path' => $caller_file_candidate
2269
- );
2270
- }
2271
-
2272
- #----------------------------------------------------------------------------------
2273
- #region Deactivation Feedback Form
2274
- #----------------------------------------------------------------------------------
2275
-
2276
- /**
2277
- * Displays a confirmation and feedback dialog box when the user clicks on the "Deactivate" link on the plugins
2278
- * page.
2279
- *
2280
- * @author Vova Feldman (@svovaf)
2281
- * @author Leo Fajardo (@leorw)
2282
- *
2283
- * @since 1.1.2
2284
- */
2285
- function _add_deactivation_feedback_dialog_box() {
2286
- $subscription_cancellation_dialog_box_template_params = $this->apply_filters( 'show_deactivation_subscription_cancellation', true ) ?
2287
- $this->_get_subscription_cancellation_dialog_box_template_params() :
2288
- array();
2289
-
2290
- /**
2291
- * @since 2.3.0 Developers can optionally hide the deactivation feedback form using the 'show_deactivation_feedback_form' filter.
2292
- */
2293
- $show_deactivation_feedback_form = true;
2294
- if ( $this->has_filter( 'show_deactivation_feedback_form' ) ) {
2295
- $show_deactivation_feedback_form = $this->apply_filters( 'show_deactivation_feedback_form', true );
2296
- } else if ( $this->is_addon() ) {
2297
- /**
2298
- * If the add-on's 'show_deactivation_feedback_form' is not set, try to inherit the value from the parent.
2299
- */
2300
- $show_deactivation_feedback_form = $this->get_parent_instance()->apply_filters( 'show_deactivation_feedback_form', true );
2301
- }
2302
-
2303
- $uninstall_confirmation_message = $this->apply_filters( 'uninstall_confirmation_message', '' );
2304
-
2305
- if (
2306
- empty( $subscription_cancellation_dialog_box_template_params ) &&
2307
- ! $show_deactivation_feedback_form &&
2308
- empty( $uninstall_confirmation_message )
2309
- ) {
2310
- return;
2311
- }
2312
-
2313
- $vars = array( 'id' => $this->_module_id );
2314
-
2315
- if ( $show_deactivation_feedback_form ) {
2316
- /* Check the type of user:
2317
- * 1. Long-term (long-term)
2318
- * 2. Non-registered and non-anonymous short-term (non-registered-and-non-anonymous-short-term).
2319
- * 3. Short-term (short-term)
2320
- */
2321
- $is_long_term_user = true;
2322
-
2323
- // Check if the site is at least 2 days old.
2324
- $time_installed = $this->_storage->install_timestamp;
2325
-
2326
- // Difference in seconds.
2327
- $date_diff = time() - $time_installed;
2328
-
2329
- // Convert seconds to days.
2330
- $date_diff_days = floor( $date_diff / ( 60 * 60 * 24 ) );
2331
-
2332
- if ( $date_diff_days < 2 ) {
2333
- $is_long_term_user = false;
2334
- }
2335
-
2336
- $is_long_term_user = $this->apply_filters( 'is_long_term_user', $is_long_term_user );
2337
-
2338
- if ( $is_long_term_user ) {
2339
- $user_type = 'long-term';
2340
- } else {
2341
- if ( ! $this->is_registered() && ! $this->is_anonymous() ) {
2342
- $user_type = 'non-registered-and-non-anonymous-short-term';
2343
- } else {
2344
- $user_type = 'short-term';
2345
- }
2346
- }
2347
-
2348
- $uninstall_reasons = $this->_get_uninstall_reasons( $user_type );
2349
-
2350
- $vars['reasons'] = $uninstall_reasons;
2351
- }
2352
-
2353
- $vars['subscription_cancellation_dialog_box_template_params'] = &$subscription_cancellation_dialog_box_template_params;
2354
- $vars['show_deactivation_feedback_form'] = $show_deactivation_feedback_form;
2355
- $vars['uninstall_confirmation_message'] = $uninstall_confirmation_message;
2356
-
2357
- /**
2358
- * Load the HTML template for the deactivation feedback dialog box.
2359
- *
2360
- * @todo Deactivation form core functions should be loaded only once! Otherwise, when there are multiple Freemius powered plugins the same code is loaded multiple times. The only thing that should be loaded differently is the various deactivation reasons object based on the state of the plugin.
2361
- */
2362
- fs_require_template( 'forms/deactivation/form.php', $vars );
2363
- }
2364
-
2365
- /**
2366
- * @author Leo Fajardo (@leorw)
2367
- * @since 1.1.2
2368
- *
2369
- * @param string $user_type
2370
- *
2371
- * @return array The uninstall reasons for the specified user type.
2372
- */
2373
- function _get_uninstall_reasons( $user_type = 'long-term' ) {
2374
- $module_type = $this->_module_type;
2375
-
2376
- $internal_message_template_var = array(
2377
- 'id' => $this->_module_id
2378
- );
2379
-
2380
- $plan = $this->get_plan();
2381
-
2382
- if ( $this->is_registered() && is_object( $plan ) && $plan->has_technical_support() ) {
2383
- $contact_support_template = fs_get_template( 'forms/deactivation/contact.php', $internal_message_template_var );
2384
- } else {
2385
- $contact_support_template = '';
2386
- }
2387
-
2388
- $reason_found_better_plugin = array(
2389
- 'id' => self::REASON_FOUND_A_BETTER_PLUGIN,
2390
- 'text' => sprintf( $this->get_text_inline( 'I found a better %s', 'reason-found-a-better-plugin' ), $module_type ),
2391
- 'input_type' => 'textfield',
2392
- 'input_placeholder' => sprintf( $this->get_text_inline( "What's the %s's name?", 'placeholder-plugin-name' ), $module_type ),
2393
- );
2394
-
2395
- $reason_temporary_deactivation = array(
2396
- 'id' => self::REASON_TEMPORARY_DEACTIVATION,
2397
- 'text' => sprintf(
2398
- $this->get_text_inline( "It's a temporary %s. I'm just debugging an issue.", 'reason-temporary-x' ),
2399
- strtolower( $this->is_plugin() ?
2400
- $this->get_text_inline( 'Deactivation', 'deactivation' ) :
2401
- $this->get_text_inline( 'Theme Switch', 'theme-switch' )
2402
- )
2403
- ),
2404
- 'input_type' => '',
2405
- 'input_placeholder' => ''
2406
- );
2407
-
2408
- $reason_other = array(
2409
- 'id' => self::REASON_OTHER,
2410
- 'text' => $this->get_text_inline( 'Other', 'reason-other' ),
2411
- 'input_type' => 'textfield',
2412
- 'input_placeholder' => ''
2413
- );
2414
-
2415
- $long_term_user_reasons = array(
2416
- array(
2417
- 'id' => self::REASON_NO_LONGER_NEEDED,
2418
- 'text' => sprintf( $this->get_text_inline( 'I no longer need the %s', 'reason-no-longer-needed' ), $module_type ),
2419
- 'input_type' => '',
2420
- 'input_placeholder' => ''
2421
- ),
2422
- $reason_found_better_plugin,
2423
- array(
2424
- 'id' => self::REASON_NEEDED_FOR_A_SHORT_PERIOD,
2425
- 'text' => sprintf( $this->get_text_inline( 'I only needed the %s for a short period', 'reason-needed-for-a-short-period' ), $module_type ),
2426
- 'input_type' => '',
2427
- 'input_placeholder' => ''
2428
- ),
2429
- array(
2430
- 'id' => self::REASON_BROKE_MY_SITE,
2431
- 'text' => sprintf( $this->get_text_inline( 'The %s broke my site', 'reason-broke-my-site' ), $module_type ),
2432
- 'input_type' => '',
2433
- 'input_placeholder' => '',
2434
- 'internal_message' => $contact_support_template
2435
- ),
2436
- array(
2437
- 'id' => self::REASON_SUDDENLY_STOPPED_WORKING,
2438
- 'text' => sprintf( $this->get_text_inline( 'The %s suddenly stopped working', 'reason-suddenly-stopped-working' ), $module_type ),
2439
- 'input_type' => '',
2440
- 'input_placeholder' => '',
2441
- 'internal_message' => $contact_support_template
2442
- )
2443
- );
2444
-
2445
- if ( $this->is_paying() ) {
2446
- $long_term_user_reasons[] = array(
2447
- 'id' => self::REASON_CANT_PAY_ANYMORE,
2448
- 'text' => $this->get_text_inline( "I can't pay for it anymore", 'reason-cant-pay-anymore' ),
2449
- 'input_type' => 'textfield',
2450
- 'input_placeholder' => $this->get_text_inline( 'What price would you feel comfortable paying?', 'placeholder-comfortable-price' )
2451
- );
2452
- }
2453
-
2454
- $reason_dont_share_info = array(
2455
- 'id' => self::REASON_DONT_LIKE_TO_SHARE_MY_INFORMATION,
2456
- 'text' => $this->get_text_inline( "I don't like to share my information with you", 'reason-dont-like-to-share-my-information' ),
2457
- 'input_type' => '',
2458
- 'input_placeholder' => ''
2459
- );
2460
-
2461
- /**
2462
- * If the current user has selected the "don't share data" reason in the deactivation feedback modal, inform the
2463
- * user by showing additional message that he doesn't have to share data and can just choose to skip the opt-in
2464
- * (the Skip button is included in the message to show). This message will only be shown if anonymous mode is
2465
- * enabled and the user's account is currently not in pending activation state (similar to the way the Skip
2466
- * button in the opt-in form is shown/hidden).
2467
- */
2468
- if ( $this->is_enable_anonymous() && ! $this->is_pending_activation() ) {
2469
- $reason_dont_share_info['internal_message'] = fs_get_template( 'forms/deactivation/retry-skip.php', $internal_message_template_var );
2470
- }
2471
-
2472
- $uninstall_reasons = array(
2473
- 'long-term' => $long_term_user_reasons,
2474
- 'non-registered-and-non-anonymous-short-term' => array(
2475
- array(
2476
- 'id' => self::REASON_DIDNT_WORK,
2477
- 'text' => sprintf( $this->get_text_inline( "The %s didn't work", 'reason-didnt-work' ), $module_type ),
2478
- 'input_type' => '',
2479
- 'input_placeholder' => ''
2480
- ),
2481
- $reason_dont_share_info,
2482
- $reason_found_better_plugin
2483
- ),
2484
- 'short-term' => array(
2485
- array(
2486
- 'id' => self::REASON_COULDNT_MAKE_IT_WORK,
2487
- 'text' => $this->get_text_inline( "I couldn't understand how to make it work", 'reason-couldnt-make-it-work' ),
2488
- 'input_type' => '',
2489
- 'input_placeholder' => '',
2490
- 'internal_message' => $contact_support_template
2491
- ),
2492
- $reason_found_better_plugin,
2493
- array(
2494
- 'id' => self::REASON_GREAT_BUT_NEED_SPECIFIC_FEATURE,
2495
- 'text' => sprintf( $this->get_text_inline( "The %s is great, but I need specific feature that you don't support", 'reason-great-but-need-specific-feature' ), $module_type ),
2496
- 'input_type' => 'textarea',
2497
- 'input_placeholder' => $this->get_text_inline( 'What feature?', 'placeholder-feature' )
2498
- ),
2499
- array(
2500
- 'id' => self::REASON_NOT_WORKING,
2501
- 'text' => sprintf( $this->get_text_inline( 'The %s is not working', 'reason-not-working' ), $module_type ),
2502
- 'input_type' => 'textarea',
2503
- 'input_placeholder' => $this->get_text_inline( "Kindly share what didn't work so we can fix it for future users...", 'placeholder-share-what-didnt-work' )
2504
- ),
2505
- array(
2506
- 'id' => self::REASON_NOT_WHAT_I_WAS_LOOKING_FOR,
2507
- 'text' => $this->get_text_inline( "It's not what I was looking for", 'reason-not-what-i-was-looking-for' ),
2508
- 'input_type' => 'textarea',
2509
- 'input_placeholder' => $this->get_text_inline( "What you've been looking for?", 'placeholder-what-youve-been-looking-for' )
2510
- ),
2511
- array(
2512
- 'id' => self::REASON_DIDNT_WORK_AS_EXPECTED,
2513
- 'text' => sprintf( $this->get_text_inline( "The %s didn't work as expected", 'reason-didnt-work-as-expected' ), $module_type ),
2514
- 'input_type' => 'textarea',
2515
- 'input_placeholder' => $this->get_text_inline( 'What did you expect?', 'placeholder-what-did-you-expect' )
2516
- )
2517
- )
2518
- );
2519
-
2520
- // Randomize the reasons for the current user type.
2521
- shuffle( $uninstall_reasons[ $user_type ] );
2522
-
2523
- // Keep the following reasons as the last items in the list.
2524
- $uninstall_reasons[ $user_type ][] = $reason_temporary_deactivation;
2525
- $uninstall_reasons[ $user_type ][] = $reason_other;
2526
-
2527
- $uninstall_reasons = $this->apply_filters( 'uninstall_reasons', $uninstall_reasons );
2528
-
2529
- return $uninstall_reasons[ $user_type ];
2530
- }
2531
-
2532
- /**
2533
- * Called after the user has submitted his reason for deactivating the plugin.
2534
- *
2535
- * @author Leo Fajardo (@leorw)
2536
- * @since 1.1.2
2537
- */
2538
- function _submit_uninstall_reason_action() {
2539
- $this->_logger->entrance();
2540
-
2541
- $this->check_ajax_referer( 'submit_uninstall_reason' );
2542
-
2543
- $reason_id = fs_request_get( 'reason_id' );
2544
-
2545
- // Check if the given reason ID is an unsigned integer.
2546
- if ( ! ctype_digit( $reason_id ) ) {
2547
- exit;
2548
- }
2549
-
2550
- $reason_info = trim( fs_request_get( 'reason_info', '' ) );
2551
- if ( ! empty( $reason_info ) ) {
2552
- $reason_info = substr( $reason_info, 0, 128 );
2553
- }
2554
-
2555
- $reason = (object) array(
2556
- 'id' => $reason_id,
2557
- 'info' => $reason_info,
2558
- 'is_anonymous' => fs_request_get_bool( 'is_anonymous' )
2559
- );
2560
-
2561
- $this->_storage->store( 'uninstall_reason', $reason );
2562
-
2563
- /**
2564
- * If the module type is "theme", trigger the uninstall event here (on theme deactivation) since themes do
2565
- * not support uninstall hook.
2566
- *
2567
- * @author Leo Fajardo (@leorw)
2568
- * @since 1.2.2
2569
- */
2570
- if ( $this->is_theme() ) {
2571
- if ( $this->is_premium() && ! $this->has_active_valid_license() ) {
2572
- FS_Plugin_Updater::instance( $this )->delete_update_data();
2573
- }
2574
-
2575
- $this->_uninstall_plugin_event( false );
2576
- $this->remove_sdk_reference();
2577
- }
2578
-
2579
- // Print '1' for successful operation.
2580
- echo 1;
2581
- exit;
2582
- }
2583
-
2584
- /**
2585
- * @author Leo Fajardo (@leorw)
2586
- * @since 2.1.4
2587
- */
2588
- function cancel_subscription_or_trial_ajax_action() {
2589
- $this->_logger->entrance();
2590
-
2591
- $this->check_ajax_referer( 'cancel_subscription_or_trial' );
2592
-
2593
- $result = $this->cancel_subscription_or_trial( fs_request_get( 'plugin_id', $this->get_id() ), false );
2594
-
2595
- if ( $this->is_api_error( $result ) ) {
2596
- $this->shoot_ajax_failure( $result->error->message );
2597
- }
2598
-
2599
- $this->shoot_ajax_success();
2600
- }
2601
-
2602
- /**
2603
- * @author Leo Fajardo (@leorw)
2604
- * @since 2.1.4
2605
- *
2606
- * @param number $plugin_id
2607
- *
2608
- * @return object
2609
- */
2610
- private function cancel_subscription_or_trial( $plugin_id ) {
2611
- $fs = null;
2612
- if ( $plugin_id == $this->get_id() ) {
2613
- $fs = $this;
2614
- } else if ( $this->is_addon_activated( $plugin_id ) ) {
2615
- $fs = self::get_instance_by_id( $plugin_id );
2616
- }
2617
-
2618
- $result = null;
2619
-
2620
- if ( ! is_null( $fs ) ) {
2621
- $result = $fs->is_paid_trial() ?
2622
- $fs->_cancel_trial() :
2623
- $fs->_downgrade_site();
2624
- }
2625
-
2626
- return $result;
2627
- }
2628
-
2629
- /**
2630
- * @author Leo Fajardo (@leorw)
2631
- * @since 2.0.2
2632
- */
2633