@@ 1044-1051 (lines=8) @@ | ||
1041 | sprintf( __( 'Error Details: Jetpack ID is not a scalar. Do not publicly post this error message! %s', 'jetpack' ), $entity ), |
|
1042 | $entity |
|
1043 | ); |
|
1044 | } elseif ( preg_match( '/[^0-9]/', $registration_response->jetpack_id ) ) { |
|
1045 | return new \WP_Error( |
|
1046 | 'jetpack_id', |
|
1047 | /* translators: %s is an error message string */ |
|
1048 | sprintf( __( 'Error Details: Jetpack ID begins with a numeral. Do not publicly post this error message! %s', 'jetpack' ), $entity ), |
|
1049 | $entity |
|
1050 | ); |
|
1051 | } |
|
1052 | ||
1053 | return $registration_response; |
|
1054 | } |
|
@@ 1793-1805 (lines=13) @@ | ||
1790 | } |
|
1791 | ||
1792 | // No .test or .local domains. |
|
1793 | if ( preg_match( '#\.(test|local)$#i', $domain ) ) { |
|
1794 | return new \WP_Error( |
|
1795 | 'fail_domain_tld', |
|
1796 | sprintf( |
|
1797 | /* translators: %1$s is a domain name. */ |
|
1798 | __( |
|
1799 | 'Domain `%1$s` just failed is_usable_domain check as it uses an invalid top level domain.', |
|
1800 | 'jetpack' |
|
1801 | ), |
|
1802 | $domain |
|
1803 | ) |
|
1804 | ); |
|
1805 | } |
|
1806 | ||
1807 | // No WPCOM subdomains. |
|
1808 | if ( preg_match( '#\.WordPress\.com$#i', $domain ) ) { |
|
@@ 1808-1820 (lines=13) @@ | ||
1805 | } |
|
1806 | ||
1807 | // No WPCOM subdomains. |
|
1808 | if ( preg_match( '#\.WordPress\.com$#i', $domain ) ) { |
|
1809 | return new \WP_Error( |
|
1810 | 'fail_subdomain_wpcom', |
|
1811 | sprintf( |
|
1812 | /* translators: %1$s is a domain name. */ |
|
1813 | __( |
|
1814 | 'Domain `%1$s` just failed is_usable_domain check as it is a subdomain of WordPress.com.', |
|
1815 | 'jetpack' |
|
1816 | ), |
|
1817 | $domain |
|
1818 | ) |
|
1819 | ); |
|
1820 | } |
|
1821 | ||
1822 | // If PHP was compiled without support for the Filter module (very edge case). |
|
1823 | if ( ! function_exists( 'filter_var' ) ) { |