PluginProbe
Buttonizer – Floating Menus, Sticky Buttons, & Popup Builder / 3.6.0
Buttonizer – Floating Menus, Sticky Buttons, & Popup Builder v3.6.0
3.6.0 3.5.0 trunk 1.0.10 1.0.2 1.0.3 1.0.4 1.0.5 1.0.6 1.0.6.1 1.0.7 1.0.8 1.0.9 1.1 1.1.1 1.2 1.3 1.4 1.4.1 1.4.2 1.4.3 1.4.4 1.4.5 1.5 1.5.1 All 110 releases
← All changes | freemius/includes/entities/class-fs-plugin.php +141 -94 1.4.23.6.0 View file →
@@ -1,117 +1,164 @@
1 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 - */
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 8
9 - if ( ! defined( 'ABSPATH' ) ) {
10 - exit;
11 - }
9 + if ( ! defined( 'ABSPATH' ) ) {
10 + exit;
11 + }
12 12
13 - class FS_Plugin extends FS_Scope_Entity {
14 - /**
15 - * @since 1.0.6
16 - * @var null|number
17 - */
18 - public $parent_plugin_id;
19 - /**
20 - * @var string
21 - */
22 - public $title;
23 - /**
24 - * @var string
25 - */
26 - public $slug;
27 - /**
28 - * @since 1.2.2
29 - *
30 - * @var string 'plugin' or 'theme'
31 - */
32 - public $type;
13 + class FS_Plugin extends FS_Scope_Entity {
14 + /**
15 + * @since 1.0.6
16 + * @var null|number
17 + */
18 + public $parent_plugin_id;
19 + /**
20 + * @var string
21 + */
22 + public $title;
23 + /**
24 + * @var string
25 + */
26 + public $slug;
27 + /**
28 + * @author Leo Fajardo (@leorw)
29 + * @since 2.2.1
30 + *
31 + * @var string
32 + */
33 + public $premium_slug;
34 + /**
35 + * @since 1.2.2
36 + *
37 + * @var string 'plugin' or 'theme'
38 + */
39 + public $type;
40 + /**
41 + * @author Leo Fajardo (@leorw)
42 + *
43 + * @since 1.2.3
44 + *
45 + * @var string|false false if the module doesn't have an affiliate program or one of the following: 'selected', 'customers', or 'all'.
46 + */
47 + public $affiliate_moderation;
48 + /**
49 + * @var bool Set to true if the free version of the module is hosted on WordPress.org. Defaults to true.
50 + */
51 + public $is_wp_org_compliant = true;
52 + /**
53 + * @author Leo Fajardo (@leorw)
54 + * @since 2.2.5
55 + *
56 + * @var int
57 + */
58 + public $premium_releases_count;
33 59
34 - #region Install Specific Properties
60 + #region Install Specific Properties
35 61
36 - /**
37 - * @var string
38 - */
39 - public $file;
40 - /**
41 - * @var string
42 - */
43 - public $version;
44 - /**
45 - * @var bool
46 - */
47 - public $auto_update;
48 - /**
49 - * @var FS_Plugin_Info
50 - */
51 - public $info;
52 - /**
53 - * @since 1.0.9
54 - *
55 - * @var bool
56 - */
57 - public $is_premium;
58 - /**
59 - * @since 1.0.9
60 - *
61 - * @var bool
62 - */
63 - public $is_live;
64 - /**
62 + /**
63 + * @var string
64 + */
65 + public $file;
66 + /**
67 + * @var string
68 + */
69 + public $version;
70 + /**
71 + * @var bool
72 + */
73 + public $auto_update;
74 + /**
75 + * @var FS_Plugin_Info
76 + */
77 + public $info;
78 + /**
79 + * @since 1.0.9
80 + *
81 + * @var bool
82 + */
83 + public $is_premium;
84 + /**
65 85 * @author Leo Fajardo (@leorw)
86 + * @since 2.2.1
66 87 *
67 - * @since 1.2.3
68 - *
69 - * @var string|false false if the module doesn't have an affiliate program or one of the following:
70 - * 'selected', 'customers', or 'all'.
71 - */
72 - public $affiliate_moderation;
88 + * @var string
89 + */
90 + public $premium_suffix;
91 + /**
92 + * @since 1.0.9
93 + *
94 + * @var bool
95 + */
96 + public $is_live;
97 + /**
98 + * @since 2.2.3
99 + * @var null|number
100 + */
101 + public $bundle_id;
102 + /**
103 + * @since 2.3.1
104 + * @var null|string
105 + */
106 + public $bundle_public_key;
107 + /**
108 + * @since 2.5.4
109 + * @var null|array
110 + */
111 + public $opt_in_moderation;
73 112
74 113 const AFFILIATE_MODERATION_CUSTOMERS = 'customers';
75 114
76 - #endregion Install Specific Properties
115 + #endregion Install Specific Properties
77 116
78 - /**
79 - * @param stdClass|bool $plugin
80 - */
81 - function __construct( $plugin = false ) {
82 - parent::__construct( $plugin );
117 + /**
118 + * @param stdClass|bool $plugin
119 + */
120 + function __construct( $plugin = false ) {
121 + parent::__construct( $plugin );
83 122
84 - $this->is_premium = false;
85 - $this->is_live = true;
123 + $this->is_premium = false;
124 + $this->is_live = true;
86 125
87 - if ( isset( $plugin->info ) && is_object( $plugin->info ) ) {
88 - $this->info = new FS_Plugin_Info( $plugin->info );
89 - }
90 - }
126 + if ( empty( $this->premium_slug ) && ! empty( $plugin->slug ) ) {
127 + $this->premium_slug = "{$this->slug}-premium";
128 + }
91 129
92 - /**
93 - * Check if plugin is an add-on (has parent).
94 - *
95 - * @author Vova Feldman (@svovaf)
96 - * @since 1.0.6
97 - *
98 - * @return bool
99 - */
100 - function is_addon() {
101 - return isset( $this->parent_plugin_id ) && is_numeric( $this->parent_plugin_id );
102 - }
130 + if ( empty( $this->premium_suffix ) ) {
131 + $this->premium_suffix = '(Premium)';
132 + }
103 133
134 + if ( isset( $plugin->info ) && is_object( $plugin->info ) ) {
135 + $this->info = new FS_Plugin_Info( $plugin->info );
136 + }
137 + }
138 +
104 139 /**
140 + * Check if plugin is an add-on (has parent).
141 + *
142 + * @author Vova Feldman (@svovaf)
143 + * @since 1.0.6
144 + *
145 + * @return bool
146 + */
147 + function is_addon() {
148 + return isset( $this->parent_plugin_id ) && is_numeric( $this->parent_plugin_id );
149 + }
150 +
151 + /**
105 152 * @author Leo Fajardo (@leorw)
106 - * @since 1.2.3
153 + * @since 1.2.3
107 154 *
108 155 * @return bool
109 156 */
110 - function has_affiliate_program() {
157 + function has_affiliate_program() {
111 158 return ( ! empty( $this->affiliate_moderation ) );
112 159 }
113 160
114 - static function get_type() {
115 - return 'plugin';
116 - }
117 - }
161 + static function get_type() {
162 + return 'plugin';
163 + }
164 + }