WordPress 6.5 adds AVIF supportย 

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 Source Open 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_quality filterFilter Filters are one of the two types of Hooks https://codex.wordpress.org/Plugin_API/Hooks. They provide a way for functions to modify data of other functions. They are the counterpart to Actions. Unlike Actions, filters are meant to work in an isolated manner, and should never have side effects such as affecting global variables and output. 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:

// Output AVIFs for uploaded JPEGs
function filter_image_editor_output_format( $formats ) {
$formats['image/jpeg'] = 'image/avif';
return $formats;
}
add_filter( 'image_editor_output_format', 'filter_image_editor_output_format' );

Q: Can WordPress create AVIF images when I upload HEIC images?

Yes. Developers can use the image_editor_output_format filter to specify this type of transformation for uploads. Here is an example:

// Output AVIFs for uploaded HEICs
function filter_image_editor_output_format( $formats ) {
	$formats['image/heic'] = 'image/avif';
	return $formats;
}
add_filter( 'image_editor_output_format', 'filter_image_editor_output_format' );

Q: If I use WordPress multisitemultisite Used 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-pluginPlugin A plugin is a piece of software containing a group of functions that can be added to a WordPress website. They can extend functionality or add new features to your WordPress websites. WordPress plugins are written in the PHP programming language and integrate seamlessly with WordPress. These can be free in the WordPress.org Plugin Directory https://wordpress.org/plugins/ or can be cost-based plugin from a third-party. to add avif to the allowed file types for all network sites:

// Ensure all network sites include AVIF support.
function filter_site_option_upload_filetypes( $filetypes ) {
$filetypes = explode( ' ', $filetypes );
if ( ! in_array( 'avif', $filetypes, true ) ) {
$filetypes[] = 'avif';
}
return implode( ' ', $filetypes );
}
add_filter( 'site_option_upload_filetypes', 'filter_site_option_upload_filetypes' );


Thanks to @stevenlinx and @westonruter for reviewing this post.

#6-5, #core-images, #dev-notes, #dev-notes-6-5, #images

Recap Hallway Hangout: What’s next for the outreach program?

A group of contributors came together to discuss the Proposal: Whatโ€™s next for the Outreach program.

Participants were @fabiankaegy @ndiego @greenshady, @poena and @bph (facilitator).

We recorded the discussion and itโ€™s available on YouTube.

The meeting discussed ways to improve the WordPress outreach program and user feedback processes.

Key points included:

Renaming the FSC Outreach channel to โ€œOutreachโ€ to broaden its scope beyond experiments.

The channel was renamed #outreach. Big Thank You to the #meta team. Come and join us.

