WP_Block_Styles_Registry::is_registered
Checks if a block style is registered for the given block type.
Method of the class: WP_Block_Styles_Registry{}
No Hooks.
Returns
true|false. True if the block style is registered, false otherwise.
Usage
$WP_Block_Styles_Registry = new WP_Block_Styles_Registry(); $WP_Block_Styles_Registry->is_registered( $block_name, $block_style_name );
- $block_name(string|null) (required)
- Block type name including namespace.
- $block_style_name(string|null) (required)
- Block style name.
Changelog
| Since 5.3.0 | Introduced. |
WP_Block_Styles_Registry::is_registered() WP Block Styles Registry::is registered code WP 7.0
public function is_registered( $block_name, $block_style_name ) {
return isset( $block_name, $block_style_name, $this->registered_block_styles[ $block_name ][ $block_style_name ] );
}