Formatting: Increase minimum characters allowed in is_email() to 6.
Brings the minimum characters expected for a valid email address to six, which matches the expectations in `wp_handle_comment_submission()` and REST API email arguments. Props rmccue, lukecavanagh, rachelbaker, desrosj, sudar. Fixes #38708. Built from https://develop.svn.wordpress.org/trunk@40667 git-svn-id: http://core.svn.wordpress.org/trunk@40530 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -2872,7 +2872,7 @@ function is_email( $email, $deprecated = false ) {
|
||||
_deprecated_argument( __FUNCTION__, '3.0.0' );
|
||||
|
||||
// Test for the minimum length the email can be
|
||||
if ( strlen( $email ) < 3 ) {
|
||||
if ( strlen( $email ) < 6 ) {
|
||||
/**
|
||||
* Filters whether an email address is valid.
|
||||
*
|
||||
@@ -3109,7 +3109,7 @@ function iso8601_to_datetime( $date_string, $timezone = 'user' ) {
|
||||
*/
|
||||
function sanitize_email( $email ) {
|
||||
// Test for the minimum length the email can be
|
||||
if ( strlen( $email ) < 3 ) {
|
||||
if ( strlen( $email ) < 6 ) {
|
||||
/**
|
||||
* Filters a sanitized email address.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user