Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
70c397f
Correct since annotation for block_core_page_list_get_submenu_visibil…
peterwilsoncc Feb 26, 2026
9fd62bc
Correct since annotation for block_core_navigation_get_submenu_visibi…
peterwilsoncc Feb 26, 2026
1457321
Soft deprecate block_core_navigation_link_render_submenu_icon().
peterwilsoncc Feb 26, 2026
daeeaff
Use WP_Styles API for inline styles.
peterwilsoncc Feb 27, 2026
df4fa9f
Document the {{PAGE_SLUG}}-wp-admin_init actions.
peterwilsoncc Feb 27, 2026
8c92fd1
Pass hook suffix to admin_footer action.
peterwilsoncc Feb 27, 2026
acf006b
Document {{PAGE_SLUG}}_init hook
peterwilsoncc Feb 27, 2026
9ae2dad
Remove duplicate documentation for actions.
peterwilsoncc Feb 27, 2026
3839d85
Update CSS comments so they are actually comments 🤦‍♂️
peterwilsoncc Mar 1, 2026
2d2cf8e
Apply suggestions from code review
peterwilsoncc Mar 2, 2026
438c808
Merge remote-tracking branch 'origin/trunk' into fix/75984-misc-fixes
t-hamano May 31, 2026
92fc84b
Navigation Link: Soft deprecate block_core_navigation_link_build_css_…
t-hamano May 31, 2026
eed8864
Merge remote-tracking branch 'origin/trunk' into fix/75984-misc-fixes
t-hamano Jun 2, 2026
bcc48d5
wp-build: Revert inline-styles helper extraction in wp-admin page tem…
t-hamano Jun 2, 2026
18f2ad6
Merge branch 'trunk' into fix/75984-misc-fixes
t-hamano Jun 3, 2026
835b408
Navigation Link: Make deprecated font-size helper self-contained
t-hamano Jun 3, 2026
a7db588
Merge branch 'trunk' into fix/75984-misc-fixes
t-hamano Jun 24, 2026
eec77bf
Merge branch 'trunk' into fix/75984-misc-fixes
t-hamano Jul 11, 2026
a657043
Merge branch 'trunk' into fix/75984-misc-fixes
t-hamano Jul 14, 2026
6037cac
wp-build: Add CHANGELOG entry for admin_footer hook_suffix fix
t-hamano Jul 15, 2026
66d0ef6
Merge branch 'trunk' into fix/75984-misc-fixes
t-hamano Jul 16, 2026
33e83d1
Merge branch 'trunk' into fix/75984-misc-fixes
t-hamano Jul 18, 2026
312e3fc
wp-build: Move changelog entry to the Unreleased section
t-hamano Jul 18, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 60 additions & 0 deletions packages/block-library/src/navigation-link/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 ) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This is what I restored. This function was deleted by #74855, but I believe it needs to be restored to maintain full backward compatibility.

_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() {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Regarding the block_core_navigation_submenu_render_submenu_icon function, please note that it is being restored by #78484.

cc @westonruter @ramonjd

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Or here if it's more convenient 😄

_deprecated_function(
__FUNCTION__,
'7.0.0',
'block_core_shared_navigation_render_submenu_icon()'
);
return block_core_shared_navigation_render_submenu_icon();
}

Comment on lines +126 to +142

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is there a reason this cannot be moved to deprecated.php in wordpress-develop instead now that it's deprecated and unmaintained going forward?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Typically block library and other package functions are deprecated in place. If you do a search for _deprecated_ you'll see a bunch of references. I think it's build related so their gutenberg_ counterparts are built and fire the deprecations for users running the plugin.

/**
* Decodes a url if it's encoded, returning the same url if not.
*
Expand Down
2 changes: 1 addition & 1 deletion packages/block-library/src/navigation/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'.
Expand Down
2 changes: 1 addition & 1 deletion packages/block-library/src/page-list/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'.
Expand Down
4 changes: 4 additions & 0 deletions packages/wp-build/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
- 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
Expand Down
2 changes: 1 addition & 1 deletion packages/wp-build/templates/page.php.template
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
Loading