Data Liberation Next Steps

The recently published announcement of the Data Liberation initiative started some great conversations, and this follow-up post aims to provide additional direction. As a start, I’d like to draw on a few things Matt mentioned in the original announcement.

Migrating your site to WordPress or exporting all your content from WordPress should be possible in one click.

This is the big picture and what we’re aiming for. One-click. No worries.

It will be an iterative journey to get there, working with the intricacies of different platforms, finding ways to liberate content from walled gardens, and combining them all. 

I often hear about folks across the WordPress community duplicating efforts when creating scripts and workflows to move users to WordPress. Imagine if we shared those resources instead and built community-owned plugins that anyone could use!

But it should be more than plugins; workflows, tutorials, and helper scripts should be shared, too. I want this resource to have space to include moving from social networks, moving from a page builder to coreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress. blocks, switching from classic to blocks, and improving WordPress current canonical plugins for importing.”

This is a huge opportunity and a broad scope of things to contribute towards. Any of the items mentioned above would be valuable,  so I also want to highlight some specific things that would be great for us to work on as a community and where you can contribute with your thoughts.

Migrating from [Platform of your choice] to WordPress

Currently, migrating content from another platform can vary from simple (WXR exports for the win!) to complex (manually editing CSV files) to impossible. 

MigrationMigration Moving the code, database and media files for a website site from one server to another. Most typically done when changing hosting companies. solutions combine community plugins, proprietary plugins, guides, tips, and scripts. What can we, as a community, do to bring all of those together into a single solution for end users? Or, at the very least, a suite of solutions that end users can access from a single place, quickly finding the one that suits their needs?

Currently, a proposal centers around using the Playground as a tool for users to migrate their content and see a real-time, editable preview of what their site would look like in WordPress. 

An alternative suggests a hybrid approach where the platform of the source site is detected, and the user is guided and assisted through performing the migration.

Get Involved

  • Both the proposals mentioned above are promising and would benefit from further discussion – add your thoughts!
  • Got a tool to help with migrations that you’d like to open up to the Community? You can open a discussion or even just submit it!

Improving WordPress’ Import/Export format (WXR)

Currently, the WordPress eXtended RSS format (WXR) is used to import and export WordPress sites. It has also been adopted by other platforms (including Squarespace and Drupal) as a de facto standard for content portability.

There is plenty of room for improvement with the format (or to investigate other export format options) that are powerful, open, and accessible.

Get Involved

Page Builders > Blocks & Classic to Blocks

An important part of Data Liberation is to provide pathways for users who want to move to modern WordPress core blocks or between third party editors.

Many third-party tools and builders have blocks and features that aren’t matched in Core blocks, making it a tricky choice for those who would prefer to use 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. Thankfully, this proposal to introduce a directory of standalone ‘core’ blocks could help.

Get Involved

Migration Guides

While the end goal is for a ‘one-click’ solution to migrate to WordPress, there will definitely be cases (for now, at least) that will involve some manual work for users.

For these situations, work has started on simple, easy-to-follow guides that walk users through the steps to liberate their content in order to import it into WordPress. Even as the community develops tools, these guides will remain an important alternative.

Get Involved

In addition to the items mentioned above, I’m interested in hearing from the community about their broader thoughts and feelings about the Data Liberation initiative.

  • What is missing from this post that you’d like to see considered?
  • With such a broad scope, what should be focused on with the highest priority?
  • What other voices should be heard on this topic?

Feel free to share your thoughts in the comments, and let me encourage you to come and join the #data-liberation channel in the Making WordPress Slack.

Unblocking WP6.5 – Font Library and Synced Pattern Overrides

A number of contributors have flagged a stalemate on a couple of different topics for WP6.5 this week. I want to first thank everyone who joined in the discussions on GithubGitHub GitHub is a website that offers online implementation of git repositories that can easily be shared, copied and modified by other developers. Public repositories are free to host, private repositories require a paid subscription. GitHub introduced the concept of the ‘pull request’ where code changes done in branches by contributors can be reviewed and discussed before being merged be the repository owner. https://github.com/, 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/., and elsewhere. There were a lot of well-reasoned and important concerns raised and it was an excellent example of the way open sourceOpen Source Open Source denotes software for which the original source code is made freely available and may be redistributed and modified. Open Source **must be** delivered via a licensing model, see GPL. works in the open. Over the last few days, I’ve discussed the suggested approaches with several coreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress. and core-editor contributors, including pros, cons, and side effects. We’ve reached a consensus on a path forward on both the Font Library and the issue with Synced Pattern Overrides.

Font Library

The font library portion of this post has been superseded by the post WordPress 6.5 release delayed 1 week, in which it’s announced fonts will be uploaded to the fonts sub-directory of the uploads folder.

Let’s ship the Font Library in WordPress 6.5 contingent on the following, which meet all the criteria and offers a good compromise:

  • The Font Library will use wp-content/fonts as the default storage folder. While locating fonts at the same level as themes and plugins gives fonts a lot of prominence, it’s worth noting 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. themes are heading toward composability, allowing users to change collections of fonts, patterns, templates, and color schemes without switching the full theme. Storing fonts at the same level as themes is the first step to breaking down themes in these composable pieces and establishing new first-class concepts and objects within our software.
  • For installations that don’t support modification of the wp-content directory, the Font Library will use wp-content/uploads/fonts as a fallback location, ensuring we stay true to our project philosophy of designing for the majority while still making the feature available to anyone out of the box without extra steps from the user. 
  • The wp_get_font_dir() (source) is available to return the location of the site’s fonts folder. Extenders should use this function as it will allow them to seamlessly integrate with the Font Library regardless of their installed version of WordPress. This allows WordPress to manage the preferred directory location and any factors related to migrating folder locations (e.g., consolidating any remaining installations using wp-content/uploads/fonts to use wp-content/fonts) in future versions without extenders also needing to make changes.
  • For very edge cases, a font_dir 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. (source) still allows overriding the font storage folder.
  • Like wp-content/uploads itself, the fonts directory will not adhere to wp_is_file_mod_allowed / DISALLOW_FILE_MODS to prevent font uploads.
  • The 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 reflect these changes upon publication.

The following is still to be explored after WP 6.5:

  • A means to move the canonical location of the fonts directory. Should the wp-content directory become writable for a site, a safe path forward should be offered for its owners.
  • Related checks will be added to Site Health.
  • A roadmap will be published outlining where the project components are headed in relation to establishing new first-class concepts outside of previously established paradigms within the software (like breaking down themes into fonts, patterns, templates, etc.). Why was this such an important and impactful decision? And how might it present itself again in the future?

Synced Pattern Overrides

During beta a change was merged that switches how blocks are named and marked as overridable patterns. This is proving to have unforeseen side effects that need further research and testing. Given that we need to focus on the solution outlined above for the Font Library, let’s revert this and try again in WP6.6.

Let’s do it!

While there may still be some disagreement about these decisions, I ask that we all support this fair and reasonable compromise to ensure the release is ready for all to enjoy the Font Library feature that many contributors have worked so hard on over the last few years. Sticking to our philosophies is important, but we must balance that with releasing early and often. We’re not perfect, and the only way to know how is to release features for all to use.

Props to @priethor, @desrosj, @swissspidy, @cbringmann, @dd32, @youknowriad

#6-5

I18N Improvements in 6.5 (Performant Translations)

Various internationalization (i18n) improvements are in WordPress 6.5, and this developers note will focus on these.

New localization system with improved performance

Over the past year, WordPress contributors have meticulously analyzed performance of the existing 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 in WordPress and ultimately created a new Performant Translations feature pluginFeature Plugin A plugin that was created with the intention of eventually being proposed for inclusion in WordPress Core. See Features as Plugins. that provided a completely overhauled system with significantly better performance. After thousands of 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. testers and a merge announcement late last year, this new library is now included in WordPress 6.5! See #59656 for all the details.

