Warning: This method has been deprecated. LLMS_Certificate_User::get_content_html() is deprecated with no replacement instead.

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.

LLMS_Certificate_User::get_content_html()

get_content_html function.


Return Return

(string)


Top ↑

Source Source

File: includes/certificates/class.llms.certificate.user.php

	private function get_content_html() {

		add_filter( 'llms_user_info_shortcode_user_id', array( $this, 'set_shortcode_user' ) );

		$codes = apply_filters(
			'llms_certificate_merge_codes',
			array(
				'{site_title}'    => $this->get_blogname(),
				'{user_login}'    => $this->user_login,
				'{site_url}'      => $this->account_link,
				'{first_name}'    => $this->user_firstname,
				'{last_name}'     => $this->user_lastname,
				'{email_address}' => $this->user_email,
				'{student_id}'    => $this->userid,
				'{current_date}'  => date_i18n( get_option( 'date_format' ), current_time( 'timestamp' ) ),
			),
			$this
		);

		$this->find    = array_keys( $codes );
		$this->replace = array_values( $codes );

		$content = $this->format_string( $this->content );

		// In certain circumstances shortcodes won't be registered yet.
		LLMS_Shortcodes::init();

		ob_start();
		llms_get_template(
			$this->template_html,
			array(
				'email_message' => do_shortcode( $content ),
				'title'         => $this->title,
				'image'         => $this->image,
			)
		);

		remove_filter( 'llms_user_info_shortcode_user_id', array( $this, 'set_shortcode_user' ) );

		return ob_get_clean();

	}


Top ↑

Changelog Changelog

Changelog
Version Description
6.0.0 LLMS_Certificate_User::get_content_html() is deprecated with no replacement.
5.0.0 Merge the [llms-user] (and others) shortcode.
3.17.4 Unknown.
1.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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