@@ 450-462 (lines=13) @@ | ||
447 | } |
|
448 | ||
449 | // No .test or .local domains. |
|
450 | if ( preg_match( '#\.(test|local)$#i', $domain ) ) { |
|
451 | return new \WP_Error( |
|
452 | 'fail_domain_tld', |
|
453 | sprintf( |
|
454 | /* translators: %1$s is a domain name. */ |
|
455 | __( |
|
456 | 'Domain `%1$s` just failed is_usable_domain check as it uses an invalid top level domain.', |
|
457 | 'jetpack' |
|
458 | ), |
|
459 | $domain |
|
460 | ) |
|
461 | ); |
|
462 | } |
|
463 | ||
464 | // No WPCOM subdomains. |
|
465 | if ( preg_match( '#\.WordPress\.com$#i', $domain ) ) { |
|
@@ 465-477 (lines=13) @@ | ||
462 | } |
|
463 | ||
464 | // No WPCOM subdomains. |
|
465 | if ( preg_match( '#\.WordPress\.com$#i', $domain ) ) { |
|
466 | return new \WP_Error( |
|
467 | 'fail_subdomain_wpcom', |
|
468 | sprintf( |
|
469 | /* translators: %1$s is a domain name. */ |
|
470 | __( |
|
471 | 'Domain `%1$s` just failed is_usable_domain check as it is a subdomain of WordPress.com.', |
|
472 | 'jetpack' |
|
473 | ), |
|
474 | $domain |
|
475 | ) |
|
476 | ); |
|
477 | } |
|
478 | ||
479 | // If PHP was compiled without support for the Filter module (very edge case). |
|
480 | if ( ! function_exists( 'filter_var' ) ) { |