Summary, Dev Chat, Mar 19, 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 @benjamin_zekavica. ๐Ÿ”— Agenda post.

Announcements ๐Ÿ“ข

WordPress 6.8 |ย BetaBeta A pre-release of software that is given out to a large group of users to trial under real conditions. Beta versions have gone through alpha testing in-house and are generally fairly close in look, feel and function to the final product; however, design changes often occur as part of the process.ย 3 is now available ๐Ÿฅณ

Theย Beta 3 release of WordPress 6.8ย is now available! A heartfelt thank you to everyone who joined the Release Party. We appreciate your testing and feedback.

Help Test 6.8 Beta version ๐Ÿงช

The Test-Team has written two helpful guides for people interested in testing:

Forthcoming releases ๐Ÿš€

Nextย GutenbergGutenberg The Gutenberg project is the new Editor Interface for WordPress. The editor improves the process and experience of creating new content, making writing rich content much simpler. It uses โ€˜blocksโ€™ to add richness rather than shortcodes, custom HTML etc. https://wordpress.org/gutenberg/ย version: 20.5

Gutenberg 20.5 is scheduled for release onย Wednesday, March 19th.
This will be the first version of Gutenberg to be merged into WordPress 6.9.

Release Candidaterelease candidate One of the final stages in the version release cycle, this version signals the potential to be a final release to the public. Also see alpha (beta).ย 1ย of 6.8:ย Marchย 25th

Theย Release Candidateย 1ย release of WordPress 6.8 will be available onย Tuesday, Marchย 25th.

A detailed overview of the release schedule for WordPress 6.8 can be foundย here. The article also includes information about the individuals assigned to each release party.

Nextย major releasemajor release A release, identified by the first two numbers (3.6), which is the focus of a full release cycle and feature development. WordPress uses decimaling count for major release versions, so 2.8, 2.9, 3.0, and 3.1 are sequential and comparable in scope.: 6.8

We are currently in theย WordPress 6.8 release cycle. Read more aboutย the release squad, timeline and focus for this release.

Discussion ๐Ÿค”

To avoid listing the topics here twice, all the necessary links and information can be found in theย agenda. This section now includes a few additions.

Release Support Needed

@jeffpaul provided an update: only a few dev notesdev note Each important change in WordPress Core is documented in a developers note, (usually called dev note). Good dev notes generally include a description of the change, the decision that led to this change, and a description of how developers are supposed to work with that change. Dev notes are published on Make/Core blog during the beta phase of WordPress release cycle. Publishing dev notes is particularly important when plugin/theme authors and WordPress developers need to be aware of those changes.In general, all dev notes are compiled into a Field Guide at the beginning of the release candidate phase. remain to be drafted and will be published this week. A Miscellaneous Dev Notedev note Each important change in WordPress Core is documented in a developers note, (usually called dev note). Good dev notes generally include a description of the change, the decision that led to this change, and a description of how developers are supposed to work with that change. Dev notes are published on Make/Core blog during the beta phase of WordPress release cycle. Publishing dev notes is particularly important when plugin/theme authors and WordPress developers need to be aware of those changes.In general, all dev notes are compiled into a Field Guide at the beginning of the release candidate phase. will be updated and released by RCrelease candidate One of the final stages in the version release cycle, this version signals the potential to be a final release to the public. Also see alpha (beta). 1. The Field GuideField guide The field guide is a type of blogpost published on Make/Core during the release candidate phase of the WordPress release cycle. The field guide generally lists all the dev notes published during the beta cycle. This guide is linked in the about page of the corresponding version of WordPress, in the release post and in the HelpHub version page. draft will be shared later this week as more dev notes are completed. The 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. Author email will likely go out next week due to current priorities.

Critical Issues Before RC 1

@joemcgill stated itโ€™s the last week of beta and critical issues need prioritizing. @audrasjb mentioned 17 tickets are left before RC1, with no major issues, though #63122 is annoying. @joemcgill is tracking new tickets and ensuring regressions in 6.8 are added to the milestone. He also requested non-release prep tasks be resolved this week for a clean RC.

Open Floor ๐Ÿ’ฌ

There were no significant topics that we would list in the summary.

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

Agenda, Dev Chat, Mar 19, 2025

The next WordPress Developers Chat will take place on Wednesday at 15:00 UTC in theย coreย channel onย Make WordPress Slack.

The live meeting will focus on the discussion for upcoming releases, and have an open floor section.

Additional items will be referred to in the various curated agenda sections below. If you haveย ticketticket Created for both bug reports and feature development on the bug tracker.ย requests for help, please continue to post details in the comments section at the end of this agenda.

Announcements ๐Ÿ“ข

WordPress 6.8 | BetaBeta A pre-release of software that is given out to a large group of users to trial under real conditions. Beta versions have gone through alpha testing in-house and are generally fairly close in look, feel and function to the final product; however, design changes often occur as part of the process.ย 3 is now available ๐Ÿฅณ

The Beta 3 release of WordPress 6.8 is now available! A heartfelt thank you to everyone who joined the Release Party. We appreciate your testing and feedback.

Help Test 6.8 Beta version ๐Ÿงช

The Test-Team has written two helpful guides for people interested in testing:

Forthcoming releases ๐Ÿš€

Nextย GutenbergGutenberg The Gutenberg project is the new Editor Interface for WordPress. The editor improves the process and experience of creating new content, making writing rich content much simpler. It uses โ€˜blocksโ€™ to add richness rather than shortcodes, custom HTML etc. https://wordpress.org/gutenberg/ version: 20.5

