|
@@ 981-988 (lines=8) @@
|
| 978 |
|
sprintf( __( 'Error Details: Jetpack ID is not a scalar. Do not publicly post this error message! %s', 'jetpack' ), $entity ), |
| 979 |
|
$entity |
| 980 |
|
); |
| 981 |
|
} elseif ( preg_match( '/[^0-9]/', $registration_response->jetpack_id ) ) { |
| 982 |
|
return new \WP_Error( |
| 983 |
|
'jetpack_id', |
| 984 |
|
/* translators: %s is an error message string */ |
| 985 |
|
sprintf( __( 'Error Details: Jetpack ID begins with a numeral. Do not publicly post this error message! %s', 'jetpack' ), $entity ), |
| 986 |
|
$entity |
| 987 |
|
); |
| 988 |
|
} |
| 989 |
|
|
| 990 |
|
return $registration_response; |
| 991 |
|
} |
|
@@ 1888-1900 (lines=13) @@
|
| 1885 |
|
} |
| 1886 |
|
|
| 1887 |
|
// No .test or .local domains. |
| 1888 |
|
if ( preg_match( '#\.(test|local)$#i', $domain ) ) { |
| 1889 |
|
return new \WP_Error( |
| 1890 |
|
'fail_domain_tld', |
| 1891 |
|
sprintf( |
| 1892 |
|
/* translators: %1$s is a domain name. */ |
| 1893 |
|
__( |
| 1894 |
|
'Domain `%1$s` just failed is_usable_domain check as it uses an invalid top level domain.', |
| 1895 |
|
'jetpack' |
| 1896 |
|
), |
| 1897 |
|
$domain |
| 1898 |
|
) |
| 1899 |
|
); |
| 1900 |
|
} |
| 1901 |
|
|
| 1902 |
|
// No WPCOM subdomains. |
| 1903 |
|
if ( preg_match( '#\.WordPress\.com$#i', $domain ) ) { |
|
@@ 1903-1915 (lines=13) @@
|
| 1900 |
|
} |
| 1901 |
|
|
| 1902 |
|
// No WPCOM subdomains. |
| 1903 |
|
if ( preg_match( '#\.WordPress\.com$#i', $domain ) ) { |
| 1904 |
|
return new \WP_Error( |
| 1905 |
|
'fail_subdomain_wpcom', |
| 1906 |
|
sprintf( |
| 1907 |
|
/* translators: %1$s is a domain name. */ |
| 1908 |
|
__( |
| 1909 |
|
'Domain `%1$s` just failed is_usable_domain check as it is a subdomain of WordPress.com.', |
| 1910 |
|
'jetpack' |
| 1911 |
|
), |
| 1912 |
|
$domain |
| 1913 |
|
) |
| 1914 |
|
); |
| 1915 |
|
} |
| 1916 |
|
|
| 1917 |
|
// If PHP was compiled without support for the Filter module (very edge case). |
| 1918 |
|
if ( ! function_exists( 'filter_var' ) ) { |