The Performant Translations 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 is still useful and will continue to be maintained to build on top of the coreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress. solution with a distinct additional feature. As is already the case today, the plugin will automatically convert any .mo files to PHPPHP The web scripting language in which WordPress is primarily architected. WordPress requires PHP 5.6.20 or higher files if a PHP file does not currently exist. This is useful for sites where translations are not coming from translate.wordpress.org or only exist locally on that server.

This new library is faster at loading binary .mo files and uses less memory. It even supports loading multiple locales at the same time, which makes locale switching faster. In addition to that, it supports translations contained in PHP files, avoiding a binary file format and leveraging OPCache if available.

The new library is so fast, in fact, that it paves the way for the Preferred Languages feature plugin to merge translations of multiple locales by default starting with WordPress 6.5.

While this is in large part a silent and backward-compatible under-the-hood change, there are still a few things to be aware of:

New .l10n.php translationtranslation The process (or result) of changing text, words, and display formatting to support another language. Also see localization, internationalization. file format

When downloading language packs from 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/, there will be a new .l10n.php file in addition to the .mo and .po files you are already familiar with. If an .mo translation file has a corresponding .l10n.php file, the latter will be loaded instead, making things even faster and use even less memory.

This 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., so if there’s only an .mo file but no PHP file, translations will still be loaded as expected. However, the opposite is also true! So you can theoretically use only .l10n.php translation files in your project and features such as the just-in-time translation loading continue to work. Right now, WordPress still expects corresponding .po and .mo files for things like update checks. However, this limitation will be addressed in the future, see #60554 for more information.

Note: if you don’t see any .l10n.php translation files in wp-content/languages yet, it might be that the language pack hasn’t been updated in a while, i.e. there were no new translations.

Here’s an example of a PHP translation file as supported by WordPress 6.5:

<?php
return [
'project-id-version' => 'WordPress - 6.5.x - Development',
'report-msgid-bugs-to' => 'polyglots@example.com',
'messages' =>
[
'original' => 'translation',
'contextEOToriginal with context' => 'translation with context',
'plural0' => 'translation0' . "\0" . 'translation1',
'contextEOTplural0 with context' => 'translation0 with context' . "\0" . 'translation1 with context',
'Product' => 'Produkt' . "\0" . 'Produkte',
],
];

Note: EOT here stands for the “End of Transmission” character (U+0004, or "\4" in PHP). It’s the same delimiter as in gettext used to glue the context with the singular string.

Generating PHP translation files

If you would like to generate these PHP translation files yourself, version 4.0 of GlotPress, the plugin that powers translate.WordPress.org, already supports the new .l10n.php format.

In addition to that, WP-CLI 2.10.0 (i18n-command 2.6.0) provides a new wp i18n make-php command to create these PHP files from a given .po file. Examples:

# Create PHP files for all PO files in the current directory.
$ wp i18n make-php .

# Create a PHP file from a single PO file in a specific directory.
$ wp i18n make-php example-plugin-de_DE.po languages

If you are developing a WordPress plugin that deals with translations, you can also use the new WP_Translation_File class to convert an .mo file into a PHP file. Example:

$contents = WP_Translation_File::transform( $mofile, 'php' );
if ( $contents ) {
file_put_contents( $path_to_php_file, $contents );
}

New filters to customize this behavior

If you would like to disable the support for PHP files for some reason; for example, if you don’t have any yet in your project and want to prevent the extra file lookup operation, you can use the new translation_file_format 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 change the preferred format (default is php) like so:

add_filter(
'translation_file_format',
static function () {
return 'mo';
}
);

The existing load_textdomain_mofile filter can still be used to filter the .mo file path for loading translations for a specific text domain. However, it only works for .mo files. To filter the path for a translation file, be it a .l10n.php or a .mo file, use the new load_translation_file filter.

Working with the $l10n global variable

Previously, when loading translations, WordPress would store an instance of the MO class in the $l10n global variable. With WordPress 6.5, this will be an instance of a new WP_Translations class that acts as a shim with similar characteristics. If your project directly works with this global variable or the MO class in some way, this is an area to keep an eye on.

Cached list of language file paths

This another slight performance improvement but unrelated to the new localization library covered above.

In places such as get_available_languages() and WP_Textdomain_Registry, WordPress used to directly use the glob() function to retrieve all .mo files in a specific directory. This is important for just-in-time translation loading and generally knowing which translations are installed. However, on sites with a large number of language files, the glob() operation can become expensive.

Because of this, a new caching mechanism was introduced in #58919 / [57287]. The file lookup is now handled centrally in WP_Textdomain_Registry and stored in the object cache in the translations group, with the cache key having the format cached_mo_files_<hash>, where <hash> is the MD5 hash of the scanned directory, e.g. wp-content/languages. The cache is cleared whenever language packs are updated.

Also, the lookup now also scans for .l10n.php files in addition to .mo files, in case only the former exist on a site.

More questions? Please let us know

If you have any questions, please leave a comment below or file a new ticket on Trac under the I18N component if you’ve encountered any bugs.

Props to @joemcgill, @stevenlinx for review.

#6-5, #dev-notes, #dev-notes-6-5, #i18n

Summary, Dev Chat, March 13, 2024

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 @joemcgill.

Announcements

WordPress 6.5 RC 2 was released yesterday, March 12, 2024 and Gutenberg 17.9 was released earlier today. Please continue to help test and provide feedback.

Forthcoming Releases

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.5

We are in the final weeks before WordPress 6.5 is scheduled to be released, with our final scheduled 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). (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). 3) scheduled for next week.

There are several important changes to our normal development process during the RC stage. For more, see this post: WordPress 6.5 Release Candidate Phase.

Please continue to test the 6.5 release. See this list of key features to test, which was published alongside WP 6.5 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.

@marybaum confirmed the release team for RC3 on Tuesday, March 19, 2024. @audrasjb as the committercommitter A developer with commit access. WordPress has five lead developers and four permanent core developers with commit access. Additionally, the project usually has a few guest or component committers - a developer receiving commit access, generally for a single release cycle (sometimes renewed) and/or for a specific component., with @hellofromtonya on backup and @davidbaumwald as mcpilot; @akshaya will host with @priethor as backup.

@swissspidy also shared that RC3 is the last scheduled RC before the stable release. The topmost priority should be solving the Font Library uploads location as per Josepha’s recent blog post. If you would like to help, there is an open architecture discussion where you can get involved, and a couple of remaining related PRs:

Primarily, we need to find a robust way to ensure that, when deleting a font, the font files are deleted from the right folder. If we don’t have a solution for the above by RC3 we could consider an additional fourth RC.

There are also some open Interactivity API bugs and editor bugs, but nothing severe. It would be helpful if these issues had owners. @joemcgill suggested scheduling another 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 this week to review these issues and assign owners.

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/ release: 18.0

Gutenberg 18.0 is scheduled for release on March 27 and will include these issues.

Discussion

The discussion today started with organizing release squads for 6.5.x and 6.6 releases.

@jorbin confirmed that we’re still looking for folks to be involved in the 6.5.x maintenance releases. Please reach out if you’re available to help with these releases – particularly if you were already involved in the 6.5 releases (but that’s not a requirement).

@priethor has a draft for a post that identifies people who have raised their hands for 6.6.

A related discussion topic is whether we should reevaluate the size of release squads prior to 6.6. This came out of the discussion following the 6.5 release squad announcement (context). There was a discussion around the pros and cons of having larger release squads, including:

  • Larger squads spread the responsibility that used to be focused on just one person to a bigger team. However;
  • It doesn’t feel like there is much need for others to help or be involved when there are so many people responsible for a release.
  • The more individuals, the greater number of relationships and opportunities for both cliques and interpersonal conflictconflict A conflict occurs when a patch changes code that was modified after the patch was created. These patches are considered stale, and will require a refresh of the changes before it can be applied, or the conflicts will need to be resolved..
  • It sometimes leaves the team not knowing who should be making key decisions about features.