Gutenberg 20.5 is scheduled for release onย Wednesday, March 19th.
This will be the first version of Gutenberg to be merged into WordPress 6.9.

Release Candidaterelease candidate One of the final stages in the version release cycle, this version signals the potential to be a final release to the public. Also see alpha (beta).ย 1 of 6.8: March 25th

Theย Release Candidateย 1ย release of WordPress 6.8 will be available onย Tuesday, March 25th.

A detailed overview of the release schedule for WordPress 6.8 can be found here. The article also includes information about the individuals assigned to each release party.

Nextย major releasemajor release A release, identified by the first two numbers (3.6), which is the focus of a full release cycle and feature development. WordPress uses decimaling count for major release versions, so 2.8, 2.9, 3.0, and 3.1 are sequential and comparable in scope.: 6.8

We are currently in theย WordPress 6.8 release cycle. Read more aboutย the release squad, timeline and focus for this release.

Discussions ๐Ÿค”

The discussion section of the agenda is to provide a place to discuss important topics affecting the upcoming release or larger initiatives that impact the CoreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress. Team. To nominate a topic for discussion, please leave a comment on this agenda with a summary of the topic, any relevant links that will help people get context for the discussion, and what kind of feedback you are looking for from others participating in the discussion.

Release Support Needed

  • Assistance with drafting, reviewing, and publishing developer notes
    Assistance is requested for the drafting, review, and final publication of the developer notes.
  • Field GuideField guide The field guide is a type of blogpost published on Make/Core during the release candidate phase of the WordPress release cycle. The field guide generally lists all the dev notes published during the beta cycle. This guide is linked in the about page of the corresponding version of WordPress, in the release post and in the HelpHub version page. draft coming Thursday, please be ready for review
    The Field Guide draft will be available on Thursday. Please be prepared to review it promptly.
  • Review of the โ€œAboutโ€ page and potential issues
    The โ€œAboutโ€ page should be reviewed to identify any potential issues in the text or content. See more here: #63025
  • Reminder of the string freeze next week before RCrelease candidate One of the final stages in the version release cycle, this version signals the potential to be a final release to the public. Also see alpha (beta). 1
    Please remember that the string freeze will take place next week before the release of RC 1.
  • Assistance with reviewing the email to 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. Authors about major changes
    Assistance is needed to review the email to be sent to Plugin Authors, informing them of the key changes.

Critical Issues Before RC 1

  • Discussion of critical issues before RC 1
    Itโ€™s suggested to discuss any critical or new issues before the release of RC 1 to ensure all problems are addressed in time.

Open floor ย ๐Ÿ’ฌ

Any topic can be raised for discussion in the comments, as well as requests for assistance on tickets. Tickets in the milestone for the next major or maintenance release will be prioritized.

Please include details of tickets / PRs and the links in the comments, and indicate whether you intend to be available during the meeting for discussion or will be async.

#6-8, #agenda, #dev-chat

More efficient block type registration in 6.8

WordPress 6.8 introduces a new function wp_register_block_types_from_metadata_collection(), which allows plugins to register multiple blockBlock Block is the abstract term used to describe units of markup that, composed together, form the content or layout of a webpage using the WordPress editor. The idea combines concepts of what in the past may have achieved with shortcodes, custom HTML, and embed discovery into a single consistent API and user experience. types with a single function call.

This function expands on the foundational capabilitiescapability Aย capabilityย is permission to perform one or more types of task. Checking if a user has a capability is performed by the current_user_can function. Each user of a WordPress site might have some permissions but not others, depending on theirย role. For example, users who have the Author role usually have permission to edit their own posts (the โ€œedit_postsโ€ capability), but not permission to edit other usersโ€™ posts (the โ€œedit_others_postsโ€ capability). of the wp_register_block_metadata_collection() function, which was introduced in WordPress 6.7 to improve performance.

Context

To recap the relevant functionality added in WordPress 6.7:

Plugins can now optionally register a PHPPHP The web scripting language in which WordPress is primarily architected. WordPress requires PHP 7.4 or higher โ€œmanifestโ€ file, which includes all the metadata for their block types. For any block type that is being registered, WordPress CoreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress. will now check whether such a manifest file is present covering the block type, and if so, it will use the data from the manifest file instead of reading and parsing the block typeโ€™s block.jsonJSON JSON, or JavaScript Object Notation, is a minimal, readable format for structuring data. It is used primarily to transmit data between a server and web application, as an alternative to XML. file directly.

Since the blocks manifest file includes all the block type names, a logical next step after adding support for such a file is to make the requirement for individual block type registration calls obsolete. This is what the newย  wp_register_block_types_from_metadata_collection() function implements.

Benefits

By using the new function, you no longer need to add individual register_block_type() calls for every block type that you include in your 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.. This improves developer experience, especially when using the latest block development best practices where the block.json file is used as the sole entrypoint for both PHP (server-side) and JavaScriptJavaScript JavaScript or JS is an object-oriented computer programming language commonly used to create interactive effects within web browsers. WordPress makes extensive use of JS for a better user experience. While PHP is executed on the server, JS executes within a userโ€™s browser. https://www.javascript.com (client-side). Adding a new block type to an existing plugin is now possible by creating the blockโ€™s directory and working exclusively within that directory. You no longer need to remember to register the block type somewhere else in the PHP codebase of the surrounding plugin.

