@@ 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 | } |
|
@@ 1831-1843 (lines=13) @@ | ||
1828 | } |
|
1829 | ||
1830 | // No .test or .local domains. |
|
1831 | if ( preg_match( '#\.(test|local)$#i', $domain ) ) { |
|
1832 | return new \WP_Error( |
|
1833 | 'fail_domain_tld', |
|
1834 | sprintf( |
|
1835 | /* translators: %1$s is a domain name. */ |
|
1836 | __( |
|
1837 | 'Domain `%1$s` just failed is_usable_domain check as it uses an invalid top level domain.', |
|
1838 | 'jetpack' |
|
1839 | ), |
|
1840 | $domain |
|
1841 | ) |
|
1842 | ); |
|
1843 | } |
|
1844 | ||
1845 | // No WPCOM subdomains. |
|
1846 | if ( preg_match( '#\.WordPress\.com$#i', $domain ) ) { |
|
@@ 1846-1858 (lines=13) @@ | ||
1843 | } |
|
1844 | ||
1845 | // No WPCOM subdomains. |
|
1846 | if ( preg_match( '#\.WordPress\.com$#i', $domain ) ) { |
|
1847 | return new \WP_Error( |
|
1848 | 'fail_subdomain_wpcom', |
|
1849 | sprintf( |
|
1850 | /* translators: %1$s is a domain name. */ |
|
1851 | __( |
|
1852 | 'Domain `%1$s` just failed is_usable_domain check as it is a subdomain of WordPress.com.', |
|
1853 | 'jetpack' |
|
1854 | ), |
|
1855 | $domain |
|
1856 | ) |
|
1857 | ); |
|
1858 | } |
|
1859 | ||
1860 | // If PHP was compiled without support for the Filter module (very edge case). |
|
1861 | if ( ! function_exists( 'filter_var' ) ) { |