There were also suggestions for better documenting the responsibilities both within the release squad and within a lead group. Also, having feature leads would be helpful, i.e. folks spearheading and owning a specific big feature in a release.

@joemcgill suggested that we could review the release squad size as part of a debrief post for 6.5, and @priethor is working on a proposal for a reduced release squad that will be published in the upcoming days.

Highlighted posts

The full list of posts from the last week in CoreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress. can be read on the agenda at this link.

Open floor

We did not have time for open floor this week.

Props to @joemcgill for reviewing.

#6-5, #dev-chat, #summary

Agenda, Dev Chat, Wednesday March 20, 2024

The next WordPress Developers Chat will take place on  Wednesday March 20, 2024 at 20:00 UTC in the core channel on Make WordPress Slack.

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

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

Announcements

WordPress 6.5 RC 3 was released on March 19, 2024. Thanks to everyone involved and those who helped test.

Forthcoming releases

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.5

Updates from the release squad can be shared in the Dev Chat.

Please continue to test the 6.5 release. See this list of key features to test, which was published alongside WP 6.5 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.

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/ release: 18.0

Gutenberg 18.0 is scheduled for release on March 27 and will include these issues.

Discussions

This week the discussion will focus on any priority topics that need to be raised before the launch of WordPress 6.5.

Proposed topics

  • Are there any priority topics needed for discussion ahead of the WordPress 6.5 release?
    • Is there a need for a silent 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).?

Feel free to suggest additional topics related to this release in the comments.

Highlighted posts

CoreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress. Editor Updates

Tickets for assistance

Tickets for 6.5 will be prioritized.
Please include detail of tickets / PR and the links into comments, and if you intend to be available during the meeting if there are any questions or will be async.

Open floor

Items for this can be shared in the comments.

Props to @joemcgill for reviewing.

#agenda, #dev-chat

Roadmap to 6.5

WordPress 6.5 is set to be released on March 26th, 2024. This release brings greater design control and optionality, more robust 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. capabilities with new APIs, access to current block theme functionality for classic themes, and the start of the new adminadmin (and super admin) redesign. More specifically, these significant features include the Font Library for easy global font management, support for Appearance Tools in Classic Themes for more expansive design options, and more robust revisionsRevisions The WordPress revisions system stores a record of each saved draft or published update. The revision system allows you to see what changes were made in each revision by dragging a slider (or using the Next/Previous buttons). The display indicates what has changed in each revision. across the editing experience (including revisions for template parts and templates). New APIs like Interactivity, Custom Fields, and Block Binding expand block capabilities and underpin features like partial sync patterns, and PHPPHP The web scripting language in which WordPress is primarily architected. WordPress requires PHP 5.6.20 or higher compatibility work ensures alignment with PHP versions. Rollback for 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 and theme updates enhances safety, and 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. fixes address various components for an improved user experience. The first taste of the admin redesign as part of phase 3 efforts are planned for this release in an iterative and contained way by bringing a new experience to the template, template part, and pattern lists within the Site Editor.

As always, what’s shared here is being actively pursued, but doesn’t necessarily mean each will make it into the final release of WordPress 6.5.

For a more detailed look at the work related to the block editor, please refer to the 6.5 board.

Design tools

Font Library

The Font Library makes it easy for anyone to install, remove, and activate fonts across your site. It’s available globally, independent of the theme activated, similar to the Media Library. Any installed font, whether installed by a user or a theme, can then be selected across the editing experience.

Follow this tracking issue for more information.

Syncing specific blocks and attributes of patterns

Building upon synced patterns, pattern overrides (previously called partial sync patterns) would allow users to ensure a synced layout and style across patterns while allowing each instance of the pattern to have customized content. This allows for consistency in design across different pieces of content. For instance, consider a testimonial pattern in a grid. With the enhanced feature, someone can insert this testimonial pattern into multiple posts, ensuring that the layout and styling components, such as the overall design of the recipe card, remain consistent across instances. Meanwhile, the content, such as Name, Image, and Role, would be local to each instance allowing for individual customization. Additionally, folks would then be able to revisit and modify the design of the overall testimonial pattern without affecting the content in existing instances. Of note, this work will need to align with the following Custom Fields API and Block Binding API

Follow this tracking issue for more information.

Section Specific Theme.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. and Colorways

Taking the high level styling system with features like style variations, section specific theme.json offers more granular control for defined parts of your site using that same underlying system. This is a broad set of work and, for 6.5, the aim is to bring color variations to group blocks via the idea of Colorways. Colorways is a subset of section-specific theme.json, with styling elements only. This option would only be available for Group blocks for 6.5 in a code only way except for a minor UIUI User interface to select. These styles would apply curated color, typography, border styles etc along with styles for elements (links, buttons etc). For now, the most common use case is a theme author creating them for a theme to provide a predefined set of colors that have been preselected based on appropriate contrast, aesthetics, and more. In the future, work is being explored to allow users to create them in the Styles interface. 

Follow this tracking issue for more information. 

Adoption pathways

Support for Appearance Tools in Classic Themes

Adding support for Appearance Tools opens a world of design options that, up until this point, have been only available with Block Themes, or themes using theme.json. For example, adding a simple border to a Group block requires support for Appearance Tools. Work is underway to allow Classic Themes to add support for most of these tools safely, without breakage, unlocking more design options for more sites in a big way.

Follow this tracking issue for more information.

Paving the way for improved Pattern management in Classic Themes

Thanks to some internal code changes, the path is being set for a future release to enable Classic Themes access to the new Patterns experience that the Site Editor provides. Separately, a link for Appearance > Patterns is going to be added for Classic Themes to make Patterns more readily accessible and visible as a feature. This will link to the current patterns experience already in Classic Themes.

Follow this tracking issue for more information.

Foundational experience

New data views for templates, template parts, and patterns in the Site Editor

This work kicks off aspects of the Admin Redesign effort in an iterative and contained way by bringing a new experience to the template, template part, and pattern lists within the Site Editor. The following features are planned:

  • Ability to display a table with specific fields, pagination and quick actions.
  • Toggling fields and sorting and filtering data by field.
  • UI for selecting entries and performing bulk actions.
  • Support for different layouts, like classic table, grid view (including gallery), with the option to display a side-by-side preview.
  • Support for saving and toggling between “views”, which are specific configurations of layouts, field visibility, etc.

This feature-rich experience provides immediate value both to the Site Editor and begins to lay the groundwork for future work related to Phase 3, including efforts around Workflows and Media Library.

Follow this tracking issue for more information.

Robust revisions

Revisions help create confidence when writing and creating, knowing your changes are always safely stored. For WordPress 6.5, templates and template parts will now display revisions, alongside broader upgrades to style revisions with plans for side by side comparisons, pagination, more detailed descriptions, and more.

Follow this tracking issue for more information.

Customize the Navigation block mobile overlay

6.5 seeks to move the needle with responsive controls by adding the ability to fully customize what your overlay menu will look like. The navigation overlay is the name for the menu that’s shown when you set and open a mobile menu. Having full control over this mobile menu would allow you to customize the colors, spacing, and blocks offering the option for a distinct menu experience across devices.

Follow this tracking issue for more information.

New APIs

Interactivity 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.

The Interactivity API aims to be a standard way to allow developers to add interactivity to the frontend of their blocks, like hearting a post or adding to cart without page loads. A standard makes it easier for developers to create rich, interactive user experiences, from simple cases like counters or popups to more complex features like instant page navigation, instant search, or carts and checkouts. After testing the API on specific coreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress. provided blocks for months in the 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/ plugin and, more recently, in core with WordPress 6.4, there are a few remaining tasks to expose the API for extenders: “store refactoring” based on feedback from early adopters, server-side directive processing that covers SEO requirements and optimizes initial renders, and adding support for ES Modules and import maps. Each of these are projects in their own right and will need to be evaluated for the release. 

