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