Action_Parser::is_valid_token( $meta_key,  $meta_value )


Parameters Parameters

$meta_key

(Required)

$meta_value

(Required)


Top ↑

Return Return

(bool)


Source Source

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

	public function is_valid_token( $meta_key, $meta_value ) {
		if ( array_intersect( array( $meta_key ), $this->get_not_token_keys() ) ) {
			return false;
		}
		if ( preg_match_all( '/{{(.*)}}/', $meta_value ) || empty( $meta_value ) ) {
			return true;
		}
		return false;
	}