Example

Letโ€™s say you have a plugin with 5 custom block types: โ€œaccordionโ€, โ€œcarouselโ€, โ€œcarousel-slideโ€, โ€œdialogโ€, and โ€œicon-buttonโ€. At the present, this means your pluginโ€™s PHP code may look like this:

$block_types = array( 'accordion', 'carousel', 'carousel-slide', 'dialog', 'icon-button' );
foreach ( $block_types as $block_type ) {
	register_block_type( __DIR__ . "/build/{$block_type}" );
}

With WordPress 6.8, you can now use the wp_register_block_types_from_metadata_collection() function to eliminate the need for the list of block types in the PHP code so that all block types are recognized and registered automatically.

To do that, you need to generate a manifest file for your block types. You can use the build-blocks-manifest command or the --blocks-manifest argument of the build command from the @wordpress/scripts NPM package, which was also explained in the relevant WordPress 6.7 dev note. It can be easily integrated into your build process by changing the scripts in your package.json file as follows:

  • Change the โ€œbuildโ€ script from wp-scripts build to wp-scripts build --blocks-manifest.
  • Change the โ€œstartโ€ script from wp-scripts start to wp-scripts start --blocks-manifest.

With the generated manifest in place, the PHP code above can be simplified to no longer require a hard-coded list of block types:

wp_register_block_types_from_metadata_collection(
	__DIR__ . '/build',
	__DIR__ . '/build/blocks-manifest.php'
);

Backward compatibility with older WordPress versions

As the wp_register_block_types_from_metadata_collection() function is only available in the latest WordPress 6.8 release, you may still want to support older WordPress versions. Fortunately, the function can be easily replaced by a few lines of codeLines of Code Lines of code. This is sometimes used as a poor metric for developer productivity, but can also have other uses., as long as you have a generated blocks manifest in place as described above.

Here is a code example that uses the respective best practices for WordPress 6.8, WordPress 6.7, and older versions:

if ( function_exists( 'wp_register_block_types_from_metadata_collection' ) ) {
	wp_register_block_types_from_metadata_collection( __DIR__ . '/build', __DIR__ . '/build/blocks-manifest.php' );
} else {
	if ( function_exists( 'wp_register_block_metadata_collection' ) ) {
		wp_register_block_metadata_collection( __DIR__ . '/build', __DIR__ . '/build/blocks-manifest.php' );
	}
	$manifest_data = require __DIR__ . '/build/blocks-manifest.php';
	foreach ( array_keys( $manifest_data ) as $block_type ) {
		register_block_type( __DIR__ . "/build/{$block_type}" );
	}
}

The @wordpress/create-block NPM package has been enhanced to use the new functions conditionally, using a similar code snippet as shown above.

Summary and further reading

The new wp_register_block_types_from_metadata_collection() function is a very simple but neat way to eliminate individual block type registration calls from your PHP code, allowing you to focus exclusively on working on the block types in your plugin without having to modify anything else in the plugin.

Please see the following links for further reading:

  • TracTrac An open source project by Edgewall Software that serves as a bug tracker and project management tool for WordPress. ticketticket Created for both bug reports and feature development on the bug tracker. #62267
  • Relevant WordPress 6.7 dev note about the previous block type registration enhancements

Props to @gziolo, @stevenlinx for review and proofreading.

Update (2025-04-16): As of @wordpress/scripts version 30.14.0, a bug regarding blocks manifest generation was fixed. This post was updated accordingly to recommend the --blocks-manifest argument of the build command in the NPM scripts to use instead of the build-blocks-manifest command in combination with other commands.

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

Summary, Dev Chat, Mar 12, 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 ๐Ÿ“ข

WordPress 6.8 |ย BetaBeta A pre-release of software that is given out to a large group of users to trial under real conditions. Beta versions have gone through alpha testing in-house and are generally fairly close in look, feel and function to the final product; however, design changes often occur as part of the process.ย 2 is now available ๐Ÿฅณ

Theย Beta 2 release of WordPress 6.8ย is now available! A heartfelt thank you to everyone who joined the Release Party. We appreciate your testing and feedback.

Help Test 6.8 Beta version ๐Ÿงช

The Test-Team has written two helpful guides for people interested in testing:

Thanks @ankit-k-gupt andย @krupajnandaย for your contribution!

Forthcoming releases ๐Ÿš€

Nextย GutenbergGutenberg The Gutenberg project is the new Editor Interface for WordPress. The editor improves the process and experience of creating new content, making writing rich content much simpler. It uses โ€˜blocksโ€™ to add richness rather than shortcodes, custom HTML etc. https://wordpress.org/gutenberg/ย version: 20.5

Gutenberg 20.5 is scheduled for release onย Wednesday, March 19th.
This will be the first version of Gutenberg to be merged into WordPress 6.9.

Nextย Betaย 3 of 6.8:ย Marchย 18th

Theย Beta 3ย release of WordPress 6.8 will be available onย Tuesday, Marchย 18th.

A detailed overview of the release schedule for WordPress 6.8 can be foundย here. The article also includes information about the individuals assigned to each release party.

Nextย major releasemajor release A release, identified by the first two numbers (3.6), which is the focus of a full release cycle and feature development. WordPress uses decimaling count for major release versions, so 2.8, 2.9, 3.0, and 3.1 are sequential and comparable in scope.: 6.8

