LLMS_User_Certificate::get_template_version()
Retrieves the certificate’s template version.
Description Description
Since LifterLMS 6.0.0, certificates are created using the block editor.
Certificates created in the classic editor will use template version 1 while any certificates created in the block editor use template version 2. Therefore a certificate that has content and no blocks will use template version 1 and any empty certificates or those containing blocks will use template version 2.
Return Return
(integer)
Source Source
File: includes/models/model.llms.user.certificate.php
public function get_template_version() { $version = empty( $this->get( 'content', true ) ) || has_blocks( $this->get( 'id' ) ) ? 2 : 1; /** * Filters a certificate's template version. * * @since 6.0.0 * * @param int $version The template version. */ return apply_filters( 'llms_certificate_template_version', $version, $this ); }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
6.0.0 | Introduced. |