@@ 966-973 (lines=8) @@ | ||
963 | sprintf( __( 'Error Details: Jetpack ID is not a scalar. Do not publicly post this error message! %s', 'jetpack' ), $entity ), |
|
964 | $entity |
|
965 | ); |
|
966 | } elseif ( preg_match( '/[^0-9]/', $registration_response->jetpack_id ) ) { |
|
967 | return new \WP_Error( |
|
968 | 'jetpack_id', |
|
969 | /* translators: %s is an error message string */ |
|
970 | sprintf( __( 'Error Details: Jetpack ID begins with a numeral. Do not publicly post this error message! %s', 'jetpack' ), $entity ), |
|
971 | $entity |
|
972 | ); |
|
973 | } |
|
974 | ||
975 | return $registration_response; |
|
976 | } |
|
@@ 1861-1873 (lines=13) @@ | ||
1858 | } |
|
1859 | ||
1860 | // No .test or .local domains. |
|
1861 | if ( preg_match( '#\.(test|local)$#i', $domain ) ) { |
|
1862 | return new \WP_Error( |
|
1863 | 'fail_domain_tld', |
|
1864 | sprintf( |
|
1865 | /* translators: %1$s is a domain name. */ |
|
1866 | __( |
|
1867 | 'Domain `%1$s` just failed is_usable_domain check as it uses an invalid top level domain.', |
|
1868 | 'jetpack' |
|
1869 | ), |
|
1870 | $domain |
|
1871 | ) |
|
1872 | ); |
|
1873 | } |
|
1874 | ||
1875 | // No WPCOM subdomains. |
|
1876 | if ( preg_match( '#\.WordPress\.com$#i', $domain ) ) { |
|
@@ 1876-1888 (lines=13) @@ | ||
1873 | } |
|
1874 | ||
1875 | // No WPCOM subdomains. |
|
1876 | if ( preg_match( '#\.WordPress\.com$#i', $domain ) ) { |
|
1877 | return new \WP_Error( |
|
1878 | 'fail_subdomain_wpcom', |
|
1879 | sprintf( |
|
1880 | /* translators: %1$s is a domain name. */ |
|
1881 | __( |
|
1882 | 'Domain `%1$s` just failed is_usable_domain check as it is a subdomain of WordPress.com.', |
|
1883 | 'jetpack' |
|
1884 | ), |
|
1885 | $domain |
|
1886 | ) |
|
1887 | ); |
|
1888 | } |
|
1889 | ||
1890 | // If PHP was compiled without support for the Filter module (very edge case). |
|
1891 | if ( ! function_exists( 'filter_var' ) ) { |