We are currently in theย WordPress 6.8 release cycle. Read more aboutย the release squad, timeline and focus for this release.

Reminder

We have only two weeks untilย RCrelease candidate One of the final stages in the version release cycle, this version signals the potential to be a final release to the public. Also see alpha (beta).ย 1.ย Dev notesย should be in progress. Please checkย @jeffpaulโ€˜s message onย Slackย for details.

Editor Updates ๐Ÿ”„

Stay tuned for weekly updates to keep you informed about the latest in WordPress editor development. Whether youโ€™re a developer, designer, or content creator, these updates will keep you in the loopLoop The Loop is PHP code used by WordPress to display posts. Using The Loop, WordPress processes each post to be displayed on the current page, and formats it according to how it matches specified criteria within The Loop tags. Any HTML or PHP code in the Loop will be processed on each post. https://codex.wordpress.org/The_Loop on all the key changes.

Donโ€™t miss out โ€” check out the weekly update and get ready for more!

Discussion ๐Ÿค”

Finalizing the About Page for WordPress 6.8

  • Jeff Paul requested help reviewing and finalizing the About page text.
  • Deadline: March 25 (RC1), but earlier completion is preferred.

โ€œSource of Truthโ€ Document

@poena asked for updates on the โ€œSource of Truthโ€ document, which provides extenders with details about the WordPress 6.8 release. Currently, no one is actively working on it due to limited capacity. @joemcgill suggested prioritizing the Field GuideField guide The field guide is a type of blogpost published on Make/Core during the release candidate phase of the WordPress release cycle. The field guide generally lists all the dev notes published during the beta cycle. This guide is linked in the about page of the corresponding version of WordPress, in the release post and in the HelpHub version page. instead, as it serves a similar purpose and is officially published. Stevenlinx may have a draft of the Field Guide, and a request was made to share it for collaboration. If no one takes on the โ€œSource of Truthโ€ document, it will likely not be created for this release.

Unused Code in WordPress CoreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress.

@zodiac1978 reported unused constants in WordPress Core and created TracTrac An open source project by Edgewall Software that serves as a bug tracker and project management tool for WordPress. ticketticket Created for both bug reports and feature development on the bug tracker. #63017 to address the issue. He asked whether their deprecation had been officially documented. @joemcgill suggested verifying if their removal was intentional or if they are still needed. @desrosj pointed out that some plugins might still rely on these constants, making their removal risky. @joedolson agreed, emphasizing that plugins could use them in ways not immediately visible in Core. @zodiac1978 plans to investigate further in the 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. directory and update the ticket with his findings.

Open Floor ๐Ÿ’ฌ

There were no further topics to discuss today.

Thanks toย @francina for helping review this summary.

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

Data: A helpful performance warning for developers in the ‘useSelect’ hook

useSelectย is a ReactReact React is a JavaScript library that makes it easy to reason about, construct, and maintain stateless and stateful user interfaces. https://reactjs.org hook that lets you subscribe to WordPress data in the blockBlock Block is the abstract term used to describe units of markup that, composed together, form the content or layout of a webpage using the WordPress editor. The idea combines concepts of what in the past may have achieved with shortcodes, custom HTML, and embed discovery into a single consistent API and user experience. editor. It checks if consumed data has changed and then rerenders your components accordingly.

Usually, things just work, and consumers donโ€™t have to worry about unnecessary rerenders. However, sometimes data is directly manipulated in theย mapSelectย callback, which can mislead theย useSelectย hook into thinking that the data has changed when it has not.

Example:

export function ExampleWithWarning() {
	const { nameAndIds } = useSelect( function mapSelect( select ) {
		const authors = select( 'core' ).getUsers( {
			who: 'authors',
			context: 'view',
		} );

		return {
			// `Array.map` will return a new array for every call,
			// even if the data is the same.
			nameAndIds: authors?.map( ( { id, name } ) => ( { id, name } ) ),
		};
	}, [] );

	return <>{ /* Your rendering logic here */ }</>;
}

WordPress will now display aย warningย whenย SCRIPT_DEBUGย is enabled to help consumers identify possible performance bottlenecks.

Example warning:

Theย useSelectย hook returns different values when called with the same state and parameters. This can lead to unnecessary re-renders and performance issues if not fixed.

Non-equal value keys: nameAndIds

This warning can be fixed by requesting only the values needed to render a component or moving data manipulation outside theย mapSelectย callback. The actual solution can vary based on your code and logic.

Please refer to the fantastic articleย โ€œHow to work effectively with the useSelect hookโ€ย to learn more about best practices for using theย useSelectย hook.

Hereโ€™s how I would fix the example code from this post:

export function ExampleWithWarning() {
	const authors = useSelect( function mapSelect( select ) {
		return select( 'core' ).getUsers( {
			who: 'authors',
			context: 'view',
		} );
	}, [] );

	// Derive required values from the `authors` outside the `useSelect` callback.
	const nameAndIds = authors?.map( ( { id, name } ) => ( { id, name } ) );

	return <>{ /* Your rendering logic here */ }</>;
}

Props toย @kirasong for the review.

#6-8, #dev-notes, #dev-notes-6-8, #editor

Roster of design tools per block (WordPress 6.8 edition)