Creating a GitHubGitHub GitHub is a website that offers online implementation of git repositories that can easily be shared, copied and modified by other developers. Public repositories are free to host, private repositories require a paid subscription. GitHub introduced the concept of the โ€˜pull requestโ€™ where code changes done in branches by contributors can be reviewed and discussed before being merged 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 pingPing The 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 โ€œBlockBlock Block is the abstract term used to describe units of markup that, composed together, form the content or layout of a webpage using the WordPress editor. The idea combines concepts of what in the past may have achieved with shortcodes, custom HTML, and embed discovery into a single consistent API and user experience. Themersโ€ โ€œAccessibilityAccessibility Accessibility (commonly shortened to a11y) refers to the design of products, devices, services, or environments for people with disabilities. The concept of accessible design ensures both โ€œdirect accessโ€ (i.e. unassisted) and โ€œindirect accessโ€ meaning compatibility with a personโ€™s assistive technology (for example, computer screen readers). (https://en.wikipedia.org/wiki/Accessibility)โ€. ย 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 release A 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.

Props for co-writing to @fabiankaegy and for review to @greenshady and @ndiego.

#outreach

Introducing the WordPress Core Trac Sustainability Focus

Sustainability for WordPress CoreCore Core 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 TracTrac An open source project by Edgewall Software that serves as a bug tracker and project management tool for WordPress. bugbug A bug is an error or unexpected result. Performance improvements, code optimization, and are considered enhancements, not defects. After feature freeze, only bugs are dealt with, with regressions (adverse changes from the previous version) being the highest priority. 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.
  • Reusing resources with caching.

A good reference for understanding the full scope of web sustainability is the Web Sustainability Guidelines (WSG).ย 

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 ticketticket Created 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 Day Contributor 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 triagetriage The 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.


Thanks to @tweetythierry and @Nahuai for reviewing this post.

#core, #sustainability, #trac

Summary, Dev Chat, February 21, 2024

Start of the meeting in SlackSlack Slack is a Collaborative Group Chat Platform https://slack.com/. The WordPress community has its own Slack Channel at https://make.wordpress.org/chat/.

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 release A 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 BetaBeta A pre-release of software that is given out to a large group of users to trial under real conditions. Beta versions have gone through alpha testing in-house and are generally fairly close in look, feel and function to the final product; however, design changes often occur as part of the process. 3 release, next week. To help with a smooth release process in order to avoid a scheduling conflictconflict A conflict occurs when a patch changes code that was modified after the patch was created. These patches are considered stale, and will require a refresh of the changes before it can be applied, or the conflicts will need to be resolved., 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 guide The 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.
  • @swissspidy expressed concern that the process for dev notesdev note Each 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:

  1. Overall, response to the new format is positive.
  2. @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 candidate One of the final stages in the version release cycle, this version signals the potential to be a final release to the public. Also see alpha (beta). and then come back to the proposalsโ€.
    • @joemcgill agreed to prioritize release discussion over proposals during the rest of this release cycle.
  3. @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 coreCore Core 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 PluginPlugin A plugin is a piece of software containing a group of functions that can be added to a WordPress website. They can extend functionality or add new features to your WordPress websites. WordPress plugins are written in the PHP programming language and integrate seamlessly with WordPress. These can be free in the WordPress.org Plugin Directory https://wordpress.org/plugins/ or can be cost-based plugin from a third-party. Dependencies feature for 6.5.

Key updates:

  1. 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.
  2. An accessibilityAccessibility Accessibility (commonly shortened to a11y) refers to the design of products, devices, services, or environments for people with disabilities. The concept of accessible design ensures both โ€œdirect accessโ€ (i.e. unassisted) and โ€œindirect accessโ€ meaning compatibility with a personโ€™s assistive technology (for example, computer screen readers). (https://en.wikipedia.org/wiki/Accessibility) issue has been fixed.
  3. Plugin updates onย plugins.phpย were failing due to some JSJS JavaScript, 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.
  4. 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 ticketticket Created 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.

Props to @azaozz for reviewing.

#6-5, #dev-chat, #summary

Upgrade/Install Chat Summary: 21 February 2024

The full chat log is available beginning here on Slack.

Highlighted Posts

Priority Projects

PluginPlugin A plugin is a piece of software containing a group of functions that can be added to a WordPress website. They can extend functionality or add new features to your WordPress websites. WordPress plugins are written in the PHP programming language and integrate seamlessly with WordPress. These can be free in the WordPress.org Plugin Directory https://wordpress.org/plugins/ or can be cost-based plugin from a third-party. 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 ticketticket Created 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.

Progress since commit:

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 note Each 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/CoreCore Core 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.

Our next chat will be held on Wednesday, 28 February 2024 at 18:00 UTC in the #core-upgrade-install channel in Slack.

#core-upgrade-install, #summary, #upgrade-install

Agenda, Dev Chat, Wednesday February 21, 2024

The next WordPress Developers Chat will take place onย  Wednesday February 21, 2024 at 20:00 UTC in theย coreย channel onย Make WordPress Slack.

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ย ticketticket Created 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 release A 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 betaBeta A pre-release of software that is given out to a large group of users to trial under real conditions. Beta versions have gone through alpha testing in-house and are generally fairly close in look, feel and function to the final product; however, design changes often occur as part of the process. versions of the release as they come out.

Call for Testers early draft for 6.5. Discussionย on SlackSlack Slack 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?

Highlighted posts

A Week in Core โ€“ February 19, 2024 โ€“ props to @audrasjb

Hallway Hangout: Letโ€™s chat about overlapping problems in the Site Editor

Merge Announcement: Interactivity API

Data Liberation Next Steps

Summary, Dev Chat, February 14, 2024

Merge Announcement: Plugin Dependencies

Tickets for assistance

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.

Open floor

Items for this can be shared in the comments.

#6-5, #agenda, #dev-chat

A Week in Core โ€“ February 19, 2024

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

  • 23 commits
  • 43 contributors
  • 81 tickets created
  • 13 tickets reopened
  • 88 tickets closed

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

Code changes

Build/Test Tools

  • Ignore src/wp-content/fonts from version controlversion control A 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
  • Remove unnecessary direct dependencies โ€“ #59658
  • Update several 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 CustomizerCustomizer Tool built into WordPress core that hooks into most modern themes. You can use it to preview and modify many of your siteโ€™s appearance settings. โ€“ #59922
  • Twenty Twenty-Four: Increase the color contrast of the Ember style variation โ€“ #60459
  • Support pullquote blockBlock Block is the abstract term used to describe units of markup that, composed together, form the content or layout of a webpage using the WordPress editor. The idea combines concepts of what in the past may have achieved with shortcodes, custom HTML, and embed discovery into a single consistent API and user experience. typography options in Twenty Twenty-One โ€“ #57854

Canonical

  • Limit post types searched by redirect_guess_404_permalink() โ€“ #59795
  • Rename admin_canonical_url filterFilter Filters are one of the two types of Hooks https://codex.wordpress.org/Plugin_API/Hooks. They provide a way for functions to modify data of other functions. They are the counterpart to Actions. Unlike Actions, filters are meant to work in an isolated manner, and should never have side effects such as affecting global variables and output. 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 PHPPHP The 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 APIAPI An API or Application Programming Interface is a software intermediary that allows programs to interact with each other and share data in limited, clearly defined ways.: Skip instead of bail out if HTMLHTML HyperText 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

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

  • Prevent incorrect language dropdown entries when there are .l10n.php files โ€“ #59656, #60553

Media

  • Replace media icon images with SVG โ€“ #31352

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

  • Clarify documentation for methods and filters relating to REST API search endpoints โ€“ #59651

Props

Thanks to the 43 people who contributed to WordPress Core on Trac: @costdev (3), @shailu25 (3), @gziolo (3), @poena (3), @huzaifaalmesbah (3), @peterwilsoncc (2), @cbravobernal (2), @swissspidy (2), @sabernhardt (2), @jacobcassidy (1), @rahmohn (1), @mukesh27 (1), @westonruter (1), @dmsnell (1), @crstauf (1), @audrasjb (1), @manfcarlo (1), @francescocarlucci (1), @rajinsharwar (1), @Anlino (1), @richtabor (1), @itpathsolutions (1), @santosguillamot (1), @czapla (1), @thekt12 (1), @ironprogrammer (1), @afercia (1), @iseulde (1), @melchoyce (1), @joemcgill (1), @wonderboymusic (1), @ocean90 (1), @karmatosed (1), @boemedia (1), @bosskhj (1), @joedolson (1), @faisal03 (1), @ashikur698 (1), @kafleg (1), @hellofromTonya (1), @darshitrajyaguru97 (1), @harshgajipara (1), and @skyakash12 (1).

Congrats and welcome to our 3 new contributors of the week: @jacobcassidy, @francescocarlucci, @skyakash12 โ™ฅ๏ธ

Core committers: @swissspidy (8), @sergeybiryukov (5), @desrosj (3), @johnbillion (2), @hellofromtonya (2), @peterwilsoncc (1), @gziolo (1), and @joedolson (1).

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

Hallway Hangout: Letโ€™s chat about overlapping problems in the Site Editor

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ย SlackSlack Slack 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 blockBlock Block is the abstract term used to describe units of markup that, composed together, form the content or layout of a webpage using the WordPress editor. The idea combines concepts of what in the past may have achieved with shortcodes, custom HTML, and embed discovery into a single consistent API and user experience..
  • 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.

#gutenberg, #hallway-hangout, #site-editor

Merge Announcement: Interactivity API

View the kickoff post, the status update post, and the Trac ticket for the Interactivity APIAPI An API or Application Programming Interface is a software intermediary that allows programs to interact with each other and share data in limited, clearly defined ways..

Purpose & Goals

Currently, pluginPlugin A plugin is a piece of software containing a group of functions that can be added to a WordPress website. They can extend functionality or add new features to your WordPress websites. WordPress plugins are written in the PHP programming language and integrate seamlessly with WordPress. These can be free in the WordPress.org Plugin Directory https://wordpress.org/plugins/ or can be cost-based plugin from a third-party. authors implement their chosen JavaScriptJavaScript JavaScript or JS is an object-oriented computer programming language commonly used to create interactive effects within web browsers. WordPress makes extensive use of JS for a better user experience. While PHP is executed on the server, JS executes within a userโ€™s browser. https://www.javascript.com frameworks (or vanilla JSJS JavaScript, 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:

  • BlockBlock Block is the abstract term used to describe units of markup that, composed together, form the content or layout of a webpage using the WordPress editor. The idea combines concepts of what in the past may have achieved with shortcodes, custom HTML, and embed discovery into a single consistent API and user experience.-first and PHPPHP The 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 hooksHooks In WordPress theme and development, hooks are functions that can be applied to an action or a Filter in WordPress. Actions are functions performed when a certain event occurs in WordPress. Filters allow you to modify certain functions. Arguments used to hook both filters and actions look the same. 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 Word This 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/..

Live site demo

In case you want to read more about the goals, you can refer to the initial proposal.

Project Background

The project started as an experimental plugin in early 2022. Then, the first API version debuted in Gutenberg 16.2 and has been continually refined until Gutenberg 17.7.

In WordPress 6.4,the Image, Search, File, Navigation, and Query coreCore Core 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 accessibilityAccessibility Accessibility (commonly shortened to a11y) refers to the design of products, devices, services, or environments for people with disabilities. The concept of accessible design ensures both โ€œdirect accessโ€ (i.e. unassisted) and โ€œindirect accessโ€ meaning compatibility with a personโ€™s assistive technology (for example, computer screen readers). (https://en.wikipedia.org/wiki/Accessibility) issues and adding the long-time expected lightbox (or โ€œexpand on clickโ€) feature for images.

The development has been done in GutenbergGutenberg The Gutenberg project is the new Editor Interface for WordPress. The editor improves the process and experience of creating new content, making writing rich content much simpler. It uses โ€˜blocksโ€™ to add richness rather than shortcodes, custom HTML etc. https://wordpress.org/gutenberg/, 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 HTMLHTML HyperText 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.

// JS File - viewScriptModule.js

import { store } from "@wordpress/interactivity";

const { state } = store("my-counter-block", {
 actions: {
   increaseCounter: () => {
     state.counter = state.counter + 1;
   },
   decreaseCounter: () => {
     state.counter = state.counter - 1;
   },
 },
});
// PHP File - render.php
wp_interactivity_state('my-counter-block', array(
   'counter' => 0,
))
?>

<div
   <?php echo get_block_wrapper_attributes(); ?>
   data-wp-interactive="create-block"
>
   <button data-wp-on--click="actions.increaseCounter">
       <?php esc_html_e( 'Increase', 'my-first-interactive-block' ); ?>
   </button>
   <p data-wp-text="state.counter"></p>
   <button data-wp-on--click="actions.decreaseCounter">
       <?php esc_html_e( 'Decrease', 'my-first-interactive-block' ); ?>
   </button>
</div>

This would result in a block like this one:

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 note Each 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.

Modules and Import maps.

The Interactivity API brings along the support of Modules and Import Maps.

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.

Guide to Javascript Modules.

Contributions and Feedback.

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!

Props toย @cbringmann, @gziolo, @swissspidy, @westonruter, @santosguillamot, @luisherranz, and @rmartinezduque for peer review.

#6-5, #feature-plugins, #feature-projects, #interactivity-api, #merge-proposals

Data Liberation Next Steps

The recently published announcement of the Data Liberation initiative started some great conversations, and this follow-up post aims to provide additional direction. As a start, Iโ€™d like to draw on a few things Matt mentioned in the original announcement.

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 coreCore Core 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.ย 

MigrationMigration Moving 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?

Currently, a proposal centers around using the Playground as a tool for users to migrate their content and see a real-time, editable preview of what their site would look like in WordPress.ย 

An alternative suggests a hybrid approach where the platform of the source site is detected, and the user is guided and assisted through performing the migration.

Get Involved

  • 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.

Get Involved

Page Builders > Blocks & Classic to Blocks

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 blockBlock Block is the abstract term used to describe units of markup that, composed together, form the content or layout of a webpage using the WordPress editor. The idea combines concepts of what in the past may have achieved with shortcodes, custom HTML, and embed discovery into a single consistent API and user experience. editor. Thankfully, this proposal to introduce a directory of standalone โ€˜coreโ€™ blocks could help.

Get Involved

Migration Guides

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.

Get Involved

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?
  • What other voices should be heard on this topic?

Feel free to share your thoughts in the comments, and let me encourage you to come and join the #data-liberation channel in the Making WordPress Slack.