Copy_Recipe_Parts::token_exists_in_content( $content )


Parameters Parameters

$content

(Required)


Top ↑

Return Return

(bool)


Source Source

File: src/core/admin/class-copy-recipe-parts.php

	public function token_exists_in_content( $content ) {
		// check if content contains a replaceable token
		if (
			false === preg_match_all( '/{{(ACTION_(FIELD|META)\:)?\d+:\w.+?}}/', $content )
			&& false === preg_match_all( '/{{id:(WPMAGICBUTTON|WPMAGICLINK)}}/', $content )
		) {
			return false;
		}
		return true;
	}