Below you find a table that lists all coreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress. blocks available in the inserter marks in the grid the feature they support in the blockBlock Block is the abstract term used to describe units of markup that, composed together, form the content or layout of a webpage using the WordPress editor. The idea combines concepts of what in the past may have achieved with shortcodes, custom HTML, and embed discovery into a single consistent API and user experience. editor. Itโ€™s a basic lookup table that helps developers to find the information quickly.

While this post is released as part of 6.8, the content summarizes changes between 6.1 and 6.8. This is an updated of the 6.7 edition and provides a cumulative list of design supports added with the last six WordPress releases. The icon โ˜‘๏ธ indicates new in 6.8.

The features covered are:

  • Align
  • Typography,
  • Color,
  • Dimension,
  • Border,
  • Layout,
  • Gradient,
  • Duotone,
  • Shadow,
  • Background image
  • Pattern overrides / Block Bindings (PO/BB)

Work in progress

The issue Tracking: Addressing Design Tooling Consistency lists tracking issues for individual block supports.

Props to @audrasjb for review.

#6-8, #dev-notes, #dev-notes-6-8, #editor

Internationalization improvements in 6.8

Various internationalization (i18n) improvements are in WordPress 6.8, and this developers note focuses on these.

Localized PHPMailer messages

Over 12 years after #23311 was reported, WordPress 6.8 now properly localizes any user-visible PHPMailer error messages. To achieve this, a new WP_PHPMailer class extending PHPMailer was introduced to leverage the WordPress i18ni18n Internationalization, or the act of writing and preparing code to be fully translatable into other languages. Also see localization. Often written with a lowercase i so it is not confused with a lowercase L or the numeral 1. Often an acquired skill. system with PHPMailer. Note that developers donโ€™t typically interact with this class directly outside of wp_mail() or the phpmailer_init action.

See [59592] for more context.

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. update emails in the adminadmin (and super admin)โ€™s localeLocale A locale is a combination of language and regional dialect. Usually locales correspond to countries, as is the case with Portuguese (Portugal) and Portuguese (Brazil). Other examples of locales include Canadian English and U.S. English.

This was reported and fixed in #62496. Itโ€™s a follow-up to the email localization change introduced in WordPress 6.7, where this instance was missed. Now, plugin update emails are correctly sent in the admin locale (if the admin email matches a user on the site).

See [59460] and [59478] for details.

Just-in-time translationtranslation The process (or result) of changing text, words, and display formatting to support another language. Also see localization, internationalization. loading for plugins/themes not in the WordPress.orgWordPress.org The community site where WordPress code is created and shared by the users. This is where you can download the source code for WordPress core, plugins and themes as well as the central location for community conversations and organization. https://wordpress.org/ directory

Back in version 4.6, WordPress introduced just-in-time translation loading for any plugin or theme that is hosted on WordPress.org. That meant plugins no longer had to call load_plugin_textdomain() or load_theme_textdomain().

With WordPress 6.8, this is now expanded to all other plugins and themes by looking at the text domain information provided by the plugin/theme. Extensions with a customย Text Domainย andย Domain Pathย headerHeader The header of your site is typically the first thing people will experience. The masthead or header art located across the top of your page is part of the look and feel of your website. It can influence a visitorโ€™s opinion about your content and you/ your organizationโ€™s brand. It may also look different on different screen sizes. no longer need to callย load_plugin_textdomain()ย orย load_theme_textdomain(). This reduces the risk of calling them too late, after some translation calls already happened, and generally makes it easier to properly internationalize a plugin or theme.

In short:

  • If your plugin/theme is hosted on WordPress.org and requires WordPress 4.6 or higher: you donโ€™t need to use load_*_textdomain()
  • Else, if your plugin/theme provides the Text Domainย andย Domain Path headers and requires WordPress 6.8 or higher: you donโ€™t need to use load_*_textdomain()

See #62244 for more.


Props to @audrasjb, @stevenlinx for review.

#6-8, #dev-notes, #dev-notes-6-8, #i18n

Agenda, Dev Chat, Mar 12, 2025

The next WordPress Developers Chat will take place on Wednesday at 15:00 UTC in theย coreย channel onย Make WordPress Slack.

The live meeting will focus on the discussion for upcoming releases, and have an open floor section.

Additional items will be referred to in the various curated agenda sections below. If you haveย ticketticket Created for both bug reports and feature development on the bug tracker.ย requests for help, please continue to post details in the comments section at the end of this agenda.

Announcements ๐Ÿ“ข

WordPress 6.8 | BetaBeta A pre-release of software that is given out to a large group of users to trial under real conditions. Beta versions have gone through alpha testing in-house and are generally fairly close in look, feel and function to the final product; however, design changes often occur as part of the process.ย 2 is now available ๐Ÿฅณ

The Beta 2 release of WordPress 6.8 is now available! A heartfelt thank you to everyone who joined the Release Party. We appreciate your testing and feedback.

Help Test 6.8 Beta version ๐Ÿงช

The Test-Team has written two helpful guides for people interested in testing:

Thanks @ankit-k-gupt and @krupajnanda for your contribution!

Forthcoming releases ๐Ÿš€

Nextย GutenbergGutenberg The Gutenberg project is the new Editor Interface for WordPress. The editor improves the process and experience of creating new content, making writing rich content much simpler. It uses โ€˜blocksโ€™ to add richness rather than shortcodes, custom HTML etc. https://wordpress.org/gutenberg/ version: 20.5

Gutenberg 20.5 is scheduled for release onย Wednesday, March 19th.
This will be the first version of Gutenberg to be merged into WordPress 6.9.

