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.
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 RC 2 was released on October 29. Thank you to everyone who contributed to this release and attended the release party! There is a helpful guide here on how to help test 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.7
We are currently in the WordPress 6.7 release cycle. WordPress 6.7 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). 3 is scheduled for Tuesday, November 5. For specific release times, review the release party schedule post.
Next maintenance release
There are no maintenance releases planned at this time.
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.6
The next Gutenberg release will be 19.6, scheduled for November 6.
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.
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.
A reminder that there are a number of issues remaining on the 6.7 Editor project board that could use help.
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.
“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-newtagtagA 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.)) 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.
This release focuses on stabilizing existing features but also brings some improvements to the general UIUIUser interface and the zooming editing experience, with 116 PRs from 47 contributors.
Gutenberg 19.5 most notable enhancements circle around the zooming out -and in!- experience.
For instance, the Edit button from the zoom-out toolbar has been replaced to favor more friendly interactions and reduce visual overload. Apart from the top toolbar toggle for this mode and the ability to double-click to zoom back, which were introduced in recent releases, a new Enter keyboard interaction brings you back in as well.
With all these easy ways to exit the zoomed-out view, the editor will now zoom out when showing the pattern inserter, a use case where showing a general view of your page/site matters more than focusing on individual blocks.
Moreover, this release brings many 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 to make this feature as stable and solid as possible for the upcoming WordPress 6.7. And the zooming transition is now smoother, too!
Other notable changes
The editor modes writing and editing, as introduced in Gutenberg 19.4, can now be set as a user preference so that the selected mode persists even after exiting the editor or reloading the page.
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 can now be used on the widgets screen, too. Check out the original pull request to learn more, or keep tuned to the Developer Blogblog(versus network, site) for more comprehensive examples!
Try zooming out when selecting the patterns tab in the inserter. (65785)
Update/replace edit button with enter on selection. (65760)
Global Styles
Improve navigation logic for revisionsRevisionsThe 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. screen. (65946)
Block bindings
Register bindings sources in widgets screens. (65937)
Position scaled htmlHTMLHyperText Markup Language. The semantic scripting language primarily used for outputting content in web browsers. within available container space. (66034)
Restores setting zoom out mode to useZoomOut hook. (65999)
Use consistent canvas frame spacing on device preview and zoom out. (66018)
Code block: Set LTR direction for RTL languages. (65891)
Fix duotone on parallax/repeated 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. cover blocks. (65929)
Fix: Embed Block: Match HTML in the editor and frontend. (65478)
Hide grid visualizer when grid is template locked or block editing mode is not default. (66065)
Post Content Block: Fix conflictconflictA 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. between clearFix and focus ring in the editor. (65364)
Post Content: Fix display of block support styles. (66003)
Post Terms: Fix fatal error when ‘get_the_term_list’ returns ‘WP_Error’. (65848)
Query LoopLoopThe Loop is PHP code used by WordPress to display posts. Using The Loop, WordPress processes each post to be displayed on the current page, and formats it according to how it matches specified criteria within The Loop tags. Any HTML or PHP code in the Loop will be processed on each post. https://codex.wordpress.org/The_Loop.: Fix isControlAllowed and isTemplate combined logic. (65984)
Global Styles: Fix overflow caused by RangeControl tooltip. (65875)
ToggleGroupControl: Don’t set value on focus after a reset. (66151)
Fix: Add missing post.slug dependency to useMemo. (66125)
Interactivity 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.
Correctly handle lazily added, deeply nested properties with deepMerge(). (65465)
Improvements to the experimental full-page navigation. (64067)
Site Editor
Fix site editor back button visual regressions. (66166)
Zoom Out: When double clicking a template while zoomed out , reset zoom level instead of showing dialog. (65963)
CSSCSSCascading Style Sheets. & Styling
Editor: Prevent wrapping text when showing icon labels in headerHeaderThe header of your site is typically the first thing people will experience. The masthead or header art located across the top of your page is part of the look and feel of your website. It can influence a visitor’s opinion about your content and you/ your organization’s brand. It may also look different on different screen sizes.. (66038)
Add argument with post ID to the editor.savePost hook. (66165)
AccessibilityAccessibilityAccessibility (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)
Post Editor
Fix 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. boxes accessibility. (65466)
Fix navigate regions shortcuts on the back button WP logo slot. (63611)
Improve PostURL terminology and accessibility. (63669)
Match visible label of search inputs with their actual label. (65458)
Components
Fixed : Modal dialog: Small improvement for elementShouldBeHidden. (65941)
ToggleGroupControl: Don’t autoselect option on first group focus. (65892)
Tooltip: Add aria-describedby to anchor only if not redundant. (65989)
Typography
Revert the “Manage fonts” button in Global Styles. (66107)
Performance
Interactivity API
Leverage scheduler.yield in splitTask when available. (66001)
Theme JSONJSONJSON, 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.
BackportbackportA port is when code from one branch (or trunk) is merged into another branch or trunk. Some changes in WordPress point releases are the result of backporting code from trunk to the release branch. from WordPress CoreCoreCore is the set of software required to run WordPress. The Core Development Team builds WordPress.: improve performance of WP_Theme_JSON::Merge when merging background styles. (66002)
Contrast notes: Update 4.6:1 note with further context. (66168)
Data-basics/4-building-a-create-page-form is ready now. (66100)
Docs: env: Expand examples of path syntax. (65972)
Updated several typos in client-assets.php file. (66084)
Use correct label in PHPPHPThe web scripting language in which WordPress is primarily architected. WordPress requires PHP 7.4 or higher Backport documentation. (65908)
add: Usage examples in core editor documentation. (63768)
Consistent with block-development-examples data-basics-59c8f8. (65995)
Code Quality
.screen-reader-text CSS update for responsive-block-control style.scss. (66145)
Fix components coding standards in Zoom Out Toolbar. (65858)
Gutenberg 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
Correct capability for the Experiments page. (66118)
Tools
Testing
Add an end-to-end test to check the interactions in write mode. (65819)
Composite: Add legacy unit tests to stable version. (65952)
This guide outlines major developer features and breaking changes in 6.7 and is published in the 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). phase to help inform WordPress extending developers, CoreCoreCore is the set of software required to run WordPress. The Core Development Team builds WordPress. developers, and others.
This release includes 445 enhancements, 464 bug fixes, and 55 accessibility improvements for 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. Editor (a.k.a. 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/).
Below is a breakdown of the most important developer-related changes included in WordPress 6.7.
Table of contents
Block Editor
WordPress 6.7 brings 8 Gutenberg releases into core – 18.6, 18.7, 18.8, 18.9, 19.0, 19.1, 19.2, and 19.3. As in most recent WordPress releases a large part of the updates are related to the block editor and its features.
General Updates
Design Tools
The ongoing effort to consolidate design tools has continued and several blocks now support more additional design tools.
Other
There are also a large number of other changes which have been listed in a miscellaneous block editor changes 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..
Interactivity 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. & Script Modules
WordPress 6.7 includes updates for the Interactivity API, such as a new way to interact with server state changes in client-side navigation. Also, script modules updates include improvements for loading existing scripts as module dependencies.
HTMLHTMLHyperText Markup Language. The semantic scripting language primarily used for outputting content in web browsers. API
WordPress 6.7 includes many helpful updates to the HTML API. This work includes a few new features and a major improvement to the HTML Processor’s usability.
I18Ni18nInternationalization, 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.
WordPress 6.7 also brings some new performance focused enhancements, including a new way to register blocks that uses generated PHPPHPThe web scripting language in which WordPress is primarily architected. WordPress requires PHP 7.4 or higher files to bypass performance bottlenecks of loading / parsing JSONJSONJSON, 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. files and more.
Miscellaneous Developer Changes
Some other notable changes for developers included in WordPress 6.7 are:
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 RC 1 was released on October 22. Thank you to everyone who contributed to this release and attended the release party! There is a helpful guide here on how to help test 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.7
We are currently in the WordPress 6.7 release cycle. WordPress 6.7 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). 2 is scheduled for Tuesday, October 29. For specific release times, review the release party schedule post.
Next maintenance release
There are no maintenance releases planned at this time.
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.5
The next Gutenberg release will be 19.5, scheduled for October 23, and 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.
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.
You can keep up to date with the major Editor features that are currently in progress by viewing these Iteration issues.
A reminder that there are a number of issues remaining on the 6.7 Editor project board that could use help.
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.
Now that WordPress 6.7 has entered the 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). (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).) phase, the following policies are in place.
These policies mainly cover how and when CoreCoreCore is the set of software required to run WordPress. The Core Development Team builds WordPress. committers can commit. For non-committing contributors, this post may help explain why a Core committercommitterA 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. makes a certain decision.
These policies cover both 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/ and WordPress-Develop repositories.
String Freeze
To allow the Polyglots teamPolyglots TeamPolyglots Team is a group of multilingual translators who work on translating plugins, themes, documentation, and front-facing marketing copy. https://make.wordpress.org/polyglots/teams/. time to get their local language’s translationtranslationThe process (or result) of changing text, words, and display formatting to support another language. Also see localization, internationalization. of WordPress ready, no new strings are permitted to be added to the release. Existing strings can be removed and/or duplicated if needed.
Seek guidance from the Polyglots team leadership for any strings reported as buggy. A buggy string is one that can not be translated to all languages in its current form. In such case, another RC may eventually be released to update the related strings. This will be done in a responsible and reasonable manner, only when necessary.
Tickets on the WordPress 6.7 milestone
For the remainder of the cycle, only two types of tickets may be placed on/remain on the 6.7 milestone:
Regressions: bugs that have been introduced during the WordPress 6.7 development cycle, either to existing or new features.
Test suite expansion: tests can be committed at any time without regard to code or string freezes. This can cover either new or existing features.
WordPress-Develop 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. is now WordPress 6.8-alpha
WordPress 6.7 was recently forked to its own branchbranchA 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"., trunk is now open for commits for the next version of the software.
Backporting to the 6.7 branch
Backporting commits of production code (that is, anything that ends up in the zip file) now requires double sign-off by two core committers. The dev-feedback keyword should be used to request a second committer’s review, dev-reviewed should be added to indicate a second committer has reviewed and approved the commit to the 6.7 branch. The commit messages guidelines document how to credit committer sign off and backportbackportA port is when code from one branch (or trunk) is merged into another branch or trunk. Some changes in WordPress point releases are the result of backporting code from trunk to the release branch. commits to WordPress-Develop.
As always if you need clarification on this process, please ask in #core-committers.
Commits to the test suite and docblockdocblock(phpdoc, xref, inline docs) changes do not require double sign-off.
WordPress 6.7 RC1 is today, October 22, with 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). 2 following on October 29
Reminder due to daylight savings, this meeting will shift to 16:00 UTC from October 29
WordPress 6.7 performance dev notesdev 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. published:
Announcing the new #core-performance-hosting channel where the Performance team have been invited to commence a discussion on initiatives [see Slack]
Priority Items
WordPress performance TracTracAn open source project by Edgewall Software that serves as a bug tracker and project management tool for WordPress. tickets
Performance Lab 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 other performance plugins)
@benni had a question to the plugins. LCP priorization. Sometimes the LCP element on a webpage is text that uses a web font included via CSSCSSCascading Style Sheets.. In such cases, the text can only be rendered after the font has been loaded, which can delay the LCP, I think? Would it be possible for the ‘Optimization Detective‘ plugin to detect when the LCP element is text and automatically preload the font in the <head> section to improve performance? Or maybe the ‘Image Prioritizer’ plugin could be renamed to ‘LCP Prioritizer’ and expanded to handle this optimization for text elements as well?
Improving the calculation of image size attributes
@mukesh27 As part of the improving the calculation of sizes work, I’ve started implementing the new approach to the existing work so we can easily update it with the latest changes. The PR will be open soon, but before that, https://github.com/WordPress/performance/pull/1623 needs to be merged to ensure we have the latest changes on the feature branchbranchA 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"..
Enable Client Side Modern Image Generation
@swissspidy just merged a GB PR yesterday & opened another one today, working on the next one
Enhance Onboarding Experience of Performance Lab Plugin
@flixos90 No update, the only outcome for now was https://github.com/WordPress/performance/issues/1583, which is ready for development – and marked as “Good first issue”, so if you’re a new contributor and you see this, this may be a great issue to get started!
WordPress 6.7 RC1 is today, October 22, with 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). 2 following on October 29
Reminder due to daylight savings, this meeting will shift to 16:00 UTC from October 29
WordPress 6.7 performance dev notesdev 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. published:
Announcing the new #core-performance-hosting channel where the Performance team have been invited to commence a discussion on initiatives [see Slack]
Priority items
WordPress performance TracTracAn open source project by Edgewall Software that serves as a bug tracker and project management tool for WordPress. tickets
Performance Lab 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 other performance plugins) including:
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.
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.
Allow insertion as first or last child of Template Part 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. (#60854).
Prior to WordPress 6.7, it wasn’t possible to insert a hooked block as a Template Part block’s first or last child, i.e. the following example wouldn’t work:
This has now been remediated. (The same is of course true when using firstChild instead of lastChild.)
The reason why the Template Part block didn’t previously support firstChild/lastChild insertion is that it belongs to a special class of blocks whose content isn’t stored as part of the serialized block markup, but obtained from a different source. In case of the Template Part block, that source is either the corresponding wp_template_part post object in the database, or the underlying Block Theme’s template part file.
The Template Part block is the second such “special” block to support firstChild/lastChild insertion of hooked blocks, alongside with the Navigation block, which has been supported since version 6.5.
Respect "multiple": false in hooked blocks (#61902).
A block can set the multiple block-supports property in its block.jsonJSONJSON, 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 to false, indicating that only one instance of that block should be present in a given post. This is used e.g. in CoreCoreCore is the set of software required to run WordPress. The Core Development Team builds WordPress.’s “More” and Footnotes blocks; it is enforced in the editor by disabling the block in the inserter once an instance of it is already present.
However, this setting hasn’t been previously supported by Block HooksHooksIn 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.. Instead, a hooked block would be inserted in every location that matched its specified anchor block and relative position with no limit imposed on the number of allowed instances, even if it had ”multiple”: false set in its block.json. This would sometimes prompt extenders to use a hooked_block_types filter in order to check if the prospective hooked block was already present. Since these checks would run on every block encountered (as a potential anchor block), they could impact performance negatively.
As of WordPress 6.7, the “multiple”: false setting is now respected by Block Hooks, freeing extenders from making those checks themselves. Specifically:
Only one instance of the block will be inserted if it’s not yet present in the current context.
The block will not be inserted at all if an instance of it is already present in the current context.
As always in Block Hooks parlance, “context” denotes the containing template, template part, pattern, or navigation post that a hooked block is supposed to be inserted into. The markup of a webpage that uses a Block Theme typically comprises a number of such contexts — one template and any number of template parts, patterns, and navigation posts. Note that the limitation imposed by this changeset only applies on a per-context basis, so it’s still possible that the resulting page contains more than one instance of a hooked block with "multiple": false set, as each context could contribute up to one such instance.
You must be logged in to post a comment.