Alert: This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.

Action_Parser::validate_if_email( $content,  $meta_key )


Parameters Parameters

$content

(Required)

$meta_key

(Required)


Top ↑

Return Return

(false|string|void)


Source Source

File: src/core/lib/recipe-parts/actions/trait-action-parser.php

	private function validate_if_email( $content, $meta_key ) {
		if ( 0 === preg_match( '/EMAIL/', $meta_key ) ) {
			return false;
		}

		$list = array(
			'EMAILFROM',
			'EMAILFROMNAME',
			'EMAILTO',
			'EMAILCC',
			'EMAILBCC',
			'AFFILIATEWPACCEMAIL',
			'AFFILIATEWPPAYMENTEMAIL',
			'EDDCUSTOMER_EMAIL',
			'MCFROMEMAILADDRESS',
			'POSTCOMMENTEREMAIL',
			'POSTAUTHOREMAIL',
			'SENDREGEMAIL',
			'WPJMAPPLICATIONEMAIL',
			'WPJMRESUMEEMAIL',
			'WPJMJOBOWNEREMAIL',
			'MCFROMEMAILADDRESS',
		);

		$list = apply_filters( 'automator_ignore_wpautop_list', $list, $content, $meta_key );

		if ( in_array( $meta_key, $list, true ) ) {
			return true;
		}

		if ( is_array( $content ) ) {
			foreach ( $content as $email ) {
				return is_email( $email );
			}
		}
	}