LLMS_Email::get_content_html()

Get the HTML email content


Return Return

(string)


Top ↑

Source Source

File: includes/emails/class.llms.email.php

	public function get_content_html() {

		global $post;
		$temp = null;

		// Override the $post global with the email post content (if it exists).
		// This fixes Elementor / WC conflict outlined at https://github.com/gocodebox/lifterlms/issues/730.
		if ( isset( $this->email_post ) ) {
			$temp = $post;
			$post = $this->email_post;
		}

		ob_start();
		llms_get_template(
			$this->template_html,
			array(
				'email_heading' => $this->get_heading(),
				'email_message' => $this->get_body(),
			)
		);

		$html = apply_filters( 'llms_email_content_get_content_html', ob_get_clean(), $this );

		// Restore the default $post global.
		if ( $temp ) {
			$post = $temp;
		}

		return $html;

	}


Top ↑

Changelog Changelog

Changelog
Version Description
3.8.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.