PluginProbe
Passster – Password Protect Pages and Content / 4.3.17
Passster – Password Protect Pages and Content v4.3.17
4.3.17 4.3.16 4.3.15 4.3.14 4.3.12 4.3.13 4.3.11 4.3.10 4.3.9 4.3.8 4.3.7 4.3.6 4.3.5 trunk 3.5.4 3.5.5.2 3.5.5.8 3.5.5.9 4.0 4.1.4 4.2.10 4.2.11 4.2.12 4.2.13 4.2.14 All 49 releases
← All changes | inc/freemius/includes/entities/class-fs-site.php +66 -22 3.5.4 → 4.3.17 View file →
@@ -15,8 +15,12 @@
15 15 * @var number
16 16 */
17 17 public $site_id;
18 18 /**
19 + * @var int
20 + */
21 + public $blog_id;
22 + /**
19 23 * @var number
20 24 */
21 25 public $plugin_id;
22 26 /**
@@ -39,12 +43,8 @@
39 43 * @var string E.g. en-GB
40 44 */
41 45 public $language;
42 46 /**
43 - * @var string E.g. UTF-8
44 - */
45 - public $charset;
46 - /**
47 47 * @var string Platform version (e.g WordPress version).
48 48 */
49 49 public $platform_version;
50 50 /**
@@ -85,8 +85,10 @@
85 85 /**
86 86 * @author Leo Fajardo (@leorw)
87 87 *
88 88 * @since 1.2.1.5
89 + * @deprecated Since 2.5.1
90 + * @todo Remove after a few releases.
89 91 *
90 92 * @var bool
91 93 */
92 94 public $is_disconnected = false;
@@ -179,8 +181,9 @@
179 181 // WPEngine staging.
180 182 fs_ends_with( $subdomain, '.staging.wpengine.com' ) ||
181 183 fs_ends_with( $subdomain, '.dev.wpengine.com' ) ||
182 184 fs_ends_with( $subdomain, '.wpengine.com' ) ||
185 + fs_ends_with( $subdomain, '.wpenginepowered.com' ) ||
183 186 // Pantheon
184 187 ( fs_ends_with( $subdomain, 'pantheonsite.io' ) &&
185 188 ( fs_starts_with( $subdomain, 'test-' ) || fs_starts_with( $subdomain, 'dev-' ) ) ) ||
186 189 // Cloudways
@@ -185,16 +188,63 @@
185 188 ( fs_starts_with( $subdomain, 'test-' ) || fs_starts_with( $subdomain, 'dev-' ) ) ) ||
186 189 // Cloudways
187 190 fs_ends_with( $subdomain, '.cloudwaysapps.com' ) ||
188 191 // Kinsta
189 - ( fs_starts_with( $subdomain, 'staging-' ) && ( fs_ends_with( $subdomain, '.kinsta.com' ) || fs_ends_with( $subdomain, '.kinsta.cloud' ) ) ) ||
192 + (
193 + ( fs_starts_with( $subdomain, 'stg-' ) || fs_starts_with( $subdomain, 'staging-' ) || fs_starts_with( $subdomain, 'env-' ) ) &&
194 + ( fs_ends_with( $subdomain, '.kinsta.com' ) || fs_ends_with( $subdomain, '.kinsta.cloud' ) )
195 + ) ||
190 196 // DesktopServer
191 197 fs_ends_with( $subdomain, '.dev.cc' ) ||
192 198 // Pressable
193 - fs_ends_with( $subdomain, '.mystagingwebsite.com' )
199 + fs_ends_with( $subdomain, '.mystagingwebsite.com' ) ||
200 + // WPMU DEV
201 + ( fs_ends_with( $subdomain, '.tempurl.host' ) || fs_ends_with( $subdomain, '.wpmudev.host' ) ) ||
202 + // Vendasta
203 + ( fs_ends_with( $subdomain, '.websitepro-staging.com' ) || fs_ends_with( $subdomain, '.websitepro.hosting' ) ) ||
204 + // InstaWP
205 + ( fs_ends_with( $subdomain, '.instawp.co' ) || fs_ends_with( $subdomain, '.instawp.link' ) || fs_ends_with( $subdomain, '.instawp.xyz' ) ) ||
206 + // 10Web Hosting
207 + ( fs_ends_with( $subdomain, '-dev.10web.site' ) || fs_ends_with( $subdomain, '-dev.10web.cloud' ) )
194 208 );
195 209 }
196 210
211 + /**
212 + * @author Leo Fajardo (@leorw)
213 + * @since 2.9.1
214 + *
215 + * @param string $host
216 + *
217 + * @return bool
218 + */
219 + static function is_playground_wp_environment_by_host( $host ) {
220 + // Services aimed at providing a WordPress sandbox environment.
221 + $sandbox_wp_environment_domains = array(
222 + // InstaWP
223 + 'instawp.co',
224 + 'instawp.link',
225 + 'instawp.xyz',
226 +
227 + // TasteWP
228 + 'tastewp.com',
229 +
230 + // WordPress Playground
231 + 'playground.wordpress.net',
232 + );
233 +
234 + foreach ( $sandbox_wp_environment_domains as $domain) {
235 + if (
236 + ( $host === $domain ) ||
237 + fs_ends_with( $host, '.' . $domain ) ||
238 + fs_ends_with( $host, '-' . $domain )
239 + ) {
240 + return true;
241 + }
242 + }
243 +
244 + return false;
245 + }
246 +
197 247 function is_localhost() {
198 248 return ( WP_FS__IS_LOCALHOST_FOR_SERVER || self::is_localhost_by_address( $this->url ) );
199 249 }
200 250
@@ -222,32 +272,26 @@
222 272 return is_numeric( $this->trial_plan_id );
223 273 }
224 274
225 275 /**
226 - * @author Vova Feldman (@svovaf)
227 - * @since 2.0.0
276 + * @author Edgar Melkonyan
228 277 *
229 278 * @return bool
230 279 */
231 - function is_tracking_allowed() {
232 - return ( true !== $this->is_disconnected );
280 + function is_beta() {
281 + return ( isset( $this->is_beta ) && true === $this->is_beta );
233 282 }
234 283
235 284 /**
236 - * @author Vova Feldman (@svovaf)
237 - * @since 2.0.0
285 + * @author Leo Fajardo (@leorw)
286 + * @since 2.5.1
238 287 *
288 + * @param string $site_url
289 + *
239 290 * @return bool
240 291 */
241 - function is_tracking_prohibited() {
242 - return ! $this->is_tracking_allowed();
243 - }
292 + function is_clone( $site_url ) {
293 + $clone_install_url = trailingslashit( fs_strip_url_protocol( $this->url ) );
244 294
245 - /**
246 - * @author Edgar Melkonyan
247 - *
248 - * @return bool
249 - */
250 - function is_beta() {
251 - return ( isset( $this->is_beta ) && true === $this->is_beta );
295 + return ( $clone_install_url !== $site_url );
252 296 }
253 297 }