@@ 952-959 (lines=8) @@ | ||
949 | sprintf( __( 'Error Details: Jetpack ID is not a scalar. Do not publicly post this error message! %s', 'jetpack' ), $entity ), |
|
950 | $entity |
|
951 | ); |
|
952 | } elseif ( preg_match( '/[^0-9]/', $registration_response->jetpack_id ) ) { |
|
953 | return new \WP_Error( |
|
954 | 'jetpack_id', |
|
955 | /* translators: %s is an error message string */ |
|
956 | sprintf( __( 'Error Details: Jetpack ID begins with a numeral. Do not publicly post this error message! %s', 'jetpack' ), $entity ), |
|
957 | $entity |
|
958 | ); |
|
959 | } |
|
960 | ||
961 | return $registration_response; |
|
962 | } |
|
@@ 1817-1829 (lines=13) @@ | ||
1814 | } |
|
1815 | ||
1816 | // No .test or .local domains. |
|
1817 | if ( preg_match( '#\.(test|local)$#i', $domain ) ) { |
|
1818 | return new \WP_Error( |
|
1819 | 'fail_domain_tld', |
|
1820 | sprintf( |
|
1821 | /* translators: %1$s is a domain name. */ |
|
1822 | __( |
|
1823 | 'Domain `%1$s` just failed is_usable_domain check as it uses an invalid top level domain.', |
|
1824 | 'jetpack' |
|
1825 | ), |
|
1826 | $domain |
|
1827 | ) |
|
1828 | ); |
|
1829 | } |
|
1830 | ||
1831 | // No WPCOM subdomains. |
|
1832 | if ( preg_match( '#\.WordPress\.com$#i', $domain ) ) { |
|
@@ 1832-1844 (lines=13) @@ | ||
1829 | } |
|
1830 | ||
1831 | // No WPCOM subdomains. |
|
1832 | if ( preg_match( '#\.WordPress\.com$#i', $domain ) ) { |
|
1833 | return new \WP_Error( |
|
1834 | 'fail_subdomain_wpcom', |
|
1835 | sprintf( |
|
1836 | /* translators: %1$s is a domain name. */ |
|
1837 | __( |
|
1838 | 'Domain `%1$s` just failed is_usable_domain check as it is a subdomain of WordPress.com.', |
|
1839 | 'jetpack' |
|
1840 | ), |
|
1841 | $domain |
|
1842 | ) |
|
1843 | ); |
|
1844 | } |
|
1845 | ||
1846 | // If PHP was compiled without support for the Filter module (very edge case). |
|
1847 | if ( ! function_exists( 'filter_var' ) ) { |