WPDev.one
Core Class

WP_Block_Supports

class WP_Block_Supports // Constructor: function Object() { [native code] }

Class encapsulating and implementing Block Supports.

Methods 5 methods

Method / Return Description
get_instance()
WP_Block_Supports

Utility method to retrieve the main instance of the class.

init()
void

Initializes the block supports. It registers the block supports block attributes.

register()
void

Registers a block support.

Parameters: $block_support_name: mixed, $block_support_config: mixed
apply_block_supports()
string[]

Generates an array of HTML attributes, such as classes, by applying to

register_attributes()
void

Registers the block attributes required by the different block supports.

Properties

Property / Type Description
$block_supports
mixed
public
No description available.
$block_to_render
mixed
public
No description available.
$instance
mixed
public
No description available.

Class Information

Since Version
5.6.0
Source File
wp-includes/class-wp-block-supports.php
Advertisement