Skip to content

Commit

Permalink
Block Supports: Change prefix in gutenberg_apply_colors_support to wp…
Browse files Browse the repository at this point in the history
…_ in dynamic blocks (#51989)
  • Loading branch information
ockham committed Jun 28, 2023
1 parent 7efa7c2 commit 75ab429
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/block-library/src/navigation-submenu/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'];
Expand Down
1 change: 1 addition & 0 deletions tools/webpack/blocks.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

1 comment on commit 75ab429

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Flaky tests detected in 75ab429.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/5406014579
📝 Reported issues:

Please sign in to comment.