Follow this tracking issue for more information.

Custom Fields API

This feature aims to create a simple way of connecting block attributes and Custom fields/metadata. Because this is such a broad undertaking, a scaled back version is planned for 6.5 that would accomplish the following:

  1. Connect block attributes and custom fields without a UI. 
  2. Include a basic UI to create these bindings where the API can read the metadata value
  3. Add the possibility to edit the value of the 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. field directly through the editing experience.
  4. Add support for more core blocks based on importance and relevancy. 

Follow this tracking issue for more information.

Block binding API 

This API aims to connect block attributes to values, obtained from different sources, that might vary depending on the context. For example, a value like post_author that changes depending on the current post. This will expand the capabilities of existing blocks without the need to create new ones, which will empower theme developers and site owners. For example, having a heading block with the content of the Post Author without needing a new Post Author block. For 6.5, the work for this API will mainly be focused on serving other pieces of the roadmap, namely Custom Fields and Partial Sync Patterns. 

Follow this tracking issue for more information.

PHP compatibility work 

Several compatibility fixes are scheduled to ship with 6.5, with work underway to improve compatibility with PHP 8.0, 8.1, and 8.2.

Since the adoption of a tiered PHP 8+ compatibility plan, each release brings the opportunity to update official PHP compatibility information for the new, as well as previous, versions of WordPress. Using current data from each PHP 8.x version’s usage metrics and open compatibility issues, exceptions will be cleared or added, and updates applied to the version chart. Significant exceptions might also warrant a dedicated Make/Core post with additional details.

The official release of PHP 8.3 in late November means that site operators and hosting companies will want to know if WordPress 6.5 is compatible with the latest PHP. Technical exceptions called out on the PHP compatibility page do not provide many users a clear answer to this question. Barring any major issues with running 6.5 on PHP 8.3, it may be helpful to publish an official compatibility notice on WordPress/News (see this example clarifying WordPress 6.4 compatibility on PHP 8.1 and 8.2).

Rollback for plugin and theme updates for automatic updates

Building on prior efforts released in WordPress 6.3, rollbacks for automatic updates to plugins is underway. Specifically, this means that checks will be added to ensure that an updated plugin does not cause a PHP fatal error when the plugin is active during an auto-update.. If it does, this error is captured and the previously installed version is restored, along with an email sent to the site admin.

Follow this trac ticket for more information.

Plugin dependencies

Currently, any plugin that requires another plugin (i.e., a dependency) is on its own to make sure admins install the dependency since the plugin won’t work without it. To ease that process for everyone involved, work has been underway to create a consistent method to handle dependencies and provide a clear pathway for folks to know the relationship and take proper action while installing these kinds of plugins. Namely, the current approach prevents activation of a dependent plugin if its dependences are not installed and activated. If dependences suddenly become unavailable (such as if a dependency’s directory is manually deleted), the dependent plugin is automatically deactivated. To learn more about this effort, please review the Feature Project: Plugin Dependencies post.

Follow this trac ticket for more information.

Continued performance improvements

While performance is a constant focus and each new feature must be reviewed for performance impact, a few priority projects are on the performance team’s list to address for 6.5:

  • Revised translation loader to make localized sites more performant.
  • Enhance performance of (block) templates, template parts, and patterns with selective caching.

Outside of these larger initiatives, typing performance is receiving a specific focus with major improvements expected.

Bug fixes and UXUX User experience iterations

In TracTrac An open source project by Edgewall Software that serves as a bug tracker and project management tool for WordPress., there are already 41 tickets closed and 9 set for early across various components and focuses. It’s still early in the cycle so expect these efforts to continue. Additionally, various main tools and features of the editing experience have planned iterations like List View, background image support for the Group block, revisiting template vs content editing modes, expanding and refining block renaming, aligning page edit features in Site Editor and Post Editor, and adding a box shadow component

Raising the minimum version of MySQLMySQL MySQL is a relational database management system. A database is a structured collection of data where content, configuration and other options are stored. https://www.mysql.com/.

MySQL 5.0 was initially made generally available in 2005 and reached its end of life (EOL) in January of 2012, making it unsupported and insecure for over 12 years. This is extremely old and this requirement is being raised. In WordPress 6.5, the minimum required version of MySQL will be raised from 5.0 to 5.5.5. 

Read this post for more information.

Thank you to @richtabor @ironprogrammer @afragen @priethor @saxonafletcher for their help with this post.

Changelog

  • Jan 23rd 2024: updated the improved pattern experience section to clarify what’s being added for 6.5

#6-5, #release-roadmap

Performance Chat Summary: 5 March 2024

Meeting agenda here and the full chat log is available beginning here on Slack.

Announcements

  • Welcome to our new members of #core-performance
  • WordCampWordCamp WordCamps are casual, locally-organized conferences covering everything related to WordPress. They're one of the places where the WordPress community comes together to teach one another what they’ve learned throughout the year and share the joy. Learn more. Asia is this week
  • Updated agenda format to match CoreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress. dev chat as suggested in previous chats
  • Reminder on timezone difference for the next 3 weeks, this chat will remain at 16:00 UTC, then it will switch to 15:00 UTC from April 2

Priority Items

Structure:

  • WordPress performance TracTrac An open source project by Edgewall Software that serves as a bug tracker and project management tool for WordPress. tickets discussion
  • Performance Lab 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 (and other performance plugins) discussion
  • Active priority projects
    • Plugin checker
    • Improve template loading
    • INP opportunities research

WordPress Performance Trac Tickets

  • For WordPress 6.5:
    • @joemcgill The only open ticketticket Created for both bug reports and feature development on the bug tracker. we still have in the milestone is #60127, which can happen at any time. @thelovekesh was planning on taking a pass at this soon.
      • The only other thing that I think we’ve been aware of is that this release is showing a slightly higher TTFB than 6.4, but we can discuss that in more detail later.
    • @thelovekesh tried to replicate the issue on 6.4 but facing some issues with local setup. Will try to set it up again.
  • For Future Releases:
    • We already have 15 items in the 6.6 milestone, but it’s a good time for folks to start thinking about what they are wanting to focus on for the next release.

Performance Lab Plugin (and other Performance Plugins)

  • @flixos90 There has been a lot of progress on the unbundling of Performance Lab (see overview issue)
  • https://github.com/WordPress/performance/pull/1011 and https://github.com/WordPress/performance/pull/1019 are close to being merged into trunk
  • While that would in principle set us up to ship the 3.0 release, there have been a few conversations on the UXUX User experience of the new screen that deserve more attention. There is a lot to unpack, but it falls into 2 categories at a high level:
    • The migrationMigration Moving the code, database and media files for a website site from one server to another. Most typically done when changing hosting companies. from modules to plugins is a confusing user experience.
    • The PL screen itself, with the plugins and modules to activate, is a confusing user experience.
  • The first point affects a one-time functionality, as it was recently decided that the concept of modules will be permanently removed. In other words, this migration will never need to happen again. As it’s already released and users are already migrating, it is not worth investing time to improve it
  • For the screen itself though, there is things we can do.
    • Most importantly, it would be more intuitive to make the experience about the features, rather than the plugins. As in, each card should describe a feature, instead of focusing on the technicality that it’s a plugin. We shouldn’t pull down .org information, but instead provide more solution driven feature descriptions. Things like the star ratings and other things related to the underlying plugin don’t need to be shown.
      • Under the hood, enabling a feature will still install and activate the corresponding plugin. But that shouldn’t matter for the user, their focus should be on the actual features.
    • We need to think about a better onboarding experience, e.g. a step which allows enabling all recommended features at once. There used to be modules which are activated by default, which is no longer possible now that the features are in the form of standalone plugins. So we need a solution to make that intuitive, which goes hand in hand with a better onboarding experience.
  • @thelovekesh suggested Maybe showing some on-boarding wizard? Where user can select what they want to improve in terms of performance on their site?
    • @flixos90 Potentially. I usually think of multiple steps when I think “onboarding wizard”, so not sure that’s needed here. But at least it would need to be a dedicated screen, or a customized version of the regular
  • @joemcgill I’m definitely in favor of the first point above, and see the second as a “nice to have”. Do we already have a GH issue to track this discussion?
  • The most immediate course of action because of those additional points regarding the Performance Lab plugin unbundling: Because of the additional discussion and engineering required, I think we should postpone the 3.0 release. Hopefully only to April. We need to make sure the UX is good enough before we ship it, but at the same time we want to minimize the time we remain in this limbo where the 2.x branchbranch A directory in Subversion. WordPress uses branches to store the latest development code for each major release (3.9, 4.0, etc.). Branches are then updated with code for any minor releases of that branch. Sometimes, a major version of WordPress and its minor versions are collectively referred to as a "branch", such as "the 4.0 branch". and trunk are so diverged, as that complicates shipping potential fixes in the existing code.

