From bd2a881101727b03b0be09382b34841af5a3c03e Mon Sep 17 00:00:00 2001 From: Bernie Reiter <96308+ockham@users.noreply.github.com> Date: Wed, 28 Jun 2023 22:59:32 +0200 Subject: [PATCH] Block Supports: Change prefix in gutenberg_apply_colors_support to wp_ in dynamic blocks (#51989) --- packages/block-library/src/navigation-submenu/index.php | 4 ++-- tools/webpack/blocks.js | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/block-library/src/navigation-submenu/index.php b/packages/block-library/src/navigation-submenu/index.php index 748613193bc709..ee8b0e789dd24c 100644 --- a/packages/block-library/src/navigation-submenu/index.php +++ b/packages/block-library/src/navigation-submenu/index.php @@ -199,9 +199,9 @@ function render_block_core_navigation_submenu( $attributes, $content, $block ) { $attributes['style']['color']['background'] = $block->context['customOverlayBackgroundColor']; } - // This allows us to be able to get a response from gutenberg_apply_colors_support. + // This allows us to be able to get a response from wp_apply_colors_support. $block->block_type->supports['color'] = true; - $colors_supports = gutenberg_apply_colors_support( $block->block_type, $attributes ); + $colors_supports = wp_apply_colors_support( $block->block_type, $attributes ); $css_classes = 'wp-block-navigation__submenu-container'; if ( array_key_exists( 'class', $colors_supports ) ) { $css_classes .= ' ' . $colors_supports['class']; diff --git a/tools/webpack/blocks.js b/tools/webpack/blocks.js index d399ee0d1a34bf..88acc23da59413 100644 --- a/tools/webpack/blocks.js +++ b/tools/webpack/blocks.js @@ -29,6 +29,7 @@ const blockViewRegex = new RegExp( */ const prefixFunctions = [ 'build_query_vars_from_query_block', + 'wp_apply_colors_support', 'wp_enqueue_block_support_styles', 'wp_get_typography_font_size_value', 'wp_style_engine_get_styles',