llms_get_certificate_content( integer $id )

Retrieve the content of a certificate


Parameters Parameters

$id

(integer) (Required) WP Post ID of the cert (optional if used within a loop).


Top ↑

Return Return

(string)


Top ↑

Source Source

File: includes/functions/llms.functions.certificate.php

function llms_get_certificate_content( $id = 0 ) {

	$id = ( $id ) ? $id : get_the_ID();

	$cert = LLMS()->certificates();

	if ( 'llms_certificate' == get_post_type( $id ) ) {

		$cert->certs['LLMS_Certificate_User']->init( $id, get_current_user_id(), $id );
		$certificate_content = $cert->certs['LLMS_Certificate_User']->get_content_html();

	} else {

		$certificate_content = get_the_content();

	}

	$content = apply_filters( 'the_content', $certificate_content );

	return apply_filters( 'lifterlms_certificate_content', $content, $id );

}


Top ↑

Changelog Changelog

Changelog
Version Description
3.18.0 Unknown.
2.2.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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