@@ 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 | } |
|
@@ 1674-1686 (lines=13) @@ | ||
1671 | } |
|
1672 | ||
1673 | // No .test or .local domains. |
|
1674 | if ( preg_match( '#\.(test|local)$#i', $domain ) ) { |
|
1675 | return new \WP_Error( |
|
1676 | 'fail_domain_tld', |
|
1677 | sprintf( |
|
1678 | /* translators: %1$s is a domain name. */ |
|
1679 | __( |
|
1680 | 'Domain `%1$s` just failed is_usable_domain check as it uses an invalid top level domain.', |
|
1681 | 'jetpack' |
|
1682 | ), |
|
1683 | $domain |
|
1684 | ) |
|
1685 | ); |
|
1686 | } |
|
1687 | ||
1688 | // No WPCOM subdomains. |
|
1689 | if ( preg_match( '#\.WordPress\.com$#i', $domain ) ) { |
|
@@ 1689-1701 (lines=13) @@ | ||
1686 | } |
|
1687 | ||
1688 | // No WPCOM subdomains. |
|
1689 | if ( preg_match( '#\.WordPress\.com$#i', $domain ) ) { |
|
1690 | return new \WP_Error( |
|
1691 | 'fail_subdomain_wpcom', |
|
1692 | sprintf( |
|
1693 | /* translators: %1$s is a domain name. */ |
|
1694 | __( |
|
1695 | 'Domain `%1$s` just failed is_usable_domain check as it is a subdomain of WordPress.com.', |
|
1696 | 'jetpack' |
|
1697 | ), |
|
1698 | $domain |
|
1699 | ) |
|
1700 | ); |
|
1701 | } |
|
1702 | ||
1703 | // If PHP was compiled without support for the Filter module (very edge case). |
|
1704 | if ( ! function_exists( 'filter_var' ) ) { |