Active Priority Projects

Plugin Checker

  • No updates this week

Improve template loading

INP research opportunities

  • No updates this week

Open Floor

Our next chat will be held on Tuesday, March 12, 2024 at 16:00 UTC in the #core-performance channel in Slack.

#core-performance, #performance, #performance-chat, #summary

Miscellaneous Editor changes in WordPress 6.5

In this post, you will find 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. for smaller changes to the editor in WordPress 6.5.


Table of contents

  1. New Block Supports
  2. Footnotes support for Custom Post Types
  3. DependencyExtractionWebpackPlugin: Drop webpack4 and node<18
  4. Enable Block Renaming support for (almost) all blocks
  5. Stabilization of the block editor’s RecursionProvider API
  6. Support for new allowedBlocks field in block.json
  7. Add new selectors to fetch entity revisions
  8. New useSettings hook for reading block instance settings
  9. Introduction of the PluginPostExcerpt Slot Component
  10. Changes to the underlying Composite component implementation
  11. Deprecated components
  12. Setting to disable custom content size controls

New 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. Supports

Background image block support additional features for size, repeat, and position

In WordPress 6.5, the background image block support receives new controls related to the size of the background image: size, repeat, and position.

For blocks that use the background image block support (currently, the Group block is the only coreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress. block to use this support), these optional controls can now be displayed. They are hidden by default behind the tools panel menu in the Background controls on the inspector 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..

How to add backgroundSize support to a theme

There are two ways to add support for backgroundSize and the related size, as well as repeat and position control to a block theme. The simplest one is to opt into the appearanceTools setting, which automatically enables a number of design tools (read more in the developer handbook).

For themes that wish to have more granular control over which UIUI User interface tools are enabled, the backgroundSize support can be opted into by setting settings.background.backgroundSize to true in theme.json. For example:

