Check that register_block_style exists

This function is not in core WordPress yet, so we should check for it in case Gutenberg is deactivated.
This commit is contained in:
Kelly Dwan 2019-10-01 13:45:31 -04:00
parent 30b7c0786e
commit ec4afa649d
No known key found for this signature in database
GPG key ID: 8BA5575F3D11575D

View file

@ -60,6 +60,7 @@ function setup() {
)
);
if ( function_exists( 'register_block_style' ) ) {
register_block_style(
'core/group',
array(
@ -77,6 +78,7 @@ function setup() {
'style_handle' => 'wporg-style',
)
);
}
// todo also setup block styles for other things, like the quote symbol, etc.
}