mirror of
https://github.com/WordPress/five-for-the-future.git
synced 2025-04-18 09:23:43 +03:00
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:
parent
30b7c0786e
commit
ec4afa649d
|
@ -60,23 +60,25 @@ function setup() {
|
|||
)
|
||||
);
|
||||
|
||||
register_block_style(
|
||||
'core/group',
|
||||
array(
|
||||
'name' => 'wporg-parallelogram',
|
||||
'label' => __( 'Parallelogram', 'wporg-5ftf' ),
|
||||
'style_handle' => 'wporg-style',
|
||||
)
|
||||
);
|
||||
if ( function_exists( 'register_block_style' ) ) {
|
||||
register_block_style(
|
||||
'core/group',
|
||||
array(
|
||||
'name' => 'wporg-parallelogram',
|
||||
'label' => __( 'Parallelogram', 'wporg-5ftf' ),
|
||||
'style_handle' => 'wporg-style',
|
||||
)
|
||||
);
|
||||
|
||||
register_block_style(
|
||||
'core/paragraph',
|
||||
array(
|
||||
'name' => 'wporg-tldr',
|
||||
'label' => __( 'Summary paragraph', 'wporg-5ftf' ),
|
||||
'style_handle' => 'wporg-style',
|
||||
)
|
||||
);
|
||||
register_block_style(
|
||||
'core/paragraph',
|
||||
array(
|
||||
'name' => 'wporg-tldr',
|
||||
'label' => __( 'Summary paragraph', 'wporg-5ftf' ),
|
||||
'style_handle' => 'wporg-style',
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
// todo also setup block styles for other things, like the quote symbol, etc.
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue