Core Class
View Source on Trac ↗
Core Class
WP_Block_Styles_Registry
class WP_Block_Styles_Registry
// Constructor: function Object() { [native code] } Class used for interacting with block styles.
Methods 7 methods
| Method / Return | Description |
|---|---|
| register() bool | Registers a block style for the given block type.
Parameters: $block_name: mixed, $style_properties: mixed |
| unregister() bool | Unregisters a block style of the given block type.
Parameters: $block_name: mixed, $block_style_name: mixed |
| get_registered() array | Retrieves the properties of a registered block style for the given block type.
Parameters: $block_name: mixed, $block_style_name: mixed |
| get_all_registered() array[] | Retrieves all registered block styles. |
| get_registered_styles_for_block() array[] | Retrieves registered block styles for a specific block type.
Parameters: $block_name: mixed |
| is_registered() bool | Checks if a block style is registered for the given block type.
Parameters: $block_name: mixed, $block_style_name: mixed |
| get_instance() WP_Block_Styles_Registry | Utility method to retrieve the main instance of the class. |
Properties
| Property / Type | Description |
|---|---|
| $registered_block_styles mixed public | No description available. |
| $instance mixed public | No description available. |
Class Information
Since Version
5.3.0
Source File
wp-includes/class-wp-block-styles-registry.php
Advertisement