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.
WordPress 6.5 supports AVIF, a modern image format that offers significant improvements in image quality and compression over previous formats like JPEG, PNG, and even WebP.ย AVIF images can be up to 50% smaller than JPEGs while maintaining the same image quality. AVIF images also support a wide range of colors (including HDR) and produce sharper images than JPEGs, especially in areas with high detail.
From WordPress version 6.5 forward, you can upload and use AVIF images in WordPress just like you would a JPEG or PNG image today โ as long as your hosting environment supports AVIF. Switching to the AVIF format for your images is likely to improve your siteโs performance and your site visitorโs experience.ย
How AVIF helps you
AVIF images are significantly smaller than their JPEG equivalents, so pages load more quickly and take less bandwidth to transmit. AVIF images still get all of the benefits of the responsive images, Fetch Priority, and lazy loading that WordPress supports by default. Finally, AVIFs are supported in all major browsers, so most sites can start using them today.
Creating AVIF images
Many image editing tools support exporting to AVIF. You can also use command line conversion tools or web based open sourceOpen SourceOpen Source denotes software for which the original source code is made freely available and may be redistributed and modified. Open Source **must be** delivered via a licensing model, see GPL. tools like Squoosh. Once you save your images as AVIF, upload them to WordPress and use them like you would any other image. WordPress can also create AVIFs for you automatically, for more details, see the FAQ item below.
Using AVIF images in WordPress
AVIF images work like any other image format in WordPress, with a few important notes:
AVIF in WordPress depends on support in your web serverโs image processing library (WordPress has built-in support for both Imagick and LibGD for image processing). You can check for AVIF support in wp-adminadmin(and super admin) by visiting Tools -> Site Health, clicking the โInfoโ tab and expanding the โMedia Handlingโ section, then finally looking for โAVIFโ in the list of supported formats.
If your audience includes a significant number of users on an unsupported browser, either avoid using AVIF images, or enqueue a browser polyfill.
FAQ
Q: How do I adjust the compression level used for generated AVIF images?
The wp_editor_set_qualityfilterFilterFilters 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. can be used to set the quality setting. The passed mime type enables setting by type, for example:
// Use a quality setting of 75 for AVIF images. function filter_avif_quality( $quality, $mime_type ) { if ( 'image/avif' === $mime_type ) { return 75; } return $quality; } add_filter( 'wp_editor_set_quality', 'filter_avif_quality', 10, 2 );
How can I output lossless AVIF images?
Using a compression level of 100 will set AVIF to its lossless mode.
Q: Can WordPress create AVIF images when I upload JPEGs?
Yes. Developers can use the image_editor_output_format filter to specify this type of transformation for uploads. Here is an example:
Q: If I use WordPress 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, will all my sites work with AVIF images?
No. Multisite stores the file types that users are allowed to upload when a site is created. We are still working on improving this in #53167. In the meantime, to ensure all existing sites on a networknetwork(versus site, blog) allow AVIF files, you can use the site_option filter in a network mu-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. to add avif to the allowed file types for all network sites:
Creating a 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 by the repository owner. https://github.com/ team for contributors to provide early feedback on features through calls for testing.
During the discussion the problem came up how to connect developer working on WordPress features with extenders or agency developers. One suggested way is to create a new subteam in the WordPress GitHub organization called โOutreachโ. This team is public and allows anyone on GitHub to use the @wordpress/outreach handle to pingPingThe act of sending a very small amount of data to an end point. Ping is used in computer science to illicit a response from a target server to test itโs connection. Ping is also a term used by Slack users to @ someone or send them a direct message (DM). Users might say something along the lines of โPing me when the meeting starts.โ the people in the listed there and ask them for feedback or testing. Similar groups are already available 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. Themersโ โ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)โ. ย If you are interested in being part of the group, notice that in the comment and share your GitHub account.
This handle should be used to raise any issues or pull requests where someone is looking for feedback / testing. So if you are working on a feature and are hoping to get so me additional insights from a diverse set of users from different backgrounds, please donโt hesitate to ping this group.
Working with the testing team to organize smaller, more manageable calls for testing.
The two test team reps, @webtechpooja andโ@ankit-k-gupta will add a discussion to their next meeting of the test team on Feb 27, at 11 UTC. If you are a contributor interested in putting user call for testings together, you might want to join in the meeting.
Encouraging engineers to use the Outreach channel for feedback on new features earlier in development.
Contributors felt that sometimes soliciting input before a feature is fully merged and pushed to a major releasemajor releaseA release, identified by the first two numbers (3.6), which is the focus of a full release cycle and feature development. WordPress uses decimaling count for major release versions, so 2.8, 2.9, 3.0, and 3.1 are sequential and comparable in scope., it could use additional feedback from extenders and agencies. As example: Pattern overrides that donโt have a theme component and donโt alleviate the pain point that there is no way for theme developers to bundle synch patterns with overrides with their themes.
The information around new features or enhancements is not always easy accessible. There is a need to have an ongoing exchange between the engineering teams, test team and outreach contributors to determine the right timing for calls for testing.
Creating a wishlist for each upcoming release to gather input on user priorities.
This is referring to a post made before WordPress 6.4 WordPress 6.4: Whatโs on your wishlist? More research is required. It also overlaps with the Extensibility Issues Triage initiative that meets once a month to look at issues that concern extensibility and could be pushed forward. Next meeting March 14, 2024, at 12:00 UTC in #core-editor channel
The goal is to make the outreach program more accessible and sustainable, improve collaboration across teams, and help guide WordPress development through early and ongoing user and contributor input.
Sustainability for WordPress CoreCoreCore is the set of software required to run WordPress. The Core Development Team builds WordPress.
One component of the WordPress Sustainability Teamโs effort is to improve the sustainability of our codebase, which led to the creation of a Sustainability Focus on the WordPress core TracTracAn open source project by Edgewall Software that serves as a bug tracker and project management tool for WordPress.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. tracker.
What does sustainability mean from a code perspective?
For this post, the emphasis is on sustainable or โgreenโ coding which focuses on minimizing the environmental impact of software development and execution. It encompasses practices like:
Optimizing algorithms and data structures to use fewer resources (Database calls, CPU, memory) during execution, leading to lower energy consumption.
Tracking sustainability improvements in WordPress core
The sustainability focus was created to provide a central way to track discussions for core code level initiatives related to sustainability.ย Any ticketticketCreated for both bug reports and feature development on the bug tracker. that has a sustainability element can be added to the focus by contributors. Having a set of tickets tagged in the focus enables contributors who want to work on sustainability to find appropriate tickets and allows the Sustainability Team to track initiatives in core.
Saving by doing less
The first ticket fixed in the sustainability focus involved removing an unnecessary process that was running twice a day on every site running WordPress to check if a site supports https. We fixed this by switching this feature to an on-demand check that only runs when users visit the Site Health section of wp-adminadmin(and super admin). Even though the https check was a small bit of code, the impact of removing these extraneous checks is enormous because of the huge footprint of WordPress on the web.
How you can Help
Since the sustainability focus is new, tagging existing tickets with the focus is important at this stage. This would be a great contributor dayContributor DayContributor Days are standalone days, frequently held before or after WordCamps but they can also happen at any time. They are events where people get together to work on various areas of https://make.wordpress.org/ There are many teams that people can participate in, each with a different focus. https://2017.us.wordcamp.org/contributor-day/https://make.wordpress.org/support/handbook/getting-started/getting-started-at-a-contributor-day/ activity! Also, during bug triagetriageThe act of evaluating and sorting bug reports, in order to decide priority, severity, and other factors. sessions, any ticket that has a sustainability impact can be added to the focus. This helps organize the effort and show where we have work to do. Secondarily, picking up any tickets that are already tagged in the focus is always welcome. Contributors who want to work on sustainability in core can head right to the focus.
Curated agenda and facilitation: props to @joemcgill
Announcements
WordPress 6.5 Beta 2ย was released on February 20, 2024. Thanks to everyone involved and who came to help test.
Gutenberg 17.8 release is planned for Feb 28, 2024. Please help test.
Forthcoming Releases
Major releasemajor releaseA release, identified by the first two numbers (3.6), which is the focus of a full release cycle and feature development. WordPress uses decimaling count for major release versions, so 2.8, 2.9, 3.0, and 3.1 are sequential and comparable in scope.: 6.5
@marybaum shared that there is a Hallway Hangout planned for the same day as the 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. 3 release, next week. To help with a smooth release process in order to avoid a scheduling conflictconflictA conflict occurs when a patch changes code that was modified after the patch was created. These patches are considered stale, and will require a refresh of the changes before it can be applied, or the conflicts will need to be resolved., she asked for volunteers for committing and Mission Control (MC). @audrasjb, @swissspidy, @davidbaumwald all agreed to be available with @hellofromtonya saying that sheโll be available to help during RCs
@joemcgill reminded everyone that we are 2 weeks away from 6.5 RC1, and dev-notes should be published as soon as possible to be included in the Field GuideField guideThe field guide is a type of blogpost published on Make/Core during the release candidate phase of the WordPress release cycle. The field guide generally lists all the dev notes published during the beta cycle. This guide is linked in the about page of the corresponding version of WordPress, in the release post and in the HelpHub version page..
The documentation team has this this project board that is being used to track dev-notes.
This report on Trac shows that there are additional tickets marked with needs-dev-note.
@swissspidyexpressed concern that the process for dev notesdev noteEach important change in WordPress Core is documented in a developers note, (usually called dev note). Good dev notes generally include a description of the change, the decision that led to this change, and a description of how developers are supposed to work with that change. Dev notes are published on Make/Core blog during the beta phase of WordPress release cycle. Publishing dev notes is particularly important when plugin/theme authors and WordPress developers need to be aware of those changes.In general, all dev notes are compiled into a Field Guide at the beginning of the release candidate phase. is not clear this release, which led to some further discussion. @joemcgill pointed out that we should be following the process included in the handbook, or making sure that it is updated to be accurate.
Discussions
Check in on the recent experimental format for Dev Chats, specifically to not share highlighted posts during the meeting and instead focus on discussion of an open proposal. (Slack link)
To summarize the main topics that were raised during that discussion:
Overall, response to the new format is positive.
@jorbin suggested โfor Alpha time, it was fantastic. I wonder if it would make sense to move more towards a focus of โHow can we help the next releaseโ during beta/RCrelease candidateOne of the final stages in the version release cycle, this version signals the potential to be a final release to the public. Also see alpha (beta). and then come back to the proposalsโ.
@joemcgill agreed to prioritize release discussion over proposals during the rest of this release cycle.
@joemcgill asked for feedback on how to ensure weโre choosing the most useful topics for discussion
@jeffpaul: Seems thereโs a backlog of things we could continue to pull from the Community Summit posts?
Action: propose a way for us to collect and nominate priorities for future discussions.
If you have additional ideas for topics that should be discussed in future meetings, or ideas for how to better organize/prioritize topics for discussion, please share in the comments.
Highlighted posts
The full list of posts from the last week in coreCoreCore is the set of software required to run WordPress. The Core Development Team builds WordPress. can be read on the agenda at this link.
Also, from last weekโs agenda, this section provides updates on the core-editor and the Developer blog, including the latest topics that need writers.
Open floor
@costdev provided an update on 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. Dependencies feature for 6.5.
Key updates:
Auto-deactivation of plugins with unmet dependencies, all bootstrapping logic, and theย plugin_dataย option have been removed, and Plugin Dependencies now mostly runs onย plugins.phpย andย plugin-install.php.
This significantly reduces the footprint of Plugin Dependencies, removes the risk of the database and cache becoming out-of-sync on high traffic sites, and resolves a concern about consent-less deactivation of plugins.
An 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) issue has been fixed.
Plugin updates onย plugins.phpย were failing due to some JSJSJavaScript, a web scripting language typically executed in the browser. Often used for advanced user interfaces and behaviors. that I had not guarded correctly. This has been fixed.
Most of the remaining work is on messaging, and is making steady progress (PRs in re-review stage).
Hereโsย a summaryย of where things stand with each ticketticketCreated for both bug reports and feature development on the bug tracker., which weโll also be posting the meeting summary on Make/Core following this evening.
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
Notes from todayโs meeting:
When Plugin Dependencies landed, @costdev posted a comment on the ticket to ask if there are any bugs or enhancements, to open a new ticketticketCreated for both bug reports and feature development on the bug tracker.. While this was partially influenced by the sheer size of the original ticket, the main aim was to make sure each issue could be tracked, discussed, investigated and patched more easily. This is a big feature, and we anticipated that increased testing could reveal some additional issues or ideas.
PR incoming:#60501 is a plugin card issue that was detected during one of the closed ticketโs investigations.
Awaiting re-review:#60465 and #60472 have pull requests awaiting re-review.
Awaiting review:#60540 is an edge case with a simple fix and has a PR awaiting review.
Needs further discussion:#60504 deals with Must-Use plugins as dependencies, which was not part of the feature and discussion has been reopened.
Please join the discussion on #60504 to help reach consensus on whether to support Must-Use plugins as dependencies and if so, how best to achieve it.
Weโll also continue working on the Dev Notedev noteEach important change in WordPress Core is documented in a developers note, (usually called dev note). Good dev notes generally include a description of the change, the decision that led to this change, and a description of how developers are supposed to work with that change. Dev notes are published on Make/Core blog during the beta phase of WordPress release cycle. Publishing dev notes is particularly important when plugin/theme authors and WordPress developers need to be aware of those changes.In general, all dev notes are compiled into a Field Guide at the beginning of the release candidate phase. for Plugin Dependencies to get it ready for review by the Documentation Team ahead of RC1.
Rollback Auto-Update
Notes from todayโs meeting:
@afragen reminded everyone that the PR for Rollback Auto-Update (#58281) would benefit from further testing.
Testing instructions can be found in this comment on the ticket.
@costdev proposed that we prepare a post for Make/CoreCoreCore is the set of software required to run WordPress. The Core Development Team builds WordPress. to outline the feature and draw more feedback and testing.
The live meeting will focus on the discussion of proposals and releases, updates on 6.5, and have an open floor section.
Additional items will be referred to in the various curated agenda sections, as below. If you haveย ticketticketCreated for both bug reports and feature development on the bug tracker.ย requests for help, please do continue to post details in the comments section at the end of this agenda.
Announcements
WordPress 6.5 Beta 2 was released on February 20, 2024. Thanks to everyone involved and who came to help test.
Gutenberg 17.8 RC release is planned for today, stable release scheduled for Feb 28, 2024. Please help test.
Forthcoming releases
Next major releasemajor releaseA release, identified by the first two numbers (3.6), which is the focus of a full release cycle and feature development. WordPress uses decimaling count for major release versions, so 2.8, 2.9, 3.0, and 3.1 are sequential and comparable in scope.: 6.5
Updates from the release squad can be shared in the Dev Chat.
Call to test 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. versions of the release as they come out.
Call for Testers early draft for 6.5. Discussionย on SlackSlackSlack is a Collaborative Group Chat Platform https://slack.com/. The WordPress community has its own Slack Channel at https://make.wordpress.org/chat/ if you are able to help. Update โ this is now closer to finalization and open for final comments.
Discussions
Check in on the experimental format weโve been using for these meetings. has discussion on open proposals been effective? Are there topics that have not been covered that youโd like to see included?
Could you help curate a Call for Volunteers to review theย open proposals on Make/Coreย and create a list of unresolved ones to discuss during Dev Chat meetings?
Tickets for 6.5 will be prioritized. Please include detail of tickets / PR and the links into comments, and if you intend to be available during the meeting if there are any questions or will be async.
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 12 and February 19, 2024.
23 commits
43 contributors
81 tickets created
13 tickets reopened
88 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
Ignore src/wp-content/fonts from version controlversion controlA version control system keeps track of the source code and revisions to the source code. WordPress uses Subversion (SVN) for version control, with Git mirrors for most repositories. โ #60337
Remove more unnecessary direct dependencies โ #59658
Use assertSame() in WP_Query tests involving ::$max_num_pages property โ #58683, #59655
Use assertSame() in get_comment_pages_count() tests โ #58683, #59655
Bundled Themes
Twenty Nineteen: Update selectors used to change the primary color in the CustomizerCustomizerTool built into WordPress core that hooks into most modern themes. You can use it to preview and modify many of your siteโs appearance settings. โ #59922
Twenty Twenty-Four: Increase the color contrast of the Ember style variation โ #60459
Support pullquote 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. typography options in Twenty Twenty-One โ #57854
Canonical
Limit post types searched by redirect_guess_404_permalink() โ #59795
Rename admin_canonical_urlfilterFilterFilters 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. to wp_admin_canonical_url โ #59545
Coding Standards
Allow $newlineEscape parameter in WP_Text_Diff_Renderer_inline::_splitOnWords() โ #59650
Docs
Various improvements and corrections to inline documentation โ #59651
Editor
Check PHPPHPThe web scripting language in which WordPress is primarily architected. WordPress requires PHP 7.4 or higher 8.1.12 for woff/woff2 mime types in WP_Font_Utils โ 60536
Merge uses_context defined by block bindings sources with block types โ #60525
Prevent PHP warning when parsing duotone hue values โ #59496
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.: Skip instead of bail out if HTMLHTMLHyperText Markup Language. The semantic scripting language primarily used for outputting content in web browsers. contains SVG or MATH โ #60517
Interactivity API: Use string instead of object in data-wp-interactive attribute โ #60542, #60356
General
Consistently cast return value to int in functions that use ceil() โ #58683
Further improve language in SimplePie code comments โ #60247
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.
Prevent incorrect language dropdown entries when there are .l10n.php files โ #59656, #60553
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/
Clarify documentation for methods and filters relating to REST API search endpoints โ #59651
To bring a broader discussion into a higher bandwidth medium, in this session, weโll talk through some overlapping problems in the Site Editor that are both known and complex to solve.
How to join
If youโre interested in joining, the Hallway Hangout will happen onย 2024-02-27 17:00 . A Zoom link will be shared in theย core-editorย SlackSlackSlack is a Collaborative Group Chat Platform https://slack.com/. The WordPress community has its own Slack Channel at https://make.wordpress.org/chat/ย channel before starting and all are welcome to join, whether to listen or participate, for as long or as little as youโd like. This will be recorded and recapped.
Agenda
At a high level, expect this to be an open forum to discuss in more depth some of the high level problems facing the current experience in the Site Editor, including discussions about current in-progress work and an examination of what makes these problems complex to solve. This includes the following aspects of the current experience:
Changing something across your entire site or just for one 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..
Seeing where items are used across the experience.
Understanding inherited values and options.
Understanding what you can and canโt edit.
As a reminder, hallway hangouts are meant to be casual and collaborative so come prepared with a kind, curious mind. Depending on how large the session is, we may not get to all questions live on the call but we can always include follow up in the recap.
View the kickoff post, the status update post, and the Trac ticket for 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..
Purpose & Goals
Currently, 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. authors implement their chosen 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 frameworks (or vanilla JSJSJavaScript, a web scripting language typically executed in the browser. Often used for advanced user interfaces and behaviors.) to enhance user experiences on WordPress sites. There is no consistency or standardized pattern for developing frontend JavaScript in WordPress.
The Interactivity API provides a standard way for developers to add interactions into the frontend of their blocks.
The API has been designed and created with these requirements:
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.-first and PHPPHPThe web scripting language in which WordPress is primarily architected. WordPress requires PHP 7.4 or higher-first. Prioritizing blocks for building sites and server side rendering for better SEO and performance. Combining the best for user and developer experience.
Backward compatible. Ensuring compatibility with both classic and block themes and optionally with other JavaScript frameworks, though itโs advised to use the API as the primary method. It also works with 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. and internationalization.
Declarative and reactive. Utilizing declarative code to define interactions, listening for changes in data, and updating only relevant parts of the DOM accordingly.
Performant: Optimizing runtime performance to deliver a fast and lightweight user experience.
Send less JavaScript. Reduce the overall amount of JS being sent on the page by providing a common framework that blocks can reuse.ย So the more that blocks leverage the Interactivity API, the less JS will be sent overall.
A live demo of what can be achieved was announced in the State of the WordState of the WordThis is the annual report given by Matt Mullenweg, founder of WordPress at WordCamp US. It looks at what weโve done, what weโre doing, and the future of WordPress. https://wordpress.tv/tag/state-of-the-word/..
In WordPress 6.4,the Image, Search, File, Navigation, and Query coreCoreCore is the set of software required to run WordPress. The Core Development Team builds WordPress. blocks were refactored using the private version of the Interactivity API, addressing 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) issues and adding the long-time expected lightbox (or โexpand on clickโ) feature for images.
The development has been done in GutenbergGutenbergThe Gutenberg project is the new Editor Interface for WordPress. The editor improves the process and experience of creating new content, making writing rich content much simpler. It uses โblocksโ to add richness rather than shortcodes, custom HTML etc.
https://wordpress.org/gutenberg/, using a Tracking Issue to monitor progress and a Discussions category to solicit feedback and offer guidance to developers who assisted in testing.
Implementation Details
The Interactivity API is a standard system of directives, based on declarative code, for adding frontend interactivity to blocks.
Directives are special HTMLHTMLHyperText Markup Language. The semantic scripting language primarily used for outputting content in web browsers. attributes that tell the Interactivity API to attach a specified interaction to a DOM element or to transform it, similar to HTMX or AlpineJS. Using HTML as the templating language enables the API to understand the directives both in the server (PHP) and in the client (JS).
As part of this project, and all the interactivity scripts are now implemented leveraging the new script modules which are also shipping in WordPress 6.5. All of them will only be loaded on the frontend if at least one interactive block is present, to avoid sending unnecessary JavaScript to the frontend.
Here is an example of an interactive block, with a JavaScript file in charge of increasing or decreasing a counter, and a PHP file in charge of counter initialization and rendering.
For developers looking to get started, there is a Getting Started guide available, with plans to transition it to a handbook in the near future.
Additionally, a detailed dev notedev noteEach important change in WordPress Core is documented in a developers note, (usually called dev note). Good dev notes generally include a description of the change, the decision that led to this change, and a description of how developers are supposed to work with that change. Dev notes are published on Make/Core blog during the beta phase of WordPress release cycle. Publishing dev notes is particularly important when plugin/theme authors and WordPress developers need to be aware of those changes.In general, all dev notes are compiled into a Field Guide at the beginning of the release candidate phase. will be released, providing further insights into utilizing the API and understanding its internal workings.
JavaScript modules have transformed the way developers write and organize JavaScript code. They provide a cleaner and more modular architecture, making code easier to maintain, test and reuse across projects.
With the addition of native support for registering and enqueueing JavaScript modules, WordPress can keep pace with web development by using efficient, effective and battle-tested methods to handle JavaScript libraries and their dependencies.
There will be another dev note about JavaScript Modules and a guide to use them.
The Interactivity API is intended to be a long-term project with future enhancements; feedback is highly welcome. The best way to reach out is via GitHub Discussions.
Code and documentation contributions are also welcomed, and the Gutenberg repository is the place to go.
Some examples of contributing could be:
Test the Interactivity API, create your own interactions, and share feedback about what you like and you donโt.
Suggest new features to include in the API.
Help creating tutorials or share demos that can inspire other people.
Spread the word
The more developers who use Interactivity API in their projects, the more consistency there will be in the WordPress ecosystem, and the less JavaScript will be sent to the world!
Feel free to spread the word about the Interactivity API in social media and events with your colleagues, friends, and everyone!
Migrating your site to WordPress or exporting all your content from WordPress should be possible in one click.
This is the big picture and what weโre aiming for. One-click. No worries.
It will be an iterative journey to get there, working with the intricacies of different platforms, finding ways to liberate content from walled gardens, and combining them all.ย
I often hear about folks across the WordPress community duplicating efforts when creating scripts and workflows to move users to WordPress. Imagine if we shared those resources instead and built community-owned plugins that anyone could use!
But it should be more than plugins; workflows, tutorials, and helper scripts should be shared, too. I want this resource to have space to include moving from social networks, moving from a page builder to coreCoreCore is the set of software required to run WordPress. The Core Development Team builds WordPress. blocks, switching from classic to blocks, and improving WordPress current canonical plugins for importing.โ
This is a huge opportunity and a broad scope of things to contribute towards. Any of the items mentioned above would be valuable,ย so I also want to highlight some specific things that would be great for us to work on as a community and where you can contribute with your thoughts.
Migrating from [Platform of your choice] to WordPress
Currently, migrating content from another platform can vary from simple (WXR exports for the win!) to complex (manually editing CSV files) to impossible.ย
MigrationMigrationMoving the code, database and media files for a website site from one server to another. Most typically done when changing hosting companies. solutions combine community plugins, proprietary plugins, guides, tips, and scripts. What can we, as a community, do to bring all of those together into a single solution for end users? Or, at the very least, a suite of solutions that end users can access from a single place, quickly finding the one that suits their needs?
Both the proposals mentioned above are promising and would benefit from further discussion โ add your thoughts!
Got a tool to help with migrations that youโd like to open up to the Community? You can open a discussion or even just submit it!
Improving WordPressโ Import/Export format (WXR)
Currently, the WordPress eXtended RSS format (WXR) is used to import and export WordPress sites. It has also been adopted by other platforms (including Squarespace and Drupal) as a de facto standard for content portability.
There is plenty of room for improvement with the format (or to investigate other export format options) that are powerful, open, and accessible.
An important part of Data Liberation is to provide pathways for users who want to move to modern WordPress core blocks or between third party editors.
Many third-party tools and builders have blocks and features that arenโt matched in Core blocks, making it a tricky choice for those who would prefer to use 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. Thankfully, this proposal to introduce a directory of standalone โcoreโ blocks could help.
While the end goal is for a โone-clickโ solution to migrate to WordPress, there will definitely be cases (for now, at least) that will involve some manual work for users.
For these situations, work has started on simple, easy-to-follow guides that walk users through the steps to liberate their content in order to import it into WordPress. Even as the community develops tools, these guides will remain an important alternative.
In addition to the items mentioned above, Iโm interested in hearing from the community about their broader thoughts and feelings about the Data Liberation initiative.
What is missing from this post that youโd like to see considered?
With such a broad scope, what should be focused on with the highest priority?