芝麻web文件管理V1.00
编辑当前文件:/home2/sdektunc/cepali.edu.mx/wp-content/plugins/contact-form-7/includes/validation-functions.php
$/', $mailbox, $matches ) ) { $addr_spec = $matches[1]; } else { $addr_spec = $mailbox; } if ( ! wpcf7_is_email( $addr_spec ) ) { return false; } $addresses[] = $addr_spec; } return $addresses; } /** * Checks whether an email address belongs to a domain. * * @param string $email A mailbox or a comma-separated list of mailboxes. * @param string $domain Internet domain name. * @return bool True if all of the email addresses belong to the domain, * false if not. */ function wpcf7_is_email_in_domain( $email, $domain ) { $email_list = wpcf7_is_mailbox_list( $email ); if ( false === $email_list ) { return false; } $domain = strtolower( $domain ); foreach ( $email_list as $email ) { $email_domain = substr( $email, strrpos( $email, '@' ) + 1 ); $email_domain = strtolower( $email_domain ); $domain_parts = explode( '.', $domain ); do { $site_domain = implode( '.', $domain_parts ); if ( $site_domain == $email_domain ) { continue 2; } array_shift( $domain_parts ); } while ( $domain_parts ); return false; } return true; } /** * Checks whether an email address belongs to the site domain. */ function wpcf7_is_email_in_site_domain( $email ) { if ( wpcf7_is_localhost() ) { return true; } $homes = array( home_url(), network_home_url(), ); $homes = array_unique( $homes ); foreach ( $homes as $home ) { $sitename = wp_parse_url( $home, PHP_URL_HOST ); if ( WP_Http::is_ip_address( $sitename ) ) { return true; } if ( wpcf7_is_email_in_domain( $email, $sitename ) ) { return true; } } return false; } /** * Verifies that a given file path is under the directories that WordPress * manages for user contents. * * Returns false if the file at the given path does not exist yet. * * @param string $path A file path. * @return bool True if the path is under the content directories, * false otherwise. */ function wpcf7_is_file_path_in_content_dir( $path ) { if ( $real_path = realpath( $path ) ) { $path = $real_path; } else { return false; } if ( 0 === strpos( $path, realpath( WP_CONTENT_DIR ) ) ) { return true; } if ( defined( 'UPLOADS' ) and 0 === strpos( $path, realpath( ABSPATH . UPLOADS ) ) ) { return true; } return false; }