Nextย Betaย 3 of 6.8: March 18th

Theย Beta 3ย release of WordPress 6.8 will be available onย Tuesday, March 18th.

A detailed overview of the release schedule for WordPress 6.8 can be found here. The article also includes information about the individuals assigned to each release party.

Nextย major releasemajor release A release, identified by the first two numbers (3.6), which is the focus of a full release cycle and feature development. WordPress uses decimaling count for major release versions, so 2.8, 2.9, 3.0, and 3.1 are sequential and comparable in scope.: 6.8

We are currently in theย WordPress 6.8 release cycle. Read more aboutย the release squad, timeline and focus for this release.

Reminder

We have only two weeks until RCrelease candidate One of the final stages in the version release cycle, this version signals the potential to be a final release to the public. Also see alpha (beta). 1. Dev notes should be in progress. Please check @jeffpaulโ€˜s message onย Slack for details.

Discussions ๐Ÿค”

The discussion section of the agenda is to provide a place to discuss important topics affecting the upcoming release or larger initiatives that impact the CoreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress. Team. To nominate a topic for discussion, please leave a comment on this agenda with a summary of the topic, any relevant links that will help people get context for the discussion, and what kind of feedback you are looking for from others participating in the discussion.

Editor Updates ๐Ÿ”„

You can keep up to date with the major Editor features with the weekly updates, now on the blogblog (versus network, site)!
Editor Weekly Updates: Mar 3 โ€“ Mar 7

Open floor ย ๐Ÿ’ฌ

Any topic can be raised for discussion in the comments, as well as requests for assistance on tickets. Tickets in the milestone for the next major or maintenance release will be prioritized.

Please include details of tickets / PRs and the links in the comments, and indicate whether you intend to be available during the meeting for discussion or will be async.

Props to @benjamin_zekavica for reviewing the agenda.

#6-8, #agenda, #dev-chat

Editor Weekly Updates: Mar 3 โ€“ Mar 7

What happened in GutenbergGutenberg The Gutenberg project is the new Editor Interface for WordPress. The editor improves the process and experience of creating new content, making writing rich content much simpler. It uses โ€˜blocksโ€™ to add richness rather than shortcodes, custom HTML etc. https://wordpress.org/gutenberg/ during the first week of March 2025? Below, youโ€™ll find an overview of the key changes and improvements.

A special thanks goes to @krupaly2k for collecting all the topics!

Need Design Feedback:

Enhancements:

Feedback:

  • Query total: It is confusing that the editor and front does not matchย โ€“ When I inserted this block, I thought I was seeing a 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. introduced by the changes to the query in WordPress 6.8.
  • Query total: The icons are confusingย โ€“ When I inserted this block I honestly did not even understand that there was an option in the toolbar.

Need Decision:

Bug:

Thanks toย @krupaly2k for helping to create this post and @benjamin_zekavica for the review

#6-8, #core, #editor-update, #gutenberg

Speculative Loading in 6.8

WordPress 6.8 introduces speculative loading, which can lead to near-instant page load times by loading URLs before the user navigates to them. The feature relies on the Speculation Rules API, a web platform feature that allows defining rules for which kinds of URLs to prefetch or prerender, and how early such speculative loading should occur.

Please refer to the speculative loading announcement post for additional information about the Speculation Rules APIAPI An API or Application Programming Interface is a software intermediary that allows programs to interact with each other and share data in limited, clearly defined ways. and related prior art in WordPress CoreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress..

Context

Prior to being implemented in WordPress Core, the feature has been successfully used on over 50,000 WordPress sites via the Speculative Loading feature plugin, which has been ported over to Core now, with a few modifications. Based on data queried from the HTTP Archive and Chrome User Experience Report (CrUX) datasets over all the time since the 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. launched, the sites that enabled speculative loading improved their Largest Contentful Paint (LCP) passing rate by ~1.9% at the median which, while it may seem a small number, is a huge boost for a single feature, considering that a lot of sites with various performance implications contribute to the data.

The Speculation Rules API was first introduced in early 2023 and has seen ever increasing usage since then. Today, over 8% of Chrome navigations rely on Speculation Rules. A related significant launch happened a few months ago when Cloudflare enabled speculative loading at large scale via its Speed Brain feature.

The Speculation Rules API is supported by Chrome, Edge, and Opera so far, which means the vast majority of end users browsing the web can benefit from its capabilitiescapability Aย capabilityย is permission to perform one or more types of task. Checking if a user has a capability is performed by the current_user_can function. Each user of a WordPress site might have some permissions but not others, depending on theirย role. For example, users who have the Author role usually have permission to edit their own posts (the โ€œedit_postsโ€ capability), but not permission to edit other usersโ€™ posts (the โ€œedit_others_postsโ€ capability).. For users of browsers without support for the API, there are no adverse effects, since the Speculation Rules API is a progressive enhancementenhancement Enhancements are simple improvements to WordPress, such as the addition of a hook, a new feature, or an improvement to an existing feature.. Browsers without support simply ignore its presence, i.e. sites maintain the same behavior as before.

Default behavior and customization

The WordPress Core implementation enables speculative loading by default in the frontend of all sites, except when a user is logged in or when a site has pretty permalinks disabled. URLs are prefetched with conservative eagerness: this means that prefetching is triggered when a user starts to click on a link. While this is typically only a fraction of a second before the actual navigation occurs, it is still enough to lead to a notable performance improvement.

