The WordPress coreCoreCore is the set of software required to run WordPress. The Core Development Team builds WordPress. development team builds WordPress! Follow this site for general updates, status reports, and the occasional code debate. There’s lots of ways to contribute:
Found a bugbugA 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.?Create a ticket in the bug tracker.
Determining whether a translationtranslationThe process (or result) of changing text, words, and display formatting to support another language. Also see localization, internationalization. exists
Sometimes it can be useful to know whether a translation already exists for in memory without having to first load the translation for the given text domain. The new has_translation() function allows for exactly that.
Sending emails in the adminadmin(and super admin)’s localeLocaleA locale is a combination of language and regional dialect. Usually locales correspond to countries, as is the case with Portuguese (Portugal) and Portuguese (Brazil). Other examples of locales include Canadian English and U.S. English.
Back in version 4.7, WordPress added the ability for users to set their preferred locale. When sending emails to a user, they are always sent in that locale, and everyone else receives the email in the site’s locale.
Now, WordPress 6.7 is going a step further: every time an email is sent to the administrator email address (admin_email), WordPress checks if a user with the same email address exists. If so, the email is sent in that user’s locale.
WordPress now warns developers if they are loading translations too early in a pluginPluginA 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 or theme, before the current user is known. Existing functions like load_plugin_textdomain() and load_theme_textdomain() were updated to defer the actual loading to the existing just-in-time translation logic in coreCoreCore is the set of software required to run WordPress. The Core Development Team builds WordPress.. This reduces the likelihood of triggering the warning, and even improves performance in some situations by avoiding loading translations if they are not needed on a given page.
Reminder: if your plugin or theme is hosted on WordPress.orgWordPress.orgThe 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/ and is still using load_*_textdomain(), you can remove this call. Since WordPress 4.6, plugins and themes no longer need load_plugin_textdomain() or load_theme_textdomain(). WordPress automatically loads the translations for you when needed. If you still support older WordPress versions or do not host your plugin/theme on WordPress.org, move the function call to a later hook such as init.
When attempting to load translations before after_setup_theme or init, WordPress tries to load the current user earlier than usual, without giving other plugins a chance to potentially hook into the process. It also prevents any plugins from filtering translation calls, e.g. for switching the locale or file location. Hence the addition of this warning to call out this unexpected behavior.
Your plugin might be _doing_it_wrong() if you for example directly call get_plugin_data() (which attempts to load translations by default) or __() without waiting for the init hook. Here is a common example that was found in an actual plugin that was fixed:
If you do not explicitly set $translate set to false when calling get_plugin_data(), the function translates the plugin metadata by default. Since this plugin just needs the version number, there is no need for translating any of the other fields.
Another example:
/**
* Plugin Name: Awesome Plugin
*/
class My_Awesome_Plugin {
public $name;
public function __construct() {
// This triggers just-in-time translation loading
$this->name = __( 'My Awesome Plugin', 'my-awesome-plugin' );
// ... do something
}
}
// This immediately instantiates the class, way before `init`.
$myplugin = new My_Awesome_Plugin();
Here, a class is immediately instantiated in the main plugin file, and code within the class constructor uses a translation function. This can be avoided by deferring the class instantiation until after init, or deferring the translation call until later when it is actually needed.
If your plugin is affected by this warning, you can use code like follows to find out the code path that triggers it:
add_action(
'doing_it_wrong_run',
static function ( $function_name ) {
if ( '_load_textdomain_just_in_time' === $function_name ) {
debug_print_backtrace();
}
}
);
Developer tools such as Query Monitor are also helpful in situations like this.
As a follow-up to the release calendar proposal for 2025, let’s gather interest in being part of the release squad for the next major releasemajor releaseA 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., WordPress 6.8.
Proposed WordPress 6.8 tentative schedule
Based on that calendar proposal for next year, the WordPress 6.8 tentative schedule is as follows:
Milestone
Date
Alpha (trunktrunkA directory in Subversion containing the latest development code in preparation for the next major release cycle. If you are running "trunk", then you are on the latest revision. open for 6.8 release)
October 22, 2024
BetaBetaA 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. 1
March 4 2025
Beta 2
March 11, 2025
Beta 3
March 18, 2025
Release Candidaterelease candidateOne 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
March 25, 2025
Release Candidate 2
April 1, 2025
Release Candidate 3
April 8, 2025
Dry Run
April 14, 2025
WordPress 6.8 General Release
April 15, 2025
According to the schedule above and the GutenbergGutenbergThe 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 cadence, WordPress 6.8 would include up to Gutenberg 20.4 for a maximum of 11 releases, depending on the end-of-year Gutenberg release adjustments (according to an unaltered schedule, Gutenberg 20.0 RCrelease candidateOne 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). and stable would land on December 25th and January 1st, respectively).
Release Leads call for volunteers
Following the release squad structure from the last release, except for the default theme role, as WordPress 6.8 won’t deliver a new default theme, these are the minimum roles that need filling:
Release Coordinator(s)
CoreCoreCore is the set of software required to run WordPress. The Core Development Team builds WordPress. Tech Lead(s)
Editor Tech Lead(s)
Core TriagetriageThe act of evaluating and sorting bug reports, in order to decide priority, severity, and other factors. Lead(s)
All release decisions will ultimately be this release team’s to make and communicate, while gathering input from the community, including finalizing the release schedule.
If you are interested in participating in WordPress 6.8’s release squad as a lead, please show interest in the comments below, clearly specifying your desired role, by December 6th.
“What’s new in GutenbergGutenbergThe 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/…” posts (labeled with the #gutenberg-new tag) are posted following every Gutenberg release on a biweekly basis, showcasing new features included in each release. As a reminder, here’s an overview of different ways to keep up with Gutenberg and the Editor.
Global Styles available on the main site editor sidebarSidebarA 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.
The site editor sidebar is getting increasingly powerful, serving as the entry point to manage all-things your site. Up until this version, the styles panel offered limited style settings, focusing on style variations, color palettes, and typographies. Gutenberg 19.7 changes this by introducing a full-fledged Global Styles panel in its place, giving users site-wide granular control on styles at the top level.
Swifter hiding & showing the template
Switching between editing your site templates and content pages should be as smooth and seamless as possible; sometimes, you need to focus on the post content and hide the rest of the template. This was previously possible in the post settings, but now it is much easier thanks to the `Show template` toggle directly on the preview dropdown in the top toolbar.
Set image blocks as featured imageFeatured imageA featured image is the main image used on your blog archive page and is pulled when the post or page is shared on social media. The image can be used to display in widget areas on your site or in a summary list of posts.
Featured images offer a nice touch in external previews, making them more attractive to potential readers. However, it can be easy to forget to set one! To help set featured images more easily, image blocks now offer a dropdown action to directly set them as the featured image of the post or page containing the blockBlockBlock 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..
With WordPress 6.7 out the door, it’s time to plan for next year’s releases. The following dates try to account for flagship events and major international holidays:
6.8 – BetaBetaA 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. 1 on March 4, stable release on April 15 (Beta 1 ten days after WC Asia)
6.9 – Beta 1 on June 24, stable release on August 5 (WCEU in early June)
7.0 – Beta 1 on September 30, stable release on November 11 (no flagship events nearby)
The release cadence is similar to past years, with a longer initial release cycle, including the end-of-year festivities and ~4-month ones. Please leave your feedback below or through a SlackSlackSlack is a Collaborative Group Chat Platform https://slack.com/. The WordPress community has its own Slack Channel at https://make.wordpress.org/chat/. DM by November 29.
Although the 6.8 dates aren’t final yet, they are close to final enough to let contributors know their availability around that time. If you want to participate in the WordPress 6.8 release, stay tuned for an upcoming post with the call for volunteers.
Props to @jeffpaul for reviewing the proposed dates and this post.
Twenty Twenty-Five embodies ultimate flexibility and adaptability, showcasing the many ways WordPress enables people to tell their stories with many patterns and styles to choose from. The glimpses of natural beauty and ancestry woven into the theme evoke ideas of impermanence, the passage of time, and continuous evolution.
The demo content imagery, all from the Public Domain, carries a poetic, universal, and ubiquitous tone that complements the coreCoreCore is the set of software required to run WordPress. The Core Development Team builds WordPress. concept. There was an opportunity to visually lean into a positive tone to bring softness, lightness, and inspiration through its aesthetic.
Patterns
Structurally, Twenty Twenty-Five offers a robust set of patterns, promoting interoperability and enabling users to compose intentional pages quickly. A broad range of patterns was designed for categories such as services, about, landing pages, products, calls to actions, events, and others.
Styles
Given the theme’s global use, high-quality and comprehensive fonts that support multiple languages have been considered from the first conceptual steps of the design. Furthermore, we’re refining a set of diverse color palettes to be bundled within the theme as style variations.
Templates
Twenty Twenty-Five also features a versatile set of blogblog(versus network, site)templates: text-centric blogs with sidebars, photo blogs that highlight featured images, and more complex blogs with diverse content. Twenty Twenty-Five will be fully compatible with the Site Editor and will use many of the new design tools like the Grid blockBlockBlock 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. and Pattern/Section Styles.
Personal Blog (Default)
In keeping with the idea of simplicity, the personal blog tendency is to lean on a default template that just works, whether you want to write a post with a title and featured imageFeatured imageA featured image is the main image used on your blog archive page and is pulled when the post or page is shared on social media. The image can be used to display in widget areas on your site or in a summary list of posts. or not, and showing all the post’s content out-of-the-box, instead of just excerpts.
Photo Blog (Alternative)
The alternative “photo blog” templates tailored primarily for photography or portfolios lean on an image-heavy approach, with interesting layouts that can be used for a variety of purposes.
Complex Blog (Alternative)
Lastly, the set of complex blog alternative templates would be more suitable for websites with greater complexity in content. Some of these templates, with more variety in type scales and more opinionated designs can also appeal to different audiences.
Development
As part of the 6.7 release, Carolina Nymark (@poena) and Juanfra Aldasoro (@juanfra) are leading development while Beatriz Fialho (@beafialho) is leading design. If you’re interested in contributing, make sure you’re following this blog; we look forward to your involvement and support throughout the process.
The Figma file is the design source of truth. Comments in the main file are open, and anyone should feel free to duplicate the Figma to their drafts and remix. Both of these actions are free, whereas every edit access is paid and therefore reserved.
Theme development will happen on the Twenty Twenty-Five GitHub repository. You can contribute by submitting and reviewing pull requests or opening new issues and, as usual, once the theme is stable, it will be merged into Core and the GitHubGitHubGitHub 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/ repository will be archived.
Starting on Wednesday August 21st at 3:00 PM UTC , there will be weekly Slack meetings in #core-themes to coordinate development of the theme. Agenda notes will be posted before meetings and summaries posted after the meeting.
Learn more
For information about previous default themes, read the following posts:
Since the introduction of blockBlockBlock 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, theme authors have been able to create custom block templates. However, this possibility was limited to themes, leaving plugins without a straightforward way to register their own templates. To achieve similar functionality, plugins had to resort to complex methods, including hooking into multiple PHPPHPThe web scripting language in which WordPress is primarily architected. WordPress requires PHP 7.4 or higher filters, manually creating WP_Block_Template objects, and replicating internal WordPress logic.
WordPress 6.7 introduces a new APIAPIAn 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. that will significantly simplify the process for plugins to register their own block templates. To enable this, two new functions have been introduced: register_block_template() for registering a block template and unregister_block_template() for unregistering it.
register_block_template( string $template_name, $args = array() ) accepts two parameters, that define how the template is registered:
$template_name: The name of the template in the form of plugin_uri//template_name (note that this requires a double //).
$args: An array of arguments for defining the template:
title: An internationalized title for the template.
description: An internationalized description of the template.
content: The default content (block markup) for the template when rendered in the editor or on the front end.
post_types: An array of post type slugs to make available to users as per-post custom templates.
For example, a pluginPluginA 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 can register a template with the following snippet:
Plugins can also override templates from the WordPress template hierarchy, such as the archive page of a custom post typeCustom Post TypeWordPress 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. or a specific author page.
Theme templates take priority over plugin-registered templates, allowing themes to override specific plugin templates just as they can with WordPress templates.
Currently, this API is limited to block templates and does not allow the registration of block template parts.
You can read more about this new feature in the following links:
Props to @aljullu for writing this dev notedev noteEach 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.. And thanks to @fabiankaegy for reviewing
Over the last year, Phase 3 of the GutenbergGutenbergThe 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/ roadmap has begun to take form and with it comes a need for an update around what’s been done, how to follow along, and what to expect going forward. This post seeks to provide answers at a high level view of these questions. As a reminder Phase 3 is centered around fostering seamless collaboration, tying together the user experience, and streamlining the content management flows to improve the way creators and teams work together within WordPress. As work progresses, feedback is needed and welcomed to ensure broader adoption.
Real-time collaboration
Over the last few months, Kevin Jahns, the author of Yjs, a popular framework for building collaborative applications has been sponsored by Automattic to work on real-time collaboration, after an initial experiment landed. He kicked off his efforts with some research and dialogue in this discussion issue. More recently, he’s pulled together some prototypes ahead of sharing a full proposal for how to proceed. Right now, consider this work as being in a strong experimental stage without a final approach. The next step is to get the initial approach into a PR for folks to give feedback on and discuss openly.
Below is a demo showing syncing content only relying on HTTPHTTPHTTP is an acronym for Hyper Text Transfer Protocol. HTTP is the underlying protocol used by the World Wide Web and this protocol defines how messages are formatted and transmitted, and what actions Web servers and browsers should take in response to various commands. APIs with the autosave interval set to 3 seconds. Because it relies on HTTP APIs, this demo would work on all WordPress instances:
Going a step further, you can see more demos in a recent update including adding y-webrtc into the experience to show how real time collaboration would work for users who can establish a peer-to-peer WebRTC connection.
An initial experiment for block-level inline comments landed with Gutenberg 19.6, breaking ground on the first of many async collaboration upgrades. At this point, another iteration on this initial feature is already planned and underway to refine the current experience further. If you’d like to help test and shape the feature further, stay tuned for a dedicated call for testing or start testing today with this WordPress Playground instance and open issues in the Gutenberg GitHubGitHubGitHub 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/ repository. The aim is to get early feedback and quickly iterate in order to land this new feature in an upcoming major WordPress release. Below is a look at the near term design slated to be shipped next with visuals for adding a comment, leaving a comment, toggling to see resolved comments, and the resulting view when looking at resolved comments:
As a next step of the initial development of DataViews, the more recent DataForm API was later introduced in Gutenberg 18.8 with the aim to reduce expected duplication to create forms in Data Views. Work has continued progressively from there with DataViews and DataForm components influencing each other’s development. You can view each in their respective Storybook views: DataViews and DataForm.
Both of these components have been created with extensibility at the heart of everything being built! For now, pluginPluginA 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 agency developers can already start using the DataViews component for their WordPress customizations with two different Developer Blogblog(versus network, site) tutorials to get you started: Using Data Views to display and interact with data in plugins and Actions from Data Views: Adding images to the Media Library. If you want to go on a deeper dive, watch a recent hallway hangout that goes through both of these components with folks actively working on them. Expect a continual focus on extensibility as these components evolve. Below is a look at how DataViews comes together with the DataForm work with an easy option to quick edit within one’s pages:
Since WordPress 6.7 was released last week, contributors have kept a close eye on incoming reports to the WordPress.orgWordPress.orgThe 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/ Support Forums, TracTracAn open source project by Edgewall Software that serves as a bug tracker and project management tool for WordPress., and the GutenbergGutenbergThe 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/ repository on GitHubGitHubGitHub 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/. Though volume has not been meaningfully higher than normal after a major releasemajor releaseA 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., most reports are describing a small set of issues that should be addressed expeditiously.
Schedule
WordPress 6.7.1 will be targeted for release on Thursday, November 21, 2024 with a very specific focus of only fixing bugs there were introduced in the 6.7 release. The goal is to deliver a small handful of high-impact bugbugA 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 for added stability prior to the busy online commerce holiday week consisting of Black Friday, Cyber Monday, and Giving Tuesday.
Continued triagetriageThe act of evaluating and sorting bug reports, in order to decide priority, severity, and other factors., testing, and committing/backporting fixes.
Wednesday, November 20, 2024 at 13:00PM UTC
Gutenberg package updates released/pluginPluginA plugin is a piece of software containing a group of functions that can be added to a WordPress website. They can extend functionality or add new features to your WordPress websites. WordPress plugins are written in the PHP programming language and integrate seamlessly with WordPress. These can be free in the WordPress.org Plugin Directory https://wordpress.org/plugins/ or can be cost-based plugin from a third-party update released (if necessary).
Wednesday, November 20, 2024 at 17:00PM UTC
WordPress 6.7.1 RC1
Thursday, November 21, 2024 at 13:30PM UTC
WordPress 6.7.1 General Release
Targeted Fixes
The following are the high priority items that cumulatively make a fast-follow release necessary:
sizes=auto causing images to show smaller than they should (#62413)
Patterns without categories break the editor when browsing uncategorized patterns (GB-66944/GB-66888)
Zoom in doesn’t focus on the right area of the screen based on selected item (a few PRs issues for this)
Zoom out button goes missing when plugins register toolbar items (GB-66884)
The following are bugs that should be included if ready, but as understood now are not affecting as many people or are less problematic:
Using the Upload button in image-based blocks in Safari unexpectedly converts images to HEIC with a temporary file name (#62447)
CategoryCategoryThe 'category' taxonomy lets you group posts / content together that share a common bond. Categories are pre-defined and broad ranging. management in the Classic Editor is broken (#62440)
CSSCSSCascading Style Sheets. targets changed on the login screen affecting custom logos (#62410)
Finally, the following are minor bug fixes introduced in 6.7 that should also be considered:
Horizontal scroll bar in the CustomizerCustomizerTool 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. (#62313)
There is currently only one ticketticketCreated for both bug reports and feature development on the bug tracker. that does not represent a bug introduced during 6.7 being considered: #62331. This is a pretty significant performance problem for sites using GD for image editing that should be considered. It was only discovered 2 weeks ago, too late to be considered for 6.7.
Notice: This week the Dev Chat time will be changing back to 20:00 UTC.
The next WordPress Developers Chat will take place on Wednesday at 20:00 UTC in the core channel on Make WordPress Slack. Please note that this has changed to the original time which is later than the previous Dev Chats during the 6.7 release.
The live meeting will focus on the discussion for upcoming releases, and have an open floor section.
Additional items will be referred to in the various curated agenda sections below. If you have ticketticketCreated for both bug reports and feature development on the bug tracker. requests for help, please continue to post details in the comments section at the end of this agenda.
Announcements
WordPress 6.7 “Rollins” was released on November 12, 2024. Thank you and congratulations to everyone who participated in this release!
Forthcoming releases
Next major releasemajor releaseA release, identified by the first two numbers (3.6), which is the focus of a full release cycle and feature development. WordPress uses decimaling count for major release versions, so 2.8, 2.9, 3.0, and 3.1 are sequential and comparable in scope.: 6.8
We are currently in the WordPress 6.8 release cycle.
Next maintenance release: 6.7.1
We are discussing releasing 6.7.1 for this week, with @desrosj offering to lead the release.
Next GutenbergGutenbergThe 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: 19.7
The next Gutenberg release will be 19.7, scheduled for November 20. It will include the following issues.
Discussions
The discussion section of the agenda is to provide a place to discuss important topics affecting the upcoming release or larger initiatives that impact the CoreCoreCore is the set of software required to run WordPress. The Core Development Team builds WordPress. Team.
This week, we can discuss the 6.7.1 maintenance release, including which issues should be included (trac milestone, Editor board) and who is available to help as part of the release squad. It’s worth noting that GB 19.6.3 was released on Nov 18, which may or may not mitigate #62413 (see thread)
If you want to nominate a topic for discussion, please leave a comment on this agenda with a summary of the topic, any relevant links that will help people get context for the discussion, and what kind of feedback you are looking for from others participating in the discussion.
Block Themes and site editor: Refactoring templates: new overview issue that seeks to “adapt our mental model regarding these theme-provided entities” to solve some long standing problems, like mix and matching templates from different sources.
You can keep up to date with the major Editor features that are currently in progress by viewing these Iteration issues.
Open floor
Any topic can be raised for discussion in the comments, as well as requests for assistance on tickets. Tickets in the milestone for the next major or maintenance release will be prioritized.
Please include details of tickets / PRs and the links in the comments, and if you intend to be available during the meeting for discussion or if you will be async.
WordPress 6.7 introduces various improvements to the BlockBlockBlock 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. Bindings APIAPIAn API or Application Programming Interface is a software intermediary that allows programs to interact with each other and share data in limited, clearly defined ways. and the built-in post metaMetaMeta 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. source, including a default UIUIUser interface and the beginnings of a public editor API.
For an introduction to Block Bindings, first introduced in WordPress 6.5, see the prior dev note.
New Block Bindings UI
Compatible blocks — which currently include Heading, Paragraph, Image, and Button — have received a new default UI for viewing bindings.
Called Attributes, you can find the new tool panel in block settings whenever a compatible block is selected in either the post or site editor.
The panel shows active bindings on the current block. If there are any post meta available, the panel is also interactive, allowing you to bind attributes to those custom fields via the built-in post meta block bindings source.
Currently, there are two limitations to the panel:
It will not allow users to bind attributes to custom sources just yet.
Bindings to custom sources, which can be added via the code editor or other programmatic means, will still display in the panel — they just can’t be connected via the UI for the moment in WordPress 6.7.
A flexible API for connecting custom sources to the Attributes panel is currently under development and is planned for public release in the future.
For now, the rollout of that API has started with the built-in post meta source to allow time for gathering feedback.
For each attribute, the panel will only show custom fields that match its data type. For example, an attribute of type string or rich-text can only be connected to a custom fieldCustom FieldCustom Field, also referred to as post meta, is a feature in WordPress. It allows users to add additional information when writing a post, eg contributors’ names, auth. WordPress stores this information as metadata. Users can display this meta data by using template tags in their WordPress themes. of type string, and an attribute of number can only be connected to another number.
New Post Meta Label Attribute
To improve how custom fields appear in the editor UI, a new label attribute has been created for post meta, which can be defined during registration:
If specified, the label will render in place of the meta key in the Attributes panel — in this example, the label would replace movie_director. The label will also render under certain circumstances in other parts of the editor, including as a placeholder for Rich Text if a block is bound to the post meta source and a default value is undefined.
Usage In Custom Post Templates
One of the primary use cases for Block Bindings is to assist in creating templates for custom post types. Given a custom post typeCustom Post TypeWordPress 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. called movie, for example, one can define how custom fields for that post type will render, such as via connected images, headings, paragraphs, and buttons.
Here is an example of how one could use connected blocks to create a layout:
One can override the content in connected blocks for each instance of the custom post type, a much simpler and more flexible way of creating layouts than in the past — all without needing to create custom blocks.
Default Permissions
Accompanying this UI is a new canUpdateBlockBindings editor setting, used to determine whether the UI is interactive for users or not.
By default, this editor setting is set to a new edit_block_binding capability, which maps to a user’s ability to either:
Edit the post type (in the post editor), or
Edit the theme options (in the site editor)
This means that the setting is by default set to true for administrators, and false for other users.
This default setting can be overridden using the block_editor_settings_allfilterFilterFilters 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. and modifying $editor_settings['canUpdateBlockBindings'] as follows:
Several functions have been exposed to enable the use of block bindings in the editor.
Registration API
Source Bootstrapping
As part of the new editor API, Block Bindings will automatically register custom sources defined on the server with bootstrapped values in the editor. This will allow existing sources registered using just the server APIs to render in the UI.
This means that any sources already registered using the server APIs, available since 6.5, will appear in the UI, at least minimally, without any action required.
For example, given the following server registration and block markup…
…the source will get registered in the editor with the source’s name my-plugin/post-attributes, label, and uses_context values. This is enough for the UI to render as follows:
In this case, however, the bound paragraph in the block canvas will simply show the source label and will not be dynamic. Further customization of the editor experience requires using the new editor registration functions, detailed in the next section.
Editor Registration
The following functions have been exposed to allow customization of the editor experience:
registerBlockBindingsSource: Registers a source on the client (using this function will override the bootstrapped registration).
unregisterBlockBindingsSource: Unregisters an existing source.
getBlockBindingsSource: Gets a specific registered source and its properties.
getBlockBindingsSources: Gets all the registered sources in the client.
These are based on other registration APIs like block types, block variations, or block collections.
Source Properties
Registered sources in the client can include the following properties:
name: The unique and machine-readable name.
label: Human-readable label. Will overwrite preexisting label if it has already been registered on the server.
usesContext: Array of context needed by the source only in the editor. Will be merged with existing uses_context if it has already been registered on the server.
getValues: Function to get the values from the source. It receives select, clientId, context, and the block bindings created for that specific source. It must return an object with attribute: value. Similar to getBlockAttributes.
setValues: Function to update multiple values connected to the source. It receives select, clientId, dispatch, context, and the block bindings created for that specific source, including the new value. Similar to updateBlockAttributes.
canUserEditValue: Function to let the editor know if the block attribute connected should be editable or not. It receives select, context, and the source arguments.
Example Usages
Register a Block Bindings Source
Building on the example server registration, use the following JavaScriptJavaScriptJavaScript or JS is an object-oriented computer programming language commonly used to create interactive effects within web browsers. WordPress makes extensive use of JS for a better user experience. While PHP is executed on the server, JS executes within a user’s browser. https://www.javascript.com/. to register in the editor by enqueuing on the enqueue_block_editor_assets hook:
Note: If desired, sources may be registered only on the client and not on the server at all. This could be useful for creating forms in the adminadmin(and super admin), or otherwise using bindings to interact with other parts of WordPress, or other dynamic data.
Block Bindings Utils
The useBlockBindingsUtils hook returns helper functions to modify the metadata.bindings attribute. The hook accepts an optional clientId argument. If the clientId is not specified, the helper functions will execute in the current block edit context.
Right now, the helpers include:
updateBlockBindings: This works similarly to updateBlockAttributes. It can be used to create, update, or remove specific connections.
removeAllBlockBindings: This is used to remove all existing connections in a block.
Example usage
import { useBlockBindingsUtils } from '@wordpress/block-editor';
const { updateBlockBindings, removeAllBlockBindings } = useBlockBindingsUtils();
// Updates bindings for url and alt attributes.
updateBlockBindings( {
url: {
source: 'core/post-meta',
args: {
key: 'url_custom_field',
},
},
alt: {
source: 'core/post-meta',
args: {
key: 'alt_custom_field',
},
},
} );
// Removes all bindings set for the block.
removeAllBlockBindings();
Used internally by the default UI for the post meta source and pattern overrides, these utils can be useful in building custom UI for other sources.
A block_bindings_source_value filter has been introduced to allow for overriding of the value returned by a source in a bound block. It takes the following arguments:
value: Value returned by the source.
name: Name of the source.
source_args: Arguments passed to the source.
block_instance: The bound block.
attribute_name: The connected attribute in the bound block.
The developers behind Block Bindings are always happy to hear feedback. Please feel free to share bugs, feature requests, or other thoughts by creating issues on GithubGitHubGitHub 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/ or leaving a comment on this post.
Anyone can also follow and comment on Block Bindings development via the latest iteration, which is posted in the Block Bindings tracking issue at the beginning of each release cycle. Be sure to subscribe to the tracking issue for updates!
Lastly, if you’d like to help shape the roadmap for Block Bindings by sharing your use cases, feel free to post in Block Bindings discussions.
You must be logged in to post a comment.