@@ 1323-1335 (lines=13) @@ | ||
1320 | } |
|
1321 | ||
1322 | // No .test or .local domains. |
|
1323 | if ( preg_match( '#\.(test|local)$#i', $domain ) ) { |
|
1324 | return new \WP_Error( |
|
1325 | 'fail_domain_tld', |
|
1326 | sprintf( |
|
1327 | /* translators: %1$s is a domain name. */ |
|
1328 | __( |
|
1329 | 'Domain `%1$s` just failed is_usable_domain check as it uses an invalid top level domain.', |
|
1330 | 'jetpack' |
|
1331 | ), |
|
1332 | $domain |
|
1333 | ) |
|
1334 | ); |
|
1335 | } |
|
1336 | ||
1337 | // No WPCOM subdomains. |
|
1338 | if ( preg_match( '#\.WordPress\.com$#i', $domain ) ) { |
|
@@ 1338-1350 (lines=13) @@ | ||
1335 | } |
|
1336 | ||
1337 | // No WPCOM subdomains. |
|
1338 | if ( preg_match( '#\.WordPress\.com$#i', $domain ) ) { |
|
1339 | return new \WP_Error( |
|
1340 | 'fail_subdomain_wpcom', |
|
1341 | sprintf( |
|
1342 | /* translators: %1$s is a domain name. */ |
|
1343 | __( |
|
1344 | 'Domain `%1$s` just failed is_usable_domain check as it is a subdomain of WordPress.com.', |
|
1345 | 'jetpack' |
|
1346 | ), |
|
1347 | $domain |
|
1348 | ) |
|
1349 | ); |
|
1350 | } |
|
1351 | ||
1352 | // If PHP was compiled without support for the Filter module (very edge case). |
|
1353 | if ( ! function_exists( 'filter_var' ) ) { |