| @@ -9,8 +9,11 @@ | ||
| 9 | 9 | if ( ! defined( 'ABSPATH' ) ) { |
| 10 | 10 | exit; |
| 11 | 11 | } |
| 12 | 12 | |
| 13 | + /** | |
| 14 | + * @property int $blog_id | |
| 15 | + */ | |
| 13 | 16 | class FS_Site extends FS_Scope_Entity { |
| 14 | 17 | /** |
| 15 | 18 | * @var number |
| 16 | 19 | */ |
| @@ -15,12 +18,8 @@ | ||
| 15 | 18 | * @var number |
| 16 | 19 | */ |
| 17 | 20 | public $site_id; |
| 18 | 21 | /** |
| 19 | - * @var int | |
| 20 | - */ | |
| 21 | - public $blog_id; | |
| 22 | - /** | |
| 23 | 22 | * @var number |
| 24 | 23 | */ |
| 25 | 24 | public $plugin_id; |
| 26 | 25 | /** |
| @@ -181,9 +180,8 @@ | ||
| 181 | 180 | // WPEngine staging. |
| 182 | 181 | fs_ends_with( $subdomain, '.staging.wpengine.com' ) || |
| 183 | 182 | fs_ends_with( $subdomain, '.dev.wpengine.com' ) || |
| 184 | 183 | fs_ends_with( $subdomain, '.wpengine.com' ) || |
| 185 | - fs_ends_with( $subdomain, '.wpenginepowered.com' ) || | |
| 186 | 184 | // Pantheon |
| 187 | 185 | ( fs_ends_with( $subdomain, 'pantheonsite.io' ) && |
| 188 | 186 | ( fs_starts_with( $subdomain, 'test-' ) || fs_starts_with( $subdomain, 'dev-' ) ) ) || |
| 189 | 187 | // Cloudways |
| @@ -189,9 +187,9 @@ | ||
| 189 | 187 | // Cloudways |
| 190 | 188 | fs_ends_with( $subdomain, '.cloudwaysapps.com' ) || |
| 191 | 189 | // Kinsta |
| 192 | 190 | ( |
| 193 | - ( fs_starts_with( $subdomain, 'stg-' ) || fs_starts_with( $subdomain, 'staging-' ) || fs_starts_with( $subdomain, 'env-' ) ) && | |
| 191 | + ( fs_starts_with( $subdomain, 'staging-' ) || fs_starts_with( $subdomain, 'env-' ) ) && | |
| 194 | 192 | ( fs_ends_with( $subdomain, '.kinsta.com' ) || fs_ends_with( $subdomain, '.kinsta.cloud' ) ) |
| 195 | 193 | ) || |
| 196 | 194 | // DesktopServer |
| 197 | 195 | fs_ends_with( $subdomain, '.dev.cc' ) || |
| @@ -201,48 +199,10 @@ | ||
| 201 | 199 | ( fs_ends_with( $subdomain, '.tempurl.host' ) || fs_ends_with( $subdomain, '.wpmudev.host' ) ) || |
| 202 | 200 | // Vendasta |
| 203 | 201 | ( fs_ends_with( $subdomain, '.websitepro-staging.com' ) || fs_ends_with( $subdomain, '.websitepro.hosting' ) ) || |
| 204 | 202 | // 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' ) ) | |
| 203 | + fs_ends_with( $subdomain, '.instawp.xyz' ) | |
| 208 | 204 | ); |
| 209 | - } | |
| 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 | 205 | } |
| 246 | 206 | |
| 247 | 207 | function is_localhost() { |
| 248 | 208 | return ( WP_FS__IS_LOCALHOST_FOR_SERVER || self::is_localhost_by_address( $this->url ) ); |