The WordPress coreCoreCore is the set of software required to run WordPress. The Core Development Team builds WordPress. development team builds WordPress! Follow this site for general updates, status reports, and the occasional code debate. There’s lots of ways to contribute:
Found a bugbugA bug is an error or unexpected result. Performance improvements, code optimization, and are considered enhancements, not defects. After feature freeze, only bugs are dealt with, with regressions (adverse changes from the previous version) being the highest priority.?Create a ticket in the bug tracker.
Welcome back to a new issue of Week in CoreCoreCore is the set of software required to run WordPress. The Core Development Team builds WordPress.. Let’s take a look at what changed on TracTracAn open source project by Edgewall Software that serves as a bug tracker and project management tool for WordPress. between February 19 and February 26, 2024.
53 commits
100 contributors
73 tickets created
5 tickets reopened
71 tickets closed
TicketticketCreated 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.
Update JSHint config to remove deprecated options – #28236
Mock APIAPIAn API or Application Programming Interface is a software intermediary that allows programs to interact with each other and share data in limited, clearly defined ways. response in PluginPluginA plugin is a piece of software containing a group of functions that can be added to a WordPress website. They can extend functionality or add new features to your WordPress websites. WordPress plugins are written in the PHP programming language and integrate seamlessly with WordPress. These can be free in the WordPress.org Plugin Directory https://wordpress.org/plugins/ or can be cost-based plugin from a third-party Dependencies tests – #59647
Query mariadb.org instead of mariadb.com in README test – #59647
Synchronize Theme.JSONJSONJSON, or JavaScript Object Notation, is a minimal, readable format for structuring data. It is used primarily to transmit data between a server and web application, as an alternative to XML.unit testunit testCode 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. between Core and GutenbergGutenbergThe Gutenberg project is the new Editor Interface for WordPress. The editor improves the process and experience of creating new content, making writing rich content much simpler. It uses ‘blocks’ to add richness rather than shortcodes, custom HTML etc. https://wordpress.org/gutenberg/ – #60387
Use assertSame() in WP_REST_Navigation_Fallback_Controller tests – #59655
Use assertSame() in comment_exists() tests – #59655
Use assertSame() in new_admin_email_subjectfilterFilterFilters 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. test – #59655
Use assertSame() in wp_insert_post() tests – #59655
Use assertSame() in wp_read_image_metadata() tests – #59655
Bundled Themes
Twenty Twenty-Three: Update XX-large font-sizes for accessibilityAccessibilityAccessibility (commonly shortened to a11y) refers to the design of products, devices, services, or environments for people with disabilities. The concept of accessible design ensures both “direct access” (i.e. unassisted) and “indirect access” meaning compatibility with a person’s assistive technology (for example, computer screen readers). (https://en.wikipedia.org/wiki/Accessibility) – #58603
Correct alignment in wp_get_attachment_image_src() – #59650
Docs
Add a @since note for $preferred_ext parameter in wp_mime_type_icon() – #31352
Correct the URLs that document the available images for MySQLMySQLMySQL is a relational database management system. A database is a structured collection of data where content, configuration and other options are stored. https://www.mysql.com/. and MariaDB for the local development environment – #59930
Improve docblockdocblock(phpdoc, xref, inline docs) for $x_redirect_by param in wp_redirect() – #60209
Use more inclusive term in rest_filter_response_fields docblock – #59651
Editor
Add fallback for blockBlockBlock is the abstract term used to describe units of markup that, composed together, form the content or layout of a webpage using the WordPress editor. The idea combines concepts of what in the past may have achieved with shortcodes, custom HTML, and embed discovery into a single consistent API and user experience. version when registering block script module – #60233
Add id to the supported Image’s binding attributes – #60577
Allow symlinks in directories provided to get_block_asset_url() – #59175, #58525
Ensure font collection metadata can be properly localized – #60509
Fix instance element styles for links applying to buttons – #60557
Format and sanitize font family names according the CSSCSSCascading Style Sheets. spec – #60537
Improve PHPUnit tests for block pattern registration – #59532
Update Packages with the latest bugbugA bug is an error or unexpected result. Performance improvements, code optimization, and are considered enhancements, not defects. After feature freeze, only bugs are dealt with, with regressions (adverse changes from the previous version) being the highest priority. fixes for 6.5 betaBetaA pre-release of software that is given out to a large group of users to trial under real conditions. Beta versions have gone through alpha testing in-house and are generally fairly close in look, feel and function to the final product; however, design changes often occur as part of the process. 2 (Round 2) – #60315
Update Packages with the latest bug fixes for 6.5 beta 2 – #60315
Block HooksHooksIn WordPress theme and development, hooks are functions that can be applied to an action or a Filter in WordPress. Actions are functions performed when a certain event occurs in WordPress. Filters allow you to modify certain functions. Arguments used to hook both filters and actions look the same.: Allow hooked_block filters to return null – #60580
Block Hooks: Fix actual/expected order in test assertions – #60506
Block Hooks: Introduce a new hooked_block filter – #60574
Block Hooks: Make test a bit easier to read – #60580
Export
Include featured imageFeatured imageA featured image is the main image used on your blog archive page and is pulled when the post or page is shared on social media. The image can be used to display in widget areas on your site or in a summary list of posts. for posts or pages – #17379
General
Handle missing field in WP_List_Util::pluck() – #59774
I18Ni18nInternationalization, or the act of writing and preparing code to be fully translatable into other languages. Also see localization. Often written with a lowercase i so it is not confused with a lowercase L or the numeral 1. Often an acquired skill.
Do not set translationtranslationThe process (or result) of changing text, words, and display formatting to support another language. Also see localization, internationalization. controller localeLocaleA locale is a combination of language and regional dialect. Usually locales correspond to countries, as is the case with Portuguese (Portugal) and Portuguese (Brazil). Other examples of locales include Canadian English and U.S. English. in bootstrap – #59656
Media
Ensure wp_mine_type_icon() returns expected file type – #31352
Prevent Media Library sidebarSidebarA sidebar in WordPress is referred to a widget-ready area used by WordPress themes to display information that is not a part of the main content. It is not always a vertical column on the side. It can be a horizontal rectangle below or above the content area, footer, header, or any where in the theme. from showing with no actions – #58973
Output plugin card elements in the order they’re displayed – #60488
REST APIREST APIThe 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/.
Happy new year, everyone! Here’s some aggregate data for 2023 about WordPress CoreCoreCore is the set of software required to run WordPress. The Core Development Team builds WordPress. contribution on TracTracAn open source project by Edgewall Software that serves as a bug tracker and project management tool for WordPress..
Please note:
These data only include code contributions to WordPress codebase, not contributions on GitHubGitHubGitHub is a website that offers online implementation of git repositories that can easily be shared, copied and modified by other developers. Public repositories are free to host, private repositories require a paid subscription. GitHub introduced the concept of the ‘pull request’ where code changes done in branches by contributors can be reviewed and discussed before being merged be the repository owner. https://github.com/ repositories such as GutenbergGutenbergThe Gutenberg project is the new Editor Interface for WordPress. The editor improves the process and experience of creating new content, making writing rich content much simpler. It uses ‘blocks’ to add richness rather than shortcodes, custom HTML etc. https://wordpress.org/gutenberg/.
The raw data for this post are available on this public spreadsheet. You might find that much 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, but they are hard to make accessible to everyone.
All the links for the graphics below open a new tab to display them in full size.
General Trac overview
In 2023, the WordPress Core team shipped 2211 commits (2597 in 2022). 2751 tickets were opened, 2545 tickets were closed, and 365 were reopened.
Also, 1079 people contributed to WordPress source code using Trac (988 in 2022), and 472 people made their very first contribution to WordPress Core ♥️ (398 in 2022).
January
February
March
April
May
June
July
August
September
October
November
December
Total
Commits
148
265
179
84
174
246
209
173
250
288
108
87
2211
Tickets closed
181
297
218
156
179
259
211
277
239
268
148
112
2545
Tickets reopened
25
36
36
19
25
40
42
29
35
40
28
10
365
Tickets created
185
234
208
188
208
255
256
310
250
270
212
175
2751
New contributors
18
91
23
18
25
74
51
31
75
46
12
8
472
Contributors
137
295
155
87
150
279
217
182
295
249
111
93
1079
This chart shows the number of commits per month in 2023, and the number of closed, reopened and created tickets per month. It also shows the number of contributors per month in 2023. It can be scrolled horizontally.
Check out the Trac timeline in the graphs below:
Here’s how many props and new contributors the Core project had per month. The most prolific months were February and September with 295 contributors each, followed by June and October. 42 of the new contributors received their first props on a commit related to the Twenty Twenty-Four theme.
Components activity
How did 2023’s commits break out by Core Component?
The most prolific components were:
Editor with 284 commits (12.8% of all listed commits)
Build/Test Tools with 265 commits (12% of all listed commits)
Docs with 188 commits (8.5% of all listed commits)
Coding Standards with 154 commits (7% of all listed commits)
Bundled Themes with 130 commits (5.9% of all listed commits)
Then came Media, Help/About, Code Modernization (which is not an official component), Themes, Administration, General, HTMLHTMLHyperText Markup Language. The semantic scripting language primarily used for outputting content in web browsers.APIAPIAn API or Application Programming Interface is a software intermediary that allows programs to interact with each other and share data in limited, clearly defined ways., Internationalization, REST APIREST APIThe 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/. and Upgrade/Install. The other components each had fewer than 30 commits this year.
Contributors data retrieved from WordPress.orgWordPress.orgThe community site where WordPress code is created and shared by the users. This is where you can download the source code for WordPress core, plugins and themes as well as the central location for community conversations and organization. https://wordpress.org/ profiles
The data below comes from matching contributors’ usernames, as mentioned in Trac props, with their profiles on WordPress.org.
One caveat: this ignores usernames that did not match a profile on dotorg, plus any that had blank or unusable country/company information (“The Universe” or “Unicorn land” 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 2062 contributions (1255 in 2022)
Russiawith 795 contributions (1152 in 2022)
India with 683 contributions (317 in 2022)
France with 680 contributions (739 in 2022)
Australia with 611 contributions (386 in 2022)
United Kingdom with 471 contributions (216 in 2022)
Ireland with 403 contributions
Bangladesh with 340 contributions (145 in 2022)
Contributors (people) by country
In 2023, people from at least 62 countries contributed to WordPress Core (57 countries in 2022).
Here are the top eight countries by number of contributors:
United States with 164 people (152 in 2022)
Bangladesh with 105 people (only 43 in 2022)
India with 93 people (77 in 2022)
United Kingdom with 31 people (38 in 2022)
France with 30 people (22 in 2022)
Canada with 25 people (17 in 2022)
Germany with 21 people (25 in 2022)
Netherlands with 21 people (23 in 2022)
Spain with 19 people (12 in 2022)
Contributions by company
In 2023, people from at least 286 companies contributed to WP Core.
These companies (well, their employees) each contributed to more than 100 commits:
Automattic with 1770 contributions (866 in 2022)
Yoast with 985 contributions (1452 in 2022)
10up with 904 contributions (501 in 2022)
Whodunit with 561 contributions (676 in 2022)
Google with 404 contributions (130 in 2022)
Bluehost with 238 contributions (226 in 2022)
XWP with 224 contributions (14 in 2022)
Human Made with 177 contributions (126 in 2022)
Advies en zo with 143 contributions (220 in 2022)
Dream Encode with 128 contributions (124 in 2022)
Emilia Capital with 123 contributions
Accessible WD with 120 contributions (53 in 2022)
GoDaddy with 111 contributions (42 in 2022)
Contributors (people) by company
A huge number of companies have only one contributor—or very few contributors. The exceptions are Automattic, with 108 core contributorsCore ContributorsCore contributors are those who have worked on a release of WordPress, by creating the functions or finding and patching bugs. These contributions are done through Trac. https://core.trac.wordpress.org. on Trac in 2023, WPDeveloper (39 contributors), 10up with 25 contributors, AuthLab (21 contributors), rtCamp (17 contributors), Awsm (12 contributors), Human Made (12 contributors), Multidots (12 contributors), and Yoast (10 contributors). Only these 9 companies had at least 10 people credited on Trac in 2023.
What did 2022 hold for Core Committers?
39 Core Committers committed code to the WordPress SVNSVNSubversion, the popular version control system (VCS) by the Apache project, used by WordPress to manage changes to its codebase. repository this year (32 in 2022):
Of the 2211 commits, 555 (25%) were made by people working at Yoast, 413 (19%) from people working at Whodunit, 399 (18%) from employees of Automattic, followed by Google (151 commits), Bluehost (148 commits) and 10up (123 commits).
Automattic is the only company with more than 10 active Core Committers, and 12 of them committed code in 2023. Google has 4 people allowed to commit code to WordPress, followed by 10up with 3 Core Committers.
Worth noting that 15 of the 39 active committers come from the US, which represents 38% of the Core Committers squad. Australia, Canada, Italy, Poland and United Kingdom each had 2 committers.
More than 30% of the commits were handled by committers located in the United States, 26% by committers located in Russia, and 19% by committers located in France.
Sponsorship
In 2023, 21.6% of the contributors and 23.1% of the committers indicated that a company sponsors their contributions.
Many thanks to @audrasjb for help collecting the 2023 data and for adding several graphics.
Welcome back to a new issue of Week in CoreCoreCore is the set of software required to run WordPress. The Core Development Team builds WordPress.. Let’s take a look at what changed on TracTracAn open source project by Edgewall Software that serves as a bug tracker and project management tool for WordPress. between September 4 and October 9, 2023.
Please note that exceptionally and because of personal vacations, this Week in Core issue covers 4 weeks 😊
269 commits
337 contributors
295 tickets created
43 tickets reopened
277 tickets closed
TicketticketCreated 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.
Welcome back to a new issue of Week in CoreCoreCore is the set of software required to run WordPress. The Core Development Team builds WordPress.. Let’s take a look at what changed on TracTracAn 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
TicketticketCreated 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 PHPPHPThe web scripting language in which WordPress is primarily architected. WordPress requires PHP 5.6.20 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
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
CustomizerCustomizerTool built into WordPress core that hooks into most modern themes. You can use it to preview and modify many of your site’s appearance settings.
use the correct X-Robots-TagheaderHeaderThe 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
Add missing param description in WP_Comment class – #58890
Clarify post_date_column_timefilterFilterFilters 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
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 loopLoopThe Loop is PHP code used by WordPress to display posts. Using The Loop, WordPress processes each post to be displayed on the current page, and formats it according to how it matches specified criteria within The Loop tags. Any HTML or PHP code in the Loop will be processed on each post. https://codex.wordpress.org/The_Loop. is entered for singular content in blockBlockBlock is the abstract term used to describe units of markup that, composed together, form the content or layout of a webpage using the WordPress editor. The idea combines concepts of what in the past may have achieved with shortcodes, custom HTML, and embed discovery into a single consistent API and user experience. themes – #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
Replace two esc_url_raw() calls in core with sanitize_url() – #59247
Use regular core button styles for page header actions – #41986
HTMLHTMLHyperText Markup Language. The semantic scripting language primarily used for outputting content in web browsers.APIAPIAn API or Application Programming Interface is a software intermediary that allows programs to interact with each other and share data in limited, clearly defined ways.
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 shortcodeShortcodeA 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
Options, MetaMetaMeta is a term that refers to the inside workings of a group. For us, this is the team that works on internal WordPress sites like WordCamp Central and Make WordPress. APIs
Introduce prime_options() to load multiple options with a single database request – #58962
Reinstate missing sort_column options in get_pages() – #59226
Remove redundant function calls in get_body_class() – #43661
REST APIREST APIThe 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
RevisionsRevisionsThe WordPress revisions system stores a record of each saved draft or published update. The revision system allows you to see what changes were made in each revision by dragging a slider (or using the Next/Previous buttons). The display indicates what has changed in each revision.
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:
Welcome back to a new issue of Week in CoreCoreCore is the set of software required to run WordPress. The Core Development Team builds WordPress.. Let’s take a look at what changed on TracTracAn open source project by Edgewall Software that serves as a bug tracker and project management tool for WordPress. between July 17 and July 24, 2023.
44 commits
83 contributors
83 tickets created
13 tickets reopened
56 tickets closed
TicketticketCreated 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 a missing closing spantagtagA 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.) for column sorting indicators – #32170, #57839
Remove outmoded jsvalidate task from Gruntfile – #58645, #26615
Bundled Themes
Twenty Twenty-One: Enable Dark Mode in the blockBlockBlock is the abstract term used to describe units of markup that, composed together, form the content or layout of a webpage using the WordPress editor. The idea combines concepts of what in the past may have achieved with shortcodes, custom HTML, and embed discovery into a single consistent API and user experience. editor iframeiframeiFrame 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. – #58835
Twenty Twenty-Three: Remove the perPage attribute where the query inherits from the global query. The global attribute should be used instead – #58581
Add test for context setting in Comment Template block – #58839
Fix a PHPPHPThe web scripting language in which WordPress is primarily architected. WordPress requires PHP 5.6.20 or higher notice appearing when adding a new template part – #57851
Fix abbreviations of “Example” in block-template-utils.php – #58879
Fix bugbugA bug is an error or unexpected result. Performance improvements, code optimization, and are considered enhancements, not defects. After feature freeze, only bugs are dealt with, with regressions (adverse changes from the previous version) being the highest priority. where it was not possible to style custom block elements in theme.json – #57868
update npm packages with bug fixes for 6.3 RC2 – #58804
External Libraries
Update deprecated jQuery code in Farbtastic lib – #57946
General
Commit changes after running precommit:css – #57856, #58869
Rename wp_in_development_mode() to wp_is_development_mode() – #57487
HTMLHTMLHyperText Markup Language. The semantic scripting language primarily used for outputting content in web browsers.APIAPIAn API or Application Programming Interface is a software intermediary that allows programs to interact with each other and share data in limited, clearly defined ways.
I18Ni18nInternationalization, or the act of writing and preparing code to be fully translatable into other languages. Also see localization. Often written with a lowercase i so it is not confused with a lowercase L or the numeral 1. Often an acquired skill.
Add missing translator comment in WP_Upgrader::generic_strings() – #58831
Media
Adjust PDF upload handling to remove non-opaque alpha channels from previews – #39216
Fix Image rotation button overflow in translations – #58877
Stop using and deprecate set_imagick_time_limit(). Seems it causes more problems than it solves – #58202
REST APIREST APIThe 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/.
Update Global styles revisionsRevisionsThe WordPress revisions system stores a record of each saved draft or published update. The revision system allows you to see what changes were made in each revision by dragging a slider (or using the Next/Previous buttons). The display indicates what has changed in each revision. private methods to protected – #58846
Script Loader
Improve test coverage for wp_print_scripts() – #58648
Upgrade/Install
Add correct parameters to add_option in upgrade_630 – #58821
Props
Thanks to the 83 (!) people who contributed to WordPress Core on Trac last week:
Welcome back to a new issue of Week in CoreCoreCore is the set of software required to run WordPress. The Core Development Team builds WordPress.. Let’s take a look at what changed on TracTracAn open source project by Edgewall Software that serves as a bug tracker and project management tool for WordPress. between July 10 and July 17, 2023.
78 commits
135 contributors
61 tickets created
12 tickets reopened
70 tickets closed
TicketticketCreated 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 a missing closing `span>tagtagA 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.) for column sorting indicators – #32170, #57839
Bootstrap/Load
Require wp-includes/compat.php in src/index.php – #58206
Build/Test Tools
Remove outmoded jsvalidate task from Gruntfil – #58645, #26615
fix height of featured images in Twenty Twenty Three – #58766
Twenty Seventeen: Use wp_register_script() to register HTML5 Shiv script – #56699
Twenty Twenty-Three: Add a border to Quote blockBlockBlock is the abstract term used to describe units of markup that, composed together, form the content or layout of a webpage using the WordPress editor. The idea combines concepts of what in the past may have achieved with shortcodes, custom HTML, and embed discovery into a single consistent API and user experience. – #57506
Twenty Twenty-Three: Remove the perPage attribute where the query inherits from the global query. The global attribute should be used instead – #58581
Add test for context setting in Comment Template block – #58839
Fix a PHPPHPThe web scripting language in which WordPress is primarily architected. WordPress requires PHP 5.6.20 or higher notice appearing when adding a new template part – #57851
Fix bugbugA bug is an error or unexpected result. Performance improvements, code optimization, and are considered enhancements, not defects. After feature freeze, only bugs are dealt with, with regressions (adverse changes from the previous version) being the highest priority. where it was not possible to style custom block elements in theme.json – #57868
update npm packages with bug fixes and blessed tasks – #58745
update npm packages with first round of bug fixes for 6.3 RC1 – #58804
update npm packages with second round of bug fixes for 6.3 RC1 – #58804
update string incorrectly marked for translationtranslationThe process (or result) of changing text, words, and display formatting to support another language. Also see localization, internationalization. in Chrome – #58716
External Libraries
Update deprecated jQuery code in Farbtastic lib – #57946
Filesystem APIAPIAn API or Application Programming Interface is a software intermediary that allows programs to interact with each other and share data in limited, clearly defined ways.
Ensure wp_tempnam() does not produce file names longer than 255 characters as this is the limit on most filesystems – #35755
General
Escape nonce used for block theme activation – #58712
Add a “Get Involved” tab to the About page – #23348
Adjust horizontal padding on the tabs under 960 pixels width – #23348
Fix closing contextual help when scrolled – #55342
Fix typo in [56171]: support forumSupport ForumWordPress Support Forums is a place to go for help and conversations around using WordPress. Also the place to go to report issues that are caused by errors with the WordPress code and implementations. “topic”, not “ticket”
Update “Get Involved” tab content with the latest edits – #23348
I18ni18nInternationalization, or the act of writing and preparing code to be fully translatable into other languages. Also see localization. Often written with a lowercase i so it is not confused with a lowercase L or the numeral 1. Often an acquired skill.
Improve the use of dashicons-external icon for external links – #47303
Move translator comments inside sprintf for tagline field description – #57675
Media
Fix adminadmin(and super admin) image editor layout at intermediary widths – #58692
Welcome back to a new issue of Week in CoreCoreCore is the set of software required to run WordPress. The Core Development Team builds WordPress.. Let’s take a look at what changed on TracTracAn open source project by Edgewall Software that serves as a bug tracker and project management tool for WordPress. between June 19 and July 3, 2023.
88 commits
143 contributors
87 tickets created
19 tickets reopened
115 tickets closed
TicketticketCreated 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
Improve the name of the e2e test jobs on GitHubGitHubGitHub is a website that offers online implementation of git repositories that can easily be shared, copied and modified by other developers. Public repositories are free to host, private repositories require a paid subscription. GitHub introduced the concept of the ‘pull request’ where code changes done in branches by contributors can be reviewed and discussed before being merged be the repository owner. https://github.com/ Actions – #58661
Run E2E tests with and without SCRIPT_DEBUG enabled – #58661
Switch frame container when testing blockBlockBlock is the abstract term used to describe units of markup that, composed together, form the content or layout of a webpage using the WordPress editor. The idea combines concepts of what in the past may have achieved with shortcodes, custom HTML, and embed discovery into a single consistent API and user experience. editor output – #58592
Switch frame container when testing block editor output – #58592
Update terser-webpack-pluginPluginA plugin is a piece of software containing a group of functions that can be added to a WordPress website. They can extend functionality or add new features to your WordPress websites. WordPress plugins are written in the PHP programming language and integrate seamlessly with WordPress. These can be free in the WordPress.org Plugin Directory https://wordpress.org/plugins/ or can be cost-based plugin from a third-party – #58660, – #57657
Bundled Themes
Twenty Fourteen: Fix text color issue on Button block hover – #58509
Twenty Nineteen: Add fragment ID to paginated links – #45920
Twenty Nineteen: Always set background color and foreground color together – #45916
Revert use of str_starts_with() and str_contains() in update-core.php – #58206
Database
Move the if statement outside of the loopLoopThe Loop is PHP code used by WordPress to display posts. Using The Loop, WordPress processes each post to be displayed on the current page, and formats it according to how it matches specified criteria within The Loop tags. Any HTML or PHP code in the Loop will be processed on each post. https://codex.wordpress.org/The_Loop.. – #56541
Docs
Correct @return description for wp_count_posts() – #58685
Revert unnecessary changes to .jshintrc files – #12009
Update block-serialization-default-parser package for WP 6.3 BetaBetaA pre-release of software that is given out to a large group of users to trial under real conditions. Beta versions have gone through alpha testing in-house and are generally fairly close in look, feel and function to the final product; however, design changes often occur as part of the process. 1 – #57832
add iframeiframeiFrame 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. around post editor – #58626
add navigation fallback – 58557
adds deprecation for deleted block_core_navigation_submenu_build_css_colors function – #58623
refactor and stabilize selectors APIAPIAn API or Application Programming Interface is a software intermediary that allows programs to interact with each other and share data in limited, clearly defined ways. – #58586
stabilise layout and refactor definitions – #58550
update npm packages to latest patchpatchA 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. versions – #58654
update npm packages with bugbugA bug is an error or unexpected result. Performance improvements, code optimization, and are considered enhancements, not defects. After feature freeze, only bugs are dealt with, with regressions (adverse changes from the previous version) being the highest priority. fixes and blessed tasks – #58701
Emoji
Give name to web worker in emoji loader and terminate when finished – #58472
Optimize emoji loader with sessionStorage, willReadFrequently, and OffscreenCanvas – #58472
Pass functions as arguments in loader to account for minification and worker script – #58472
Filesystem API
Allow optional inclusion of hidden files in list_files() – #53659
Define password as null if not set when using SSH2 with public/private key – #33196
General
Add missing parentheses to functions referenced in _deprecated_function() calls added in 6.3 – #58235, #58301, #58555
Ignore invalidinvalidA 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. types for the ‘_wp_http_referer’ URLURLA specific web address of a website or web page on the Internet, such as a website’s URL www.wordpress.org query variable – #57670
HTMLHTMLHyperText Markup Language. The semantic scripting language primarily used for outputting content in web browsers. API
Fix a fatal error when processing malformed document with unclosed attribute – #58637
Declare a few default parameters in WP_Http_Curl and WP_Http_Streams – #52622
Media
Fix inconsistent docs for existing wp_img_tag_add_loading_attrfilterFilterFilters are one of the two types of Hooks https://codex.wordpress.org/Plugin_API/Hooks. They provide a way for functions to modify data of other functions. They are the counterpart to Actions. Unlike Actions, filters are meant to work in an isolated manner, and should never have side effects such as affecting global variables and output. and remove duplicate – #58235
Only show “Copy” and “Download” actions when an attachment URL is available – #57893
Menus
Allow themes and plugins to pass HTML attributes to various Nav Walker outputs – #57140
Options, MetaMetaMeta is a term that refers to the inside workings of a group. For us, this is the team that works on internal WordPress sites like WordCamp Central and Make WordPress. APIs
Check if the gmt_offset value is numeric in sanitize_option() – #57728
Prime networknetwork(versus site, blog) options in a single cache call using wp_cache_get_multiple – #56913
Add an action hook to bulk_edit_posts() function – #28112
Ensure scheduled posts are published when using Bulk Edit – #31635
REST APIREST APIThe 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/.
Cache schema in block pattern and menu item endpoints – #58657
Check post meta update authorization only when value is changed
Expose current $request object to cors_header filters in WP_REST_SERVER->serve_request() – #57752
add revisionsRevisionsThe WordPress revisions system stores a record of each saved draft or published update. The revision system allows you to see what changes were made in each revision by dragging a slider (or using the Next/Previous buttons). The display indicates what has changed in each revision. endpoint for global styles – #58524
Correct the label for wp-content directory check – #58678
Include new WP_DEVELOPMENT_MODE in the list of constants – #58646
Themes
Block template is located twice in get_query_template() – #58299
Fix layout issue on the Themes page background overlay – #58164
Use get_theme_file_path() in wp_theme_has_theme_json() – #57629
Use improved support for child themes in wp_theme_has_theme_json() – #57629
Upgrade/Install
Initialize the local $checkout variable in WP_Automatic_Updater::is_vcs_checkout() – #58563
Only show errors if there is nothing to update – #57999
Pass the full database version string to WordPress.orgWordPress.orgThe community site where WordPress code is created and shared by the users. This is where you can download the source code for WordPress core, plugins and themes as well as the central location for community conversations and organization. https://wordpress.org/ for parsing – #58584
What if effortlessly creating performant, fluid, and idiomatic frontend interactivity on blockBlockBlock is the abstract term used to describe units of markup that, composed together, form the content or layout of a webpage using the WordPress editor. The idea combines concepts of what in the past may have achieved with shortcodes, custom HTML, and embed discovery into a single consistent API and user experience.-based WordPress sites was possible? Imagine plugins providing interactions like “heart this post” or “add to cart” without page reloads. Picture instant search, commenting, and native full-page transitions as best-in-class built-ins without complex scaffolding or external tools. Envision achieving this in any block theme by default without sacrificing PHPPHPThe web scripting language in which WordPress is primarily architected. WordPress requires PHP 5.6.20 or higher server rendering and the pluginPluginA plugin is a piece of software containing a group of functions that can be added to a WordPress website. They can extend functionality or add new features to your WordPress websites. WordPress plugins are written in the PHP programming language and integrate seamlessly with WordPress. These can be free in the WordPress.org Plugin Directory https://wordpress.org/plugins/ or can be cost-based plugin from a third-party ecosystem for a JSJSJavaScript, a web scripting language typically executed in the browser. Often used for advanced user interfaces and behaviors. runtime. Visualize block developers easily declaring and extending such behaviors in a way that is immediately familiar and compatible with the block ecosystem.
That’s what we, the contributors involved in this project, aim to explore and unlock with the Interactivity APIAPIAn API or Application Programming Interface is a software intermediary that allows programs to interact with each other and share data in limited, clearly defined ways.. The demo below shows some of this power and flexibility in action.
GutenbergGutenbergThe Gutenberg project is the new Editor Interface for WordPress. The editor improves the process and experience of creating new content, making writing rich content much simpler. It uses ‘blocks’ to add richness rather than shortcodes, custom HTML etc. https://wordpress.org/gutenberg/ has evolved a lot over the past few years, though most of the improvements have focused on the block developer experience within the block editor. Today, we’d like to update you on the Interactivity API, which aims to be a standard way to allow developers to add interactivity to the frontend of their blocks.
The Interactivity API is for the frontend of blocks, not for the block editor. This means the API is not expected to be used inside the edit function. It’s a way to create interactive user interfaces for your site visitors. Having said that, we’d like to explore whether some directives could be reused across the frontend and the editor to unify the whole block developer experience.
This is still experimental. Functionalities are missing, documentation is scarce, and the final API may look different. The API’s design is open to debate, and any feedback is key to ensuring the Interactivity API accounts for the entirety of WordPress’ diverse needs and requirements.
The main goal of the Interactivity API is to provide a standard and simple way to handle the frontend interactivity of Gutenberg blocks.
A standard makes it easier for developers to create rich, interactive user experiences, from simple cases like counters or popups to more complex features like instant page navigation, instant search, or carts and checkouts.
All these user experiences are technically possible right now without the Interactivity API. However, the more complex the user experience and the more blocks interact with each other, the harder it becomes for developers to build and maintain sites. There are a lot of challenges they have to figure out themselves. The API aims to provide out-of-the-box means for supporting these kinds of interactions.
To address this challenge, before researching different approaches, some requirements/goals for the API were defined:
Block-first and PHP-first: The API must work well with PHP and the current block system, including dynamic blocks, widely extended in WordPress. It must support server-side rendering. Server-rendered HTMLHTMLHyperText Markup Language. The semantic scripting language primarily used for outputting content in web browsers. and client-hydrated HTML must be exactly the same. This is important for SEO and the user experience.
Backward compatible: The API must be compatible with WordPress hooksHooksIn WordPress theme and development, hooks are functions that can be applied to an action or a Filter in WordPress. Actions are functions performed when a certain event occurs in WordPress. Filters allow you to modify certain functions. Arguments used to hook both filters and actions look the same., which could, for example, modify server-rendered HTML. It must also be compatible with internationalization and existing JS libraries on the site (such as jQuery).
Optional and gradual adoption: Related to the previous point, the API must remain optional. It should be possible to adopt it gradually, meaning that interactive blocks not using this API can coexist with those using it.
Declarative and reactive: The API must use declarative code, listen to changes in the data, and update only the parts of the DOM that depend on that data.
Performant: The runtime must be fast and lightweight to ensure the best user experience.
ExtensibleExtensibleThis is the ability to add additional functionality to the code. Plugins extend the WordPress core software.: In the same way WordPress focuses on extensibility, this new system must provide extensibility patterns to cover most use cases.
Atomic and composable: Having small reusable parts that can be combined to create more complex systems is required to create flexible and scalable solutions.
Compatible with the existing block development tooling: The API must be integrated with the existing block-building tools without requiring additional tooling or configuration by the developer.
Apart from all these requirements, integrating client-side navigation on top of any solution should be easy and performant. Client-side navigation is the process of navigating between site pages without reloading the entire page, which is one of the most impressive user experiences demanded by web developers. For that reason, this functionality should be compatible with this new system.
What’s being proposed?
The Interactivity API is a standard system of directives, based on declarative code, for adding frontend interactivity to blocks.
Directives extend HTML with special attributes that tell the Interactivity API to attach a specified behavior to a DOM element or even to transform it. For those familiar with Alpine.js, it’s a similar approach but explicitly designed to work seamlessly with WordPress.
The API is designed for the world of blocks and takes WordPress history of being closely attached to web standards to heart.
As directives are added to the HTML, they work great with dynamic blocks and PHP.
Dynamic block example
<div
data-wp-interactive='{ "namespace": "wpmovies" }'
data-wp-context='{ "isOpen": false }'
data-wp-watch="callbacks.logIsOpen"
>
<button
data-wp-on--click="actions.toggle"
data-wp-bind--aria-expanded="context.isOpen"
aria-controls="p-1"
>
Toggle
</button>
<p id="p-1" data-wp-show="context.isOpen">
This element is now visible!
</p>
</div>
As you can see, directives like data-wp-on--click or data-wp-show are added as custom HTML attributes. WordPress can process this HTML on the server, handling the directives’ logic and creating the appropriate markup.
Backward compatible
As the Interactivity API works perfectly with server-side rendering, you can use all the WordPress APIs, including:
WordPress filters and actions: You can keep using WordPress hooks to modify the HTML or even to modify directives. Additionally, existing hooks will keep working as expected.
CoreCoreCore is the set of software required to run WordPress. The Core Development Team builds WordPress.TranslationtranslationThe process (or result) of changing text, words, and display formatting to support another language. Also see localization, internationalization. API: e.g. __() and _e(). You can use it to translate the text in the HTML (as you normally would) and even use those APIs on the server side of your directives.
Optional and gradual adoption
The Interactivity API pipeline promotes progressive enhancementenhancementEnhancements are simple improvements to WordPress, such as the addition of a hook, a new feature, or an improvement to an existing feature. by building on top of WordPress’s solid foundation and patterns. It was carefully designed not to force any use cases to pay for the costs of other use cases.
For example, blocks with directives can coexist with other (interactive or non-interactive) blocks. This means that if there are other blocks on the page using other frameworks like jQuery, everything will work as expected.
Declarative and reactive
The Interactivity API follows an approach similar to other popular JS frameworks by separating state, actions, and callbacks and defining them declaratively. Why declaratively?
Declarative code describes what a program should do, while imperative code describes how the program should do it. Using a declarative approach, the UIUIUser interface automatically updates in response to changes in the underlying data. With an imperative approach, you must manually update the UI whenever the data changes. Compare the two code examples:
Imperative code
<button id="toggle-button">Toggle Element</button>
<p>This element is now visible!</p>
<script>
const button = document.getElementById("toggle-button");
button.addEventListener("click", () => {
const element = document.getElementById("element");
if(element) {
element.remove();
} else {
const newElement = document.createElement("p");
newElement.textContent = "This element is visible";
document.body.appendChild(newElement);
}
});
</script>
Declarative code
This is the same use case shared above but serves as an example of declarative code using this new system. The JavaScriptJavaScriptJavaScript or JS is an object-oriented computer programming language commonly used to create interactive effects within web browsers. WordPress makes extensive use of JS for a better user experience. While PHP is executed on the server, JS executes within a user’s browser. https://www.javascript.com/. logic is defined in the view.js file of the block, and add the directives to the markup in the render.php .
<!-- Render.php file -->
<div
data-wp-interactive='{ "namespace": "wpmovies" }'
data-wp-context="{ 'isOpen': true }"
>
<button
data-wp-on--click="actions.toggle"
data-wp-bind--aria-expanded="context.ispen"
aria-controls="p-1"
>
Toggle
</button>
<p id="p-1" data-wp-show="context.isOpen">
This element is now visible!
</p>
</div>
Don’t worry if you don’t fully understand this example yet. It will be explained in detail later in the post.
Using imperative code may be easier when creating simple user experiences, but it becomes much more difficult as blocks become more complex. The Interactivity API must cover all use cases, from the simplest to the most challenging. That’s why a declarative approach using directives better fits the Interactivity API.
Performant
The API has been designed to be as performant as possible:
The runtime code needed for the directives is just ~10 KB, and it only needs to be loaded once for all the blocks.
It only loads the directives needed by the blocks present on the page. For example, if no blocks are using data-wp-show, the code for this directive won’t be loaded.
The scripts will load without blocking the page rendering.
There are ongoing explorations about the possibility of delaying the scripts loading once the block is in the viewport. This way, the initial load would be optimized without affecting the user experience.
Extensible
Directives can be added, removed, or modified directly from the HTML. For example, users could use the render_block filter to modify the HTML and its behavior.
In addition to using built-in directives, users can create custom directives to add any custom behaviors to their HTML.
Atomic and composable
Each directive controls a small part of the DOM, and you can combine multiple directives to create rich, interactive user experiences.
Compatible with the existing block development tooling
Using built-in directives does not require a build step and only requires a small runtime. A build step is necessary only when creating custom directives that return JSX. For such use cases, the API works out of the box with common block-building tools like wp-scripts.
Client-side navigation
The Interactivity API comes with built-in primitives for adding client-side navigation to your site. This functionality is completely optional, but it opens the possibility to create these user experiences without having to opt out of the WordPress rendering system.
It also pairs very well with the View Transitions API allowing developers to animate page transitions easily.
Why a standard?
Blocks using the Interactivity API and interactive blocks using other approaches like jQuery can coexist, and everything will work as expected. However, the Interactivity API comes with some benefits for your interactive blocks:
Blocks can communicate with each other easily. With a standard, this communication is handled by default. When different blocks use different approaches to frontend interactivity, inter-block communication becomes more complex and almost impossible when separate developers create blocks.
Composability and compatibility: You can combine interactive blocks, and nest them in structures with defined behaviors. Thanks to following the same standard, they are fully cross-compatible. If each block used a different approach to interactivity, they would likely break.
Fewer KBs will be sent to the browser. If each plugin author uses a different JS framework, more code will be loaded in the frontend. If all the blocks use the same one, the code is reused.
If all the blocks on a page use this standard, site-wide features like client-side navigation can be enabled.
Additionally, with a standard, WordPress can absorb the maximum amount of complexity from the developer because it will handle most of what’s needed to create an interactive block.
Complexities absorbed by the standard
With this absorption, less knowledge is required to create interactive blocks, and developers have fewer decisions to worry about.
Additionally, if the community adopts a standard, learning from other interactive blocks would be simpler, which fosters collaboration and code reusability. This should simplify the development process and make it friendlier to less experienced developers.
How to create interactive blocks using the API
It’s important to highlight that the block creation workflow doesn’t change.
Until now, WordPress has been intentionally unopinionated about the different solutions used on the frontend of blocks. The Interactivity API changes that. It adds a new standard way to easily add frontend interactivity to blocks while the APIs handling the Block Editor remain the same.
To add interactivity to blocks using the Interactivity API, developers would need to:
Add directives to the markup to add specific behavior to the block.
If needed, create a store with the logic (state, actions, or callbacks) needed for interactivity. Blocks using only directives with self-sufficient logic like data-wp-link, don’t need this step.
Before explaining each step in more detail, let’s return to our example: a button that shows and hides some text. We’ll also add logic to send a message in the console whenever the button is hidden/revealed.
Add directives
Directives are added to the markup of your block. In the render.php file (for dynamic blocks) or the save.js file (for static blocks).
<div
data-wp-interactive='{ "namespace": "wpmovies" }'
data-wp-context='{ "isOpen": false }'
data-wp-watch="callbacks.logIsOpen"
>
<button
data-wp-on--click="actions.toggle"
data-wp-bind--aria-expanded="context.isOpen"
aria-controls="p-1"
>
Toggle
</button>
<p id="p-1" data-wp-show="context.isOpen">
This element is now visible!
</p>
</div>
In this example, the directive data-wp-context is used to define some local state ("isOpen": false) that will be available to that HTML node and all its children. All the actions and callbacks used in those nodes can access that data. Knowing that, other directives like data-wp-on--click can trigger actions and callbacks reading that context.
Create the store
In this part, the logic (actions and callbacks) called by the directives is defined.
The store is created in the view.js file of each block. Although it works at a block level right now, the possibility of sharing code that multiple blocks need will be investigated as well.
// view.js
import { store, getContext } from "@wordpress/interactivity";
store( 'wpmovies', {
actions: {
toggle: () => {
const context = getContext();
context.isOpen = !context.isOpen;
},
},
callbacks: {
logIsOpen: () => {
const context = getContext();
// Log the value of `isOpen` each time it changes.
console.log(`Is open: ${context.isOpen}`);
},
},
});
For those familiar with ReactReactReact is a JavaScript library that makes it easy to reason about, construct, and maintain stateless and stateful user interfaces. https://reactjs.org/., this would be an equivalent React component:
const Comp = () => {
const [isOpen, setIsOpen] = useState(false);
useEffect(() => {
// Log the value of `isOpen` each time it changes.
console.log(`Is Open: ${isOpen}`);
}, [isOpen]);
const toggle = () => {
setIsOpen(!isOpen);
};
return (
<div>
<button
onClick={toggle}
aria-expanded={isOpen}
aria-controls="p-1"
>
Toggle
</button>
{isOpen && <p id="p-1">This element is visible!</p>}
</div>
);
};
Let’s take a look at each step in detail:
1. Add the directives
Directives are custom HTML attributes whose value can contain options or references to the store.
Let’s return to our previous example:
Dynamic block example
// render.php
<div
<?php echo get_block_wrapper_attributes(); ?>
data-wp-interactive='{ "namespace": "wpmovies" }'
data-wp-context='{ "isOpen": false }'
data-wp-watch="callbacks.logIsOpen"
>
<button
data-wp-on--click="actions.toggle"
data-wp-bind--aria-expanded="context.isOpen"
aria-controls="p-1"
>
Toggle
</button>
<p id="p-1" data-wp-show="context.isOpen">
This element is now visible!
</p>
</div>
This is how it would work in a static block:
Static block example
// save.js
const save = () => {
return `
<div
{...useBlockProps()}
data-wp-interactive='{ "namespace": "wpmovies" }'
data-wp-context='{ "isOpen": true }'
data-wp-watch="callbacks.logIsOpen"
>
<button
data-wp-on--click="actions.toggle"
data-wp-bind--aria-expanded="context.isOpen"
aria-controls="p-1"
>
Toggle
</button>
<p id="p-1" data-wp-show="context.isOpen">
This element is now visible!
</p>
</div>
`;
};
The example above uses directives like wp-show and wp-on to add interactivity to the HTML. Below is the initial list of core directives planned, which aims to cover the most common use cases for adding interactivity. It has been inspired by other frameworks like Alpine, VueVueVue (pronounced /vjuː/, like view) is a progressive framework for building user interfaces. https://vuejs.org/., or Svelte:
wp-context provides local state available to a specific HTML node and its children.
wp-on runs code on dispatched DOM events like click or keyup. The format of this directive is data-wp-on--[event], like data-wp-on--click or data-wp-on--keyup.
wp-show shows and hides elements depending on the state or context.
wp-each creates DOM elements by iterating through a list.
wp-bind allows setting HTML attributes on elements.
wp-class adds or removes a class to an HTML element, depending on its value.
wp-style adds or removes inline style to an HTML element, depending on its value.
wp-text sets the inner content of an HTML element.
wp-html sets the innerHTML property of an HTML element.
wp-slot / wp-fill moves snippets of HTML from one place (fills) to another (slots).
wp-watch runs an expression when the node is created and runs it again when the state or context changes.
wp-init runs an expression only when the node is created.
wp-error captures errors in other interactive blocks.
Please bear in mind that this list may vary, and not all these core directives have been implemented yet. Additionally, the API is extensible: anyone can create their own directives if needed.
An important feature is that, when needed, directives support server-side rendering in PHP. This results in a better user experience and better SEO. This is usually taken for granted with WordPress but, when using modern frameworks like React to add interactivity to blocks, it is common to show empty content until client-side JavaScript updates the HTML.
2. Create the store
The store contains the reactive state and the actions and callbacks that modify it.
State: Defines data available to the HTML nodes of the page. It is important to differentiate between two ways to define the data:
Global state: It is defined using the store() function, and the data is available to all the HTML nodes of the page.
Context/Local State: It is defined using the data-wp-context directive in an HTML node, and the data is available to that HTML node and its children.
Actions: Usually triggered by the data-wp-on directive (using event listeners) or other actions.
Callbacks: Automatically react to state changes. Usually triggered by data-wp-callback or data-wp-init directives.
Returning to our example, this could be a simple store in one block:
// view.js
import { store, getContext } from "@wordpress/interactivity";
store( 'wpmovies', {
actions: {
toggle: () => {
const context = getContext();
context.isOpen = !context.isOpen;
},
},
callbacks: {
logIsOpen: () => {
const context = getContext();
// Log the value of `isOpen` each time it changes.
console.log(`Is open: ${context.isOpen}`);
},
},
});
In this specific case, only actions and callbacks are defined, but some state could also be included. For example, you could define the state in another block to create a list with your “Favorite movies”. It might look something like this:
// view.js - A favorite movies block
import { store, getContext } from '@wordpress/interactivity';
const { state } = store( 'wpmovies', {
state: {
favoriteMovies: [],
},
actions: {
addMovie: () => {
const context = getContext();
// We assume that there is a `wp-context` directive
// on the block which provides the item ID.
state.favoriteMovies.push(context.item.id);
},
clearFavoriteMovies: () => {
state.favoriteMovies = [];
},
},
});
Note: The store function will automatically merge the store definitions from all the blocks using store into a single reactive object. This way, you can use the global state defined in other blocks.
Initializing the store on the server with wp_initial_state()
The state can also be initialized on the server using the wp_initial_state() function. You would typically do this in the render.php file of your block (the render.php templates were introduced in WordPress 6.1). Initializing your state on the server allows you to populate it with some data from the server without worrying about serializing that data or making additional API requests.
The store defined on the server with wp_initial_state() gets merged with the stores defined in the view.js files. For example, the “Favorite movies” block from above could initialize its store on the server like this:
And then its `view.js` file would be simplified to:
// view.js - A favorite movies block
import { store, getContext } from '@wordpress/interactivity';
const { state } = store( 'wpmovies', {
actions: {
addMovie: () => {
const context = getContext();
// We assume that there is a `wp-context` directive
// on the block which provides the item ID.
state.favoriteMovies.push(context.item.id);
},
clearFavoriteMovies: () => {
state.favoriteMovies = [];
},
},
});
Initializing the store in the server also allows you to use any WordPress API. For example, you could use the Core Translation API to translate part of your state:
When creating a directive, you might notice that its value is a string pointing to a specific state, an action, or a callback. For instance, in the example that we’ve been using in this post, the value of the data-wp-on--click directive was actions.toggle, and the value of data-wp-watch was callbacks.logIsOpen.
Those values are references to a particular property in the store. They are wired to the directives automatically so that each directive “knows” what actions.toggle refers to without any additional configuration.
When a directive is evaluated, the reference callback receives an object with:
The store containing the state, actions and callbacks.
The context (an object containing the context defined in all the wp-context ancestors).
The reference to the DOM element on which the directive was defined (a ref).
Other properties relevant to the directive. For example, the data-wp-on--click directive also receives the instance of the MouseEvent triggered by the user.
import { store, getContext, getElement } from "@wordpress/interactivity"
const { state } = store( 'wpmovies', {
state: {
theme: false,
},
actions: {
toggle: ( event ) => {
console.log(state);
// `{ "theme": false }`
const context = getContext();
console.log(context);
// `{ "isOpen": true }`
const { ref } = getElement();
console.log(ref);
// The DOM element
console.log(event);
// The Event object if using the `data-wp-on`
}
}
})
This approach enables some functionalities that make directives flexible and powerful:
Actions and callbacks can read and modify the state and the context.
Actions and callbacks can do anything a regular JavaScript function can do, like access the DOM or make API requests.
Callbacks automatically react to state changes.
How can users learn more and keep track of the API?
If you are interested in this proposal, let us know in the comments or the Interactivity API GitHub repo. Your feedback is highly appreciated. If you want to learn more about the Interactivity API, here is a list of relevant links with more information:
GitHub repo: This is where most aspects are discussed and a way to follow the development process. Feel free to open any issue, discussion, or pull request.
Movies demo repo: An example with some interactive blocks and user experiences. If you are interested in the code or even reproducing it locally, the information is gathered here.
There will be more resources in the future, including technical documentation, to explain everything in more detail.
Next steps
There will be two sessions on April 17th, 2023 (one at 08:00UTC and another at 17:00UTC) featuring a live product demo followed by a Q&A. The specifics for each session will be announced on the Make Core blogblog(versus network, site). If you’re interested in the Interactivity API, have any related questions, or want to provide feedback, feel free to join us. For those who cannot attend or prefer to share feedback in writing, comment on this post. Additionally, the session will be recorded and posted it here.
EDIT: These are the links to both sessions, where the Interactivity API is explained in more detail and answered some questions:
First session: Hosted by Michael Burridge and led by Mario Santos and Luis Herranz.
Second session: Hosted by Ryan Welcher and led by Michal Czaplinski
With this in mind, these are the next steps for the Interactivity API:
Gather and address the feedback received in the live session and this post.
Keep developing the API, incorporating the feedback.
Work on more technical documentation to explain in detail how the Interactivity API works.
Once there is enough feedback and the API feels confident enough, the intent is to add the API as an experimental feature to Gutenberg so block authors can start building with it (with the eventual goal of including it in Core).
FAQ
How does the Interactivity API work under the hood?
Its three main components are:
Preact combined with Preact Signals for hydration, client logic, and client-side navigation.
HTML Directives that can be understood by both the client and server.
There will be more technical documentation to explain the API in more detail in the future. In the meantime, please share any questions in the comments or on the GitHub repo.
Why did you choose Preact to build the directives system? Why not React or another JavaScript framework?
Preact has a number of advantages over React and other JavaScript frameworks like Vue, Svelte, or Solid in the context of the frontend (which is the focus of the Interactivity API):
It’s performant (even more when used with signals).
It’s compatible with React (through preact/compat, useful to share the same Editor components for some use cases where SSR is not important, and the components are very complex, like an e-commerce cart and checkout, for example).
It’s HTML-friendly (unlike React).
It gives us DOM diffing out of the box.
It’s extremely extensible through their Option Hooks. They use that extensibility for the hooks (preact/hooks), compatibility with React (preact/compat) and their signals (@preact/signals). Basically, everything but the DOM diffing algorithm.
Its core team has been great and very helpful. They are also interested in enhancing this “island-based” usage of Preact.
Is Gutenberg going to move from React to Preact since the Interactivity API uses it?
No. At the moment, there are no plans to make that transition. The requirements and advantages of the editor, as a fully interactive application, are quite different. Preact does have a @preact/compat package that enables full compatibility with the React ecosystem, and many large web applications use it. However, using Preact in the block editor would not offer advantages like it does on the frontend in the Interactivity API.
What approaches have been considered instead of using directives?
Many alternative approaches were considered. Here’s a brief summary of some of them:
React and other JavaScript frameworks
React was considered first because Gutenberg developers are familiar with it. Other popular JS frameworks like Svelte, Vue.js, or Angular were also considered, but none of them (including React) are PHP-friendly or compatible with WordPress hooks or internationalization. See above for a longer explanation.
Alpine.js
Alpine.js is a great framework, and it inspired a lot of functionality in the Interactivity API. However, it doesn’t support server-side rendering of its directives, and having a similar system tailored for WordPress blocks has many benefits.
The possibility of creating a DSL for writing interactive templates was also researched. The code written in that Template DSL would then be compiled into both JavaScript and PHP. However, creating a production-grade Template compiler is complex and would be a large and risky investment of effort. This approach is still being considered for the future, with the directives serving as a compilation target.
Why should I, as a block developer, use the Interactivity API rather than React?
Using React on the frontend doesn’t work smoothly with server rendering in PHP. Every approach that uses React to render blocks has to load content using client-side JavaScript. If you only render your blocks on the client, it typically results in a poor user experience because the user stares at empty placeholders and spinners while waiting for content to load.
Now, it’s possible to server-render a block in PHP and use React to render the same block on the frontend. However, this results in a poor developer experience because the logic has to be duplicated across the PHP and React parts. Not only that, but you have now exposed yourself to subtle bugs caused by WordPress hooks!
Imagine installing a third-party plugin with a hook (filterFilterFilters 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.) that modifies the server-rendered HTML. Let’s say this filter adds a single CSSCSSCascading Style Sheets. class to your block’s HTML. That CSS class will be present in the server-rendered markup. On the frontend, your block will render again in React, but now the content will not include that CSS class because there is no way to apply WordPress hooks to React-rendered content!
On the other hand, the Interactivity API is designed to work perfectly with WordPress hooks because directives enhance the server-rendered HTML with behaviors. This also means it works out of the box with WordPress backend APIs like i18ni18nInternationalization, or the act of writing and preparing code to be fully translatable into other languages. Also see localization. Often written with a lowercase i so it is not confused with a lowercase L or the numeral 1. Often an acquired skill..
To summarize, using the Interactivity API rather than just using React comes with these benefits:
If you use React, your interactive blocks must generate the same markup on the client as they do on the server in PHP. Using the Interactivity API, there is no such requirement as directives are added to server-rendered HTML.
The Interactivity API is PHP-friendlier. It works out of the box with WordPress hooks or other server functionalities such as internationalization. For example, with React, you can’t know which hooks are applied on the server, and their modifications would be overwritten after hydration.
What are the benefits of Interactivity API over just using jQuery or vanilla JavaScript?
The main difference is that the Interactivity API is declarative and reactive, so writing and maintaining complex interactive experiences should become way easier. Additionally, it has been specially designed to work with blocks, providing a standard that comes with the benefits mentioned above, like inter-block communication, compatibility, or site-wide features such as client-side navigation.
Finally, comparing it with jQuery, the Interactivity API runtime is ~10kb, which is much more lightweight. Actually, there is an ongoing effort to remove heavy frameworks like jQuery across the WordPress ecosystem, and this would help in this regard.
Do I need to know React, PHP, and this new Interactivity API?
If you want to add frontend interactivity to your blocks using this API, the short answer is yes. If your block is not interactive, the block creation workflow will remain exactly the same.
As mentioned in the post, this API only adds a new standard way to easily add frontend interactivity to blocks, which didn’t exist until now. This means that you will still need to use React to handle the editor part of your blocks.
In the future, we’d like to explore the possibility of expanding the usage of directives to unify the developer experience among the Editor as well.
On the other hand, if you want to create an interactive block, with the Interactivity API you don’t have to deal with complex topics like tooling, integration with WordPress, inter-block communication, or the server-side rendering of the interactive parts.
Does this mean I must migrate all my interactive blocks to use this API?
No. Blocks outside the Interactivity API can coexist with blocks using it. However, as explained above, keep in mind that there are some benefits for blocks that use the API:
Blocks can communicate with each other easily. With a standard, this communication is handled by default. When different blocks use different approaches to frontend interactivity, inter-block communication becomes more complex and gets almost impossible when separate developers create blocks.
Composability and compatibility: You can combine interactive blocks, nest them in structures with defined behaviors, and, thanks to following the same standard, they are fully cross-compatible. If each block were to use a different approach to interactivity, they would likely break.
Fewer KBs will be sent to the browser. If each plugin author uses a different JS framework, more code will be loaded in the frontend. If all the blocks use the same one, the code is reused.
If all the blocks on a page use this standard, site-wide features like client-side navigation can be enabled.
What are the performance implications of using this API? Is it worth loading the Interactivity API for very simple use cases?
The API has been designed with performance in mind, so it shouldn’t be a problem:
The runtime code needed for the directives is just ~10 KB, and it only needs to be loaded once for all the blocks.
It only loads the directives needed by the blocks present on the page. For example, if no blocks use data-wp-show, that directive won’t be loaded.
All the scripts that belong to the Interactivity API (including the `view.js` files) will load without blocking the page rendering.
There are ongoing explorations about the possibility of delaying the scripts loading once the block is in the viewport. This way, the initial load would be optimized without affecting the user experience.
Can I use directives in the block editor?
No. Right now, directives only work in the frontend of blocks. However, it’ll be investigated whether some directives (and also your custom directives) could be reused across the frontend and the editor. It’s worth emphasizing that the realities of the editor application and the frontend of a website are very different, particularly around the interactivity they afford. It needs to be ensured that the right tools are built for the right context. An interesting area to explore further would be to expose directives in the editor so users and builders can use them to attach behaviors to their sites on demand.
Does it work with the Core Translation API?
It does! As the Interactivity API works perfectly with server-side rendering, you can use all the WordPress APIs including __() and _e(). You can use it to translate the text in the HTML (as you normally would) and even use it inside the store when using wp_initial_state() on the server side. It might look something like this:
Before testing, bear in mind that the Interactivity API is still experimental and very likely to change before an official release. There are still missing functionalities that may break your site, and the API hasn’t been documented yet properly. If you plan to use it, do so at your own risk.
If you want to test the Interactivity API, you can install the latest version of the plugin on your site. Note that it requires the latest version of Gutenberg to work. Once installed, you can start creating interactive blocks using the API.
If you prefer to test the Interactivity API in a demo site with some interactive blocks already in place, you can look at the WP Movies demo.
How can interactive blocks update/save the state on the server?
It is still an active area of research, but is on the roadmap for the Interactivity API. For example, there’s an ongoing experiment to create an interactive version of the Comments Form block that can persist comments on the site and refresh itself without a full page reload.
Is it going to be a plugin? Or will it be part of Gutenberg/Core?
Although it is now distributed as a plugin, it aims to be added as an experimental feature to Gutenberg. The goal is to include it in Core once enough feedback has been gathered, and it’s clear that it’s the right direction.
I’m concerned about XSS; can JavaScript be injected into directives?
No. The Interactivity API only allows for References to be passed as values to the directives. This way, there is no need to eval() full JavaScript expressions, so it’s not possible to perform XSS attacks.
Does this work with CSP?
Yes. The Interactivity API does not use eval() or the Function() constructor, so it doesn’t violate the unsafe-eval content security policy. It is also designed to work with any custom content security policy.
Can you use directives to make AJAX/REST-API requests?
Sure. Actions and callbacks called by directives can do anything a JavaScript function can, including making API requests.
As mentioned during the post, it’d be great to hear your thoughts and new ideas in the GitHub repo.
Special props to @czapla , who coauthored this blog post with me from the start, and to @kristastevens for her invaluable help in shaping the document and ensuring everything was cohesive.
Happy new year everyone! Here’s some aggregate data for 2022 about WordPress CoreCoreCore is the set of software required to run WordPress. The Core Development Team builds WordPress. contribution on TracTracAn open source project by Edgewall Software that serves as a bug tracker and project management tool for WordPress..
Please note: these data only include code contributions to WordPress codebase, and it does not include contributions on GitHubGitHubGitHub is a website that offers online implementation of git repositories that can easily be shared, copied and modified by other developers. Public repositories are free to host, private repositories require a paid subscription. GitHub introduced the concept of the ‘pull request’ where code changes done in branches by contributors can be reviewed and discussed before being merged be the repository owner. https://github.com/ repositories like GutenbergGutenbergThe Gutenberg project is the new Editor Interface for WordPress. The editor improves the process and experience of creating new content, making writing rich content much simpler. It uses ‘blocks’ to add richness rather than shortcodes, custom HTML etc. https://wordpress.org/gutenberg/.
The raw data for this post are available on this public spreadsheet. You might find that much 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, but they are hard to make accessible to everyone.
Last note: all the graphics below link to to a new tab to display them in full size.
General Trac overview
In 2022, the WordPress Core team shipped 2597 commits (1852 in 2021). 2656 tickets were opened, 2413 tickets were closed, and 353 were reopened.
Also, 988 people contributed to WordPress source code using Trac (832 in 2021), and 398 people made their very first contribution to WordPress Core ♥️ (305 in 2021).
January
February
March
April
May
June
July
August
September
October
November
December
Total
Commits
229
156
230
279
133
172
183
235
320
374
182
104
2597
Tickets closed
214
217
187
190
194
146
220
148
269
278
240
110
2413
Tickets reopened
55
46
22
23
34
27
19
20
23
33
40
11
353
Tickets created
297
252
230
132
235
230
194
171
218
231
299
167
2656
New contributors
18
32
20
37
15
18
69
31
68
43
43
4
398
Contributors
115
122
168
200
110
105
196
211
327
237
162
56
988
This chart shows the number of commits per month in 2022, and the number of closed, reopened and created tickets per month. It also shows the number of contributors per month in 2022. It 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 September, followed by October, August and July, during the WordPress 6.1 development cycle. March and April were also prolific months (WP 6.0 development cycle).
Components activity
How did 2022’s commits break out by Core Component?
The most prolific components were:
Build/Test Tools with 366 commits (17% of all listed commits)
Docs with 297 commits (14% of all listed commits)
Editor with 207 commits (10% of all listed commits)
Coding Standards with 145 commits (7% of all listed commits) and Code Modernization (which is not an official component) with 135 commits (6% of all listed commits)
Bundled Themes with 128 commits (6% of all listed commits)
Then comes Media, Administration, REST APIREST APIThe 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/., Themes, General, Upgrade/Install, Help/About, Internationalization, Posts/Post Types, Query and Users. The other components each had fewer than 30 commits this year.
Contributors data retrieved from WordPress.orgWordPress.orgThe community site where WordPress code is created and shared by the users. This is where you can download the source code for WordPress core, plugins and themes as well as the central location for community conversations and organization. https://wordpress.org/ profiles
The data below comes from matching contributors’ usernames, as mentioned in Trac props, with their profiles on WordPress.org.
One caveat: this ignores usernames that did not match a profile on dotorg, plus any that had blank or unusable country/company information (“The Universe” or “Unicorn land” 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 1255 contributions (1142 in 2021)
Russiawith 1152 contributions (227 in 2021)
France with 739 contributions (266 in 2021)
Australia with 386 contributions (211 in 2021)
India with 317 contributions (219 in 2021)
Netherlands with 225 contributions
United Kingdom with 216 contributions (112 in 2021)
Sweden with 182 contributions (102 in 2021)
Contributors (people) by country
In 2022, people from at least 57 countries contributed to WordPress Core (56 countries in 2021).
Here is the top eight countries by number of contributors:
United States with 152 people (155 in 2021)
India with 77 people (58 in 2021)
Bangladesh with 43 people (only 13 in 2021)
United Kingdom with 38 people (34 in 2021)
Germany with 25 people (23 in 2021)
Netherlands with 23 people (20 in 2021)
France with 22 people (26 in 2021)
Canada with 17 people (16 in 2021)
Italy with 13 people (15 in 2021)
Contributions by company
In 2022, people from at least 229 companies contributed to WP Core.
These companies (well, their employees) each contributed to more than 100 commits:
Yoast with 1452 contributions (379 in 2021)
Automattic with 866 contributions (785 in 2021)
Whodunit with 676 contributions (215 in 2021)
10up with 501 contributions (30 in 2021)
Bluehost with 226 contributions (146 in 2021)
Advies en zo with 220 contributions (191 in 2021)
Spacedmonkey with 132 contributions (38 in 2021)
Google with 130 contributions (87 in 2021)
Dream Encode with 124 contributions (20 in 2021)
Human Made with 126 contributions (131 in 2021)
Awesome Motive with 122 contributions (29 in 2021)
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 88 core contributorsCore ContributorsCore contributors are those who have worked on a release of WordPress, by creating the functions or finding and patching bugs. These contributions are done through Trac. https://core.trac.wordpress.org. on Trac in 2022, 10up with 38 contributors, Yoast (18 contributors), WPDeveloper (15 contributors), Multidots (14 contributors), and rtCamp (10 contributors). Only these 6 companies had more than 10 people credited on Trac in 2022.
What did 2022 hold for Core Committers?
32 Core Committers committed code to the WordPress SVNSVNSubversion, the popular version control system (VCS) by the Apache project, used by WordPress to manage changes to its codebase. repository this year (33 in 2021):
Of the 1901 commits, 755 (39%) were made by people working at Yoast, 414 (21%) from people working at Whodunit, 199 (10%) from employees of Automattic, followed by 10up (128 commits) and Bluehost (125 commits).
Automattic is the only company with more than 10 active Core Committers. Google has 4 people allowed to commit code to WordPress, followed by 10up and Human Made with 2 Core Committers.
Worth noting that 14 of the 32 active committers come from the US, which represents 43% of the Core Committers squad. Australia comes second with 3 committers and Portugal third with 2 committers.
More than 39% of the commits where handled by committers located in Russia, 21% by committers located in France, and 18% by committers located in the US.
Many thanks to @sabernhardt for his help to collect the 2022 data and to proofread this recap.
Welcome back to a new issue of Week in CoreCoreCore is the set of software required to run WordPress. The Core Development Team builds WordPress.. Let’s take a look at what changed on TracTracAn open source project by Edgewall Software that serves as a bug tracker and project management tool for WordPress. between October 31 and November 7, 2022.
47 commits
120 contributors
97 tickets created
27 tickets reopened
104 tickets closed
TicketticketCreated 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 a few strings used as HTMLHTMLHyperText Markup Language. The semantic scripting language primarily used for outputting content in web browsers. attributes – #57093
Bundled Themes
Twenty Seventeen: Improve letter-spacing reset for non-latin alphabets – #56994
Canonical
Protect against error for term not exists queries – #55955
Coding Standards
Apply spacing changes after composer format – #57057
Declare $wp_taxonomies global at the top of unregister_taxonomy() – #57058
Use consistent spelling for “cacheable” in WP_Query::get_posts() – #57012
Docs
Document the usage of $wpdb global in WP_Date_Query methods – #57033
Document the usage of globals in some functions – #57082
Fix block_editor_rest_api_preload() parameter type – #56810, #56792
Improve globals documentation in unregister_taxonomy() and wp_term_is_shared() – #57058, #56792
Replace HTTPHTTPHTTP is an acronym for Hyper Text Transfer Protocol. HTTP is the underlying protocol used by the World Wide Web and this protocol defines how messages are formatted and transmitted, and what actions Web servers and browsers should take in response to various commands. links with HTTPSHTTPSHTTPS is an acronym for Hyper Text Transfer Protocol Secure. HTTPS is the secure version of HTTP, the protocol over which data is sent between your browser and the website that you are connected to. The 'S' at the end of HTTPS stands for 'Secure'. It means all communications between your browser and the website are encrypted. This is especially helpful for protecting sensitive data like banking information. in class-json.php docblocks – #57017, #56792
Replace HTTP links with HTTPS in class-pop3.php docblocks and JSJSJavaScript, a web scripting language typically executed in the browser. Often used for advanced user interfaces and behaviors. vendor readme file – #57017, #56792
Typo correction in get_registered_nav_menus()docblockdocblock(phpdoc, xref, inline docs) – #57101, #56792
Various docblock fixes in MultisitemultisiteUsed to describe a WordPress installation with a network of multiple blogs, grouped by sites. This installation type has shared users tables, and creates separate database tables for each blog (wp_posts becomes wp_0_posts). See also network, blog, site administration functions – #56792
Editor
Avoid running certain logic around theme.json parsing unnecessarily for classic themes – #56945
Correctly style separator blocks when only a background-color is defined – #56903
Improve frontend performance for get_default_block_editor_settings() – #56815
Improve how min/max font sizes are calculated for fluid typography – #57075
Improve performance of WP_Theme_JSON class by reducing usage of expensive array functions – #56974, #57067
Update blockBlockBlock is the abstract term used to describe units of markup that, composed together, form the content or layout of a webpage using the WordPress editor. The idea combines concepts of what in the past may have achieved with shortcodes, custom HTML, and embed discovery into a single consistent API and user experience. editor packages to the latest patchpatchA 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 – #57038, #56818, #56955, #56923
Filesystem
Return FTPFTPFTP is an acronym for File Transfer Protocol which is a way of moving computer files from one computer to another via the Internet. You can use software, known as a FTP client, to upload files to a server for a WordPress website. https://codex.wordpress.org/FTP_Clients./FTP Sockets exists() methods to a previous state – #56966, #51170, #28013
Formatting
Check that both normalizer_* functions exist in remove_accents() – #56980
General
Use HTTPS for the b2/cafélog link in readme.html – #57018
Help/About
Fix inconsistency in auto-updates help tabs – #56921
I18Ni18nInternationalization, or the act of writing and preparing code to be fully translatable into other languages. Also see localization. Often written with a lowercase i so it is not confused with a lowercase L or the numeral 1. Often an acquired skill.
Initialize textdomain registry in wp_load_translations_early() – #57051
Media
Prevent decoding attribute corrupting JSONJSONJSON, or JavaScript Object Notation, is a minimal, readable format for structuring data. It is used primarily to transmit data between a server and web application, as an alternative to XML. data – #56969
Menus
Apply menu-item-has-children class in sub-menus – #56946, #28620
Networks and Sites
Replace “N/A” with “Not applicable” in choose_primary_blog() – #57040
Don’t attempt caching if running a WP_User_Query before plugins_loaded – #56952
Prevent ID only queries erroring when starting the loopLoopThe Loop is PHP code used by WordPress to display posts. Using The Loop, WordPress processes each post to be displayed on the current page, and formats it according to how it matches specified criteria within The Loop tags. Any HTML or PHP code in the Loop will be processed on each post. https://codex.wordpress.org/The_Loop. – #56948
Revert one instance of wp_get_theme() from [54817] – #57057
Update/Install
Deactivate GutenbergGutenbergThe Gutenberg project is the new Editor Interface for WordPress. The editor improves the process and experience of creating new content, making writing rich content much simpler. It uses ‘blocks’ to add richness rather than shortcodes, custom HTML etc. https://wordpress.org/gutenberg/pluginPluginA plugin is a piece of software containing a group of functions that can be added to a WordPress website. They can extend functionality or add new features to your WordPress websites. WordPress plugins are written in the PHP programming language and integrate seamlessly with WordPress. These can be free in the WordPress.org Plugin Directory https://wordpress.org/plugins/ or can be cost-based plugin from a third-party version older than 14.1 – #56985
Upgrade/Install
Delete the comments-query-loop folder in wp-includes/blocks – #57080
You must be logged in to post a comment.