|
@@ 952-959 (lines=8) @@
|
| 949 |
|
sprintf( __( 'Error Details: Jetpack ID is not a scalar. Do not publicly post this error message! %s', 'jetpack' ), $entity ), |
| 950 |
|
$entity |
| 951 |
|
); |
| 952 |
|
} elseif ( preg_match( '/[^0-9]/', $registration_response->jetpack_id ) ) { |
| 953 |
|
return new \WP_Error( |
| 954 |
|
'jetpack_id', |
| 955 |
|
/* translators: %s is an error message string */ |
| 956 |
|
sprintf( __( 'Error Details: Jetpack ID begins with a numeral. Do not publicly post this error message! %s', 'jetpack' ), $entity ), |
| 957 |
|
$entity |
| 958 |
|
); |
| 959 |
|
} |
| 960 |
|
|
| 961 |
|
return $registration_response; |
| 962 |
|
} |
|
@@ 1704-1716 (lines=13) @@
|
| 1701 |
|
} |
| 1702 |
|
|
| 1703 |
|
// No .test or .local domains. |
| 1704 |
|
if ( preg_match( '#\.(test|local)$#i', $domain ) ) { |
| 1705 |
|
return new \WP_Error( |
| 1706 |
|
'fail_domain_tld', |
| 1707 |
|
sprintf( |
| 1708 |
|
/* translators: %1$s is a domain name. */ |
| 1709 |
|
__( |
| 1710 |
|
'Domain `%1$s` just failed is_usable_domain check as it uses an invalid top level domain.', |
| 1711 |
|
'jetpack' |
| 1712 |
|
), |
| 1713 |
|
$domain |
| 1714 |
|
) |
| 1715 |
|
); |
| 1716 |
|
} |
| 1717 |
|
|
| 1718 |
|
// No WPCOM subdomains. |
| 1719 |
|
if ( preg_match( '#\.WordPress\.com$#i', $domain ) ) { |
|
@@ 1719-1731 (lines=13) @@
|
| 1716 |
|
} |
| 1717 |
|
|
| 1718 |
|
// No WPCOM subdomains. |
| 1719 |
|
if ( preg_match( '#\.WordPress\.com$#i', $domain ) ) { |
| 1720 |
|
return new \WP_Error( |
| 1721 |
|
'fail_subdomain_wpcom', |
| 1722 |
|
sprintf( |
| 1723 |
|
/* translators: %1$s is a domain name. */ |
| 1724 |
|
__( |
| 1725 |
|
'Domain `%1$s` just failed is_usable_domain check as it is a subdomain of WordPress.com.', |
| 1726 |
|
'jetpack' |
| 1727 |
|
), |
| 1728 |
|
$domain |
| 1729 |
|
) |
| 1730 |
|
); |
| 1731 |
|
} |
| 1732 |
|
|
| 1733 |
|
// If PHP was compiled without support for the Filter module (very edge case). |
| 1734 |
|
if ( ! function_exists( 'filter_var' ) ) { |