This default of prefetch with conservative eagerness is used as a reasonable starting point to enable speculative loading at the scale of WordPress. It is in line with the configuration that Cloudflare uses in its speculative loading feature, and it minimizes the chance of any speculative loads without a subsequent navigation to the URLURL A specific web address of a website or web page on the Internet, such as a websiteโ€™s URL www.wordpress.org. The Speculative Loading plugin uses a default of prerender with moderate eagerness, which leads to a larger performance improvement due to the speculative load being triggered earlier as well as prerendering the URL, but also has tradeoffs related to certain client-side behavior inadvertently being triggered even in case the user never ends up navigating to the URL.

Customization via actions and filters

Excluding URL patterns from speculative loading

When a URL is prefetched, the server response is loaded before the user navigates to it. In most cases, this is not an issue since server responses for frontend URLs do not typically change the state of the site in any way. However, there may be plugins that use the pattern of so-called โ€œaction URLsโ€, where simply navigating to a specific URL (with a GET request) a state change occursโ€”for example on an e-commerce WordPress site, it could be adding a product to the shopping cart or marking an item as a favorite. It is worth noting that this is an antipattern, since state changes should typically be triggered only by POST requests, e.g. via form submissions, and GET requests are supposed to be โ€œidempotentโ€. Despite that, plugins that use this pattern should ensure that such URLs are excluded from prefetching and prerendering. In the case of conservative eagerness, this should not be an issue since itโ€™s almost guaranteed the user will also navigate to the URL. But for sites that use a more eager configuration there is a chance the navigation will never occur, which is why excluding such URLs is important.

By default, any URLs that include query parameters are excluded from prefetching and prerendering automatically, which should cater for the majority of such action URLs. However, in case a plugin is implementing its own rewrite rules for these URLs instead of using custom query parameters, they can use the wp_speculation_rules_href_exclude_paths 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 provide URL patterns to exclude.

This example ensures that any URLs with a path starting in โ€œ/cart/โ€ will be excluded from speculative loading, regardless of whether itโ€™s prefetch or prerender:

add_filter(
	'wp_speculation_rules_href_exclude_paths',
	function ( $href_exclude_paths ) {
		$href_exclude_paths[] = '/cart/*';
		return $href_exclude_paths;
	}
);

All URL patterns provided should follow the URL Pattern web specification, and they will all be considered relative to the frontend of the site. For sites where the home URL is in a subdirectory, WordPress will automatically prefix the corresponding path segment so that plugin developers do not need to worry about that.

While WordPress Coreโ€™s default behavior is to prefetch URLs, sites may opt in to prerendering URLs. This leads to a significant performance boost, but also has additional implications on the speculatively loaded URLs, since even their client-side code will be loaded. If a site contains any client-side logic that should only run once the user actually navigates to the URL, it needs to check for whether the site is being prerendered first and only trigger such logic once the navigation has occurred (see โ€œDetect prerender in JavaScriptโ€ documentation). A common use-case for that is analytics tooling (see โ€œImpact on analyticsโ€ documentation). Many popular providers already support prerendering, so no change is necessary. But if your site or your plugin includes such functionality on certain URLs and you havenโ€™t updated the JavaScriptJavaScript JavaScript or JS is an object-oriented computer programming language commonly used to create interactive effects within web browsers. WordPress makes extensive use of JS for a better user experience. While PHP is executed on the server, JS executes within a userโ€™s browser. https://www.javascript.com logic to support prerendering yet, you can temporarily exclude the relevant URLs from prerendering specifically.

This example ensures that any URLs with a path starting in โ€œ/personalized-area/โ€ will be excluded from prerender speculative loading only:

add_filter(
	'wp_speculation_rules_href_exclude_paths',
	function ( $href_exclude_paths, $mode ) {
		if ( 'prerender' === $mode ) {
			$href_exclude_paths[] = '/personalized-area/*';
		}
		return $href_exclude_paths;
	},
	10,
	2
);

Modifying the default speculative loading configuration

As mentioned before, WordPress sites are able to modify the default speculative loading configuration. For further improved performance, you may want the configuration to be more eager or to leverage prerendering. This can be achieved via the wp_speculation_rules_configuration filter, which receives either an associative array with mode and eagerness keys to control the configuration, or null to disable speculative loading for the current request.

The default value for the filter is array( 'mode' => 'auto', 'eagerness' => 'auto' ), unless a user is logged-in or the site has pretty permalinks disabled, in which case the default value is null. For both configuration parameters, the value auto signifies that WordPress Core will decide on the configuration, which as of today effectively leads to a mode of prefetch and an eagerness of conservative. Depending on various criteria such as the state of the Speculation Rules API and ecosystem support, the behavior may change in a future WordPress release.

Here is an example that uses the filter to increase the eagerness to moderate. This will improve the performance benefits, while increasing the tradeoff for a speculative load without subsequent navigation:

add_filter(
	'wp_speculation_rules_configuration',
	function ( $config ) {
		if ( is_array( $config ) ) {
			$config['eagerness'] = 'moderate';
		}
		return $config;
	}
);

The mode value can be either auto, prefetch, or prerender, and the eagerness value can be either auto, conservative, moderate, or eager. The Speculation Rules API also defines another eagerness value of immediate, however that value is strongly discouraged for document-level rules that speculatively load any URLs, so the WordPress Core API does not allow using it for its overall configuration.

