@@ 466-478 (lines=13) @@ | ||
463 | } |
|
464 | ||
465 | // No .test or .local domains. |
|
466 | if ( preg_match( '#\.(test|local)$#i', $domain ) ) { |
|
467 | return new \WP_Error( |
|
468 | 'fail_domain_tld', |
|
469 | sprintf( |
|
470 | /* translators: %1$s is a domain name. */ |
|
471 | __( |
|
472 | 'Domain `%1$s` just failed is_usable_domain check as it uses an invalid top level domain.', |
|
473 | 'jetpack' |
|
474 | ), |
|
475 | $domain |
|
476 | ) |
|
477 | ); |
|
478 | } |
|
479 | ||
480 | // No WPCOM subdomains. |
|
481 | if ( preg_match( '#\.WordPress\.com$#i', $domain ) ) { |
|
@@ 481-493 (lines=13) @@ | ||
478 | } |
|
479 | ||
480 | // No WPCOM subdomains. |
|
481 | if ( preg_match( '#\.WordPress\.com$#i', $domain ) ) { |
|
482 | return new \WP_Error( |
|
483 | 'fail_subdomain_wpcom', |
|
484 | sprintf( |
|
485 | /* translators: %1$s is a domain name. */ |
|
486 | __( |
|
487 | 'Domain `%1$s` just failed is_usable_domain check as it is a subdomain of WordPress.com.', |
|
488 | 'jetpack' |
|
489 | ), |
|
490 | $domain |
|
491 | ) |
|
492 | ); |
|
493 | } |
|
494 | ||
495 | // If PHP was compiled without support for the Filter module (very edge case). |
|
496 | if ( ! function_exists( 'filter_var' ) ) { |