@@ 903-910 (lines=8) @@ | ||
900 | sprintf( __( 'Error Details: Jetpack ID is not a scalar. Do not publicly post this error message! %s', 'jetpack' ), $entity ), |
|
901 | $entity |
|
902 | ); |
|
903 | } elseif ( preg_match( '/[^0-9]/', $registration_response->jetpack_id ) ) { |
|
904 | return new \WP_Error( |
|
905 | 'jetpack_id', |
|
906 | /* translators: %s is an error message string */ |
|
907 | sprintf( __( 'Error Details: Jetpack ID begins with a numeral. Do not publicly post this error message! %s', 'jetpack' ), $entity ), |
|
908 | $entity |
|
909 | ); |
|
910 | } |
|
911 | ||
912 | return $registration_response; |
|
913 | } |
|
@@ 1449-1461 (lines=13) @@ | ||
1446 | } |
|
1447 | ||
1448 | // No .test or .local domains. |
|
1449 | if ( preg_match( '#\.(test|local)$#i', $domain ) ) { |
|
1450 | return new \WP_Error( |
|
1451 | 'fail_domain_tld', |
|
1452 | sprintf( |
|
1453 | /* translators: %1$s is a domain name. */ |
|
1454 | __( |
|
1455 | 'Domain `%1$s` just failed is_usable_domain check as it uses an invalid top level domain.', |
|
1456 | 'jetpack' |
|
1457 | ), |
|
1458 | $domain |
|
1459 | ) |
|
1460 | ); |
|
1461 | } |
|
1462 | ||
1463 | // No WPCOM subdomains. |
|
1464 | if ( preg_match( '#\.WordPress\.com$#i', $domain ) ) { |
|
@@ 1464-1476 (lines=13) @@ | ||
1461 | } |
|
1462 | ||
1463 | // No WPCOM subdomains. |
|
1464 | if ( preg_match( '#\.WordPress\.com$#i', $domain ) ) { |
|
1465 | return new \WP_Error( |
|
1466 | 'fail_subdomain_wpcom', |
|
1467 | sprintf( |
|
1468 | /* translators: %1$s is a domain name. */ |
|
1469 | __( |
|
1470 | 'Domain `%1$s` just failed is_usable_domain check as it is a subdomain of WordPress.com.', |
|
1471 | 'jetpack' |
|
1472 | ), |
|
1473 | $domain |
|
1474 | ) |
|
1475 | ); |
|
1476 | } |
|
1477 | ||
1478 | // If PHP was compiled without support for the Filter module (very edge case). |
|
1479 | if ( ! function_exists( 'filter_var' ) ) { |