|
@@ 1014-1021 (lines=8) @@
|
| 1011 |
|
sprintf( __( 'Error Details: Jetpack ID is not a scalar. Do not publicly post this error message! %s', 'jetpack' ), $entity ), |
| 1012 |
|
$entity |
| 1013 |
|
); |
| 1014 |
|
} elseif ( preg_match( '/[^0-9]/', $registration_response->jetpack_id ) ) { |
| 1015 |
|
return new \WP_Error( |
| 1016 |
|
'jetpack_id', |
| 1017 |
|
/* translators: %s is an error message string */ |
| 1018 |
|
sprintf( __( 'Error Details: Jetpack ID begins with a numeral. Do not publicly post this error message! %s', 'jetpack' ), $entity ), |
| 1019 |
|
$entity |
| 1020 |
|
); |
| 1021 |
|
} |
| 1022 |
|
|
| 1023 |
|
return $registration_response; |
| 1024 |
|
} |
|
@@ 1940-1952 (lines=13) @@
|
| 1937 |
|
} |
| 1938 |
|
|
| 1939 |
|
// No .test or .local domains. |
| 1940 |
|
if ( preg_match( '#\.(test|local)$#i', $domain ) ) { |
| 1941 |
|
return new \WP_Error( |
| 1942 |
|
'fail_domain_tld', |
| 1943 |
|
sprintf( |
| 1944 |
|
/* translators: %1$s is a domain name. */ |
| 1945 |
|
__( |
| 1946 |
|
'Domain `%1$s` just failed is_usable_domain check as it uses an invalid top level domain.', |
| 1947 |
|
'jetpack' |
| 1948 |
|
), |
| 1949 |
|
$domain |
| 1950 |
|
) |
| 1951 |
|
); |
| 1952 |
|
} |
| 1953 |
|
|
| 1954 |
|
// No WPCOM subdomains. |
| 1955 |
|
if ( preg_match( '#\.WordPress\.com$#i', $domain ) ) { |
|
@@ 1955-1967 (lines=13) @@
|
| 1952 |
|
} |
| 1953 |
|
|
| 1954 |
|
// No WPCOM subdomains. |
| 1955 |
|
if ( preg_match( '#\.WordPress\.com$#i', $domain ) ) { |
| 1956 |
|
return new \WP_Error( |
| 1957 |
|
'fail_subdomain_wpcom', |
| 1958 |
|
sprintf( |
| 1959 |
|
/* translators: %1$s is a domain name. */ |
| 1960 |
|
__( |
| 1961 |
|
'Domain `%1$s` just failed is_usable_domain check as it is a subdomain of WordPress.com.', |
| 1962 |
|
'jetpack' |
| 1963 |
|
), |
| 1964 |
|
$domain |
| 1965 |
|
) |
| 1966 |
|
); |
| 1967 |
|
} |
| 1968 |
|
|
| 1969 |
|
// If PHP was compiled without support for the Filter module (very edge case). |
| 1970 |
|
if ( ! function_exists( 'filter_var' ) ) { |