If you wanted to opt for an even greater performance boost, here is an example that uses the filter to opt for prerender with moderate eagerness. This is similar to what the Speculative Loading feature plugin implements, and it can lead to a significant performance boost. Please keep in mind the effects of prerendering on client-side JavaScript logic explained in the previous section before enabling prerender.

add_filter(
	'wp_speculation_rules_configuration',
	function ( $config ) {
		if ( is_array( $config ) ) {
			$config['mode']      = 'prerender';
			$config['eagerness'] = 'moderate';
		}
		return $config;
	}
);

As mentioned before, speculative loading is disabled by default for sites that do not use pretty permalinks. This is because the aforementioned exclusion of URLs with query parameters would not reliably apply anymore if even WordPress Coreโ€™s arguments used query parameters. There may however be cases where, as a site owner of a site without pretty permalinks, you are confident that your site is not using any of the problematic patterns that are the reason for this exclusion in the first place, or you already identified them and explicitly excluded URLs with the specific query parameters from being speculatively loaded. In that case, you could use the filter to enable speculative loading, as seen here:

add_filter(
	'wp_speculation_rules_configuration',
	function ( $config ) {
		if ( ! $config && ! get_option( 'permalink_structure' ) ) {
			$config = array(
				'mode'      => 'auto',
				'eagerness' => 'auto',
			);
		}
		return $config;
	}
);

Please use caution when opting into speculative loading like this. WordPress Coreโ€™s defaults were carefully considered to cater for the majority of sites in a safe way, so only use this code snippet if you are confident it will not have adverse effects on your site.

Including additional speculation rules

The Speculation Rules API allows defining multiple rules to configure how the browser should speculatively load URLs. By default, WordPress Core only includes a single rule that handles all the aforementioned behavior. More advanced customization is possible by providing entirely new speculation rules in addition to Coreโ€™s main rule, which can be accomplished by using the wp_load_speculation_rules action. The action receives an instance of the new WP_Speculation_Rules class, which has validation mechanisms built in and can be amended as needed. By adding new rules, you can implement entirely custom configurations that will be applied on top of WordPress Coreโ€™s main rule.

Here is an example, which directly relates to the previous example that changes the default configuration to prerender with moderate eagerness. You may prefer not to change the default, but there may be specific URLs where you would like to enable prerender with moderate eagerness. You could add a custom URL-level speculation rule for that:

add_action(
	'wp_load_speculation_rules',
	function ( WP_Speculation_Rules $speculation_rules ) {
		$speculation_rules->add_rule(
			'prerender',
			'my-moderate-prerender-url-rule',
			array(
				'source'    => 'list',
				'urls'      => array(
					'/some-url/',
					'/another-url/',
					'/yet-another-url/',
				),
				'eagerness' => 'moderate',
			)
		);
	}
);

Taking this example further, maybe there is no easy way to provide a list of URLs, e.g. in case they change often or more URLs need to be added regularly. In that case, you consider using a document-level speculation rule that applies for all links that are marked with a specific class, or where a parent element has a specific class:

add_action(
	'wp_load_speculation_rules',
	function ( WP_Speculation_Rules $speculation_rules ) {
		$speculation_rules->add_rule(
			'prerender',
			'my-moderate-prerender-optin-rule',
			array(
				'source'    => 'document',
				'where'     => array(
					'selector_matches' => '.moderate-prerender, .moderate-prerender a',
				),
				'eagerness' => 'moderate',
			)
		);
	}
);

With this rule in place, users would be able to add a moderate-prerender class to any blockBlock Block is the abstract term used to describe units of markup that, composed together, form the content or layout of a webpage using the WordPress editor. The idea combines concepts of what in the past may have achieved with shortcodes, custom HTML, and embed discovery into a single consistent API and user experience. that supports the advanced UIUI User interface for adding classes, and that way they could manually opt in any link on demand.

Please refer to the Speculation Rules API specification for details on what a rule definition can look like.

Customization via UI

The previous example already hints at how speculative loading can be customized via the UI. While a dedicated UI for the feature like it exists in the Speculative Loading feature plugin is out of scope for WordPress Core, many block types provide an โ€œAdditional CSSCSS Cascading Style Sheets. class(es)โ€ field in the โ€œAdvancedโ€ panel in the block sidebarSidebar A sidebar in WordPress is referred to a widget-ready area used by WordPress themes to display information that is not a part of the main content. It is not always a vertical column on the side. It can be a horizontal rectangle below or above the content area, footer, header, or any where in the theme..

WordPress Core has built-in support for the CSS classes no-prefetch and no-prerender. You can add these to any block so that links within that block are opted out of prefetching or prerendering respectively. Note that no-prefetch opts out of both, i.e. opts out of speculative loading entirely, since prefetching is part of prerendering. Please refer to the section about excluding URL patterns for guidance on when it may be useful to exclude URLs from prefetching or prerendering.

This mechanism makes it easy for advanced users to take granular control over speculative loading for specific blocks.

Summary and further reading

The speculative loading feature in WordPress 6.8 is a great win for performance of WordPress and the web overall, by starting the page load process even before the user navigation occurs. By fine-tuning it further based on your siteโ€™s needs, you can achieve even greater performance boosts than with the default configuration.

Please see the following links for further reading:

Props to @westonruter, @tunetheweb, @adamsilverstein, @joemcgill for review and proofreading.

#6-8, #dev-notes, #dev-notes-6-8, #feature-projects, #performance, #speculative-loading