Changeset 14381
- Timestamp:
- 05/03/2010 06:54:37 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/formatting.php
r14231 r14381 1466 1466 * 1467 1467 * @param string $email Email address to verify. 1468 * @param boolean $ check_dns Whether to check the DNS for the domain using checkdnsrr().1468 * @param boolean $deprecated. Deprecated. 1469 1469 * @return string|bool Either false or the valid email address. 1470 1470 */ 1471 function is_email( $email, $check_dns = false ) { 1471 function is_email( $email, $deprecated = false ) { 1472 if ( ! empty( $deprecated ) ) 1473 _deprecated_argument( __FUNCTION__, '3.0' ); 1474 1472 1475 // Test for the minimum length the email can be 1473 1476 if ( strlen( $email ) < 3 ) { … … 1519 1522 return apply_filters( 'is_email', false, $email, 'sub_invalid_chars' ); 1520 1523 } 1521 }1522 1523 // DNS1524 // Check the domain has a valid MX and A resource record1525 if ( $check_dns && function_exists( 'checkdnsrr' ) && !( checkdnsrr( $domain . '.', 'MX' ) || checkdnsrr( $domain . '.', 'A' ) ) ) {1526 return apply_filters( 'is_email', false, $email, 'dns_no_rr' );1527 1524 } 1528 1525
Note: See TracChangeset
for help on using the changeset viewer.