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