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