{
"settings": {
"background": {
"backgroundImage": true,
"backgroundSize": true

Note that as of WordPress 6.4 and WordPress 6.5, the backgroundImagebackgroundSize, and related supports are only available at the individual block level, not in global styles or at the site root. These features will be explored in subsequent releases, with progress tracked in this GithubGitHub GitHub is a website that offers online implementation of git repositories that can easily be shared, copied and modified by other developers. Public repositories are free to host, private repositories require a paid subscription. GitHub introduced the concept of the ‘pull request’ where code changes done in branches by contributors can be reviewed and discussed before being merged be the repository owner. https://github.com/ issue: #54336.

GitHub pull request: #57005

Props to @andrewserong for writing the 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..

Aspect ratio block support

A new aspect ratio block support has been added in WordPress 6.5, with the Cover block opted-in by default. For themes using the appearanceTools feature in theme.json, the control will be available in the inspector controls under Dimensions.

The feature allows users to set an aspect ratio for the Cover block, and is mutually exclusive with min-height rules. If an aspect ratio is set, then min-height is unset to ensure that height rules do not conflictconflict A conflict occurs when a patch changes code that was modified after the patch was created. These patches are considered stale, and will require a refresh of the changes before it can be applied, or the conflicts will need to be resolved. with the aspect ratio. The aspect ratio rules will be output at render-time for the block via an inline style applied to the block’s wrapper.

Note that themes or blocks that add width or height rules to a block will need to take care in testing compatibility with aspect-ratio if they are to opt-in to aspect ratio support. The aspect ratio tends to work most flexibly when width or height rules are not set.

How to add aspectRatio support to a theme

There are two ways to add support for aspectRatio to a block theme. The simplest is to opt into the appearanceTools setting, which automatically enables a number of design tools (read more in the developer handbook).

For themes that wish to have more granular control over which UI tools are enabled, the aspectRatio support can be opted into by setting settings.dimensions.aspectRatio to true in theme.json. For example:

{
"settings": {
"dimensions": {
"aspectRatio": true

GitHub pull request: #56897

Props to @andrewserong for writing the dev note.

Add block gap support to Quote block

The Quote block has blockGap support in WordPress 6.5. It also changes the default spacing between the quote and the citation in block themes that have blockGap enabled, to be consistent with all other blocks that use the layout support. The default spacing will now use the layout spacing rules defined by a theme’s styles.spacing.blockGap value in theme.json.

For themes that use blockGap but wish to use a different gap between the quote and the citation, they can set a spacing.blockGap value for the block directly.

GitHub pull request: #56054

Props to @andrewserong for writing the dev note.

Add padding and margin support to the Pullquote block

Pullquote block now supports padding and margin. At the same time, the browser default margin applied to the blockquote element inside the block has been reset to zero to ensure that padding values are applied accurately inside the block. Depending on themes, this effect may result in visual changes and the need to adjust padding or margin.

GitHub pull request: #45731

Props to @wildworks for writing the dev note.

Footnotes support for Custom Post Types

In WordPress version 6.5, footnotes are now supported on any custom post typeCustom Post Type WordPress can hold and display many different types of content. A single item of such a content is generally called a post, although post is also a specific post type. Custom Post Types gives your site the ability to have templated posts, to simplify the concept. that fulfills certain requirements. To be eligible for footnotes, a custom post type must have capabilities like 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/., custom fields, revisionsRevisions The WordPress revisions system stores a record of each saved draft or published update. The revision system allows you to see what changes were made in each revision by dragging a slider (or using the Next/Previous buttons). The display indicates what has changed in each revision., and editor support. If a post type meets these requirements, footnotes should be available by default without requiring any changes from the developer.

However, if a developer wants to remove footnotes support in a specific condition, for example, in a particular post type, they can use the block 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. like any other block. The following code sample demonstrates how we can remove footnotes support from the “post” post type:


add_filter( 'allowed_block_types_all', 'footnotes_allowed_block_types', 10, 2 );

function footnotes_allowed_block_types( $allowed_blocks, $editor_context ) {
if( 'post' === $editor_context->post->post_type ) {
$allowed_blocks_array = array();
if ( is_array( $allowed_blocks )) {
$allowed_blocks_array = $allowed_blocks;
} else if( $allowed_blocks === false ) {
return false;
} else if ($allowed_blocks === true ) {
$block_types = WP_Block_Type_Registry::get_instance()->get_all_registered();
foreach( $block_types as $block_type) {
$allowed_blocks_array[] = $block_type->name;
}
}

$allowed_blocks = array_values( array_diff( $allowed_blocks_array, array(
'core/footnotes',
) ) );
}
return $allowed_blocks;
}

GitHub pull request: #57353

Props to @jorgefilipecosta for writing the dev note.

DependencyExtractionWebpackPlugin: Drop webpack4 and node<18

As webpack4 doesn’t support modules that blocks require to work, and that webpack5 was released more than three years ago, the support for webpack4 is dropped in WordPress 6.5.

In addition, the support for Node.js version 17 or older is dropped, as Node.js 18 is currently the oldest maintained version.

  • @wordpress/scripts version 17 has dropped official support for unmaintained Node.js versions. The oldest supported Node.js version is now Node.js 18.
  • @wordpress/dependency-extraction-webpack-plugin version 5 has dropped official support for unmaintained Node.js versions. The oldest supported Node.js version is now Node.js 18.
  • @wordpress/dependency-extraction-webpack-plugin version 5 has dropped support for webpack versions less than 5. Users should either upgrade to webpack v5 or continue to use v4 of 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. Version 4 will not be maintained going forward.
    If you’re using @wordpress/dependency-extraction-webpack-plugin via @wordpress/scripts, the webpack change should not affect you.

GitHub pull request: #57303

Props to @jonsurrell for writing the dev note.

Enable Block Renaming support for (almost) all blocks

Building on the foundation introduced in WordPress 6.4all blocks (with some exceptions) can now be given custom names within the Editor.

The data for this continues to be stored under the name property of the block’s metadata attribute (e.g. attributes.metadata.name).

All blocks (including 3rd party blocks) will be “renameable” by default, with the only exceptions being the following blocks:

  • core/block
  • core/template-part
  • core/pattern
  • core/navigation
  • core/navigation-link

To disable the ability to rename a block, set the relevant support property to false in block.json:

// block.json
{
	"supports": {
		"renaming": false // disables ability to rename block via the Editor UI
	},
}

GitHub pull request: #54426

Props to @get_dave for writing the dev note.

Stabilization of the block editor’s RecursionProvider API

Context

Originally implemented as an experimental hook named __experimentalUseNoRecursiveRenders  in early 2021, then improved and repackaged in 2022 as the pair __experimentalRecursionProvider and __experimentalUseHasRecursion, the purpose of these APIs is to prevent certain advanced block types from accidentally triggering infinite rendering loops inside the block editor. For example, the Template block must guard against these loops:

  • If a user adds an instance of the Template block into the contents of that same template (linear recursion);
  • If Template A contains Template B, which then contains Template A (mutual recursion).

As of today, the following core block types use the RecursionProvider API: 

  • core/block
  • core/navigation
  • core/post-content
  • core/template-part.

Changes with WordPress 6.5

The API has been promoted to stable, thereby shedding the __experimental prefix. Consumers should now use the API by importing RecursionProvider and useHasRecursion from @wordpress/block-editor, or via the WP global as wp.blockEditor.RecursionProvider and wp.blockEditor.useHasRecursion.

For more details and a working example, see the component’s README.md document.

BeforeAfter
wp.blockEditor.__experimentalRecursionProviderwp.blockEditorRecursionProvider
wp.blockEditor.__experimentalUseHasRecursionwp.blockEditor.useHasRecursion

Backwards compatibility

The former identifiers — __experimentalRecursionProvider and __experimentalUseHasRecursion — are now deprecated. This means that they are still accessible, but their use will trigger a warning in the browser console.

GitHub pull request: #58120

Props to @mcsf for writing the dev note.

Support for new allowedBlocks field in block.json

WordPress 6.5 adds support for the new allowedBlocks field in the block.json file. It lets block developers specify which block types can be inserted as children of the given block. It’s a companion to the existing parent and ancestor fields that have a similar function, namely specifying allowed parent block types. Example of usage in a block.json file:

{
  "name": "core/list",
  "title": "List",
  "allowedBlocks": [ "core/list-item" ]
}

One of the main advantages of the block.json field is that it can be modified by plugins. For example, you can create a block that acts as a custom list item and extend the Core List block so that your custom block can be inserted as its child:

addFilter( 'blocks.registerBlockType', 'my-list-item', ( settings, name ) => {
  if ( name === 'core/list' ) {
    const { allowedBlocks = [] } = settings;
    return { ...settings, allowedBlocks: [ ...allowedBlocks, 'my/list-item' ] };
  }
  return settings;
} );

This new API replaces the allowedBlocks option that can be passed to the useInnerBlocksProps hook inside the block’s edit function. This option was previously used to implement the same check, but it wasn’t extensibleExtensible This is the ability to add additional functionality to the code. Plugins extend the WordPress core software.: the list of allowed blocks was hardcoded in the block’s edit function and couldn’t be modified.

The allowedBlocks option on the useInnerBlocksProps hook is still supported and is not deprecated, but you should use it only for specialized use cases. Like when the list of allowed blocks is dynamically calculated for each block: from its attributes, or from its surrounding environment (the parent block etc.).

GitHub pull request: #58262

Props to @jsnajdr for writing the dev note.

Introducing the block_core_navigation_listable_blocks 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.

WordPress 6.5 introduces a new filter, block_core_navigation_listable_blocks which is designed to provide control over the accessible rendering of child blocks used within the Navigation block.

Historically, the Navigation block has conditionally wrapped particular blocks in <li> tags to ensure accessible markup on the front of the site.

With the introduction of the new allowedBlocks API, which technically allows any block to be added as valid children of the Navigation block, developers require a means to indicate which blocks need to be wrapped.

The block_core_navigation_listable_blocks filter allows developers to determine whether a specific block should be wrapped in an <li> tagtag A directory in Subversion. WordPress uses tags to store a single snapshot of a version (3.6, 3.6.1, etc.), the common convention of tags in version control systems. (Not to be confused with post tags.), thereby aiding in adherence to accessibilityAccessibility Accessibility (commonly shortened to a11y) refers to the design of products, devices, services, or environments for people with disabilities. The concept of accessible design ensures both “direct access” (i.e. unassisted) and “indirect access” meaning compatibility with a person’s assistive technology (for example, computer screen readers). (https://en.wikipedia.org/wiki/Accessibility) standards and the creation of valid markup.

The example below shows the mycustomblock/icon block opting into being wrapped in an <li> tag:

function add_icon_block_to_navigation_listable_blocks( $blocks ) {
$blocks[] = 'mycustomblock/icon';
return $blocks;
}
add_filter( 'block_core_navigation_listable_blocks', 'add_icon_block_to_navigation_listable_blocks' );

GitHub pull request: #55551

Props to @get_dave for writing the dev note.

Add new selectors to fetch entity revisions

Two new selectors have been introduced to Block Editor’s Core Data API to fetch revisions and single revisions for post types that support revisions, for example, posts and pages, templates, and global styles.

getRevisions( kind, name, recordKey, query ) – fetches a post’s revisions where recordKey is the id of the parent post.

getRevision(kind, name, recordKey, revisionKey, query) – fetches a single post revision, where revisionKey is the id of the individual revision.

The functions use similar arguments to existing core data entity functions, such as getEntityRecords with the addition of recordKey (post parent id) and revisionKey (single revision id).

Example usage:

// Returns a collection of revisions.
// `parentGlobalStylesId` is the id (int) of the parent post.
wp.data.select( 'core' ).getRevisions( 'root', 'globalStyles', parentGlobalStylesId, { per_page: -1 } );
 
// Paginated results.
// `parentId` is the id (int) of the parent post.
wp.data.select( 'core' ).getRevisions( 'postType', 'post', parentId, { per_page: 3, page: 2 } )
 
// Get a single revision object.
// `parentId` is the id (int) of the parent post.
// `revisionId` is the id (int) of the individual revision post.
wp.data.select( 'core' ).getRevision( 'postType', 'post', parentId, revisionId );
 
 
// Get a single revision with only the id, parent and date fields.
// `parentId` is the id (int) of the parent post.
// `revisionId` is the id (int) of the individual revision post.
wp.data.select( 'core' ).getRevision( 'postType', 'post', parentId, revisionId, { _fields: 'id,parent,date' } );

getRevisions and getRevision can also be used via useSelect in ReactReact React is a JavaScript library that makes it easy to reason about, construct, and maintain stateless and stateful user interfaces. https://reactjs.org/. components:

import { useSelect } from '@wordpress/data';
import { store as coreStore } from '@wordpress/core-data';

function MyComponent() {
    const pageRevisions = useSelect(
        ( select ) =>
            select( coreStore ).getRevisions( 'postType', 'page', pageId ),
        [ pageId ]
    );
    // Do something with pageRevisions...
}

In the background, these selectors’ corresponding resolvers call revisions REST API endpoints.

GitHub pull request: #54046

Props to @ramonopoly for writing the dev note.

New useSettings hook for reading block instance settings

When trying to improve the block editor’s performance for WordPress 6.5, one of the identified issues was related to the useSetting hook that is used by block instances to read various settings provided by the environment they are in: parent blocks, the theme, the block editor itself. It turns out that it’s inefficient to read multiple settings with separate useSetting calls:

const allowFixed = useSetting( 'position.fixed' );
const allowSticky = useSetting( 'position.sticky' );

The editor performance is improved when all the settings are read at once using a new hook called useSettings:

const [ allowFixed, allowSticky ] = useSettings( 'position.fixed', 'position.sticky' );

That’s why WordPress 6.5 introduces this new hook. The useSetting (singular) hook is now deprecated (using it will trigger a console warning), because reading even a single setting is very easy with the useSettings (plural) hook:

const [ allowFixed ] = useSettings( 'position.fixed' );

The only change is that the useSettings hook always returns an array, and the array needs to be destructured to read the single value. Supporting two APIs for performing the same task is therefore not justified.

GitHub pull request: #55337

Props to @jsnajdr for writing the dev note.

Introduction of the PluginPostExcerpt Slot Component

This update introduces a new PluginPostExcerpt slot component within the 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/ editor. This enhancementenhancement Enhancements are simple improvements to WordPress, such as the addition of a hook, a new feature, or an improvement to an existing feature. allows for the extension of the Post ExcerptExcerpt An excerpt is the description of the blog post or page that will by default show on the blog archive page, in search results (SERPs), and on social media. With an SEO plugin, the excerpt may also be in that plugin’s metabox. panel, allowing developers to customize this area for their needs.

What’s New?

The component enables the addition of custom content within the Post Excerpt panel. This is particularly useful for plugins looking to add extra functionality or information specific to their use case.

Usage

To utilize this new feature, developers can now insert their custom content into the Post Excerpt panel by creating a component that leverages the slot. This allows for a seamless integration of custom functionalities directly within the editor.

The following example shows adding custom content to the post excerpt panel.

import { PluginPostExcerpt } from '@wordpress/edit-post';
import { __ } from '@wordpress/i18n';

const MyPluginPostExcerpt = () => (
  <PluginPostExcerpt
    className="my-plugin-post-excerpt"
  >
    { __( 'Post excerpt custom content' ) }
  </PluginPostExcerpt>
);

GitHub pull request: #55200

Props to @retrofox for writing the dev note.

Changes to the underlying Composite component implementation

WordPress 6.5 no longer includes the Reakit package, as it does not support React beyond v16. The __unstable* Composite component was built on this library, so it has been internally refactored.

What does this mean for consumers?

The primary API has not changed, and can still be imported with no changes. For typical usage patterns, there should be no differences, and in most cases, no action is required from consumers of the package.

However, composite state props must now be generated by the useCompositeState hook; they can no longer be provided by independent state logic. Composite state arguments have not changed, though, and will continue to work as before.

import {
  __unstableComposite: Composite,
  __unstableCompositeGroup: CompositeGroup,
  __unstableCompositeItem: CompositeItem,
  __unstableUseCompositeState: useCompositeState
} from '@wordpress/components';

const state = useCompositeState({ ... });

// ✅ This will continue to work
...( <Composite { ...state } /> );

// ⛔️ This will no longer work
...( <Composite { ...state } currentId={ ... } /> );

Consumers can continue to either spread the state or pass as a single state prop.

// ✅ Used by spreading the state
...(
  <Composite { ...state }>
    <CompositeGroup { ...state }>
      <CompositeItem { ...state }>
        { ... }
      </CompositeItem>
    </CompositeGroup>
  </Composite>
);

// ✅ Or with a single `state` prop
...(
  <Composite state={ state }>
    <CompositeGroup state={ state }>
      <CompositeItem state={ state }>
        { ... }
      </CompositeItem>
    </CompositeGroup>
  </Composite>
);

Because the shape of the returned composite state has changed, consumers can also now no longer destructure specific state props from useCompositeState.

// ✅ This will continue to work
const state = useCompositeState({ ... });

// ⛔️ This will no longer work
const { groups, items } = useCompositeState({ ... });

What’s next?

We anticipate a new stable Composite component to be released in WordPress 6.6, along with the deprecation of this unstable version.

GitHub pull request: #58620

Props to @andrewhayward for writing the dev note.

Deprecated components

Deprecating isPressed in Button component

The isPressed prop on the Button component implicitly sets aria-pressed, with no way to override it. But sometimes Button is used for roles other than button, such as option and checkbox, where aria-pressed is not appropriate, and workarounds are required to add the correct semantics.

In an effort to move away from custom props that have native HTMLHTML HyperText Markup Language. The semantic scripting language primarily used for outputting content in web browsers. equivalents, and to allow greater flexibility in component usage, aria-pressed is now supported as a first-class prop, taking precedence over isPressed.

GitHub pull request: #54740

Props to @andrewhayward for writing the dev note.

Outer Margins Deprecation

A number of UI components currently ship with styles that give them top and/or bottom margins. This can make it hard to reuse them in arbitrary layouts, where you want different amounts of gap or margin between components. To better suit modern layout needs, we are in the process of deprecating these outer margins

A few releases ago, we deprecated the outer margins on a number of components and introduced transitional props so consumers could opt into these new styles before they become the default:

  • AnglePickerControl__nextHasNoMarginBottom
  • CustomGradientPicker__nextHasNoMargin
  • FontSizePicker__nextHasNoMarginBottom
  • GradientPicker__nextHasNoMargin

In WordPress 6.5, these margin-free styles have become the default. Any use of these props can be safely removed.

GitHub pull request: #58699, #58700, #58701, #58702

Props to @mikachan for writing the dev note.

CustomSelectControl deprecation

CustomSelectControl used to have a hard-coded width, which was inconsistent with our other form components. In WordPress 6.1, we deprecated this unconstrained width, and introduced the transitional __nextUnconstrainedWidth prop so consumers could opt into these new styles before they become the default.

In WordPress 6.5, these unconstrained width styles have become the default. Any use of the __nextUnconstrainedWidth prop can be safely removed.

GitHub pull request: #58974

Props to @mikachan for writing the dev note.

Remove deprecation warnings for __next36pxDefaultSize

A few releases ago, we introduced a __next36pxDefaultSize prop on several components, meant to coordiate the transition to a new default sizing scheme (36px height). Due to some changes in our design direction, we eventually dropped this prop in favor of the __next40pxDefaultSize prop (40px height), making all existing opt-ins to the __next36pxDefaultSize prop act as an opt-in to the 40px one.

After receiving developer feedback about this ahead of WordPress 6.5, we will no longer throw a deprecation warning for usages of the __next36pxDefaultSize prop, informing consumers of this change. Do note, however, that it will trigger the new 40px size rather than the 36px size, despite the prop name.

GitHub pull request: #58703

Props to @mikachan for writing the dev note.

Remove unused buttonBehavior attribute from the Search block

The Search block had a buttonBehavior attribute, which was referenced internally to determine the display variations of the block. However, this attribute was removed because it could not be changed from the user interface, and the default value was always referenced.

With this change, this attribute will no longer be referenced even if it has been added manually.

GitHub pull request: #53467

Props to @wildworks for writing the dev note.

Setting to disable custom content size controls

Similar to the setting that allows disabling layout controls in WP 6.4, this allows only the content and wide size controls for a constrained layout to be disabled from the theme.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, globally or at a per-block level.

To disable the control globally for all blocks, add the following in theme.json under settings.layout:

"allowCustomContentAndWideSize": false

To disable at the block level, add the following in theme.json under settings.blocks:

"core/group": {
"layout": {
"allowCustomContentAndWideSize": false
}
}

Props to @isabel_brison for writing the dev note.


Props to @fabiankaegy and @bph for reviewing the post

#6-5, #dev-notes, #dev-notes-6-5

Summary of Hallway Hangout on overlapping problems in the Site Editor

This is a summary of a Hallway Hangout that was first announced on Make Core. The aim was to have a shared space where we could talk synchronously about overlapping problems facing the site editing experience.

Video Recording:

Notes:

Notes are somewhat provided by some AI tooling but, unfortunately, wasn’t quite on point enough for me to use entirely. If anything is off or missing, please let me know.

The hallway hangout focused on discussing issues and problems users experience with the Site Editor, including changing something across an entire site or just for one 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., pervasive inconsistencies in user interfaces, understanding inherited values and options, and determining what can and cannot be edited. This came out of a public blog post on the topic.

We discussed the need to improve documentation and educate users to help address these overlapping problems. We chatted about the what’s underneath the desire to not ship any new features and that some of these areas of problems require new features to be fixed. We discussed how some 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/ features are released in stages across various releases ultimately paving the way for greater work to be done, like Block HooksHooks In WordPress theme and development, hooks are functions that can be applied to an action or a Filter in WordPress. Actions are functions performed when a certain event occurs in WordPress. Filters allow you to modify certain functions. Arguments used to hook both filters and actions look the same. released in 6.4 and expanded upon for 6.5. Another example that was mentioned was content-only locking, which was added into a release without a UIUI User interface as it was a foundational part of a larger roadmap (overriding content in patterns needed this work for example). Part of what needs to be done here to is to better communicating how new features connect to and build upon each other. In many cases, polishing these experiences and reducing confusion has been a major focus of many of the last releases.

We discussed how it feels like we’re caught in between right now and there are different UI experiences floating around between the 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., site editor, and then page builders building on top. In a perfect world, the page builders use what’s being built in coreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress. and the experience of using blocks feels more natural, whether just in the block editor or in the site editor (instead of those feeling like different experiences). It’s also tricky to come up with solutions that don’t just surface the complexity without providing clarity too. It’s both the most rewarding and most difficult to cover the wide range of use cases WordPress seeks to cover.

We chatted about using the experimental flag in Gutenberg 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 to allow incremental exploration before features are merged to core for some features. Tensions exist between accumulating features quickly in Gutenberg vs bottleneck of merging to core releases. Folks want to see more efforts made to document feature decisions and UI changes at the same level as core tickets, with complete descriptions. Getting feedback into UI decisions as much as possible will help with this too as we should make changes based on feedback and design direction combined. It would be great if more hosts ran the Gutenberg plugin directly and gave feedback to help with this. At this point, the #outreach channel was plugged as was the new outreach group in GitHubGitHub GitHub is a website that offers online implementation of git repositories that can easily be shared, copied and modified by other developers. Public repositories are free to host, private repositories require a paid subscription. GitHub introduced the concept of the ‘pull request’ where code changes done in branches by contributors can be reviewed and discussed before being merged be the repository owner. https://github.com/ to pingPing The act of sending a very small amount of data to an end point. Ping is used in computer science to illicit a response from a target server to test it’s connection. Ping is also a term used by Slack users to @ someone or send them a direct message (DM). Users might say something along the lines of “Ping me when the meeting starts.” folks who have opted in to provide feedback.

We discussed differentiating user capabilities for blocks and experiences based on user roles and the context of what they are trying to do on a site. More work needs to be done to explore and improve user capabilities. It was suggested that having more Core team members build real sites could help surface important issues and help prioritize work. Right now, we do see this happening with the Create Block Theme allowing folks to build block themes directly with the Site Editor and surface gaps. The same is true of each time a default theme is made and the gaps that are surfaced and fixed as a result. As much as possible, building real sites or working with folks who do has always been and remains critical.

Feedback from folks in the agency space centered around how agencies can’t ensure brand standards due to inability to lock down with GitGit Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency. Git is easy to learn and has a tiny footprint with lightning fast performance. Most modern plugin and theme development is being done with this version control system. https://git-scm.com/. when content can change in the editor. It’s important to find ways to reassure clients that brand standards can still be ensured with new workflows. The same problem exists on the broader 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/ site so there are big opportunities for learnings and feedback. In some cases, folks tried the Site Editor last year and need to be invited back in with the latest & greatest to try once more with additional plugins to fill the gaps for now. In other cases, folks are successfully using it. Opened this developer blog idea after the fact to have agencies start sharing how they’ve successfully used the Site Editor process wise.

A new “overlapping problem” that @annezazu will add to the post is around the swirling experience of gradual adoption, extension, and curating of the editing experience. How do we make it as seamless as possible and have it make sense to folks? Expect the post to be updated with more thoughts there.

Towards the end, we also discussed issues everyday users face with site editing, the need for better onboarding, and a call to join more WordPress meetupMeetup All local/regional gatherings that are officially a part of the WordPress world but are not WordCamps are organized through https://www.meetup.com/. A meetup is typically a chance for local WordPress users to get together and share new ideas and seek help from one another. Searching for ‘WordPress’ on meetup.com will help you find options in your area. events. The “usual suspects” came up particularly around editing the homepage, the pain of the template hierarchy being exposed, missing settings in the Site Editor, etc. We also discussed an unfortunate experience someone had in giving feedback but feeling very dismissed. This is not something any of us want anyone to feel and it’s important we engage constructively. We also discussed how the majority still use classic themes and the importance of respecting both in discussions.

To close, we talked about how these are the toughest problems to solve! They are not easy by design and there’s a lot of appreciation for everyone who is willing to engage in these topics. We’re very much listening and I wouldn’t have been able to write the post to begin with if we weren’t. The biggest next step is to hold an additional hallway hangout in the future around one of these areas with a large design presence to help present solutions, discuss potential drawbacks, and see how we can move forward.

#gutenberg, #hallway-hangout, #outreach, #site-editor

Agenda, Dev Chat, Wednesday February 28, 2024

The next WordPress Developers Chat will take place on  Wednesday February 28, 2024 at 20:00 UTC in the core channel on Make WordPress Slack.

The live meeting will focus on the discussion of proposals and releases, updates on 6.5, and have an open floor section.

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

Announcements

WordPress 6.5 Beta 3 was released on February 27, 2024. Thanks to everyone involved and who came to help test.

Forthcoming releases

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.5

Updates from the release squad can be shared in the Dev Chat.

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/ release: 17.8

Gutenberg 17.8 is scheduled for released today and will include the these issues.

Discussions

This week the discussion will focus on any final priority topics that need to be raised prior to 6.5 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.

Proposed topics

Feel free to suggest additional topics related to this release in the comments.

Highlighted posts

CoreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress.-editor Updates

Props to @annezazu for collating and sharing this list.

Tickets for assistance

Tickets for 6.5 will be prioritized.
Please include detail of tickets / PR and the links into comments, and if you intend to be available during the meeting if there are any questions or will be async.

Open floor

Items for this can be shared in the comments.

#6-5, #agenda, #dev-chat