mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-12 12:50:28 +00:00
Block Editor: Fix WP_Block_Supports class compatibility with Gutenberg-provided class.
When using WordPress trunk with Gutenberg master, there's an incompatibility causing the dynamic block generated classes to be omitted. This commit refactors the block supports to fix that problem. Props nosolosw. Fixes #51606. git-svn-id: https://develop.svn.wordpress.org/trunk@49310 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -96,11 +96,13 @@ class Block_Supported_Styles_Test extends WP_UnitTestCase {
|
||||
* Returns the rendered output for the current block.
|
||||
*
|
||||
* @param array $block Block to render.
|
||||
*
|
||||
* @return string Rendered output for the current block.
|
||||
*/
|
||||
private function render_example_block( $block ) {
|
||||
global $current_parsed_block;
|
||||
$current_parsed_block = $block;
|
||||
$wrapper_attributes = get_block_wrapper_attributes(
|
||||
WP_Block_Supports::init();
|
||||
WP_Block_Supports::$block_to_render = $block;
|
||||
$wrapper_attributes = get_block_wrapper_attributes(
|
||||
array(
|
||||
'class' => 'foo-bar-class',
|
||||
'style' => 'test: style;',
|
||||
|
||||
Reference in New Issue
Block a user