mirror of
https://github.com/WordPress/five-for-the-future.git
synced 2025-04-21 10:33:44 +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(
|
if ( function_exists( 'register_block_style' ) ) {
|
||||||
'core/group',
|
register_block_style(
|
||||||
array(
|
'core/group',
|
||||||
'name' => 'wporg-parallelogram',
|
array(
|
||||||
'label' => __( 'Parallelogram', 'wporg-5ftf' ),
|
'name' => 'wporg-parallelogram',
|
||||||
'style_handle' => 'wporg-style',
|
'label' => __( 'Parallelogram', 'wporg-5ftf' ),
|
||||||
)
|
'style_handle' => 'wporg-style',
|
||||||
);
|
)
|
||||||
|
);
|
||||||
|
|
||||||
register_block_style(
|
register_block_style(
|
||||||
'core/paragraph',
|
'core/paragraph',
|
||||||
array(
|
array(
|
||||||
'name' => 'wporg-tldr',
|
'name' => 'wporg-tldr',
|
||||||
'label' => __( 'Summary paragraph', 'wporg-5ftf' ),
|
'label' => __( 'Summary paragraph', 'wporg-5ftf' ),
|
||||||
'style_handle' => 'wporg-style',
|
'style_handle' => 'wporg-style',
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
}
|
||||||
|
|
||||||
// todo also setup block styles for other things, like the quote symbol, etc.
|
// todo also setup block styles for other things, like the quote symbol, etc.
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue