Block_Manager
in package
Intercepts 'the content' filter to allow overriding of the rendering functions of Gutenberg blocks. This allows us to use twig for block rendering.
Table of Contents
- determine_block_type_class() : string
- Attempts to create a custom block from class from a block. Falls back to a default Clarkson Core block type.
- sanitize_block_type_name() : string
- Filters a block name into a valid class name.
Methods
determine_block_type_class()
Attempts to create a custom block from class from a block. Falls back to a default Clarkson Core block type.
public
determine_block_type_class(WP_Block_type $block_type) : string
Parameters
- $block_type : WP_Block_type
-
Gutenberg block to determine class for.
Return values
string —sanitize_block_type_name()
Filters a block name into a valid class name.
public
sanitize_block_type_name(string $str) : string
Parameters
- $str : string
-
Classname to be sanitized.