The WordPress core development team builds WordPress! Follow this site for general updates, status reports, and the occasional code debate. There’s lots of ways to contribute:
So far, fine tuning which images and iframes should be lazy-loaded or not has been possible using the wp_img_tag_add_loading_attr and wp_iframe_tag_add_loading_attr filters, and these are still available as before. However, to improve the performance out-of-the-box without requiring a developer to customize the behavior, WordPress will now skip the very first “content image or iframe” on the page from being lazy-loaded. The term “content image or iframe” here denotes any image or iframe that is found within content of any post in the current main query loop as well any featured image of such a post. This applies to both “singular” and “archive” content: In a “singular” context the first image or iframe of the (only) post is not lazy-loaded, while in an “archive” context the first image or iframe of the first post in the query is not lazy-loaded.
Customizing the behavior
The approach of not lazy-loading the first content image or iframe enhances LCP performance correctly for the majority of themes, which use a single-column layout for post content. For themes with alternative layouts such as multi-column, a new wp_omit_loading_attr_thresholdfilter is now available and can be used to change how many of the first images/iframes should be skipped from being lazy-loaded – per the above, the default is 1. It is recommended for theme authors to use this filter in cases where based on the layout it is likely to have more than one content image/iframe in the initial viewport.
For example, a theme that uses a three-column grid of posts in its archives could leverage the filter to override the threshold to 3 on archive pages, which would then result in the first three content images/iframes not being lazy-loaded. The following code snippet illustrates what that could look like:
The refinement of the lazy-loading implementation should notably improve LCP performance for most sites that rely on it, while not having adverse effects for sites where the default heuristics described above do not apply to. That is only a solid starting point though. In the future, specifically with the more semantic content specification that block-based themes will facilitate, we will be able to further fine tune the lazy-loading implementation by using the available block information.
For more background information on the changes described above, see #53675.
Here’s some aggregate data for 2021 about WordPress Core contribution on Trac. Please note: it only include code contributions and it does not include contributions on GitHub repositories like Gutenberg.
The raw data for this post are on this public spreadsheet. You might find that easier to read if you have low vision or colorblindness; the graphics below are a snapshot pulled together to include as much information as possible in this blogpost.
General Trac overview
In 2021, the WordPress Core team shipped 1852 commits. 2797 tickets were opened, 2732 tickets were closed, and 408 were reopened.
Also, 2572 people contributed to WordPress source code using Trac, and 305 people made their very first contribution to WordPress Core ♥️
Jan
Feb
Mar
Apr
May
Jun
Jul
aug
Sep
Oct
Nov
Dec
Total
Commits
62
175
110
97
142
286
174
175
103
57
327
144
1852
Tickets closed
236
315
372
147
182
355
248
210
157
88
271
151
2732
Tickets reopened
26
33
45
21
25
37
77
36
22
19
31
36
408
Tickets created
200
280
371
177
197
320
288
297
161
126
190
190
2797
New contributors
14
43
14
22
35
37
15
12
18
14
71
10
305
Contributors
120
229
165
117
280
400
154
132
156
90
555
174
2572
This chart can be scrolled horizontally
Check out the Trac timeline in the graph below:
Here’s how many props and new contributors the Core project had per month. The most prolific month was November, in the WordPress 5.9 beta cycle, followed by June (WP 5.8 beta cycle).
Components activity
How did 2021’s commits break out by Core Component?
The most prolific components were:
Build/Test Tools with 310 commits (17% of all listed commits)
Docs with 198 commits (11% of all listed commits)
Editor with 188 commits (10.5% of all listed commits)
Bundled Themes with 144 commits (8% of all listed commits)
Coding Standards with 140 commits (8% of all listed commits)
Then comes Media, REST API, Code Modernization, External Librairies, Administration, Upgrade/Install, Site Health and Posts/Post Types. The other components each had fewer than 30 commits this year.
Data fetched from WordPress.org profiles
The data below comes from matching contributors’ usernames, as mentioned in Trac props, with their profiles on WordPress.org. One caveat: usernames that did not match a profile on dotorg, or that left blank their country/company information, filled in non-exploitable info got ignored. After all, “The Universe” or “The place to be” are not known countries 😆
Contributions by country
The next graph shows the number of props received by country. The top eight countries, based on the number of props received, are these:
United States with 1142 contributions
France with 266 contributions
Russia with 227 contributions
The Netherlands with 225 contributions
India with 219 contributions
Australia with 211 contributions
United Kingdom with 112 contributions
Canada with 102 contributions
Contributors (people) by country
In 2021, people from more than 56 countries contributed to WordPress Core.
The top eight countries by contributions, expressed as the number of props received, are:
United States with 155 people
India with 58 people
United Kingdom with 34 people
France with 26 people
Germany with 23 people
The Netherlands with 20 people
Canada with 16 people
Australia with 15 people
Contributions by company
In 2021, people from at least 236 companies contributed to WP Core.
These companies each contributed (well, their people did) to more than 50 commits:
Automattic with 785 contributions
Yoast with 379 contributions
Whodunit with 215 contributions
Advies en zo with 191 contributions
Bluehost with 146 contributions
Human Made with 131 contributions
Google with 87 contributions
iThemes with 73 contributions
Dekode Interaktiv with 52 contributions
Contributors (people) by company
The graph below is also interesting, because it shows that a huge number of companies have only one contributor—or a very few contributors. The exceptions are Automattic, with 85 core contributors on Trac in 2021, Yoast (18 contributors) and 10up. Only those three companies had more than ten people credited on Trac in 2021.
What did 2021 hold for Core Committers?
33 Core Committers committed code to the WordPress SVN repository this year:
Amazing!
There are similar data for 2020 and 2019? Just to see how the pandemic affected and time changed the contributions?
Another questions there are contributions by company that have committers but there are tons that don’t have committers but contribute too. I think that can interesting to see how much the company “not so much” involved contribute to WordPress.
Thank you @mte90!
As far as I know, this is the first time we published this type of post, so it’s hard to compare… 🤷♂️ but the data for other years are still available (it’s a fair load of work to put them together though) 🙂
Except for the last graph (committers), the company graphs are not only listing committers contribution but all contributors credited in commits (using “props”). So yes, everyone who helped on a ticket committed in 2021 is listed in this post. See the spreadsheet for more details and a full contributor list.
Prior to WordPress 5.9 the only way to work with inner block was to use the <InnerBlocks /> component. One downside of this approach is that in the editor this creates additional DOM nodes that wrap the markup of the inner blocks. This makes it more difficult to style these inner blocks areas to match what the enduser will see on the site.
With WordPress 5.9 we’re introducing a new react hook called useInnerBlocksProps that allows you to change this and take more control over the markup of inner blocks areas. The useInnerBlocksProps is exported from the @wordpress/block-editor package same as the InnerBlocks component itself and supports everything the component does. It also works like the useBlockProps hook introduced with apiVersion: 2 in WordPress 5.6.
To use the hook, take the object returned from calling the hook and spread it onto the host element you want to render the inner blocks into. For example:
1
2
3
4
5
6
7
8
9
10
functionBlockEdit(props) {
const blockProps = useBlockProps();
const innerBlocksProps = useInnerBlocksProps();
return(
<section {...blockProps}>
<div {...innerBlocksProps} />
</section>
);
}
The above code will render to the following markup in the editor:
1
2
3
4
5
<section>
<div>
<!-- Inner Blocks get inserted here -->
</div>
</section>
The hook also accepts two arguments:
The first argument accepts an object containing additional props that are added to the element in the dom. For example, to add a custom class name to the inner blocks area you pass { className: 'my-class' } as the first argument.
The second argument is also an object and can contain any properties to control the behavior of the inner blocks area. It accepts all options like allowedBlocks, template, templateLock, renderAppender, etc. You can find the full list of supported properties in the InnerBlocks props documentation
To save inner blocks content there is a special variant of the hook, this is similar to the component-based approach that uses <InnerBlocks.Content /> in the save method of a block. For hooks, you add .save to the end of the hook like so:
When you use the useInnerBlocksProps.save() hook it only accepts the first parameter, these are the options you want to add to the container element.
Why use hooks?
The hooks allow for new options and nice enhancements. For example, you can take the object returned from the useBlockProps hook—these contain the properties for the block’s wrapping container—and pass them to the useInnerBlocksProps hook. This reduces the number of elements we need to create. For example:
Another benefit to using the hook approach is using the returned value, which is just an object, and deconstruct to get the react children from the object. This property contains the actual child inner blocks thus we can place elements on the same level as our inner blocks.
Another benefit to using the hook approach is using the returned value, which is just an object, and deconstruct to get the react children from the object. This property contains the actual child inner blocks thus we can place elements on the same level as our inner blocks.
Does this not trigger a long running block validation bug?
This week’s meeting is being skipped due to anticipated low attendance at the end of year. Meetings will resume on January 5th, 2022. You’re encouraged to use this time to help test WordPress 5.9 Beta 4. For specific steps and areas to test, you can follow this post on how to test 5.9 features.
If you have anything you’d like to discuss or share asynchronously though, please share in the comments of this post. This includes the following:
If you have an update for the main site editing projects.
If you have anything to share for Task Coordination.
If you have anything you’d like to raise that typically would be discussed in the Open Floor section.
@paaljoachim and myself will follow up on any open ended questions or topics left on this thread.
I realize many of those who aren’t still vacationing are still heads-down testing 5.9 and discussion on broad new proposals like mine may need to wait until there’s more available energy. Perhaps it can come up in the Jan 5 agenda?
Hey @sdwire! This definitely belongs here. I think this is wise to bring up on the Jan 5th agenda. For now though, I’ll add some labels and tag some folks in who might be able to give some context/chime in. Thanks for your work there in laying out your idea so clearly.
In PR 37348 docs were refactored to use JSX/Plain as the toggles for code examples. We don’t need to limit examples to ES5 anymore, so this makes it clearer the difference. Documentation contributor guide was also updated for guidance.
PR 36183 adds generated core block documentation from the block.json files. Published here. The item to note is if you change a block.json in a core block, you will need to run npm run docs:build. Your failing commit will tell you have a local change.
Take a look at WP 5.9 project board for docs and dev notes, I’m reached out to those listed. We have a goal of getting notes published before RC1, but with late fixes and holidays we won’t have them all. So, if you have any to write, try to make it a priority when you return in the new year.
During 2021, a group of contributors worked to update the WordPress updaters and add some features to make auto-updates safer and dependencies more reliable.
For the feature ready to be shipped with WordPress 6.0, the discovered issue with Chassic/Vagrant should be resolved. Outreach to hosting companies needs to be done to ensure production environments will behave as expected.
Help required – Hosting companies
Would it be possible to get a hosting company to set up different environments to test the patch in multiple scenarios? Including testing on shared servers from hosting providers who aggressively throttle resources.
Outcome 3 – Have managed updates (database migrations)
Evaluate if this is beneficial for plugin developers and create user stories before writing code, to make sure the solution addresses a specific, shared problem.
Outcome 4 – Create a unified JSON convention for requirements and dependencies
After a lot of conversations, the contributors moved away from a JSON file in favor of a “Requires Plugins” header based on feedback to this PR. Then, they focused on adminUI improvements using that header to solve what appears to be the most common use case: protect the user from fatal errors when installing a plugin without the required dependencies and guide them to complete the installation.
Looking back at the conversations (Trac and Slack) it looks like there is not enough clarity on the best possible method to solve the user issue, or what “dependencies” mean (soft vs. hard dependencies).
For plugin developers, the main issue is to avoid different plugins introducing implementations to check for the existence of dependencies and take appropriate actions. This is, in fact, something that is already happening. The problem is solved by each plugin developer. Would it be possible to solve it with a unified convention?
For end-users, the issue is with add-ons. For them to work, they need another plugin to be activated. If plugin and theme developers don’t properly check for the existence of plugins before using them, there is a risk of getting fatal errors on the user site.
Next steps
@peterwilsoncc suggested proposing a feature project. Right now, there is a Google Document with some notes about the solutions but the problem and the why are missing. This project is not tied to a release right now since it is still in the discovery phase.
Evaluate the problem from the point of view of plugin developers. Is it beneficial to have a unified solution for Core or does it not make a difference? Help from the plugin team and plugin authors is needed.
Write the user stories from the end-of-user point of view.
Write a proposal for a feature project with the findings from the two explorations.
Do you want to help?
If you want to help, please join the #core-auto-updates chats, Tuesdays at 5PM UTC in 2022.
The WordPress 5.9 Beta 4 has landed. Please download and test! Thanks to everyone who has been involved in the release so far and getting the Beta 4 out the door.
A Week in Core. Three new contributors to core this week – welcome to them all. The next New Contributor Meeting for core is scheduled for 12 January 2022 at 19:00 UTC. If you have any questions on contributing to core before that, just bring them up here in #core any time outside of any ongoing meeting, or in the open floor section of the weekly dev chat, and someone should follow up.
Please continue to share the Help test WordPress 5.9 features. This replaces the ongoing call for FSE testing promotions until after 5.9 is released. Thanks @annezazu
The annual community survey closes next week on December 30, 2021. Still time to complete it.
Component Maintainers update
Build/Test Tools Component
Update via @sergeybiryukov: Some enhancements were made to the unit test suite:
Reduce the use of unnecessary randomness in tests to increase the overall reliability of the tests. See ticket#37371 for more details.
Remove an assertion in filter_rest_url_for_leading_slash(). This assertion could mask the fact that some other tests don’t perform an assertion. See ticket #54661 for more details.
Update from @nalininonstopnewsuk: For the Quick/ Bulk Edit component, we are continuing to work through and reading all the previous materials in the background while the primary focus is on 5.9. We want to run a bug scrub on the tickets the week after 5.9 is out.
About / Help page component
Update via @webcommsat: More updates have been done this week on the text and Figma. Will update the ticket today.
You can also join the collaborations cross-team on social media posts on the release features.
@maksimkuzmin suggested: Most of the times bespoke themes built relying on page templates to set up specific page to the specific type of page. E.g. Search Page is bound to the page-search.php template in the code. The major lack of functionality is to have a function that will quickly retrieve page(s) by the given template name. Without building a WP Query, etc. Sort of get_page_by_template( $template_file ).
This enhancement will further be discussed and potentially reconsidered in a pre-existing ticket: #16264.
4. Bug report potentially related to 5.9
@afragen: FYI, posted bug report and PR for #54682, believed to be 5.9 related.
Next meeting
Dev Chat will take place next week, Wednesday 29 December 2021 at 20:00 UTC in the Make WordPress Core Slack for a quick check-in.
“What’s new in Gutenberg…” posts (labeled with the #gutenberg-newtag) are published following every Gutenberg release on a biweekly basis, discovering new features included in each release. As a reminder, here’s an overview of different ways to keep up with Gutenberg and the Full Site Editing project.
If you observe the Gregorian Calendar, New Year’s Eve is fast approaching, which means that the time has come for the next release of Gutenberg!
Gutenberg 12.2 has just been released! It’s the last minor Gutenberg release in 2021. This release improves compatibility with the upcoming WordPress 5.9 release and block themes. Also, it brings new features, code quality improvements, and bug fixes. You can find the release highlights below.
Seamless navigation between the Site Editor and the Template List
Gutenberg 12.2 takes the Template List one step beyond, improving its user experience and performance. Thanks to its new client-side routing, WordPress doesn’t need to reload the page when navigating between the Site Editor and the Template List, reducing the time spent rendering unneeded HTML code.
Improvements to post comments
Starting with Gutenberg 12.2, the Comments Query Loop block is now able to display nested comments. This improves user experience as it is now much easier to understand if a comment responds to another comment or is just a first-level comment.
Also, the new Comments Pagination Numbers block allows displaying page numbers inside the Comments Pagination block, which in turn can be used inside the Comments Query Loop block. This improves the UI because users can quickly navigate the comments using the page number. Also, the pagination in the Comments Query Loop block now works similar to the pagination for posts.
A new home for border controls
Although lots of blocks are already taking advantage of border supports, this release switches border supports to the ToolsPanel, and sets which border properties are displayed in the ToolsPanel by default. The ToolsPanel, first introduced in Gutenberg 11.3, offers progressive discovery options for those provided through block supports, improving the user experience and consolidating the sidebar UI.
New font size labels in the FontSizePicker component
Gutenberg 12.2 improves the way font sizes are displayed in the sidebar by using a sequence of numbers (1, 2, 3, 4, 5) as labels for the font sizes. These simplified labels can accommodate use cases with complex CSS values, helping users understand the available font sizes.
Improved color picker
More components are being iterated in this release. In an effort to reduce sidebar clutter and improve the design tools user experience, all blocks, including those that use custom color implementation, can now take advantage of the new dropdown-based color picker. This improved UI is easier to use, especially when editing a few colors back-to-back.
Preview for Block Styles in the Widget Editor
While Gutenberg 12.0 introduced block styles preview on hover for the Block Editor, this release brings this functionality to the Widgets Editor, too. It’s now possible to preview style variations in the Widgets Editor when editing blocks that support this (e.g., Image, Table, Button blocks) by hovering or focusing over the style name, for full accessibility support.
Changelog
Enhancements
Block Library
New block: Add Comments Pagination Numbers block. (36890)
Switch to addEventListener event for load event in the navigation block view script. (37135)
Don’t request the deprecated navigation areas endpoint outside of the Gutenberg plugin. (37187)
Navigation Link Control: Hide the Transforms component when no options are available. (37284)
Remove the deprecated navigation area block from the inserter. (37026)
Query Loop: Add useBlockPreview component, fix alignment of the Query Loop block in the editor. (36431)
Query Pagination: core/query-pagination-next and core/query-pagination-previous blocks: change the markup on the first and last pages of the pagination. (36681)
Search: Fix application of border color class in the editor. (37242)
Thank you, @priethor, for coordinating the release process, proofreading, and helping to select release highlights! Thank you, @jameskoster and @joen for helping me to prepare visual assets and proofreading the release post! Thank you, @mamaduka, for uploading the plugin to WordPress.org! Kudos to all the other contributors who have helped to make this release possible.
Got other posts that should get the Core team’s attention? Please add them in the comments.
Upcoming releases
The current upcoming major release is version 5.9.
RC1 is set to release on 4th January and means two things:
Hard string freeze, including all the strings for the About page.
And Trunk branches to 6.0 alpha, so if you have a feature you’d like to see in the next major version, this is the time to start on it!
Component Maintainers
From now until launch, devchat will skip a formal check-in so the group can have a longer Open Floor. If you’re a maintainer who’d like to get help with a blocker or share success, add your item to the comments.
Open Floor
Add your topic to the comments, and enjoy priority for your topic at the beginning of Open Floor.
Amazing!
There are similar data for 2020 and 2019? Just to see how the pandemic affected and time changed the contributions?
Another questions there are contributions by company that have committers but there are tons that don’t have committers but contribute too. I think that can interesting to see how much the company “not so much” involved contribute to WordPress.
Thank you @mte90!
As far as I know, this is the first time we published this type of post, so it’s hard to compare… 🤷♂️ but the data for other years are still available (it’s a fair load of work to put them together though) 🙂
Except for the last graph (committers), the company graphs are not only listing committers contribution but all contributors credited in commits (using “props”). So yes, everyone who helped on a ticket committed in 2021 is listed in this post. See the spreadsheet for more details and a full contributor list.
Thanks I misunderstood contributors with committers 🙂