llms_is_block_editor_supported_for_certificates()

Determines whether or not the block editor can be used to build certificates.


Description Description

The JS used for certificates in the block editor relies on WP functions and APIs available since WordPress 5.8. Earlier versions of WordPress won’t work.


Top ↑

Return Return

(boolean)


Top ↑

Source Source

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

function llms_is_block_editor_supported_for_certificates() {

	global $wp_version;
	$is_supported = version_compare( $wp_version, '5.8-src', '>=' );

	/**
	 * Filters whether or not the block editor can be used for building certificates.
	 *
	 * By default, `$is_supported` will be `true` for WordPress 5.8 or later and false for versions less than
	 * 5.8.
	 *
	 * This filter may be used to disable the block editor on later versions.
	 *
	 * @since 6.0.0
	 *
	 * @param boolean $is_supported Whether or not the block editor is supported.
	 */
	return apply_filters( 'llms_block_editor_supported_for_certificates', $is_supported );

}


Top ↑

Changelog Changelog

Changelog
Version Description
6.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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