Performance Chat Summary: 20 May 2025

The full chat log is available beginning here on Slack.

WordPress Performance TracTrac An open source project by Edgewall Software that serves as a bug tracker and project management tool for WordPress. tickets

  • @westonruter shared work on #61734 / PR #8815 adding fetchpriority support for Scripts and Script Modules.
  • @spacedmonkey shared a desire to see some eyes on #59592
    • @spacedmonkey says it seems to have a massive effect for those using object caching. The change has unit tests and has been been reviewed by a non committercommitter A developer with commit access. WordPress has five lead developers and four permanent core developers with commit access. Additionally, the project usually has a few guest or component committers - a developer receiving commit access, generally for a single release cycle (sometimes renewed) and/or for a specific component.. Just needs another committers to give it the thumbs up.
    • @spacedmonkey would like to land this ASAP, to allow as much time as possible to test this change.
    • @rmccue confirmed support for the proposal but cannot review the code in the short term.
    • @westonruter asked whether thereโ€™s TTFB benchmarking data available for the patchpatch A special text file that describes changes to code, by identifying the files and lines which are added, removed, and altered. It may also be referred to as a diff. A patch can be applied to a codebase for testing..
      • @spacedmonkey noted there wouldโ€™t be any noticeable difference there. This change would help high traffic site and helps database and object cache performance.
      • @tillkruess noted It will just reduce memory usage in the cache significantly, or make it easier to keep it low.
  • @spacedmonkey noted that #58001, #63021, and #57496 are still awaiting a second round of review.

