Noptin_Mailer::merge( $content,  $tags = array() )

Merges a string with the specified merge tags


Source Source

File: includes/class-noptin-mailer.php

	public function merge( $content, $tags = array() ) {

		$tags = wp_parse_args( $this->get_default_merge_tags(), $tags );

		// Replace all available tags with their values.
		foreach ( $tags as $key => $value ) {
			if ( ! is_array( $value ) ) {
				$content = str_ireplace( "[[$key]]", $value, $content );
			}
		}

		// Remove unavailable tags.
		$content = preg_replace( '/\[\[\w+]\]/', '', $content );

		return $content;
	}


Top ↑

User Contributed Notes User Contributed Notes

30 day money back guarantee
Safe & Secure online payment
Custom CSS Slide Example
Custom Animation Example
Default Animation