@@ 932-939 (lines=8) @@ | ||
929 | sprintf( __( 'Error Details: Jetpack ID is not a scalar. Do not publicly post this error message! %s', 'jetpack' ), $entity ), |
|
930 | $entity |
|
931 | ); |
|
932 | } elseif ( preg_match( '/[^0-9]/', $registration_response->jetpack_id ) ) { |
|
933 | return new \WP_Error( |
|
934 | 'jetpack_id', |
|
935 | /* translators: %s is an error message string */ |
|
936 | sprintf( __( 'Error Details: Jetpack ID begins with a numeral. Do not publicly post this error message! %s', 'jetpack' ), $entity ), |
|
937 | $entity |
|
938 | ); |
|
939 | } |
|
940 | ||
941 | return $registration_response; |
|
942 | } |
|
@@ 1565-1577 (lines=13) @@ | ||
1562 | } |
|
1563 | ||
1564 | // No .test or .local domains. |
|
1565 | if ( preg_match( '#\.(test|local)$#i', $domain ) ) { |
|
1566 | return new \WP_Error( |
|
1567 | 'fail_domain_tld', |
|
1568 | sprintf( |
|
1569 | /* translators: %1$s is a domain name. */ |
|
1570 | __( |
|
1571 | 'Domain `%1$s` just failed is_usable_domain check as it uses an invalid top level domain.', |
|
1572 | 'jetpack' |
|
1573 | ), |
|
1574 | $domain |
|
1575 | ) |
|
1576 | ); |
|
1577 | } |
|
1578 | ||
1579 | // No WPCOM subdomains. |
|
1580 | if ( preg_match( '#\.WordPress\.com$#i', $domain ) ) { |
|
@@ 1580-1592 (lines=13) @@ | ||
1577 | } |
|
1578 | ||
1579 | // No WPCOM subdomains. |
|
1580 | if ( preg_match( '#\.WordPress\.com$#i', $domain ) ) { |
|
1581 | return new \WP_Error( |
|
1582 | 'fail_subdomain_wpcom', |
|
1583 | sprintf( |
|
1584 | /* translators: %1$s is a domain name. */ |
|
1585 | __( |
|
1586 | 'Domain `%1$s` just failed is_usable_domain check as it is a subdomain of WordPress.com.', |
|
1587 | 'jetpack' |
|
1588 | ), |
|
1589 | $domain |
|
1590 | ) |
|
1591 | ); |
|
1592 | } |
|
1593 | ||
1594 | // If PHP was compiled without support for the Filter module (very edge case). |
|
1595 | if ( ! function_exists( 'filter_var' ) ) { |