Open Floor

  • @b1ink0 brought up some confusion around the bugbug A bug is an error or unexpected result. Performance improvements, code optimization, and are considered enhancements, not defects. After feature freeze, only bugs are dealt with, with regressions (adverse changes from the previous version) being the highest priority. scrub timing, asking if the schedule should be revisited to avoid conflicts. (Bug scrub schedule link)
    • @westonruter asked if the time had already been moved to avoid conflicting with coreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress. dev chat.
    • @westonruter confirmed that, according to the Make Meetings page, it had not been adjusted.
    • @swissspidy suggested moving the bug scrub to Tuesdays on alternate weeks from office hours.
    • @westonruter and @flixos90 both supported the idea.
    • @swissspidy updated the Make Meetings page and Bug scrub schedule, then shared the schedule for the next meetings as follows:
      • May 27 โ€“ bug scrub (potentially led byย @adamsilverstein)
      • June 3 โ€“ office hours (@swissspidy would probably cancel that one because of WordCampWordCamp WordCamps are casual, locally-organized conferences covering everything related to WordPress. They're one of the places where the WordPress community comes together to teach one another what theyโ€™ve learned throughout the year and share the joy. Learn more. Europe)
      • June 10 โ€“ bug scrub
      • June 17 โ€“ office hours

Our next chat will be held on Tuesday, June 3, 2025 at 15:00 UTC in the #core-performance channel in Slack.

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

Proposal: Bits as dynamic tokens.

A proposal for starting to introduce Bits (dynamic tokens/placeholders) into WordPress.

When Blocks came into the scene Shortcodes were largely abandoned, but Shortcodes had value. They had many problems, but they also had value. It wasnโ€™t clear at the time how to bring them back without bringing back many of the problems they brought with them, namely issues surrounding ambiguity in parsing, nesting, changing the page in dramatic ways, and providing usable content in the absence of a required pluginPlugin A plugin is a piece of software containing a group of functions that can be added to a WordPress website. They can extend functionality or add new features to your WordPress websites. WordPress plugins are written in the PHP programming language and integrate seamlessly with WordPress. These can be free in the WordPress.org Plugin Directory https://wordpress.org/plugins/ or can be cost-based plugin from a third-party or theme.

Around two years ago a discussion was started for introducing dynamic tokens in the editor as placeholders for externally-sourced content. The idea was raised before the discussion was started: many developers were starting to introduce unique code in multiple blocks and plugins that looked for ways to find and replace content in the editor:

  • Set an image URLURL A specific web address of a website or web page on the Internet, such as a websiteโ€™s URL www.wordpress.org to the postโ€™s featured imageFeatured image A 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..
  • Insert a placeholder for a subscriberโ€™s name in an email form.
  • Add the post authorโ€™s display name in a query loopLoop The Loop is PHP code used by WordPress to display posts. Using The Loop, WordPress processes each post to be displayed on the current page, and formats it according to how it matches specified criteria within The Loop tags. Any HTML or PHP code in the Loop will be processed on each post. https://codex.wordpress.org/The_Loop. template.
  • Write a translatable string in a theme template inside the Site Editor.

When the HTMLHTML HyperText Markup Language. The semantic scripting language primarily used for outputting content in web browsers. APIAPI An API or Application Programming Interface is a software intermediary that allows programs to interact with each other and share data in limited, clearly defined ways. started developing it changed the game for these kinds of dynamic tokens. Previously the discussion was largely blocked by finding a syntax that would be reasonable for someone to type in directly, but also avoid causing all sorts of breakage to the surrounding HTML. Now, these discussions are less relevant because the HTML API provides a way to find various kinds of placeholders and then ensure a context-aware replacement and escaping when replacing them.

It provides a way for WordPress to make heuristics-based decisions on what content to allow and not to allow on output. It ensures that the output of one of the tokens doesnโ€™t bleed into or break the page around it.

After many explorations, one form of placeholders stands out above all the others โ€“ a quirk in the HTML specification referred to within WordPress as a โ€œfunky comment.โ€ These look like closing tags, except the tagtag A directory in Subversion. WordPress uses tags to store a single snapshot of a version (3.6, 3.6.1, etc.), the common convention of tags in version control systems. (Not to be confused with post tags.) name is invalidinvalid A resolution on the bug tracker (and generally common in software development, sometimes also notabug) that indicates the ticket is not a bug, is a support request, or is generally invalid.. When a browser sees them they interpret them as HTML comments, removing them by default from the page (in the case that the server fails to replace them), and itโ€™s impossible to nest them.

These funky comments are the perfect vehicle for safe fallback, human-typability, and the ability to parse and replace. While funky comments can appear in many forms, this proposal is discussing the specific form that can be used for dynamic tokens and placeholders: these are called Bits. While blocks represent rich content types, Bits represent small semantic bits of knowledge. Bits can appear in any blockBlock Block is the abstract term used to describe units of markup that, composed together, form the content or layout of a webpage using the WordPress editor. The idea combines concepts of what in the past may have achieved with shortcodes, custom HTML, and embed discovery into a single consistent API and user experience. or in any HTML without requiring any changes to any existing Block code; Bits can appear anywhere.

What is a Bit?

<//wp:post-meta key="isbn">

A Bit is a small token of semantic meaning. It references content sourced beyond the post or content in which itโ€™s found. It could refer to metadata about a post, a post metaMeta Meta is a term that refers to the inside workings of a group. For us, this is the team that works on internal WordPress sites like WordCamp Central and Make WordPress. field, a stock price sourced from an API call, a countdown to a particular date, the local time of a given timestamp in the readerโ€™s timezone, a plugin URL, a view counter, a render for a math formula, or any other bit of knowledge that is provided by the server when rendering a post.

Bits are a form of horizontal composition. Blocks donโ€™t need to know about Bits for someone to use Bits. Bits are a form of user control: anyone can add a Bit into their post without needing a developer to adjust their Blocks or theme first.

Bits are like blocks in that they comprise a name and a set of attributes, but unlike Blocks, Bits cannot nest. They are the inline analogue to block-oriented Blocks. Bits can provide some HTML, but not much. Bits are configurable by their attributes: a post date can be configured to display as โ€œMay 22โ€ or โ€œ2010/05/22.โ€

Bits are registered both in PHPPHP The web scripting language in which WordPress is primarily architected. WordPress requires PHP 7.4 or higher and also inside the editor. Thereโ€™s an inspector panel for configuring a Bit based on the registration with semantic-specific controls, but Bits can also be manually typed from the visual view of the editor, and it will recognize them once typed.

Bits can be found in various contents, including plaintext and markup contexts. Bit implementations must provide both of these outputs, as well as a fallback so that they can provide some meaningful value when the necessary rendering code is missing. For example, a Bit providing a URL will might URL-encode it for URL attributes, but leave non-ASCII unicode characters in place for display purposes; a post date might return a standardized string timestamp for plaintext context but a <span>-annotated human-readable date for better CSSCSS Cascading Style Sheets. styling in markup contexts.

<!-- stored in a post -->
<time datetime="<//wp-bit:post-date format='RFC9557'>"><//wp-bit:post-date format="human-diff"></time>

<!-- rendered to the reader -->
<time datetime="2024-05-22T12:00:00+00:00">eighteen days ago</time>

Bits are parsed just like any other HTML closing tag except: the โ€œtag nameโ€ cannot start with a-z; they extend from the start of the โ€œtag nameโ€ until the very first > (even if itโ€™s inside a quoted value). The attributes are parsed just like HTML attributes, meaning that there can be unquoted, single-quoted, and double-quoted attributes. The only caveat is that when found inside an HTML attribute, the quoting cannot conflictconflict A conflict occurs when a patch changes code that was modified after the patch was created. These patches are considered stale, and will require a refresh of the changes before it can be applied, or the conflicts will need to be resolved..

How do humans interact with Bits?

The editor has two inherent view modes for Bits: a preview mode, and a token mode. The Preview mode may show a preview of the replaced value of the Bit where itโ€™s found, and it may indicate that the Bit is there through some visual indication or otherwise. The token mode shows the Bits as placeholders indicating which kind of Bit they are.

An example of how a bit might look in token mode in the editor, clearly showing the type and configuration.
An early exploration of an ISBN post-meta bit from @ellatrix, in the editorโ€™s preview mode.

Bits are designed so that someone who is used to working with them can enter them directly as text, but people wonโ€™t need to know anything about their syntax in order to use them. Bit registration in the editor provides a name, a description, and some additional metadata just like Blocks to make it possible to provide a discoverable system for finding and configuring them.

The Bits inserter appears when typing //. Whereas the slash inserter shows Blocks on a single /, if someone types a second, they will instead see a list of Bits that will auto-filterFilter Filters are one of the two types of Hooks https://codex.wordpress.org/Plugin_API/Hooks. They provide a way for functions to modify data of other functions. They are the counterpart to Actions. Unlike Actions, filters are meant to work in an isolated manner, and should never have side effects such as affecting global variables and output. as they continue to type. The // for the slash inserter corresponds to the Bit syntax <//wp-bit:core/hello-dolly>.

Bit registration in the editor also provides an optional configuration panel akin to Block Inspector controls. Since each Bit carries its own semantics, these controls guide authors into how to configure Bit, maybe by selecting formatting options, choosing an associated post ID (by searching for its title), or choosing which of several options to enable.

What about Block Bindings?

Bits and Block Bindings are related but complementary systems. While Block Bindings can be thought of primarily as a developer-oriented API, where a developer can open up a given block or a subset of a blockโ€™s attributes to be replaced by some other source of data, Bits are primarily author-oriented, giving end-users the ability to add sourced content anywhere.

There is likely a large overlap in the kinds of data sources that power each system. Ideally, the registered sources will be compatible with both.

Proposal

The HTML API already introduced the concept of a โ€œfunky comment,โ€ which is the tag closer with an invalid tag name. For WordPress 6.6 this document is only proposing to unlock storing the funky comments in CoreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress. so that GutenbergGutenberg The Gutenberg project is the new Editor Interface for WordPress. The editor improves the process and experience of creating new content, making writing rich content much simpler. It uses โ€˜blocksโ€™ to add richness rather than shortcodes, custom HTML etc. https://wordpress.org/gutenberg/ the plugin can experiment with various prototypes of the Bit system with its full lifecycle. Currently this requires combining a Gutenberg patchpatch A special text file that describes changes to code, by identifying the files and lines which are added, removed, and altered. It may also be referred to as a diff. A patch can be applied to a codebase for testing. and a Core patch.

The only thing required for WordPress 6.6 is a big-fix to existing code, which would be useful even if Bits donโ€™t come to be, and even if they use a different syntax: WordPress attempts to separate HTML comments from other tags, but itโ€™s unaware of the myriad ways that invalid HTML turns into comments. Core-61009 introduces a patch that makes Core more aware of a couple new types of syntax-turned comments.

By opening up the ability to store Bits in the database, it makes it easier to start exploring Bits as a broader system, including what ought to be built an how. Until then, it remains cumbersome. Even in the case that Bits use a different syntax, this patch is still improves WordPressโ€™ understanding of HTML.


With the ability to store Bits in the database, work should progress rapidly during the WordPress 6.7 development cycle, building up editor flows to discover, configure, and render Bits. Work will be explored in Core for registering them on the backend, and it will likely work together with a system for HTML templating powered by the HTML API.


For future releases and design, your feedback is invited in defining the interfaces for registering, displaying, interacting with, and governing Bits.

Acknowledgements

Thanks to @annezazu, @antonvlasenko, @ironprogrammer, @ellatrix, and @gziolo (and anyone else I forgot) for review and feedback on this post before publishing.

Font Library update: storage of font files

This post has been superseded by the post WordPress 6.5 release delayed 1 week, in which itโ€™s announced fonts will be uploaded to the fonts sub-directory of the uploads folder.

The Font Library, a new feature of WordPress 6.5, will allow users of blockBlock Block is the abstract term used to describe units of markup that, composed together, form the content or layout of a webpage using the WordPress editor. The idea combines concepts of what in the past may have achieved with shortcodes, custom HTML, and embed discovery into a single consistent API and user experience. editor themes to upload and customize their siteโ€™s fonts. You can learn about the full set of Font Library features in the #dev-note.

As fonts are a new first-class object, there has been some discussion around where to store the associated files while accounting for different file systems used by WordPress sites. The particular challenge has been for file systems that do not allow for the writing of files outside the uploads directory (See Gutenberg#59417 and Gutenberg#59699).

To account for such file systems, it was originally decided to natively fallback to the uploads directory natively in WordPress CoreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress..

Revised approach to font file storage

Exploratory work on supporting a fallback directory natively has demonstrated that this approach would lead to a high risk of bugs. Therefore, the original decision is being modified and the new approach will be:

  • WordPress Core will by default only attempt to store font files in the wp-content/fonts directory,
  • For file systems unable to write to or persistently store files in the new directory it is recommended to install the pluginPlugin A plugin is a piece of software containing a group of functions that can be added to a WordPress website. They can extend functionality or add new features to your WordPress websites. WordPress plugins are written in the PHP programming language and integrate seamlessly with WordPress. These can be free in the WordPress.org Plugin Directory https://wordpress.org/plugins/ or can be cost-based plugin from a third-party Fonts to Uploads to store the files in the under existing uploads directory, in wp-content/uploads/fonts
  • Developers wishing to modify the directory without using a plugin can use the font_dir filterFilter Filters are one of the two types of Hooks https://codex.wordpress.org/Plugin_API/Hooks. They provide a way for functions to modify data of other functions. They are the counterpart to Actions. Unlike Actions, filters are meant to work in an isolated manner, and should never have side effects such as affecting global variables and output. documented in the announcement post.

Props @mmaattiiaass and other contributors for working on the exploratory pull request.

Thank you @desrosj, @priethor, @chanthaboune and @jorbin for contributing to and reviewing this post.

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

A Week in Core โ€“ February 12, 2024

Welcome back to a new issue ofย Week inย CoreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress.. Letโ€™s take a look at what changed onย TracTrac An open source project by Edgewall Software that serves as a bug tracker and project management tool for WordPress.ย between February 5 and February 12, 2024.

  • 71 commits
  • 245 contributors
  • 82 tickets created
  • 11 tickets reopened
  • 82 tickets closed

Ticketticket Created for both bug reports and feature development on the bug tracker.ย numbers are based on theย Trac timeline for the period above. The following is a summary of commits, organized by component and/or focus.

Code changes

Administration

  • Improve contrast and consistency of focus styles โ€“ #51870

Bundled Themes

  • Twenty Fifteen: Add top margin to the File blockBlock Block is the abstract term used to describe units of markup that, composed together, form the content or layout of a webpage using the WordPress editor. The idea combines concepts of what in the past may have achieved with shortcodes, custom HTML, and embed discovery into a single consistent API and user experience. button styles โ€“ #58498
  • Twenty Nineteen: Add border-radius to avatarAvatar An avatar is an image or illustration that specifically refers to a character that represents an online user. Itโ€™s usually a square box that appears next to the userโ€™s name. images in the editor โ€“ #59285
  • Twenty Nineteen: Correct line height for Button block โ€“ #58443
  • Twenty Nineteen: Restore transition property to a single line โ€“ #58443
  • Twenty Sixteen: Add border-radius to avatar images in the editor โ€“ #59253
  • Twenty Twenty-Four: Add missing translationtranslation The process (or result) of changing text, words, and display formatting to support another language. Also see localization, internationalization. functions to text strings โ€“ #60298
  • Twenty Twenty-Four: Prefix the block pattern categoryCategory The 'category' taxonomy lets you group posts / content together that share a common bond. Categories are pre-defined and broad ranging. name โ€“ #59839
  • Twenty Twenty-Three: Include Latin-extended characters in DM Sans font files โ€“ #59008
  • Twenty Twenty-Two: Prefix the pages block pattern category name โ€“ #59839
  • Twenty Twenty: Fix Table block default and custom border colors โ€“ #58022
  • Twenty Twenty: Scope .privacy-policy styles to the footer only โ€“ #60469
  • Improve focus outline in Twenty Twenty-Four โ€“ #60334
  • Cast font URLURL A specific web address of a website or web page on the Internet, such as a websiteโ€™s URL www.wordpress.org functions to string for add_editor_style() โ€“ #59704

Build/Test Tools

  • Fix bugbug A bug is an error or unexpected result. Performance improvements, code optimization, and are considered enhancements, not defects. After feature freeze, only bugs are dealt with, with regressions (adverse changes from the previous version) being the highest priority. pulling local environment containers on Apple silicone โ€“ #59930
  • Generate a human-readable HTMLHTML HyperText Markup Language. The semantic scripting language primarily used for outputting content in web browsers. coverage report โ€“ #60476
  • Make the props bot message shorter โ€“ #60417
  • Pin a specific commit for Hosting Test Reporter โ€“ #59647
  • Revert [57551] โ€“ #59647
  • Unpin PHPPHP The web scripting language in which WordPress is primarily architected. WordPress requires PHP 7.4 or higher 7.4 from the test coverage workflow โ€“ #59647
  • Adjust the metaMeta Meta is a term that refers to the inside workings of a group. For us, this is the team that works on internal WordPress sites like WordCamp Central and Make WordPress. key time in wp_scheduled_delete() tests โ€“ #59938

Canonical

  • Introduce admin_canonical_url filterFilter Filters are one of the two types of Hooks https://codex.wordpress.org/Plugin_API/Hooks. They provide a way for functions to modify data of other functions. They are the counterpart to Actions. Unlike Actions, filters are meant to work in an isolated manner, and should never have side effects such as affecting global variables and output. โ€“ #59545

Coding Standards

  • Add missing fullstop to docblocks in wp-includes/vars.php โ€“ #41877
  • Replace alias join() in WP_Font_Utils โ€“ #60473

Editor

  • Add viewScriptModule handling to block.json metadata โ€“ #60233
  • Add wakeup magic method to the block bindings registry โ€“ #60282
  • Avoid double escaping on value passed for attribute in HTML tagtag A directory in Subversion. WordPress uses tags to store a single snapshot of a version (3.6, 3.6.1, etc.), the common convention of tags in version control systems. (Not to be confused with post tags.) processor
  • Expand Block Bindings for button block โ€“ #60481
  • Fix block style variation selector generation โ€“ #60453
  • Fix typo in FontUtils doc block โ€“ #59166
  • Improve code documentation for block bindings โ€“ #60282
  • Introduce WP_Block_Bindings_Source class โ€“ #60447
  • Make asset file optional for block scripts โ€“ #57234
  • Refactor block binding processing and attribute computation โ€“ #60282
  • Register the Google Font collection โ€“ #59166
  • Show the patterns page for classic themes โ€“ #58827
  • Update PHPDocPHPDoc (docblock, inline docs) for block bindingsโ€™s context arg โ€“ #59743
  • Update pattern overrides attribute format โ€“ #60456
  • Update the WordPress packages to GutenbergGutenberg The Gutenberg project is the new Editor Interface for WordPress. The editor improves the process and experience of creating new content, making writing rich content much simpler. It uses โ€˜blocksโ€™ to add richness rather than shortcodes, custom HTML etc. https://wordpress.org/gutenberg/ 17.7RC1 โ€“ #60315
  • Block HooksHooks In WordPress theme and development, hooks are functions that can be applied to an action or a Filter in WordPress. Actions are functions performed when a certain event occurs in WordPress. Filters allow you to modify certain functions. Arguments used to hook both filters and actions look the same.: Inject hooked blocks into modified templates and parts โ€“ #59646
  • Blocks: Allow reading the script handle from asset files โ€“ #60485
  • Interactivity APIAPI An API or Application Programming Interface is a software intermediary that allows programs to interact with each other and share data in limited, clearly defined ways.: Integrate Server Directive Processing โ€“ #60356
  • Interactivity API: Remove empty file โ€“ #60356

Filesystem API

  • Fix typo in ftp_base::restore() โ€“ #60497

General

  • Add an option to configure the site icon in general settings โ€“ #54370, #16434
  • Remove ableist language from code comments โ€“ #60247

HTML API

  • Add subclassed has_bookmark() and fix seek() โ€“ #60474
  • Join text nodes on invalidinvalid A resolution on the bug tracker (and generally common in software development, sometimes also notabug) that indicates the ticket is not a bug, is a support request, or is generally invalid.-tag-name boundaries โ€“ #60385

I18Ni18n Internationalization, or the act of writing and preparing code to be fully translatable into other languages. Also see localization. Often written with a lowercase i so it is not confused with a lowercase L or the numeral 1. Often an acquired skill.

  • Add Translator comments for Planet URLs โ€“ #58010

Media

  • Update progress spinner position on small screens โ€“ #33049
  • enable control of progressive image output โ€“ #21668

Networks and Sites

  • Improve switch_to_blog() docblockdocblock (phpdoc, xref, inline docs) โ€“ #60332

Permalinks

  • Detect Caddy web server support โ€“ #41877

Plugins

  • Store pluginPlugin A plugin is a piece of software containing a group of functions that can be added to a WordPress website. They can extend functionality or add new features to your WordPress websites. WordPress plugins are written in the PHP programming language and integrate seamlessly with WordPress. These can be free in the WordPress.org Plugin Directory https://wordpress.org/plugins/ or can be cost-based plugin from a third-party deletion results in temporary option โ€“ #59433

Quick/Bulk Edit

  • Pre-fill category fields with their status โ€“ #11302

REST APIREST API The REST API is an acronym for the RESTful Application Program Interface (API) that uses HTTP requests to GET, PUT, POST and DELETE data. It is how the front end of an application (think โ€œphone appโ€ or โ€œwebsiteโ€) can communicate with the data store (think โ€œdatabaseโ€ or โ€œfile systemโ€) https://developer.wordpress.org/rest-api/.

  • Add featured_media field to attachments endpoint โ€“ #41692
  • Improve error handling in REST meta fields โ€“ #48823
  • Introduce the necessary endpoints for the font library โ€“ #59166
  • Provide detailed error data in REST API response โ€“ #60014

Script Loader

  • Add a timezone offset display value to wp.date.setSettings โ€“ #60105
  • Improve translators comments for wp.date.setSettings in compat file โ€“ #60412
  • always output core block global styles after base global styles โ€“ #60280
  • Add deregister module function โ€“ #60463

Shortcodes

  • Always return an array in shortcode_parse_atts() โ€“ #59249

Themes

  • Add โ€˜theme_filesโ€™ cache group to block pattern cache operations โ€“ #60120
  • update add_theme_support docblock โ€“ #60221

Toolbar

  • Add adminbar link for new sites in networknetwork (versus site, blog) installs โ€“ #41104

Upgrade/Install

  • Avoid update_option() calls during bootstrap โ€“ #60461, #60457, #60491
  • Upgrade/Install: Introduce Plugin Dependencies โ€“ #22316
  • Micro-optimizations for getting plugin_file in plugins loader loopLoop The Loop is PHP code used by WordPress to display posts. Using The Loop, WordPress processes each post to be displayed on the current page, and formats it according to how it matches specified criteria within The Loop tags. Any HTML or PHP code in the Loop will be processed on each post. https://codex.wordpress.org/The_Loop. โ€“ #60510
  • Remove unnecessary individual subfiles from $_old_files array โ€“ #58995

Users

  • Replace table tags for color palettes in profiles โ€“ #53157

Props

Thanks to the 245 (!!) people who contributed to WordPress Core on Trac: @gziolo (14), @mukesh27 (13), @swissspidy (13), @sabernhardt (13), @poena (12), @shailu25 (11), @huzaifaalmesbah (9), @youknowriad (8), @oglekler (7), @joedolson (7), @jorbin (7), @audrasjb (7), @spacedmonkey (6), @SergeyBiryukov (6), @dmsnell (6), @get_dave (6), @hellofromTonya (5), @afercia (5), @kebbet (5), @harshgajipara (5), @johnbillion (5), @costdev (4), @nicolefurlan (4), @jonsurrell (4), @czapla (4), @TimothyBlynJacobs (3), @karmatosed (3), @pbiron (3), @desrosj (3), @afragen (3), @azaozz (3), @luisherranz (3), @dingo_d (2), @mikeschroder (2), @andraganescu (2), @johnjamesjacoby (2), @rajinsharwar (2), @nidhidhandhukiya (2), @cbravobernal (2), @dd32 (2), @wildworks (2), @pooja1210 (2), @wasiur195 (2), @scribu (2), @ajmcfadyen (2), @peterwilsoncc (2), @pitamdey (2), @santosguillamot (2), @isabel_brison (2), @bernhard-reiter (2), @mcsf (2), @ocean90 (2), @aaronrobertshaw (2), @sadpencil (1), @cfinnberg (1), @viliamkopecky (1), @ecc (1), @rcorrales (1), @cvorko (1), @flixos90 (1), @joemcgill (1), @adamsilverstein (1), @_ck_ (1), @markoheijnen (1), @Japh (1), @pmeenan (1), @derekspringer (1), @buley (1), @ericlewis (1), @bahia0019 (1), @born2webdesign (1), @kushang78 (1), @timothyblynjacobs (1), @wonderboymusic (1), @dlh (1), @obenland (1), @jameskoster (1), @kjellr (1), @stacimc (1), @h71 (1), @krupajnanda (1), @jordesign (1), @monzuralam (1), @hrrarya (1), @fnpen (1), @mhshohel (1), @bedas (1), @jeremyfelt (1), @prionkor (1), @matveb (1), @benniledl (1), @jsnajdr (1), @mnydigital (1), @onemaggie (1), @luminuu (1), @pouicpouic (1), @ugyensupport (1), @jivygraphics (1), @sumitbagthariya16 (1), @kkmuffme (1), @talldanwp (1), @dartiss (1), @upadalavipul (1), @manfcarlo (1), @mayur8991 (1), @panchalhimani711 (1), @itpathsolutions (1), @thakordarshil (1), @Ankit-K-Gupta (1), @darshitrajyaguru97 (1), @pavelevap (1), @chasedsiedu (1), @helen (1), @joshcanhelp (1), @ubernaut (1), @Cyberchicken (1), @laumindproductscomau (1), @Marcoevich (1), @tomybyte (1), @thinkluke (1), @virtality-marketing-solutions (1), @Michalooki (1), @itecrs (1), @pannelars (1), @WHSajid (1), @samba45 (1), @Mte90 (1), @tomluckies (1), @soulseekah (1), @francina (1), @webcommsat (1), @balub (1), @sarathar (1), @glendaviesnz (1), @up1512001 (1), @zodiac1978 (1), @davidbinda (1), @westonruter (1), @retrofox (1), @joefusco (1), @colorfultones (1), @acosmin (1), @alh0319 (1), @beafialho (1), @javiercasares (1), @mmaattiiaass (1), @grantmkin (1), @oandregal (1), @ajlende (1), @ahoereth (1), @alanfuller (1), @alexkingorg (1), @amykamala (1), @anonymized_10690803 (1), @apeatling (1), @ashfame (1), @atimmer (1), @aristath (1), @batmoo (1), @beaulebens (1), @blobaugh (1), @bobbingwide (1), @boonebgorges (1), @brianhenryie (1), @chanthaboune (1), @chrisdavidmiles (1), @coolmann (1), @courane01 (1), @danielbachhuber (1), @davidperez (1), @Denis-de-Bernardy (1), @DJPaul (1), @dougal (1), @DrewAPicture (1), @ethitter (1), @filosofo (1), @georgestephanis (1), @giuseppemazzapica-1 (1), @goldenapples (1), @griffinjt (1), @husobj (1), @ideag (1), @jarednova (1), @jbobich (1), @jbrinley (1), @jltallon (1), @johnciacia (1), @joppuyo (1), @jsmoriss (1), @knutsp (1), @kraftbj (1), @kraftner (1), @kurtpayne (1), @lkraav (1), @logikal16 (1), @man4toman (1), @markjaquith (1), @matt (1), @mbijon (1), @megphillips91 (1), @mikeschinkel (1), @mordauk (1), @morehawes (1), @mrwweb (1), @mte90 (1), @mzaweb (1), @nacin (1), @norcross (1), @nvwd (1), @nwjames (1), @obliviousharmony (1), @paaljoachim (1), @pauldewouters (1), @pbaylies (1), @Philipp15b (1), @pogidude (1), @retlehs (1), @rmccue (1), @ryan (1), @sabreuse (1), @sc0ttkclark (1), @sereedmedia (1), @ShaneF (1), @shidouhikari (1), @soean (1), @stephenh1988 (1), @taylorde (1), @tazotodua (1), @threadi (1), @TJNowell (1), @tollmanz (1), @toscho (1), @tropicalista (1), @Viper007Bond (1), @westi (1), @whiteshadow (1), @williamsba1 (1), @wpsmith (1), @ZaneMatthew (1), @noisysocks (1), @kevin940726 (1), and @fabiankaegy (1).

Congrats and welcome to our 28 (!!) new contributors of the week: @sadpencil, @cfinnberg, @viliamkopecky, @ecc, @cvorko, @pmeenan, @derekspringer, @born2webdesign, @kushang78, @hrrarya, @fnpen, @mhshohel, @benniledl, @mnydigital, @up1512001, @alh0319, @anonymized_10690803, @blobaugh, @chrisdavidmiles, @giuseppemazzapica-1, @jltallon, @johnciacia, @logikal16, @pbaylies, @Philipp15b, @pogidude, @tropicalista, @whiteshadow โ™ฅ๏ธ

Core committers: @gziolo (11), @youknowriad (10), @sergeybiryukov (8), @audrasjb (7), @joedolson (7), @swissspidy (5), @desrosj (5), @spacedmonkey (3), @jorbin (3), @costdev (3), @hellofromtonya (2), @dmsnell (2), @isabel_brison (2), @adamsilverstein (1), @davidbaumwald (1), and @bernhard-reiter (1).

#6-5, #core, #week-in-core

Two Weeks in Core โ€“ September 4, 2023

Welcome back to a new issue ofย Week inย CoreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress.. Letโ€™s take a look at what changed onย TracTrac An open source project by Edgewall Software that serves as a bug tracker and project management tool for WordPress.ย between August 21 and September 4, 2023.

  • 75 commits
  • 150 contributors (!)
  • 25 new contributors (!)
  • 129 tickets created
  • 13 tickets reopened
  • 117 tickets closed

Ticketticket Created for both bug reports and feature development on the bug tracker.ย numbers are based on theย Trac timeline for the period above. The following is a summary of commits, organized by component and/or focus.

Code changes

Administration

  • Escape post type output as field attribute โ€“ #59190

Build/Test Tools

  • Avoid doing copy:dynamic when running grunt watch when using --dev option โ€“ #59196
  • Change the version of Node.js in the Codespaces container โ€“ #56658
  • Compare results in performance measurement workflow โ€“ #58358, #58359
  • Enable running the tests on PHPPHP The web scripting language in which WordPress is primarily architected. WordPress requires PHP 7.4 or higher 8.3 โ€“ #59231
  • Ensure database containers are prepared for commands โ€“ #30462, #58867
  • Expand database testing to account for all supported versions and types โ€“ #30462
  • Implicitly pass secrets to the called workflow โ€“ #30462
  • Merge pre-commit changes missed in [56439] โ€“ #30462
  • Revert unintentional .env change in [56449] โ€“ #56594
  • Tests_Formatting_MakeClickable should use data providors โ€“ #57660
  • Correct uses of ReflectionProperty::setValue() for static properties โ€“ #59231
  • Fix coding standards for Tests_Admin_wpUserSearch โ€“ #41125
  • Remove webfonts tests โ€“ #59165

Bundled Theme

  • Twenty Nineteen: Improve social media icon dimension attributes โ€“ #45950
  • Ensure that pull quotes are able to use the correct font size โ€“ #57854

Coding Standards

  • Remove unused global variables in various /wp-admin/includes/ files โ€“ #59254
  • Use strict comparison in wp-includes/class-wp-hook.php โ€“ #58831
  • Use strict comparison in wp-includes/class-wp-widget.php โ€“ #58831
  • Use strict comparison in wp-includes/ms-files.php โ€“ #58831
  • Use strict comparison in wp-includes/ms-site.php โ€“ #58831

CustomizerCustomizer Tool built into WordPress core that hooks into most modern themes. You can use it to preview and modify many of your siteโ€™s appearance settings.

  • use the correct X-Robots-Tag headerHeader The header of your site is typically the first thing people will experience. The masthead or header art located across the top of your page is part of the look and feel of your website. It can influence a visitorโ€™s opinion about your content and you/ your organizationโ€™s brand. It may also look different on different screen sizes. โ€“ #58865

Database

  • Improve the documentation for various methods in the wpdb class โ€“ #58833
  • Remove support for the mysql extension โ€“ #59118

Docs

  • Add missing param description in WP_Comment class โ€“ #58890
  • Clarify post_date_column_time filterFilter Filters are one of the two types of Hooks https://codex.wordpress.org/Plugin_API/Hooks. They provide a way for functions to modify data of other functions. They are the counterpart to Actions. Unlike Actions, filters are meant to work in an isolated manner, and should never have side effects such as affecting global variables and output. description โ€“ #59029
  • Correct default post type in page_template_dropdown() docblockdocblock (phpdoc, xref, inline docs) โ€“ #58972
  • Docblock improvements in _deprecated_class() function, as per docblocks standards โ€“ #58833
  • Fix typo in a translator comment in _deprecated_class() โ€“ #58833
  • Improve PHPCSPHP Code Sniffer PHP Code Sniffer, a popular tool for analyzing code quality. The WordPress Coding Standards rely on PHPCS. comments general consistency โ€“ #58833
  • Use third-person singular verbs in various function descriptions, as per docblocks standards โ€“ #58833
  • Wrap inline @see tags in curly braces โ€“ #58858

Editor

  • Add relative time strings for the wp-date inline script output โ€“ #59219, #47373
  • Donโ€™t use fluid layout value in typography โ€“ #58754
  • Ensure main query loopLoop The Loop is PHP code used by WordPress to display posts. Using The Loop, WordPress processes each post to be displayed on the current page, and formats it according to how it matches specified criteria within The Loop tags. Any HTML or PHP code in the Loop will be processed on each post. https://codex.wordpress.org/The_Loop. is entered for singular content in blockBlock Block is the abstract term used to describe units of markup that, composed together, form the content or layout of a webpage using the WordPress editor. The idea combines concepts of what in the past may have achieved with shortcodes, custom HTML, and embed discovery into a single consistent API and user experience. themes โ€“ #58154
  • Optimize wp_get_block_css_selector to remove array_merge calls for better performance โ€“ #59178
  • Preserve block style variations when securing theme โ€“ #59108
  • Introduce font-face styles generator and printer โ€“ #59165

External Libraries

  • Update jQuery to version 3.7.1 โ€“ #59227
  • Upgrade PHPMailer to version 6.8.1 โ€“ #59238 โ€“ #58833

General

  • Fix coding standards for translatable _deprecated_class() message strings โ€“ #41125
  • Introduce a _deprecated_class() function โ€“ #41125
  • Replace two esc_url_raw() calls in core with sanitize_url() โ€“ #59247
  • Use regular core button styles for page header actions โ€“ #41986

HTMLHTML HyperText Markup Language. The semantic scripting language primarily used for outputting content in web browsers. APIAPI An API or Application Programming Interface is a software intermediary that allows programs to interact with each other and share data in limited, clearly defined ways.

  • Stop processing HTML when encountering unsupported markup โ€“ #59167
  • Update WP_Http class to avoid PHP deprecation warnings โ€“ #58876

Help/About

  • Match icon and text in Help for bulk edit button โ€“ #58785

Login and Registration

  • Improve test coverage for sign on related functions โ€“ #36476

Media

  • Add a filter to the get_available_post_mime_types() function to allow overriding its database query โ€“ #52759
  • Prevent warning if shortcodeShortcode A shortcode is a placeholder used within a WordPress post, page, or widget to insert a form or function generated by a plugin in a specific location on your site. is used without attributes โ€“ #59206
  • Remove unused $is_IE and $is_opera globals in media_upload_form() โ€“ #59254

Menus

  • Fix proximity of controls to Save and Delete menus โ€“ #56594
  • Revert unintentional changes in [56449] โ€“ #56594

Options, MetaMeta Meta is a term that refers to the inside workings of a group. For us, this is the team that works on internal WordPress sites like WordCamp Central and Make WordPress. APIs

  • Introduce prime_options() to load multiple options with a single database request โ€“ #58962
  • Introduce wp_set_option_autoload_values() โ€“ #58964

Performance

  • Add fallback for $script_uri to prevent firing plugins_url() unnecessarily โ€“ #59181

Plugins

  • Correctly display spaces in new plugins search results โ€“ #59143

Posts, Post Types

  • Avoid redundant SQL query in get_pages() โ€“ #59224
  • Reinstate missing sort_column options in get_pages() โ€“ #59226
  • Remove redundant function calls in get_body_class() โ€“ #43661

REST APIREST API The REST API is an acronym for the RESTful Application Program Interface (API) that uses HTTP requests to GET, PUT, POST and DELETE data. It is how the front end of an application (think โ€œphone appโ€ or โ€œwebsiteโ€) can communicate with the data store (think โ€œdatabaseโ€ or โ€œfile systemโ€) https://developer.wordpress.org/rest-api/.

  • Remove misleading comment in WP_REST_Blocks_Controller->get_item_schema โ€“ #59193

RevisionsRevisions The WordPress revisions system stores a record of each saved draft or published update. The revision system allows you to see what changes were made in each revision by dragging a slider (or using the Next/Previous buttons). The display indicates what has changed in each revision.

  • Add missing escaping function for $post_edit_link in wp-admin/revision.php โ€“ #59141

Rewrite Rules

  • Prevent stampedes when flush_rewrite_rules() is called โ€“ #58998

Site Health

  • Show correct debug value for file uploads โ€“ #58737
  • fix check name used for REST API permission checks โ€“ #59236

Upgrade/Install

  • Add missing escaping function for get_option( 'home' ) in upgrade.php โ€“ #59199
  • Remove unused globals in core_upgrade_preamble() โ€“ #59254

Upload

  • Add a MIME type exception for .docx generated by Google Docs โ€“ #57898
  • Correct duplicate MIME type for .xlsx files generated by Google Docs โ€“ #57898

Users

  • Call add_user_meta() instead of update_user_meta() when adding metadata to a new user โ€“ #59212
  • Properly deprecate both constructors in WP_User_Search โ€“ #41125
  • Remove unused wpdb global in check_password_reset_key() โ€“ #59185

Widgets

  • Improve performance of has_content method in WP_Widget_Media_Gallery class โ€“ #58757

XML-RPC

  • Remove unused wpdb global in wp_xmlrpc_server::mw_newMediaObject() โ€“ #59185

Props

Thanks to the 150 (!) people who contributed to WordPress Core on Trac last week:

@mukesh27 (14), @costdev (11), @sergeybiryukov (10), @joemcgill (8), @flixos90 (7), @jrf (7), @poena (6), @aristath (5), @afercia (5), @upadalavipul (5), @spacedmonkey (5), @rajinsharwar (4), @desrosj (4), @azaozz (4), @Presskopp (4), @jorbin (3), @oglekler (3), @ramonopoly (3), @swissspidy (3), @david.binda (3), @westonruter (2), @hellofromTonya (2), @oandregal (2), @boonebgorges (2), @tabrisrp (2), @gziolo (2), @daxelrod (2), @johnbillion (2), @hztyfoon (2), @davidbaumwald (2), @sabernhardt (2), @jeffpaul (2), @nidhidhandhukiya (2), @niravsherasiya7707 (1), @michelleblanchette (1), @dhruvishah2203 (1), @matthewfarlymn (1), @elrae (1), @DrewAPicture (1), @rmccue (1), @ohryan (1), @wvega (1), @ahardyjpl (1), @nekojonez (1), @dilipbheda (1), @TobiasBg (1), @Synchro (1), @aslamdoctor (1), @maltfield (1), @szepeviktor (1), @bvreeman22 (1), @johnregan3 (1), @johnjamesjacoby (1), @iammehedi1 (1), @jordanpak (1), @adhun (1), @nithi22 (1), @huzaifaalmesbah (1), @deepakvijayan (1), @zunaid321 (1), @olliejones (1), @laurelfulford (1), @maxinacube (1), @l1nuxjedi (1), @pento (1), @netweb (1), @nacin (1), @crstauf (1), @armondal (1), @tahmidulkarim (1), @crunnells (1), @TimothyBlynJacobs (1), @JordanPak (1), @emailjoey (1), @melchoyce (1), @michaelarestad (1), @danieltj (1), @helen (1), @viralsampat (1), @adamsilverstein (1), @iCaleb (1), @maciejmackowiak (1), @archon810 (1), @rcorrales (1), @varjodesigns (1), @jivygraphics (1), @whyisjake (1), @90lines (1), @sc0ttkclark (1), @jakariaistauk (1), @djcowan (1), @arena (1), @askdesign (1), @bph (1), @bradley2083 (1), @colorfultones (1), @dingo_d (1), @domainsupport (1), @annezazu (1), @dryanpress (1), @elmastudio (1), @francina (1), @garrett-eclipse (1), @gigitux (1), @grantmkin (1), @antonvlasenko (1), @andraganescu (1), @ironprogrammer (1), @Michi91 (1), @youknowriad (1), @jastos (1), @aurooba (1), @dsas (1), @jonoaldersonwp (1), @grapplerulrich (1), @jb510 (1), @annashopina (1), @soean (1), @wildworks (1), @zaguiini (1), @winterstreet (1), @mujuonly (1), @mi5t4n (1), @audrasjb (1), @simison (1), @mikeschroder (1), @manzoorwanijk (1), @adrianduffell (1), @ipajen (1), @dmsnell (1), @skorasaurus (1), @shiloey (1), @jeremyyip (1), @mburridge (1), @jffng (1), @joostdevalk (1), @jorgefilipecosta (1), @juanmaguitar (1), @mamaduka (1), @matveb (1), @mitogh (1), @scruffian (1), @ndiego (1), @ntsekouras (1), @ocean90 (1), @paaljoachim (1), @pagelab (1), @peterwilsoncc (1), @priethor (1), and @mattkeys (1).

Congrats and welcome to our 25 (!) new contributors of the week:ย @niravsherasiya7707, @michelleblanchette, @matthewfarlymn, @wvega, @ahardyjpl, @aslamdoctor, @maltfield, @bvreeman22, @iammehedi1, @jordanpak, @maxinacube, @l1nuxjedi, @JordanPak, @emailjoey, @varjodesigns, @jivygraphics, @90lines, @djcowan, @askdesign, @Michi91, @jastos, @winterstreet, @mi5t4n, @adrianduffell, @shiloey โ™ฅ๏ธ

Core committers: @sergeybiryukov (15), @audrasjb (13), @johnbillion (6), @desrosj (5), @swissspidy (4), @drewapicture (4), @jorbin (3), @peterwilsoncc (3), @joedolson (3), @joemcgill (3), @flixos90 (2), @isabel_brison (2), @hellofromtonya (2), @timothyblynjacobs (1), @davidbaumwald (1), @antpb (1), @kadamwhite (1), @spacedmonkey (1), @westonruter (1), @adamsilverstein (1), @bernhard-reiter (1), @costdev (1), and @whyisjake (1).

#6-4, #core, #week-in-core

Two Weeks in Core โ€“ August 14, 2023

Welcome back to a new issue ofย Week inย CoreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress.. Letโ€™s take a look at what changed onย TracTrac An open source project by Edgewall Software that serves as a bug tracker and project management tool for WordPress.ย between July 31 and August 14, 2023.

  • 40 commits
  • 50 contributors
  • 164 tickets created
  • 15 tickets reopened
  • 138 tickets closed

Ticketticket Created for both bug reports and feature development on the bug tracker.ย numbers are based on theย Trac timeline for the period above. The following is a summary of commits, organized by component and/or focus.

Code changes

Build/Test Tools

  • Bump the required versions of Node.js and npm โ€“ #56658
  • Correct two @covers annotations to use the recommended pattern โ€“ #59069
  • Update 3rd-party GitHubGitHub GitHub is a website that offers online implementation of git repositories that can easily be shared, copied and modified by other developers. Public repositories are free to host, private repositories require a paid subscription. GitHub introduced the concept of the โ€˜pull requestโ€™ where code changes done in branches by contributors can be reviewed and discussed before being merged be the repository owner. https://github.com/ Actions โ€“ #58867
  • Update all build tool related dependencies โ€“ #58863
  • Update the README file to reflect new Node.js/npm versions โ€“ #59071, #56658
  • revert downgrade of uuid โ€“ #58623
  • Fix leakage in WP_List_Table tests โ€“ #58955, #58896

Code Modernization

  • Deprecate dynamic properties in WP_List_Table magic methods โ€“ #58896, #56034
  • Deprecate dynamic properties in WP_Text_Diff_Renderer_Table magic methods โ€“ #58898, #56034
  • Deprecate dynamic properties in WP_User_Query magic methods โ€“ #58897, #56034
  • Use โ€œdeclareโ€ in WP_List_Table magic methods deprecation message โ€“ #58896

Coding Standards

  • Bring more consistency to Last-Modified and ETag checks โ€“ #58831
  • Rewrite loose comparison in wp_list_categories() โ€“ #58831
  • Use instanceof keyword instead of the is_a() function โ€“ #58943
  • Use strict comparison in wp-admin/includes/class-wp-importer.php โ€“ #58831
  • Use strict comparison in wp-includes/class-wp-image-editor.php โ€“ #58831
  • Use strict comparison in wp-includes/class-wp.php โ€“ #58831
  • Use strict comparison in wp-includes/cron.php โ€“ #58831
  • Use strict comparison in wp-includes/kses.php โ€“ #58831
  • Use strict comparison in wp-includes/revision.php โ€“ #58831

Docs

  • Correct duplicate hook reference for wp_min_priority_img_pixels โ€“ #59067
  • Remove @see references for SimplePie classes โ€“ #59030

Editor

  • Only exclude auto-generated blockBlock Block is the abstract term used to describe units of markup that, composed together, form the content or layout of a webpage using the WordPress editor. The idea combines concepts of what in the past may have achieved with shortcodes, custom HTML, and embed discovery into a single consistent API and user experience. files from coding standards checks โ€“ #50010
  • Simplify usage of block_has_support() function by supporting a string โ€“ #58532

Embeds

  • Modernize wp-embed script with removal of obsolete IE10/IE11 code and support for WP 4.4 and below โ€“ #58974

Emoji

  • Suppress console errors from sessionStorage usage in sandboxed post embed iframeiframe iFrame is an acronym for an inline frame. An iFrame is used inside a webpage to load another HTML document and render it. This HTML document may also contain JavaScript and/or CSS which is loaded at the time when iframe tag is parsed by the userโ€™s browser. โ€“ #58978, #58472

External Libraries

  • Update Backbone.js to version 1.5.0 โ€“ #58930
  • Update imagesLoaded to version 5.0.0 โ€“ #56731
  • Update the whatwg-fetch polyfill library โ€“ #59066

HTMLHTML HyperText Markup Language. The semantic scripting language primarily used for outputting content in web browsers. APIAPI An API or Application Programming Interface is a software intermediary that allows programs to interact with each other and share data in limited, clearly defined ways.

  • Add support for BUTTON element โ€“ #58961
  • Adjust code styling to GutenbergGutenberg The Gutenberg project is the new Editor Interface for WordPress. The editor improves the process and experience of creating new content, making writing rich content much simpler. It uses โ€˜blocksโ€™ to add richness rather than shortcodes, custom HTML etc. https://wordpress.org/gutenberg/โ€™s linterโ€™s preferences โ€“ #58918
  • Fix missing * for docblockdocblock (phpdoc, xref, inline docs) โ€“ #58918. โ€“ #59010

Media

  • Simplify logic in wp_get_loading_optimization_attributes() โ€“ #58891

Options, MetaMeta Meta is a term that refers to the inside workings of a group. For us, this is the team that works on internal WordPress sites like WordCamp Central and Make WordPress. APIs

  • Expand $autoload parameter documentation โ€“ #58963

Script Loader

  • Use defer loading strategy for wp-embed script and move to head (in block themes) โ€“ #58931

Site Health

  • Use PHP_SAPI constant instead of the php_sapi_name() function โ€“ #58942

Themes

  • Avoid unnecessary check whether parent template file exists when not using a child themeChild theme A Child Theme is a customized theme based upon a Parent Theme. Itโ€™s considered best practice to create a child theme if you want to modify the CSS of your theme. https://developer.wordpress.org/themes/advanced-topics/child-themes/. โ€“ #58576
  • add wp_get_theme_data_template_parts function โ€“ #59003

Upgrade/Install

  • Update $_old_files for 6.3 โ€“ #58994

Users

  • Correct the logic for switch_to_blog() in WP_User_Query::generate_cache_key() โ€“ #59011

Props

Thanks to the 50 people who contributed to WordPress Core on Trac last week:

@sergeybiryukov (13), @aristath (7), @rajinsharwar (7), @afercia (7), @poena (7), @costdev (6), @jrf (5), @antonvlasenko (5), @hellofromTonya (5), @mukesh27 (5), @audrasjb (5), @peterwilsoncc (4), @swissspidy (4), @desrosj (4), @hareesh-pillai (3), @ayeshrajans (3), @dmsnell (3), @flixos90 (3), @westonruter (3), @markjaquith (3), @oglekler (3), @jeffpaul (3), @thekt12 (2), @nihar007 (2), @nazsabuz (1), @arnedb (1), @Hareesh (1), @spacedmonkey (1), @Pillai (1), @JeffPaul (1), @joemcgill (1), @davidbaumwald (1), @crstauf (1), @kevin940726 (1), @khokansardar (1), @Rahe (1), @adamsilverstein (1), @valmedia2023 (1), @dantovbein (1), @hbhalodia (1), @tmatsuur (1), @felixarntz (1), @gziolo (1), @ahmedgeek (1), @dd32 (1), @austinginder (1), @RavanH (1), @lopo (1), @youknowriad (1), and @rmccue (1).

Congrats and welcome to our 5 new contributors of the week:ย @nazsabuz, @arnedb, @valmedia2023, @dantovbein, @ahmedgeek โ™ฅ๏ธ

Core committers: @sergeybiryukov (14), @desrosj (7), @hellofromtonya (5), @flixos90 (4), @westonruter (3), @bernhard-reiter (2), @johnbillion (1), @oandregal (1), @jorbin (1), @davidbaumwald (1), and @isabel_brison (1).

#6-3, #6-4, #core, #week-in-core

I18N Performance Analysis

A recent in-depth performance analysis of WordPress core showed that loading translations had a significant hit on a siteโ€™s server response time. Given that more than half of all WordPress sites use a language other than English (US), the performance team identified this as an area worth looking into more closely. The team spent the last couple of months exploring this in more detail and the results are now shared in this blogblog (versus network, site) post.

This is merely an analysis of the current i18ni18n Internationalization, or the act of writing and preparing code to be fully translatable into other languages. Also see localization. Often written with a lowercase i so it is not confused with a lowercase L or the numeral 1. Often an acquired skill. system in WordPress with some proposed under-the-hood performance improvements. No decisions have been made on any of these proposals.

Context

Initial benchmarks showed that the median loading time for a localized site can be up to 50% slower than for non-localized sites, depending on which themes and plugins are being used. This was measured using both the wpp-research CLI tool and also a dedicated benchmark environment (as elaborated in the Comparison section towards the end).

The WordPress i18n system is based on gettext, which uses source .po (Portable Object) files and binary .mo (Machine Object) files for storing and loading translations. It is not using the C gettext APIAPI An API or Application Programming Interface is a software intermediary that allows programs to interact with each other and share data in limited, clearly defined ways. itself but a custom userland implementation that works without any external dependencies.

In addition to coreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress. itself, each pluginPlugin A plugin is a piece of software containing a group of functions that can be added to a WordPress website. They can extend functionality or add new features to your WordPress websites. WordPress plugins are written in the PHP programming language and integrate seamlessly with WordPress. These can be free in the WordPress.org Plugin Directory https://wordpress.org/plugins/ or can be cost-based plugin from a third-party and theme has its own translationtranslation The process (or result) of changing text, words, and display formatting to support another language. Also see localization, internationalization. file, which has to be loaded and parsed on every request. Loading and parsing all these translation files is an expensive task.

In the past, various solutions have been discussed and explored to improve the i18n performance of WordPress. A non-exhaustive list:

  • Use a more lightweight MO parser
  • Improve translation lookups by using the hash map in MO files (e.g. with DynaMo)
  • Caching translations in the object cache
  • Caching translations in APCu (an in-memory key-value store for PHPPHP The web scripting language in which WordPress is primarily architected. WordPress requires PHP 7.4 or higher)
  • Other more elaborated forms of caching (e.g. per request)
  • Using the native PHP gettext extension
  • Use a custom PHP extension to handle the MO file parsing)
  • Using lazily evaluated translation calls (see #41305 for details)
  • Using a different file format than .mo files, e.g. plain .php files

A more recent discussion touching on all of these solutions can be found over at the wordpress/performance repository. Itโ€™s a great way to get some context on this topic.

For this analysis, many of these solutions were looked at, focusing on their advantages and disadvantages. At the end of this post there is a comparison table with some much needed numbers as well, based on custom-built benchmarks.

Solutions

Solution A: Use different file format

Use a different file format for translations instead of .mo files to avoid the overhead of loading and parsing binary files.

Design considerations

With this solution, translations will be stored in plain .php files returning an associative array of translation strings. Whenever a .php file is available, it will be preferred over the .mo file, which is still used as a fallback. The rest of the architecture remains the same.

When a localized WordPress site downloads language packs from the translate.wordpress.org translation platform, it downloads .po and .mo files containing all the translations. This will be modified to include .php files. GlotPress, which the platform is built on, will be updated to support this new output format. Additionally, WordPress core itself could be modified to generate PHP files whenever they are missing.

In theory, nothing is faster in PHP than loading and executing another PHP file. .json, .ini, or .xml would all be much slower.

Proof of concepts using the PHP files can be found at swissspidy/wp-php-translation-files and swissspidy/ginger-mo.

Benefits

  • Initial benchmarks show consistent significant performance improvements
  • Relatively trivial to implement
  • Maintains backward compatibility thanks to graceful fallback
  • Makes it easier for users to inspect and change translations (no need to compile .po to .mo)
  • Avoids loading and parsing binary .mo files, which is the main bottleneck
  • Lets PHP store translations in OPcache for an additional performance benefit
  • Battle-tested approach in the PHP ecosystem (for example in Laravel)

Caveats and risks

  • Requires not only changes to WordPress core, but also tools like GlotPress and WP-CLIWP-CLI WP-CLI is the Command Line Interface for WordPress, used to do administrative and development tasks in a programmatic way. The project page is http://wp-cli.org/ https://make.wordpress.org/cli/
  • Adds maintenance overhead by introducing a new file format on top of the existing one
    • As shown by the proof of concept, the overhead is minimal
    • In the long term, .mo support could be deprecated
  • Security considerations due to essentially executing remotely fetched PHP files
    • Not really different from downloading plugins/themes from WordPress.org
    • WordPress considers translations to be trusted
    • Hosting providers could be blocking PHP execution in wp-content/languages
    • Could potentially use checksum verifications or static analysis at install time to detect anomalies

Effort and timeline

The proof of concept using PHP files is in a very solid state already. There are also examples for changes to WP-CLI (PR) and GlotPress (PR). This makes it suitable for a feature project to expand testing with very little effort required. Even a core merge would be very straightforward in a relatively short time, potentially already in Q4 2023. The security aspect when using PHP files could be a potential blockerblocker A bug which is so severe that it blocks a release., so itโ€™s important to loopLoop The Loop is PHP code used by WordPress to display posts. Using The Loop, WordPress processes each post to be displayed on the current page, and formats it according to how it matches specified criteria within The Loop tags. Any HTML or PHP code in the Loop will be processed on each post. https://codex.wordpress.org/The_Loop. in the WordPress security team and hosting providers early on.

More time is required to test other file formats and compare results.

Solution B: Native gettext extension

Use the native gettext PHP extension written in C when available, instead of the custom built-in parser in WordPress.

Design considerations

WordPress has always used a custom MO file parser, because the native gettext extension is not necessarily available on the server. With this solution, the existing system is adapted to use the extension whenever available and falling back to the custom implementation if not.

This has been previously explored in #17268 and implemented in WP Performance Pack and Native Gettext. These implementations can serve as inspiration for the initial design. They all work similarly in that they symlink or copy the translation files to a new directory structure that is compatible with the gettext extension.

As of July 2023, around 66% of all localized WordPress sites have the gettext extension installed, according to information from the WordPress update requests.

Benefits

  • Significant performance improvements for eligible sites
    • Initial benchmarks show that loading time and memory usage basically do not differ from non-localized sites

Caveats and risks

  • The gettext extension is not commonly available
    • Smaller incentive to implement and lower impact overall
  • Requires locales to be installed on the server
    • Servers rarely have many installed locales
      • Locales often need to be compiled first and take up a lot of space
      • WordPress on the other hand supports over 200 locales
    • Potential clashes with the custom locales WordPress supports
      • For example, locales like pt_PT_ao90, de_DE_formal or roh might not even be supported
    • Outreach to hosting providers would be necessary
  • Adds maintenance overhead by essentially adding a second gettext implementation
  • Poor API
    • Requires setting environment variables (such as LC_MESSAGES and LANGUAGE), which might not be possible or cause conflicts on certain servers/sites
  • Requires symlinks or hard file copies
    • Symlinks might not be possible on the server; copying all translation files means doubling disk usage
  • Translation files are cached by PHP, thus any translation change requires restarting the web server
    • There are workarounds such as cache busting using random file names or fstat, however they might not work on all environments
  • Has not been tested on a wider scale, despite being discussed for years

Check out the code of WP Performance Pack and Native Gettext to get a better idea of the extensionโ€™s poor API.

Effort and timeline

While there are existing implementations that could be leveraged for this solution, further field testing is required to assess whether the extension actually works under all circumstances. Given the limitations around the poor API and requirements for installing locales, it does not seem like a viable solution at all.

Solution C: Cache translations

Cache translations somehow to avoid expensive .mo parsing.

Design considerations

Cache translations either on disk, in the database, or the object cache to avoid expensive .mo file parsing on subsequent requests. This can be done in a generalized manner or also on a per-request basis to only load translations required for the current URLURL A specific web address of a website or web page on the Internet, such as a websiteโ€™s URL www.wordpress.org.

Many different caching strategies have been explored in various forms in the past, each with their own pros and cons. Some could even be combined. Defining the exact implementation requires further exploration and testing, which warrants its own exploration post.

Benefits

  • Caching translations after one time .mo parsing potentially improves performance for future requests

Caveats and risks

  • Caching using persistent object cache (e.g. Memcached, Redis) or APCu:
    • Not available on most sites, making this not an ideal solution
      • Availability according to data from WordPress update requests:
        • Memcached: ~25%
        • Redis: ~25%
        • APCu: ~6%
    • Can potentially significantly increase cache size or exceed cache key limits
  • Database caching:
    • Moves the problem from disk reads to database reads
    • Can potentially significantly increase database size
    • Alternatively, use sqlite as a cache backend
      • Untested approach
      • Available on around 90% of sites
  • Disk caching:
    • Not always possible, depending on server environment
    • Still causes file reads, only with fewer or other files
  • Multiple cache groups (e.g. per-request or frontend/adminadmin (and super admin) split)
    • Smarter cache logic to only load translations that are needed for the majority of requests
    • Can potentially significantly increase cache size
    • Unlikely that different requests use very different translations
  • Cache retrieval adds overhead
    • Exact performance gains depend on implementation method and need to be measured first
    • No performance gains with cold cache
    • Cache invalidation logic TBD

Effort and timeline

Given the existing solutions in the ecosystem, the engineering effort itself would not be too big, but the right caching implementation (e.g. disk cache or object cache) needs to be evaluated first.

However, the right caching strategy probably does not exist because of all the different hosting environments. Since itโ€™s unrealistic for core to support multiple types of caching, this solution seems better suited for plugins rather than core.

Solution D: Lazily evaluated translation calls

Use lazily evaluated translation calls to reduce the number of function calls in certain cases, leading to improved performance.

Design considerations

The idea of lazily evaluated translation calls has been first discussed in #41305. It enables avoiding string-specific expensive translation lookups until the translations are actually needed, by passing around proxy objects.

In other words: beyond just-in-time loading of translation files (which WordPress already does), this would add just-in-time lookup of individual strings in the translations. Check out this proof of concept to get a better picture.

It can be integrated essentially in two ways, both of which are explained on the core ticketticket Created for both bug reports and feature development on the bug tracker.:

  1. Change all translation calls to be lazily evaluated by default
  2. Make this opt-in, either with new function arguments or new functions altogether

Benefits

  • Reduces the number of translation lookups, in some scenarios drastically
    • On a regular home page request there are ~60% less translation calls, saving around ~10ms (as measured by XHProf)
  • As a side effect, solves UXUX User experience issues such as #38643

Caveats and risks

  • Depending on implementation this either breaks backward compatibility or risks not gaining enough adoption
    • Documentation, tooling, and developer education can help mitigate this to a certain extent
    • Adoption could be done gradually, e.g. starting with an opt-in approach and eventually making it the default
  • Likely will not have a significant impact on typical frontend page loads, as itโ€™s mostly useful for areas like the REST APIREST API The REST API is an acronym for the RESTful Application Program Interface (API) that uses HTTP requests to GET, PUT, POST and DELETE data. It is how the front end of an application (think โ€œphone appโ€ or โ€œwebsiteโ€) can communicate with the data store (think โ€œdatabaseโ€ or โ€œfile systemโ€) https://developer.wordpress.org/rest-api/. schema output, where a lot of translation calls are made without actually using the translations
    • Needs analysis in more scenarios to measure impact
    • The REST API schema already has a workaround by using a cache in a static variable
  • Does not improve situation for actually loading translation files
  • Initial testing shows that this actually hurts performance due to the additional thousands of proxy objects being created

Effort and timeline

Gradual adoption would mean a multi-year effort to establish lazily evaluated translation calls, while enabling this by default is a significant backward compatibility break that could affect thousands of plugins and themes in the ecosystem. And since it does actually slow down performance in some cases, this solution is not a great candidate for implementation.

Solution E: Optimize/Rewrite existing MO parser

Refactor the existing MO parser in WordPress to be more performant.

Design considerations

Completely overhaul the existing MO translation file parser in WordPress with performance in mind. For example by using Ginger MO, WP Performance Pack, or other existing solutions as a base.

While for instance Altis DXP (Human Made) have actually replaced the existing MO parser with a custom-made PHP extension written in Rust, such an approach is obviously not feasible for core. The new solution needs to be written in userland PHP.

Initial testings with an updated fork of Ginger MO show some noticeable speedups and lower memory usage. It also supports multiple translation files per text domain and multiple locales loaded at once, which could prove beneficial for improving the localeLocale A locale is a combination of language and regional dialect. Usually locales correspond to countries, as is the case with Portuguese (Portugal) and Portuguese (Brazil). Other examples of locales include Canadian English and U.S. English. switching functionality in WordPress core.

Besides that, plugins like WP Performance Pack and DynaMo have implemented partial lookups using the MO hash table or binary search, avoiding reading the whole file and storing it in memory. That slightly reduces memory usage and performance.

Benefits

  • Can be used without necessarily introducing another file format
  • Opens up potential performance enhancements in other areas, i.e. locale switching
  • Mostly maintains backward compatibility

Caveats and risks

  • Still a risk of breaking backward compatibility

Effort and timeline

There already is a working proof of concept for this solution, but more testing is required to further refine it and improve its backward compatibility layer. With such an effort being an ideal candidate for a feature pluginFeature Plugin A plugin that was created with the intention of eventually being proposed for inclusion in WordPress Core. See Features as Plugins., this could be achieved relatively quickly in a few months.

Solution F: Splitting up translation files

Split translation files from plugins and themes into smaller chunks to make loading them more efficient.

Design considerations

Depending on the projectโ€™s size, translation files can be quite big. Thatโ€™s why WordPress itself uses separate translation files for the admin and everything else, so that not too many strings are unnecessarily loaded.

This strategy could be applied to plugins and themes as well. Either by allowing them to use multiple text domains (which would require developer education and changes to tooling), or by somehow doing this automatically (exact method TBD)

Benefits

  • Faster loading times due to loading smaller files

Caveats and risks

  • Risk of breaking backward compatibility
  • Opt-in approach requires tooling and distribution changes and risks slow adoption

Effort and timeline

Further research is required to evaluate this properly.

Comparison

At first glance, solution A (PHP translation files) is a relatively straightforward enhancementenhancement Enhancements are simple improvements to WordPress, such as the addition of a hook, a new feature, or an improvement to an existing feature. that maintains backward compatibility and shows promising improvements. However, it does not only require changes to core itself, but also to the translation platform. The security aspect remains a risk, although discussing it early on with stakeholders and gathering more testers would help mitigate it.

Leveraging the native gettext extension as in solution B shows stunning results, but the lack of availability and the non-ideal API are a concern. Still, itโ€™s a progressive enhancement that cannot be ignored. Especially since it could pretty much eliminate the need for additional caching as in solution C.

Caching already loaded translations as in solution C does not eliminate the root cause of the i18n slowness, but can speed up subsequent requests. Unfortunately, persistent object caches or APCu are rather uncommon (though we do not have exact data on the former yet, see #58808), and implementing more complex types of caching (e.g. per-request caching) would require significant exploration effort before becoming a viable option.

Lazily evaluated translation calls (solution D) can shave time off translation calls in some situations, but overall actually decrease performance. While it could help solve some actual UX issues in core, the backward compatibility and adoption concerns make it even less of a suitable solution.

Existing plugins like Ginger MO and WP Performance Pack show that the existing MO parser in WordPress can be further improved (solution E).

Benchmarks

Now to the most interesting part: the hard numbers!

These benchmarks are powered by a custom-built performance testing environment using @wordpress/env and Playwright. The environment has been configured with some additional plugins and the PHP extensions required for some of the solutions. Tests have been performed against the 6.3 RCrelease candidate One of the final stages in the version release cycle, this version signals the potential to be a final release to the public. Also see alpha (beta). by visiting the home page and the dashboard 30 times each and then using the median values.

You can find the exact setup in this wp-i18n-benchmarks GitHub repository.

BlockBlock Block is the abstract term used to describe units of markup that, composed together, form the content or layout of a webpage using the WordPress editor. The idea combines concepts of what in the past may have achieved with shortcodes, custom HTML, and embed discovery into a single consistent API and user experience. Theme

LocaleScenarioObject CacheMemory UsageTotal Load Time
en_USDefault15.60 MB133.58 ms
de_DEDefault29.14 MB181.95 ms
de_DEGinger MO (MO)19.24 MB159.18 ms
de_DEGinger MO (PHP)16.98 MB138.14 ms
de_DEGinger MO (JSONJSON JSON, or JavaScript Object Notation, is a minimal, readable format for structuring data. It is used primarily to transmit data between a server and web application, as an alternative to XML.)19.24 MB153.39 ms
de_DENative Gettext15.99 MB142.12 ms
de_DEDynaMo19.62 MB157.93 ms
de_DECache in APCu50.37 MB181.51 ms
en_USDefaultโœ…15.67 MB121.53 ms
de_DEDefaultโœ…29.01 MB167.67 ms
de_DEGinger MO (MO)โœ…19.11 MB147.19 ms
de_DEGinger MO (PHP)โœ…16.85 MB127.97 ms
de_DEGinger MO (JSON)โœ…19.11 MB144.43 ms
de_DENative Gettextโœ…15.86 MB129.19 ms
de_DEDynaMoโœ…18.57 MB133.46 ms
de_DECache in APCuโœ…50.30 MB170.19 ms
de_DECache in object cacheโœ…29.07 MB173.19 ms
Benchmarks using the Twenty Twenty-Three block theme

Classic Theme

LocaleScenarioObject CacheMemory UsageTotal Load Time
en_USDefault15.35 MB120.79 ms
de_DEDefault28.79 MB172.10 ms
de_DEGinger MO (MO)18.85 MB145.68 ms
de_DEGinger MO (PHP)16.56 MB124.73 ms
de_DEGinger MO (JSON)18.84 MB140.78 ms
de_DENative Gettext15.58 MB128.26 ms
de_DEDynaMo19.24 MB146.09 ms
de_DECache in APCu50.13 MB167.28 ms
en_USDefaultโœ…15.19 MB107.26 ms
de_DEDefaultโœ…28.59 MB154.30 ms
de_DEGinger MO (MO)โœ…18.64 MB133.21 ms
de_DEGinger MO (PHP)โœ…16.37 MB112.94 ms
de_DEGinger MO (JSON)โœ…18.64 MB128.94 ms
de_DENative Gettextโœ…15.38 MB115.11 ms
de_DEDynaMoโœ…18.10 MB120.72 ms
de_DECache in APCuโœ…49.99 MB151.82 ms
de_DECache in object cacheโœ…28.65 MB156.36 ms
Benchmarks using the Twenty Twenty-One classic theme

Admin

LocaleScenarioObject CacheMemory UsageTotal Load Time
en_USDefault15.42 MB139.83 ms
de_DEDefault31.92 MB187.76 ms
de_DEGinger MO (MO)20.07 MB164.94 ms
de_DEGinger MO (PHP)17.09 MB139.66 ms
de_DEGinger MO (JSON)20.06 MB160.87 ms
de_DENative Gettext15.95 MB143.43 ms
de_DEDynaMo20.58 MB166.79 ms
de_DECache in APCu58.13 MB190.38 ms
en_USDefaultโœ…15.66 MB112.69 ms
de_DEDefaultโœ…31.84 MB164.26 ms
de_DEGinger MO (MO)โœ…19.99 MB140.70 ms
de_DEGinger MO (PHP)โœ…17.01 MB118.52 ms
de_DEGinger MO (JSON)โœ…19.98 MB138.49 ms
de_DENative Gettextโœ…15.87 MB120.01 ms
de_DEDynaMoโœ…19.73 MB120.26 ms
de_DECache in APCuโœ…58.07 MB162.41 ms
de_DECache in object cacheโœ…31.86 MB164.28 ms
Benchmarks visiting the WordPress admin

Conclusion

Finding the right path forward means weighing all the pros and cons of each solution and looking at both horizontal and vertical impact, i.e. how much faster can i18n be made for how many sites.

When looking at all these factors, it appears that a revamped translations parser (solution E) could bring the most significant improvements to all localized WordPress sites. Especially when combined with a new PHP translation file format (solution A), which Ginger MO supports, the i18n overhead becomes negligible. Of course the same risks associated with introducing a new format apply.

On top of that, a revamped i18n library like Ginger MO could also be combined with other solutions such as caching or dynamic MO loading to potentially gain further improvements. However, those routes have yet to be explored.

Next steps

The WordPress performance team wants to further dive into this topic and test some of the above solutions (and combinations thereof) on a wider scale through efforts like the Performance Lab feature project. We are looking forward to hearing your feedback on this analysis and welcome any additional comments, insights, and tinkering.

Deadline August 6, 2023

After the deadline passes, the performance team will discuss the received feedback and determine next steps.


Thank you to @flixos90, @westonruter, @joemcgill, @spacedmonkey, and @adamsilverstein for reviewing and helping with this post. Thank you to @nbachiyski, @ocean90, @akirk, @rmccue, @dd32 for providing valuable insights and context.

#core, #i18n, #performance

A Week in Core โ€“ June 26, 2023

Welcome back to a new issue ofย Week inย CoreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress.. Letโ€™s take a look at what changed onย TracTrac An open source project by Edgewall Software that serves as a bug tracker and project management tool for WordPress.ย between June 19 and June 26, 2023.

  • 112 commits
  • 192 contributors
  • 68 tickets created
  • 16 tickets reopened
  • 107 tickets closed

Ticketticket Created for both bug reports and feature development on the bug tracker.ย numbers are based on theย Trac timeline for the period above. The following is a summary of commits, organized by component and/or focus.

Code changes

Administration

  • Add the no-store and private directives to the Cache-Control headerHeader The header of your site is typically the first thing people will experience. The masthead or header art located across the top of your page is part of the look and feel of your website. It can influence a visitorโ€™s opinion about your content and you/ your organizationโ€™s brand. It may also look different on different screen sizes. when preventing caching for logged in users โ€“ #21938, #57627
  • Backwards compatibility for new sortable keys โ€“ #32170
  • Consistent positioning and size of search form โ€“ #57949
  • Fix password layout for RTL and mobile โ€“ #9883
  • Fix visual regressionregression A software bug that breaks or degrades something that previously worked. Regressions are often treated as critical bugs or blockers. Recent regressions may be given higher priorities. A "3.6 regression" would be a bug in 3.6 that worked as intended in 3.5. in media search input โ€“ #57949
  • Hide password in options/writing โ€“ #9883
  • Make checkbox column clickable โ€“ #21516
  • Reduce translationtranslation The process (or result) of changing text, words, and display formatting to support another language. Also see localization, internationalization. calls after [55969] โ€“ #57675
  • Replace Tagline option placeholder with a description โ€“ #57675
  • Replace contracted verb forms for better consistency โ€“ #30796
  • Set accessible state for list table headers โ€“ #32170

Bootstrap/Load

  • Require wp-includes/compat.php earlier in wp-settings.php โ€“ #58206
  • Require wp-includes/compat.php in wp-load.php โ€“ #58206

Build/Test Tools

  • Store artefacts of failing E2E test runs โ€“ #58596
  • Update URLURL A specific web address of a website or web page on the Internet, such as a websiteโ€™s URL www.wordpress.org of theme unit testunit test Code written to test a small piece of code or functionality within a larger application. Everything from themes to WordPress core have a series of unit tests. Also see regression. data โ€“ #58569
  • Update the test for pre_wp_setup_nav_menu_item filterFilter Filters are one of the two types of Hooks https://codex.wordpress.org/Plugin_API/Hooks. They provide a way for functions to modify data of other functions. They are the counterpart to Actions. Unlike Actions, filters are meant to work in an isolated manner, and should never have side effects such as affecting global variables and output. โ€“ #56577

Bundled Themes

  • Twenty Fifteen: Fix Letter Case implementation โ€“ #58526
  • Twenty Fifteen: Remove IE specific resources โ€“ #56699
  • Twenty Fourteen: Fix Letter Case implementation โ€“ #58526
  • Twenty Nineteen: Always set background color and foreground color together โ€“ #45916
  • Twenty Nineteen: Ensure Separator blockBlock Block is the abstract term used to describe units of markup that, composed together, form the content or layout of a webpage using the WordPress editor. The idea combines concepts of what in the past may have achieved with shortcodes, custom HTML, and embed discovery into a single consistent API and user experience. supports theme colors in editor โ€“ #58558
  • Twenty Nineteen: Fix a JSJS JavaScript, a web scripting language typically executed in the browser. Often used for advanced user interfaces and behaviors. coding standard issue found after [55970] โ€“ #46474
  • Twenty Nineteen: Prevent a console error related to the main navigation on Firefox โ€“ #46474
  • Twenty Nineteen: Remove unused function parameters and variables โ€“ #57397
  • Twenty Nineteen: Revert [55960] โ€“ #45916
  • Twenty Seventeen: Make twentyseventeen_is_static_front_page() an alias of twentyseventeen_is_frontpage() โ€“ #43515
  • Twenty Seventeen: Remove IE specific resources โ€“ #56699
  • Twenty Sixteen: Fix Letter Case implementation โ€“ #58526
  • Twenty Sixteen: Fix List block padding in the editor โ€“ #58409
  • Twenty Ten: Improve Pullquote block line height for better readability โ€“ #52546
  • Twenty Thirteen: Remove IE specific resources โ€“ #56699
  • Twenty Thirteen: Remove an unnecessary border from Table block โ€“ #56538
  • Twenty Twenty-Two: Add missing subject tags and feature tags โ€“ #58437
  • Twenty Twenty: Fix Letter Case implementation โ€“ #58526
  • Twenty Twenty: Fix an RTL style issue leading to failed Test Default Themes & Create ZIPs workflow โ€“ #58396
  • Twenty Twenty: Fix left margin in Latest Posts & Latest Comments blocks โ€“ #58396
  • Twenty Twenty: Inherit Quote blockโ€™s paragraph custom letter spacing in the editor โ€“ #58033
  • Twenty Twenty: Remove various unused function parameters and variables โ€“ #57371
  • Twenty Twenty: Revert [56034] pending further investigation โ€“ #58396

Cache APIAPI An API or Application Programming Interface is a software intermediary that allows programs to interact with each other and share data in limited, clearly defined ways.

  • Remove unused usermeta global cache group โ€“ #58175

Code Modernization

  • Replace usage of strpos() with str_contains() โ€“ #58206
  • Replace usage of substr() with str_starts_with() and str_ends_with() โ€“ #58220
  • Use str_contains() in a few more places โ€“ #58206
  • Use str_contains() in a few more places โ€“ #58206
  • Use str_contains() in a few more places โ€“ #58220
  • Use str_ends_with() in a few more places โ€“ #58220
  • Use str_starts_with() and str_ends_with() in a few more places โ€“ #58220
  • Use str_starts_with() and str_ends_with() in a few more places โ€“ #58220
  • Use str_starts_with() in WP_Theme_JSON class methods โ€“ #58012

Coding Standards

  • Fix missing semicolon after [56009] โ€“ #40966
  • Fix undeclared variable issue โ€“ #40966
  • Use Yoda condition in str_ends_with() โ€“ #58220
  • Use strict comparison in wp-includes/pomo/translations.php โ€“ #57839

Database

  • Replace str_contains() and str_ends_with() usage in wpdb methods โ€“ #58206

Docs

  • Add missing param description to update_menu_item_cache in wp_get_nav_menu_items() โ€“ #58468, #57840
  • register_block_style() docblockdocblock (phpdoc, xref, inline docs) improvement โ€“ #58562, #57840

Editor

  • Add a description key to theme.json style variations โ€“ #58614
  • Add no-js fallback for site editor โ€“ #56228
  • Fix block editor styles being registered with frontend stylesheets โ€“ #58605
  • Fix block template utils test: use template part instead of template object โ€“ #58540
  • Improve accessibilityAccessibility Accessibility (commonly shortened to a11y) refers to the design of products, devices, services, or environments for people with disabilities. The concept of accessible design ensures both โ€œdirect accessโ€ (i.e. unassisted) and โ€œindirect accessโ€ meaning compatibility with a personโ€™s assistive technology (for example, computer screen readers). (https://en.wikipedia.org/wiki/Accessibility) of new custom fieldCustom Field Custom 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. UIUI User interface โ€“ #15631
  • Introduce WP_Theme_JSON::prepend_to_selector() to improve code quality and performance โ€“ #58193, #58457
  • Register core block styles in one place โ€“ #58528
  • Rename wp_get_remote_patterns to wp_get_theme_directory_pattern_slugs โ€“ #58460
  • Use static closures to avoid memory leaks โ€“ #58323
  • `wp_get_global_styles`: allow transforming the CSSCSS Cascading Style Sheets. Custom Properties into the values they represent โ€“ #58588
  • `wp_get_global_styles`: return the standard format for CSS Custom Properties โ€“ #58467
  • add Post Content attributes to block editor settings โ€“ #58534
  • add grid layout type โ€“ #58554
  • add grid layout type โ€“ #58554
  • add support for block-level link hover colors โ€“ #58575
  • add text columns to typography support โ€“ #58549
  • fix site editor layout bugbug A bug is an error or unexpected result. Performance improvements, code optimization, and are considered enhancements, not defects. After feature freeze, only bugs are dealt with, with regressions (adverse changes from the previous version) being the highest priority. โ€“ #56228
  • rename reusable blocks to patterns โ€“ #58577
  • revert add grid layout type โ€“ #58554
  • update layout classnames and specificity โ€“ #58548
  • use layout.wideSize as max viewport width โ€“ #58522
  • use logarithmic scale for fluid typography โ€“ #58523

Embeds

  • Add Anghami as a trusted oEmbed provider โ€“ #49850

Filesystem API

  • Attempt to create directory in copy_dir() โ€“ #41855

General

  • Introduce WP_DEVELOPMENT_MODE constant to signify context-specific development mode โ€“ #57487
  • Replace substr_compare() usage in the str_ends_with() polyfill โ€“ #58220
  • Replace some instances of โ€œblogblog (versus network, site)โ€ with โ€œsiteโ€ in documentation, translator comments, and user-facing text strings โ€“ #58117
  • Return early from str_ends_with() polyfill if both haystack and needle are empty โ€“ #58220
  • fix overridden typos โ€“ #58464

Help/About

  • Improve Dashboard screen options behavior on small screens โ€“ #57977

I18Ni18n Internationalization, or the act of writing and preparing code to be fully translatable into other languages. Also see localization. Often written with a lowercase i so it is not confused with a lowercase L or the numeral 1. Often an acquired skill.

  • Ensure determine_locale() does not potentially return an empty string โ€“ #58317

KSES

  • Add support for CSS repeat() function โ€“ #58551

Login and Registration

  • Add required to Username/password inputs โ€“ #32510

Media

  • Automatically add fetchpriority="high" to hero image to improve load time performance โ€“ #58235
  • Display the โ€œCopy URLโ€ and โ€œDownload fileโ€ row actions when the โ€œUnattachedโ€ filter is applied โ€“ #57890, #57893
  • Redirect deprecated wp-admin/media.php file โ€“ #57612

Posts, Post Types

  • Add a $previous_status parameter to wp_trash_post() related hooksHooks In WordPress theme and development, hooks are functions that can be applied to an action or a Filter in WordPress. Actions are functions performed when a certain event occurs in WordPress. Filters allow you to modify certain functions. Arguments used to hook both filters and actions look the same. โ€“ #58392

Quick/Bulk Edit

  • Donโ€™t set publish date when editing drafts โ€“ #19907

REST APIREST API The REST API is an acronym for the RESTful Application Program Interface (API) that uses HTTP requests to GET, PUT, POST and DELETE data. It is how the front end of an application (think โ€œphone appโ€ or โ€œwebsiteโ€) can communicate with the data store (think โ€œdatabaseโ€ or โ€œfile systemโ€) https://developer.wordpress.org/rest-api/.

  • Indicate when a theme supports the Site editor in the Themes REST API response โ€“ #58123
  • Return post modified datetime for Templates โ€“ #58540

Script Loader

  • Add support for HTMLHTML HyperText Markup Language. The semantic scripting language primarily used for outputting content in web browsers. 5 โ€œasyncโ€ and โ€œdeferโ€ attributes โ€“ #12009
  • Replace str_contains() usage in wp-includes/script-loader.php โ€“ #58206

Themes

  • Allow non-block themes to add theme support for border settings โ€“ #58598
  • Allow non-block themes to add theme support for link color settings โ€“ #58597
  • Change the order of path check in is_block_theme method โ€“ #58520
  • Fix caching issue in get_post_templates method in WP_Theme โ€“ #57886

Tools

  • Fix unresolvable conflicts computation in package sync script โ€“ #58628

Upgrade/Install

  • Add aria-describedby for input descriptions โ€“ #58613
  • Move location of $upgrade_notice for better consistency โ€“ #57939
  • Prevent users from sending multiple bulk pluginPlugin A plugin is a piece of software containing a group of functions that can be added to a WordPress website. They can extend functionality or add new features to your WordPress websites. WordPress plugins are written in the PHP programming language and integrate seamlessly with WordPress. These can be free in the WordPress.org Plugin Directory https://wordpress.org/plugins/ or can be cost-based plugin from a third-party updates โ€“ #40966
  • Show/hide toggle on password fields โ€“ #3534
  • Update โ€˜show detailsโ€™ button change โ€“ #44714

Props

Thanks to the 192 (!!) people who contributed to WordPress Core on Trac last week:

@sabernhardt (28), @audrasjb (21), @mukesh27 (20), @costdev (19), @spacedmonkey (16), @joedolson (14), @oglekler (13), @ramonopoly (11), @sergeybiryukov (11), @poena (10), @peterwilsoncc (8), @azaozz (8), @swissspidy (8), @flixos90 (8), @afercia (6), @tb1909 (5), @isabel_brison (5), @andrewserong (5), @dd32 (5), @zunaid321 (5), @kebbet (5), @joemcgill (5), @thakordarshil (4), @pateljaymin (4), @ugyensupport (4), @panchalhimani711 (4), @nidhidhandhukiya (4), @desrosj (3), @westonruter (3), @neychok (3), @pooja1210 (3), @ironprogrammer (3), @nihar007 (3), @clorith (3), @alexstine (3), @rutviksavsani (2), @karmatosed (2), @pbiron (2), @soulseekah (2), @hellofromtonya (2), @bgoewert (2), @kafleg (2), @Cybr (2), @ryelle (2), @samnajian (2), @Soean (2), @jane (2), @upadalavipul (2), @thekt12 (2), @dhruvishah2203 (2), @NekoJonez (2), @wpnook (2), @oandregal (2), @timothyblynjacobs (2), @10upsimon (2), @kapilpaul (1), @ignatggeorgiev (1), @jorbin (1), @krupalpanchal (1), @tacoverdo (1), @ramonopoly (1), @aristath (1), @maxcgparis (1), @rianrietveld (1), @bor0 (1), @boniu91 (1), @renyot (1), @kjellr (1), @zgrkaralar (1), @sabreuse (1), @wojtek.szkutnik (1), @pamprn09 (1), @brookedot (1), @ryan (1), @denis-de-bernardy (1), @mastrup (1), @jrf (1), @otto42 (1), @williampatton (1), @maniu (1), @hellofromTonya (1), @johnjamesjacoby (1), @dimijazz (1), @laurelfulford (1), @samful (1), @monzuralam (1), @azizantoun (1), @bacoords (1), @allancole (1), @d-signed (1), @nant82 (1), @sanchothefat (1), @matmoe (1), @ronakganatra (1), @jeremyfelt (1), @aznadesign (1), @mitchoyoshitaka (1), @lessbloat (1), @ogleker (1), @Boniu91 (1), @dilipbheda (1), @joostdevalk (1), @luehrsen (1), @ianbelanger (1), @grantmkin (1), @McAlyster (1), @janpaulkleijn (1), @rehanali (1), @pavanpatil1 (1), @Dharm1025 (1), @Ankit K Gupta (1), @markdoliner (1), @ayeshrajans (1), @paulkevan (1), @andy786 (1), @johnbillion (1), @pouicpouic (1), @joyously (1), @afragen (1), @Heiko_Mamerow (1), @Denis-de-Bernardy (1), @subrataemfluence (1), @nrqsnchz (1), @fencermonir (1), @zebaafiashama (1), @rudlinkon (1), @uxtremist (1), @rfischmann (1), @youknowriad (1), @mista-flo (1), @batmoo (1), @franrosa (1), @annashopina (1), @hareesh-pillai (1), @bitnissen (1), @krupajnanda (1), @kevin940726 (1), @xkon (1), @nkeller15 (1), @mujuonly (1), @hugod (1), @davidbaumwald (1), @shailu25 (1), @harshgajipara (1), @dmsnell (1), @nadimcse (1), @glendaviesnz (1), @adamsilverstein (1), @mukeshpanchal27 (1), @mor10 (1), @scep (1), @vanaf1979 (1), @Otto42 (1), @MarcGuay (1), @bookdude13 (1), @melchoyce (1), @aaronrobertshaw (1), @adeltahri (1), @chouby (1), @Clorith (1), @ocean90 (1), @dingo_d (1), @mikeschroder (1), @dhrumilk (1), @markparnell (1), @prashantbhivsane (1), @marybaum (1), @ababir (1), @chiragrathod103 (1), @jahidcse (1), @ntsekouras (1), @ryokuhi (1), @Narthur (1), @simonemanfre (1), @intoxination (1), @vasilism (1), @xmarcos (1), @matt (1), @markjaquith (1), @nazgul (1), @akbigdog (1), @rob1n (1), @DrewAPicture (1), @MichaelH (1), @empireoflight (1), @rmccue (1), @markoheijnen (1), @r0uter (1), @amansurov (1), @bi0xid (1), @caraffande (1)

.

Congrats and welcome to our 37 (!!) new contributors of the week:ย @thakordarshil, @pateljaymin, @panchalhimani711, @samnajian, @dhruvishah2203, @wpnook, @maxcgparis, @renyot, @mastrup, @dimijazz, @azizantoun, @bacoords, @aznadesign, @McAlyster, @janpaulkleijn, @markdoliner, @Heiko_Mamerow, @fencermonir, @uxtremist, @rfischmann, @franrosa, @annashopina, @bitnissen, @shailu25, @harshgajipara, @nadimcse, @scep, @vanaf1979, @ababir, @jahidcse, @Narthur, @simonemanfre, @vasilism, @xmarcos, @akbigdog, @r0uter, @amansurov, and @caraffandeย โ™ฅ๏ธ

Core committers: @audrasjb (37), @sergeybiryukov (21), @joedolson (14), @isabel_brison (13), @peterwilsoncc (5), @flixos90 (4), @oandregal (4), @spacedmonkey (3), @swissspidy (2), @johnbillion (2), @westonruter (1), @bernhard-reiter (1), @joemcgill (1).

#6-3, #core, #week-in-core

Performance Chat Summary: 20 June 2023

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

Announcements

  • Welcome to our new members ofย #core-performance [Slack thread]
  • Release 2.4.0 scheduled for later today
    • Agreed to postpone this to Tuesday June 20 to support several team members being out for the US holiday
  • Upcomingย BetaBeta A pre-release of software that is given out to a large group of users to trial under real conditions. Beta versions have gone through alpha testing in-house and are generally fairly close in look, feel and function to the final product; however, design changes often occur as part of the process.ย 1 for the 6.3 release on Tuesday June 27, 2023
  • Updates to ourย CoreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress.ย Performance Handbook with the introduction of theย Profiling PHP performance with XHProfย article

Priority Projects

Server Response Time

Link to roadmap projects

Contributors: @joemcgill @spacedmonkey @aristath

Database Optimization

Link to roadmap projects

Contributors: @aristath @spacedmonkey @olliejones

  • No updates this week

JavaScriptJavaScript JavaScript or JS is an object-oriented computer programming language commonly used to create interactive effects within web browsers. WordPress makes extensive use of JS for a better user experience. While PHP is executed on the server, JS executes within a userโ€™s browser. https://www.javascript.com/. & CSSCSS Cascading Style Sheets.

Link to roadmap project

Contributors: @mukesh27 @10upsimon @adamsilverstein @westonruter

  • @joemcgill For Script Loading Strategy:ย https://core.trac.wordpress.org/ticket/12009
    • Most of the PR for adding support for `async` and `defer` has been approved for commit. Unfortunately, keeping in support for inline scripts is blocking the current PR, so weโ€™re going to remove that part of the implementation this week and commit the rest. This just means that if anyone tries to add an `async` or `defer` strategy to a handle that has an inline script attached in an `after` position, the original script will be loaded with a blocking strategy instead.
    • @spacedmonkey I code reviewed the above and approved it for commit
    • @joemcgill we will likely ask for another review once weโ€™ve implemented the changes
    • @10upsimon Nothing more from my side, Iโ€™ll be working withย @joemcgill on the reversal of delayed after inline scripts, and further testing
    • @spacedmonkey Should we talk about the comment โ€“ย https://github.com/WordPress/wordpress-develop/pull/4391#issuecomment-1598421109ย . Or leave it open floor. I think this should be in core and I want to work out a path to unblock it
    • @10upsimon this is the same level of push back weโ€™re receiving on theย Trac ticket itself. Itโ€™s a long standing aversion to support delayed inline scripts. Iโ€™d like to see it in core as well, if possible.
    • @joemcgill I think weโ€™ve exhausted this conversation for now. The focus this week should be to get the majority of this feature committed and we can advocate for extending support for inline scripts during the beta period.
    • @spacedmonkey Could it be commit before the beta and then if we can resolve the inline style stuff, then we can do a part revert?
    • @joemcgill Andrew has indicated in the PR thread that we could continue that conversation during the beta period, yes

Images

Link to roadmap projects

Contributors: @flixos90 @thekt12 @adamsilverstein @joemcgill

  • @adamsilverstein Some recent developments on the modern image front: the new version of Safari includes JpegXL support which was a bit of a surprise and somewhat exciting. If other browsers follow suit, maybe the format will become useful for the web and WordPress?! In addition, Edge canary has apparently added AVIF support, so we will hopefully see all major browsers supporting AVIF soon.ย  I created a patchpatch A special text file that describes changes to code, by identifying the files and lines which are added, removed, and altered. It may also be referred to as a diff. A patch can be applied to a codebase for testing. to add AVIF support to core on the existing ticketticket Created for both bug reports and feature development on the bug tracker. that is ready for testing โ€“ย ย https://core.trac.wordpress.org/ticket/51228
  • @thekt12 and @flixos90 are also working on finalisingย https://github.com/WordPress/wordpress-develop/pull/4495ย this week
    • @spacedmonkey I have been code review and profiling this. We are awaiting a new version that improves PHPPHP The web scripting language in which WordPress is primarily architected. WordPress requires PHP 7.4 or higher performance.

Measurement

Link to roadmap projects

Contributors: @adamsilverstein @olliejones @joemcgill @mukesh27

  • @joemcgill Over the weekend, the Theme Unit Testunit test Code written to test a small piece of code or functionality within a larger application. Everything from themes to WordPress core have a series of unit tests. Also see regression. data that we rely on briefly went offline and broke the automated performance tests in Core. There is an open ticket about bringing that code directly into our repo, rather than relying on the Theme Unit Test data, but there is also conversation happening about moving all of that code into the WP organization. Original thread:ย https://wordpress.slack.com/archives/C02RQBWTW/p1687140431658569 For now, I donโ€™t think we need to take immediate action, but is something to consider over the coming weeks.

Ecosystem Tools

Link to roadmap projects

Contributors: @joegrainger @mukesh27

  • @joegrainger We are working on the last check for Milestone 2 for theย Plugin Checker. Once complete weโ€™ll be moving onto further QA/Testing and remediating over this week and next. Progress can be seen on theย GitHub repoย here. Feel free to take a look and leave any thoughts/ideas you may have in the repo. Thanks!

Creating Standalone Plugins

Link to GitHub overview issue

Contributors: @flixos90 @mukesh27 @10upsimon

  • @flixos90 Still awaiting approval of the Dominant Color Images pluginPlugin A plugin is a piece of software containing a group of functions that can be added to a WordPress website. They can extend functionality or add new features to your WordPress websites. WordPress plugins are written in the PHP programming language and integrate seamlessly with WordPress. These can be free in the WordPress.org Plugin Directory https://wordpress.org/plugins/ or can be cost-based plugin from a third-party in the plugin repo

Open Floor

  • @spacedmonkey This ticket has been very active โ€“ย https://core.trac.wordpress.org/ticket/58368
    • TLDR, WP_Commey_Query does count queries using order by, resulting in bad performance. Comment type is not a database index.
    • @joemcgill That ticket needs an owner and and agreed upon patch in the next week. Seems like a stretch at the moment.
    • @spacedmonkey I am not sure we can add indexes easily to a table like comments. The person on the ticket has 5 million comments in this database. Adding an index normally locks a table on a high traffic like that, it could be a problem. I think we will have to puntpunt Contributors sometimes use the verb "punt" when talking about a ticket. This means it is being pushed out to a future release. This typically occurs for lower priority tickets near the end of the release cycle that don't "make the cut." In this is colloquial usage of the word, it means to delay or equivocate. (It also describes a play in American football where a team essentially passes up on an opportunity, hoping to put themselves in a better position later to try again.) to 6.4. I will update the ticket.
      • @rmccue I think weโ€™ve added indexes on large tables before, seem to recall .com needing to orchestrate a slow rollout of them
  • @joemcgill Do we know who is ensuring the fix forย https://core.trac.wordpress.org/ticket/58457ย is getting synced from the GutenbergGutenberg The Gutenberg project is the new Editor Interface for WordPress. The editor improves the process and experience of creating new content, making writing rich content much simpler. It uses โ€˜blocksโ€™ to add richness rather than shortcodes, custom HTML etc. https://wordpress.org/gutenberg/ repo? This process still seems very manual and error prone to me.
  • @spacedmonkey Would useful to get eyes on โ€“ย https://github.com/WordPress/gutenberg/pull/51116

Our next chat will be held on Tuesday, June 27, 2023 at 15:00 UTC in the #core-performance channel in Slack.

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

A Week in Core โ€“ May 22, 2023

Welcome back to a new issue ofย Week inย CoreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress.. Letโ€™s take a look at what changed onย TracTrac An open source project by Edgewall Software that serves as a bug tracker and project management tool for WordPress.ย between May 8 and May 22, 2023 (sorry for not being able to publish a post last week, this one will cover two weeks!).

  • 48 commits
  • 87 contributors
  • 108 tickets created
  • 10 tickets reopened
  • 79 tickets closed

Also, WordPress 6.2.1 and 6.2.2 maintenance and security releases went out!

Ticketticket Created for both bug reports and feature development on the bug tracker.ย numbers are based on theย Trac timeline for the period above. The following is a summary of commits, organized by component and/or focus.

Code changes

Administration

  • Add missing escaping for CSSCSS Cascading Style Sheets. classes on the body tagtag A directory in Subversion. WordPress uses tags to store a single snapshot of a version (3.6, 3.6.1, etc.), the common convention of tags in version control systems. (Not to be confused with post tags.) in the adminadmin (and super admin) โ€“ #58336

Build/Test Tools

  • Call wp_cache_flush_runtime in WP_UnitTestCase. โ€“ #31463
  • Move wp_cache_flush_runtime() next to wp_cache_flush() โ€“ #57841
  • Partial revert of r55745 โ€“ #57841
  • Remove expectation of a deprecation notice from WP_Posts_List_Table tests โ€“ #58157
  • Split the tests from user/author.php into individual test classes โ€“ #57841
  • Use the function get_num_queries across all unit tests โ€“ #57841

Code Modernization

  • Correct fallback return value in get_the_author() โ€“ #58157
  • Explicitly declare all properties in Text_Diff_Engine_native โ€“ #58298

Coding Standards

  • Use esc_url() to escape link URLURL A specific web address of a website or web page on the Internet, such as a websiteโ€™s URL www.wordpress.org value in wp-admin/edit-link-form.php โ€“ #58282

Comments

  • Always lazily load comment metaMeta Meta is a term that refers to the inside workings of a group. For us, this is the team that works on internal WordPress sites like WordCamp Central and Make WordPress. โ€“ #57801

Docs

  • A host of corrections and improvements to inline documentation โ€“ #57840
  • Clarify @param types on get_sample_permalink_html filterFilter Filters are one of the two types of Hooks https://codex.wordpress.org/Plugin_API/Hooks. They provide a way for functions to modify data of other functions. They are the counterpart to Actions. Unlike Actions, filters are meant to work in an isolated manner, and should never have side effects such as affecting global variables and output. โ€“ #58322
  • Correct default value for the $optimize option in Style Engine โ€“ #57840
  • Fix a few more typos in DocBlocks โ€“ #57840
  • Fix a few more typos in DocBlocks and inline comments โ€“ #57840
  • Fix a few more typos in inline comments โ€“ #58334, #57840
  • Fix typo in a comment in Bulk_Upgrader_Skin::header() and ::footer() โ€“ #58334
  • Improve HTMLHTML HyperText Markup Language. The semantic scripting language primarily used for outputting content in web browsers. APIAPI An API or Application Programming Interface is a software intermediary that allows programs to interact with each other and share data in limited, clearly defined ways. file and class headers per the documentation standards โ€“ #57840
  • Improve Style Engine DocBlocks per the documentation standards โ€“ #57840
  • Improve Style Engine file and class headers per the documentation standards โ€“ #57840
  • Improve a few DocBlocks in wp-includes/formatting.php โ€“ #58316
  • Update code examples formatting in WP_HTML_Tag_Processor documentation โ€“ #58028
  • Various corrections and improvements to inline docsinline docs (phpdoc, docblock, xref) and docblocks โ€“ #57840
  • describe return type of _get_block_template_file() โ€“ #57756

Editor

  • Disable lazy loading term meta in get_block_templates โ€“ #58230
  • Ensure blockBlock Block is the abstract term used to describe units of markup that, composed together, form the content or layout of a webpage using the WordPress editor. The idea combines concepts of what in the past may have achieved with shortcodes, custom HTML, and embed discovery into a single consistent API and user experience. comments are of a valid form
  • Remove shortcodeShortcode A shortcode is a placeholder used within a WordPress post, page, or widget to insert a form or function generated by a plugin in a specific location on your site. support from block templates
  • Restore shortcode support for block templates โ€“ #58333
  • Update block editor packages to the latest patchpatch A special text file that describes changes to code, by identifying the files and lines which are added, removed, and altered. It may also be referred to as a diff. A patch can be applied to a codebase for testing. releases โ€“ #58274

Embeds

  • Add protocol validation for WordPress Embed code

General

  • Remove a few is_object() checks followed by instanceof operator โ€“ #58309
  • Use static on closures whenever $this is not used to avoid memory leaks โ€“ #58323

Help/About

  • Remove unwanted space in a link located on about.php โ€“ #58373

I18Ni18n Internationalization, or the act of writing and preparing code to be fully translatable into other languages. Also see localization. Often written with a lowercase i so it is not confused with a lowercase L or the numeral 1. Often an acquired skill.

  • Introduce sanitization function for localeLocale A locale is a combination of language and regional dialect. Usually locales correspond to countries, as is the case with Portuguese (Portugal) and Portuguese (Brazil). Other examples of locales include Canadian English and U.S. English.
  • Replace โ€œRoll backโ€ with โ€œRestoreโ€ in user facing strings โ€“ #58282

Media

  • Conditionally skip lazy-loading on images before the loopLoop The Loop is PHP code used by WordPress to display posts. Using The Loop, WordPress processes each post to be displayed on the current page, and formats it according to how it matches specified criteria within The Loop tags. Any HTML or PHP code in the Loop will be processed on each post. https://codex.wordpress.org/The_Loop. to improve LCP performance โ€“ #58211
  • Increase default for wp_omit_loading_attr_threshold to 3 โ€“ #58213
  • Introduce wp_get_attachment_image_context filter โ€“ #58212
  • Prevent CSRF setting attachment thumbnails
  • Prevent special images within post content to skew image counts and cause lazy-loading bugs โ€“ #58089

Networks and Sites

  • Lazy load site meta โ€“ #58185
  • Load WP_Metadata_Lazyloader class file if class does not exist โ€“ #58185
  • Load WP_Metadata_Lazyloader class file if class in meta.php โ€“ #58185

Plugins

  • Remove is_object() check in WP_Hook:build_preinitialized_hooks() โ€“ #58290

Posts, Post Types

  • Add a new filter for query arguments in get_pages โ€“ #12821

RevisionsRevisions The WordPress revisions system stores a record of each saved draft or published update. The revision system allows you to see what changes were made in each revision by dragging a slider (or using the Next/Previous buttons). The display indicates what has changed in each revision.

  • Add edit link functionality for the wp_template and wp_template_part post types โ€“ #57709

TaxonomyTaxonomy A taxonomy is a way to group things together. In WordPress, some common taxonomies are category, link, tag, or post format. https://codex.wordpress.org/Taxonomies#Default_Taxonomies.

  • Do not prime term meta in wp_get_object_terms โ€“ #57701

Props

Thanks to the 87 people who contributed to WordPress Core on Trac last week: @spacedmonkey (15), @peterwilsoncc (10), @costdev (10), @mukesh27 (9), @xknown (6), @flixos90 (6), @sergeybiryukov (5), @westonruter (5), @johnbillion (5), @thekt12 (4), @audrasjb (4), @youknowriad (4), @jrf (4), @davidbaumwald (3), @timothyblynjacobs (3), @isabel_brison (3), @dd32 (3), @antpb (3), @Presskopp (3), @talldanwp (2), @andraganescu (2), @ntsekouras (2), @ocean90 (2), @NekoJonez (2), @oandregal (2), @matveb (2), @rmccue (2), @desrosj (2), @aristath (1), @johnjamesjacoby (1), @antonvlasenko (1), @ramonopoly (1), @ironprogrammer (1), @annezazu (1), @wonderboymusic (1), @boonebgorges (1), @voldemortensen (1), @DrewAPicture (1), @tillkruess (1), @mamaduka (1), @wildworks (1), @mdxfr (1), @hellofromtonya (1), @kebbet (1), @mattwiebe (1), @bph (1), @ndiego (1), @joen (1), @ellatrix (1), @kevin940726 (1), @andrewserong (1), @welcher (1), @juanmaguitar (1), @coffee2code (1), @azaozz (1), @bor0 (1), @thomask (1), @dilipbheda (1), @marianne38 (1), @mikeschroder (1), @ehtis (1), @jorbin (1), @gziolo (1), @chriscct7 (1), @Otto42 (1), @ryelle (1), @joedolson (1), @Clorith (1), @kamplugins (1), @afragen (1), @apermo (1), @kenwins (1), @noisysocks (1), @zunaid321 (1), @martinkrcho (1), @paulkevan (1), @ahsannayem (1), @rutviksavsani (1), @Enchiridion (1), @sumitbagthariya16 (1), @Soean (1), @sabernhardt (1), @salvoaranzulla (1), @ebai4 (1), @sajjad67 (1), @tijmensmit (1), and @dmsnell (1).

Congrats and welcome to our 5 new contributors of the week:ย @marianne38, @ahsannayem, @rutviksavsani, @ebai4, @tijmensmitย โ™ฅ๏ธ

Core committers: @sergeybiryukov (17), @audrasjb (10), @spacedmonkey (9), @flixos90 (4), @johnbillion (2), @desrosj (1), @westonruter (1), @oandregal (1), and @davidbaumwald (1).

#6-3, #core, #week-in-core