@@ 495-507 (lines=13) @@ | ||
492 | } |
|
493 | ||
494 | // No .test or .local domains. |
|
495 | if ( preg_match( '#\.(test|local)$#i', $domain ) ) { |
|
496 | return new \WP_Error( |
|
497 | 'fail_domain_tld', |
|
498 | sprintf( |
|
499 | /* translators: %1$s is a domain name. */ |
|
500 | __( |
|
501 | 'Domain `%1$s` just failed is_usable_domain check as it uses an invalid top level domain.', |
|
502 | 'jetpack' |
|
503 | ), |
|
504 | $domain |
|
505 | ) |
|
506 | ); |
|
507 | } |
|
508 | ||
509 | // No WPCOM subdomains. |
|
510 | if ( preg_match( '#\.WordPress\.com$#i', $domain ) ) { |
|
@@ 510-522 (lines=13) @@ | ||
507 | } |
|
508 | ||
509 | // No WPCOM subdomains. |
|
510 | if ( preg_match( '#\.WordPress\.com$#i', $domain ) ) { |
|
511 | return new \WP_Error( |
|
512 | 'fail_subdomain_wpcom', |
|
513 | sprintf( |
|
514 | /* translators: %1$s is a domain name. */ |
|
515 | __( |
|
516 | 'Domain `%1$s` just failed is_usable_domain check as it is a subdomain of WordPress.com.', |
|
517 | 'jetpack' |
|
518 | ), |
|
519 | $domain |
|
520 | ) |
|
521 | ); |
|
522 | } |
|
523 | ||
524 | // If PHP was compiled without support for the Filter module (very edge case). |
|
525 | if ( ! function_exists( 'filter_var' ) ) { |