Summary, Dev Chat, June 25, 2025

Start of the meeting in SlackSlack Slack is a Collaborative Group Chat Platform https://slack.com/. The WordPress community has its own Slack Channel at https://make.wordpress.org/chat/., facilitated by @francina. 🔗 Agenda post.

Announcements 📢

Forthcoming releases 🚀

Discussion 💬

CustomizerCustomizer Tool built into WordPress core that hooks into most modern themes. You can use it to preview and modify many of your site’s appearance settings.: Bugfixes Only

The Customizer is no longer under active development. New feature requests will not be considered, though bugfixes are still welcome to ensure compatibility. A manual review of the 78 open tickets is planned—no automatic closures. A proposal to introduce an official “maintenance mode” for legacy components (e.g., Customizer, Widgets, TinyMCE) is in the works.

Unicode Email Addresses Patchpatch A special text file that describes changes to code, by identifying the files and lines which are added, removed, and altered. It may also be referred to as a diff. A patch can be applied to a codebase for testing.

A patch enabling support for Unicode email addresses was introduced and is under review. Initial feedback is positive. Targeted for WordPress 6.9, not for 6.8.x minor releases.

Custom Error Handling Revisited

The long-standing ticketticket Created for both bug reports and feature development on the bug tracker. on registering custom error and exception handlers (#59282) was brought back into focus. Progress is stalled but will be revisited for a future release.

Improving FSE PluginPlugin A plugin is a piece of software containing a group of functions that can be added to a WordPress website. They can extend functionality or add new features to your WordPress websites. WordPress plugins are written in the PHP programming language and integrate seamlessly with WordPress. These can be free in the WordPress.org Plugin Directory https://wordpress.org/plugins/ or can be cost-based plugin from a third-party Discoverability

A suggestion to improve the visibility of Full Site Editing (FSE) plugins was raised. The idea needs clearer definition—whether it’s a metaMeta Meta is a term that refers to the inside workings of a group. For us, this is the team that works on internal WordPress sites like WordCamp Central and Make WordPress. issue or an initiative for contributors remains open.

Next Bug Scrubs: June 26 and June 30

  • A 6.8.2 bugbug A bug is an error or unexpected result. Performance improvements, code optimization, and are considered enhancements, not defects. After feature freeze, only bugs are dealt with, with regressions (adverse changes from the previous version) being the highest priority. scrub is scheduled for Thursday, June 25 at 3 PM GMT.
  • A bug scrub is scheduled for Monday, June 30 at 3 PM GMT to help triagetriage The act of evaluating and sorting bug reports, in order to decide priority, severity, and other factors. and manage open tickets.

Props to @audrasjb for review.

#6-8, #6-8-2, #core, #dev-chat, #summary

New REST API Filter for Exposing Menus Publicly in WordPress 6.8

In WordPress 6.8, the REST APIREST API The REST API is an acronym for the RESTful Application Program Interface (API) that uses HTTP requests to GET, PUT, POST and DELETE data. It is how the front end of an application (think “phone app” or “website”) can communicate with the data store (think “database” or “file system”) https://developer.wordpress.org/rest-api/. will allow public access to menu data.

That enhancementenhancement Enhancements are simple improvements to WordPress, such as the addition of a hook, a new feature, or an improvement to an existing feature. addresses a longstanding need for headless CMS implementations and custom front-end applications. Before, accessing menu data via the REST API required user authentication with appropriate capabilities. In turn, that limited the potential user base for REST API implementations.

Now, with this update, you can expose menus, menu items, and menu locations publicly via the REST API, making WordPress content available to more platforms than ever.

Key Changes for Developers:

  • FilterFilter Filters are one of the two types of Hooks https://codex.wordpress.org/Plugin_API/Hooks. They provide a way for functions to modify data of other functions. They are the counterpart to Actions. Unlike Actions, filters are meant to work in an isolated manner, and should never have side effects such as affecting global variables and output. to Control Menu Exposure: A new filter, rest_menu_read_access, manages the visibility of menu data in the REST API.  By default, menus are not exposed publicly.  You can use this filter to specify which menus should be accessible via the REST API.
  • Per-Menu and Endpoint-Level Control: The rest_menu_read_access filter can be used to expose specific menus—and now also applies to menu items and menu locations—based on custom logic.  The filter receives the current REST controller class as a parameter, allowing developers to control public exposure granularly depending on which endpoint is being accessed.  This provides powerful flexibility to tailor REST API access across different menu-related endpoints, while ensuring that only intended data is made public.

Code Example:

To expose all menus publicly via the REST API, add this code to your theme’s functions.php file or a custom pluginPlugin A plugin is a piece of software containing a group of functions that can be added to a WordPress website. They can extend functionality or add new features to your WordPress websites. WordPress plugins are written in the PHP programming language and integrate seamlessly with WordPress. These can be free in the WordPress.org Plugin Directory https://wordpress.org/plugins/ or can be cost-based plugin from a third-party:

add_filter( 'rest_menu_read_access', '__return_true' );

This snippet uses the rest_menu_read_access filter to return true for all menus, making them accessible through the REST API.

For more selective exposure, you can implement conditional logic within the filter:

function filter_primary_menu_rest_visibility( $show_in_rest, $request, $instance ) {

   if( $instance::class !== ‘WP_REST_Menu_Locations_Controller’ ){

       return $show_in_rest;

   }

   if ( isset( $request['location'] ) && 'primary' === $request['location'] ) {

       return true;

   }

   return $show_in_rest;

}

add_filter( 'rest_menu_read_access', 'filter_primary_menu_rest_visibility', 10, 3 );

In this example, only the request to the primary menu location, (wp-json/wp/v2/menu-locations/primary) is exposed via the REST API, while others remain restricted.

Extensibility Considerations:

  • Default Behavior: Menus are not exposed publicly by default.  Developers must explicitly opt-in to expose menu data via the REST API using the provided filter.
  • Backward Compatibility: This enhancement is fully backward-compatible.  Existing functionality remains unchanged unless the new filter is utilized to alter the default behavior.
  • Security Implications: When exposing menu data publicly, consider the content and structure of your menus to ensure no sensitive information is inadvertently made accessible.

These new capabilities give you the power to seamlessly integrate WordPress menus into decoupled architectures and enhance the flexibility of your content delivery strategies.  For more information, visit #54304.

Props to @joemcgill @spacedmonkey @marybaum @benjamin_zekavica for authoring and review.

#6-8-2, #dev-notes, #dev-notes-6-8