LLMS_Shortcodes_Blocks::register_blocks()
Registers shortcode blocks.
Return Return
(void)
Source Source
File: includes/shortcodes/class.llms.shortcodes.blocks.php
public function register_blocks(): void {
$blocks = $this->get_config();
foreach ( $blocks as $name => $args ) {
$block_dir = $args['path'] ?? LLMS_PLUGIN_DIR . "blocks/$name";
if ( file_exists( "$block_dir/block.json" ) ) {
register_block_type(
$block_dir,
array(
'render_callback' => array( $this, 'render_block' ),
)
);
}
}
}
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
| Version | Description |
|---|---|
| 7.2.0 | Introduced. |