llms_get_certificate_content( integer $id )
Retrieve the content of a certificate
Description Description
Parameters Parameters
- $id
-
(integer) (Required) WP Post ID of the cert (optional if used within a loop)
Return Return
(string)
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 ); }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
2.2.0 | Introduced. |
User Contributed Notes User Contributed Notes
Permalink: