diff --git a/packages/block-library/src/navigation-link/index.php b/packages/block-library/src/navigation-link/index.php index 0e85ce7290ebbf..b7c76b2f6e6007 100644 --- a/packages/block-library/src/navigation-link/index.php +++ b/packages/block-library/src/navigation-link/index.php @@ -80,6 +80,66 @@ function block_core_navigation_link_build_css_colors( $context, $attributes, $is return $colors; } +/** + * Build an array with CSS classes and inline styles defining the font sizes + * which will be applied to the navigation markup in the front-end. + * + * This function is no longer used internally and is kept only for backward + * compatibility with third-party code that may call it directly. + * + * @since 5.9.0 + * @deprecated 7.0.0 + * + * @param array $context Navigation block context. + * @return array Font size CSS classes and inline styles. + */ +function block_core_navigation_link_build_css_font_sizes( $context ) { + _deprecated_function( __FUNCTION__, '7.0.0' ); + + // CSS classes. + $font_sizes = array( + 'css_classes' => array(), + 'inline_styles' => '', + ); + + $has_named_font_size = array_key_exists( 'fontSize', $context ); + $has_custom_font_size = isset( $context['style']['typography']['fontSize'] ); + + if ( $has_named_font_size ) { + // Add the font size class. + $font_sizes['css_classes'][] = sprintf( 'has-%s-font-size', $context['fontSize'] ); + } elseif ( $has_custom_font_size ) { + // Add the custom font size inline style. + $font_sizes['inline_styles'] = sprintf( + 'font-size: %s;', + wp_get_typography_font_size_value( + array( + 'size' => $context['style']['typography']['fontSize'], + ) + ) + ); + } + + return $font_sizes; +} + +/** + * Returns the top-level submenu SVG chevron icon. + * + * @since 5.9.0 + * @deprecated 7.0.0 Use block_core_shared_navigation_render_submenu_icon() instead. + * + * @return string + */ +function block_core_navigation_link_render_submenu_icon() { + _deprecated_function( + __FUNCTION__, + '7.0.0', + 'block_core_shared_navigation_render_submenu_icon()' + ); + return block_core_shared_navigation_render_submenu_icon(); +} + /** * Decodes a url if it's encoded, returning the same url if not. * diff --git a/packages/block-library/src/navigation/index.php b/packages/block-library/src/navigation/index.php index 155184c2eaa4a0..802909a39e648b 100644 --- a/packages/block-library/src/navigation/index.php +++ b/packages/block-library/src/navigation/index.php @@ -16,7 +16,7 @@ * will always have a value even for legacy blocks. We check the legacy openSubmenusOnClick * attribute first to preserve original behavior for blocks saved before the migration. * - * @since 6.9.0 + * @since 7.0.0 * * @param array $attributes Block attributes containing submenuVisibility and/or openSubmenusOnClick. * @return string The visibility mode: 'hover', 'click', or 'always'. diff --git a/packages/block-library/src/page-list/index.php b/packages/block-library/src/page-list/index.php index 2cb44683f1a2c6..0c3109897cfc76 100644 --- a/packages/block-library/src/page-list/index.php +++ b/packages/block-library/src/page-list/index.php @@ -9,7 +9,7 @@ * Returns the submenu visibility value with backward compatibility * for the deprecated openSubmenusOnClick attribute. * - * @since 6.9.0 + * @since 7.0.0 * * @param array $context Block context from parent Navigation block. * @return string The visibility mode: 'hover', 'click', or 'always'. diff --git a/packages/wp-build/CHANGELOG.md b/packages/wp-build/CHANGELOG.md index b2b1a86856ea91..e566337545a245 100644 --- a/packages/wp-build/CHANGELOG.md +++ b/packages/wp-build/CHANGELOG.md @@ -2,6 +2,15 @@ ## Unreleased +### Enhancements + +- Widgets: carry a widget's declarative `actions` from `widget.json` into + the generated PHP registry ([#80363](https://github.com/WordPress/gutenberg/pull/80363)). + +### Bug Fixes + +- Pass the current `$hook_suffix` to the `admin_footer` action in the generated single-page admin template instead of an empty string ([#75985](https://github.com/WordPress/gutenberg/pull/75985)). + ## 0.19.0 (2026-07-14) ### Enhancements diff --git a/packages/wp-build/templates/page.php.template b/packages/wp-build/templates/page.php.template index 3f78099a319d3f..56be6f6b3c1b71 100644 --- a/packages/wp-build/templates/page.php.template +++ b/packages/wp-build/templates/page.php.template @@ -283,7 +283,7 @@ function {{PREFIX}}_{{PAGE_SLUG_UNDERSCORE}}_render_page() { // BEGIN see wp-admin/admin-footer.php /** This action is documented in wp-admin/admin-footer.php */ - do_action( 'admin_footer', '' ); + do_action( 'admin_footer', $hook_suffix ); // Print import map first so it's available for inline scripts wp_script_modules()->print_import_map();