LLMS_Blocks::init()
Register all blocks & components.
Return Return
(void)
Source Source
File: libraries/lifterlms-blocks/includes/class-llms-blocks.php
* @since 1.0.0 * @since 1.4.0 Add status tools class. * @since 1.9.0 Added course progress block class. * @since 2.0.0 Return early if LifterLMS isn't installed, move file inclusion to `$this->includes()`, * and moved actions and filters from the constructor. * @since 2.2.1 Handle '-src' in WordPress version numbers. * @since 2.5.0 Updated minimum LifterLMS core version to 7.2.0. * * @return void */ public function init() { if ( ! function_exists( 'llms' ) || ! version_compare( self::MIN_CORE_VERSION, llms()->version, '<=' ) ) { return; } $this->includes(); add_action( 'add_meta_boxes', array( $this, 'remove_metaboxes' ), 999, 2 ); global $wp_version; $filter = version_compare( $wp_version, '5.8-src', '>=' ) ? 'block_categories_all' : 'block_categories'; add_filter( $filter, array( $this, 'add_block_category' ) ); add_action( 'admin_print_scripts', array( $this, 'admin_print_scripts' ), 15 );
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
2.2.1 | Handle '-src' in WordPress version numbers. |
2.0.0 | Return early if LifterLMS isn't installed, move file inclusion to $this->includes() , and moved actions and filters from the constructor. |
1.9.0 | Added course progress block class. |
1.4.0 | Add status tools class. |
1.0.0 | Introduced. |