From b63ee5748aa1230ad6555778ad01477ac52a62eb Mon Sep 17 00:00:00 2001 From: nacin Date: Mon, 3 May 2010 18:54:37 +0000 Subject: [PATCH] Deprecate checkdnsrr from is_email. Unused in core, and wonky on some server setups (Mac OS X < PHP 5.3 specifically). A plugin can always add it back. props technosailor, fixes #12503. git-svn-id: http://svn.automattic.com/wordpress/trunk@14381 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/formatting.php | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/wp-includes/formatting.php b/wp-includes/formatting.php index be6ed2801d..3f1246e79e 100644 --- a/wp-includes/formatting.php +++ b/wp-includes/formatting.php @@ -1465,10 +1465,13 @@ function convert_smilies($text) { * @since 0.71 * * @param string $email Email address to verify. - * @param boolean $check_dns Whether to check the DNS for the domain using checkdnsrr(). + * @param boolean $deprecated. Deprecated. * @return string|bool Either false or the valid email address. */ -function is_email( $email, $check_dns = false ) { +function is_email( $email, $deprecated = false ) { + if ( ! empty( $deprecated ) ) + _deprecated_argument( __FUNCTION__, '3.0' ); + // Test for the minimum length the email can be if ( strlen( $email ) < 3 ) { return apply_filters( 'is_email', false, $email, 'email_too_short' ); @@ -1520,12 +1523,6 @@ function is_email( $email, $check_dns = false ) { } } - // DNS - // Check the domain has a valid MX and A resource record - if ( $check_dns && function_exists( 'checkdnsrr' ) && !( checkdnsrr( $domain . '.', 'MX' ) || checkdnsrr( $domain . '.', 'A' ) ) ) { - return apply_filters( 'is_email', false, $email, 'dns_no_rr' ); - } - // Congratulations your email made it! return apply_filters( 'is_email', $email, $email, null ); }