Gallery Block Refactor Dev Note

The problem

If you have ever added a custom link to an image 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. and then tried to do the same on a Gallery image, you will understand the frustration and confusion of not having consistency between different types of image blocks. This inconsistency is because the coreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress. Gallery block stores the details of the included images as nested <img> elements within the block content. Therefore, the images within a gallery look and behave different from images within an individual image block. There are some long-standing open issues related to this:

The only way to fix this with the Gallery block in its current state is to try and replicate the additional functionality that the Image block has in the Gallery block, and vice versa. While this would be possible, it would lead to an additional maintenance overhead to keep the UIUI User interface and underlying code in sync between the two blocks.

Changes made

To make the behavior of images consistent between the Image Block and Gallery, while avoiding code duplication, the core Gallery block has been refactored to save the individual images as nested core Image blocks using the standard core innerBlocks APIs. To make this work with the innerBlocks 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., the gallery structure also had to change from an ordered list to a collection of figure elements within a figure. This structure change also brings the core Gallery block into line with the W3C WAI guidelines on the grouping of images.

The structure change means that Gallery images now have the ability to add custom links, or custom styles, for each image. An example of the flexible Gallery layouts this opens up can be seen below.

Gallery images will also automatically inherit new functionality that is added to the Image block, including those added by plugins. Below is an example of a Gallery block making us of the Image wave style and vintage 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. option added by the CoBlocks 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.

Other benefits include being able to use the standard move, drag and drop, copy, duplicate, and remove block functionalities. Keyboard navigation also benefits from the adoption of the standard block model by the Gallery block.

What theme and plugin authors need to do before 5.9

To support the new Gallery block format, plugin and theme authors should aim to do the following before the December release of this change in WordPress 5.9.

  • Any gallery related CSSCSS Cascading Style Sheets. should have additional selectors added to target images in the following structure in both the editor and front end (existing selectors must remain to support the existing gallery block content). The new structure can be seen below. See this issue for an example of the type of additional selectors that may need to be added.
<figure class="wp-block-gallery blocks-gallery-grid has-nested-images columns-default is-cropped">
	<figure class="wp-block-image size-large">
		<img
			src="http://localhost/image1"
			alt="Image gallery image"
			class="wp-image-71"
		/>
	</figure>
	<figure class="wp-block-image size-large">
		<img
			src="http://localhost/image2"
			alt="Image gallery image"
			class="wp-image-70"
		/>
	</figure>
</figure>
  • For custom blocks with options to transform->from and transform->to the core Gallery block the plugin should be tested with the GutenbergGutenberg The Gutenberg project is the new Editor Interface for WordPress. The editor improves the process and experience of creating new content, making writing rich content much simpler. It uses ‘blocks’ to add richness rather than shortcodes, custom HTML etc. https://wordpress.org/gutenberg/ plugin to ensure that these transformations work correctly with both existing gallery content and the new gallery block format

In the future, when the new Gallery format is stable in a core release, the transformation filters will be deprecated, and plugin authors will need to update their transformations to handle both Gallery formats. Notice will be given ahead of this change being made.

It is also expected that existing gallery content will be automatically migrated to the new format. This will allow the old gallery version’s code to be removed from the codebase. There is currently no time frame set for this to occur.

Additional context and considerations

Other existing solutions

Third-party block developers are currently solving some of the problems caused by the limitations of the core Gallery block by implementing their custom Gallery blocks. These include some of the missing functionality, like the ability to add custom links to individual images. This can be problematic for site owners and content editors due to a large number of Gallery blocks that offer very similar functionality, but none of which appear to provide a close match to the functionality available with individual core Image blocks.

There do not appear to be any examples of plugins that already solve this problem in a way that utilizes Image blocks as inner blocks.

Backwards compatibility considerations

This is a breaking change due to the fundamental change in the underlying Gallery structure. Due to the large number of Gallery blocks already in use, along with themes and plugins that may rely on the existing structure, the following steps have been taken to mitigate the impact of this change on theme and plugin developers as much as possible:

  • Initially, there will be no automatic migrationMigration Moving the code, database and media files for a website site from one server to another. Most typically done when changing hosting companies. of existing gallery content. This means that all existing gallery content will behave the same in the editor and front end as it does now, so will be compatible with existing plugins and themes. Only new gallery blocks added after this change will have the new structure in the editor and the front-end.
  • Two temporary transformation filters have been added that will handle the transformation of 3rd party blocks to and from the core gallery block

Possible edge cases

The refactored Gallery format has been tested against the following sample block libraries that have existing transforms to and from the core Gallery block:

The following themes have also been tested to make sure that both the existing gallery content and the new format galleries display correctly:

  • TwentyNineteen
  • TwentyTwenty
  • TwentyTwentyOne
  • Astra
  • Arbutus

While the refactored gallery works effectively with these plugins and themes, there may be edge cases in other plugins and themes that have not been accounted for. Themes that heavily modify the gallery CSS based on the existing <ul><li></li></ul> will definitely need to be updated if the same style changes need to be applied to the new gallery format.  Therefore, it is recommended that theme and plugin authors test the changed gallery block well in advance of the 5.9 release.

Additional details about this change 

Previous discussions about this change can be found on the main pull request or call for testing.

#5-9, #core-editor, #dev-notes, #gallery, #gutenberg

Dev chat summary, August 18, 2021

@francina led the chat on this agenda. You can also read the Slack logs.

We welcomed a couple of first-time attendees, always a happy chat when it happens!

Highlighted blogblog (versus network, site) posts

The attendees did not add comments to the posts highlighted in the agenda, but Francesca encouraged everyone to test WordPress trunktrunk A directory in Subversion containing the latest development code in preparation for the next major release cycle. If you are running "trunk", then you are on the latest revision. with the 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. Tester pluginPlugin A plugin is a piece of software containing a group of functions that can be added to a WordPress website. They can extend functionality or add new features to your WordPress websites. WordPress plugins are written in the PHP programming language and integrate seamlessly with WordPress. These can be free in the WordPress.org Plugin Directory https://wordpress.org/plugins/ or can be cost-based plugin from a third-party and report bugs.

Worth mentioning

Thanks to the 31 people who contributed to WordPress CoreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress. on TracTrac An open source project by Edgewall Software that serves as a bug tracker and project management tool for WordPress. last week, including 3 new contributors! Kudos to the 2 core committers of the week, too.

A Week in Core – August 16, 2021

Announcements

@annezazu reminded everyone about an upcoming deadline, to respond to the current call for testing.

@hellofromtonya invited everyone to join the weekly working session where core contributorsCore Contributors Core contributors are those who have worked on a release of WordPress, by creating the functions or finding and patching bugs. These contributions are done through Trac. https://core.trac.wordpress.org. will cover testing docs, 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 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., open tickets for PHPPHP The web scripting language in which WordPress is primarily architected. WordPress requires PHP 5.6.20 or higher 8.1 testing, and for recent test modernization. They are announced in the core-test channel 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/., so keep an eye on them!

Component maintainers

Build/Test Tools

@sergeybiryukov announced that the WordPress test suite is compatible with PHPUnit 8 & 9, and runs tests on PHP 8.1 beta (scheduled for release in November). See tickets #46149 and #53891 for more details.

As some of these test improvements were an unavoidable backward compatibility break for plugins/themes running tests on the WordPress core framework, there is an ongoing discussion about backporting some of these changes to older branches. Two main reasons for backporting:

  • Make WP security releases easier by not having to rewrite the tests that accompany security backports for older PHPUnit versions.
  • Help minimize the impact on the extender community who need to do cross-version testing against older versions of WordPress.

You can check #53911 for more details. Feedback welcome!

General

#53635 – Work continues on making various compatibility fixes for PHP 8.1.

Upgrade/Install

#51857 – Work continues on adding rollback for failed plugin/themes updates. You can also read Upgrade/Install Meeting Notes, August 17.

Open Floor

Christian Herrmann brought up two tickets:

A lively discussion ensued about the state of old tickets that lose momentum. It’s important to keep the conversation alive. Everyone is invited to add comments to tickets, refresh patches, and bring them up during dev-chat or scrubs when they will be scheduled for WordPress 5.9 and beyond.

Francesca also pointed new attendees to some resources that can be helpful if you want to contribute to WordPress.


See you next week!

#5-8-x, #5-9, #dev-chat, #summary

A Week in Core – August 16, 2021

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

  • 33 commits
  • 31 contributors
  • 43 tickets created
  • 5 tickets reopened
  • 37 tickets closed

Pending the appointment of the WordPress 5.9 team, a number of tickets have been fixed, waiting for the next minor releaseMinor Release A set of releases or versions having the same minor version number may be collectively referred to as .x , for example version 5.2.x to refer to versions 5.2, 5.2.1, 5.2.3, and all other versions in the 5.2 (five dot two) branch of that software. Minor Releases often make improvements to existing features and functionality.(s).

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

  • Add schema reference to PHPUnit config files – #53363
  • Declare two TestCase classes as abstract – #53363
  • Enable running the tests on PHPPHP The web scripting language in which WordPress is primarily architected. WordPress requires PHP 5.6.20 or higher 8.1 – #53891, #53635
  • Hard deprecate WP_UnitTestCase_Base::checkRequirements()#46149
  • Hard deprecate WP_UnitTestCase_Base::checkRequirements()#46149
  • Make the polyfills loading more flexible – #46149
  • Remove Unicode character from PHPUnit version check message – #53363
  • Revert [51602] for now to investigate test failures on PHPUnit < 7.0 – #46149
  • Simplify the PHPUnit test workflow – #53891
  • Add unit tests for the wp_nonce_ays() function – #53882
  • Fix failing 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. unit tests 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. metadata – Follow up for #53238
  • Rename classes in phpunit/tests/formatting/ per the naming conventions – #53363
  • Use correct comparison in do_enclose() tests – #53635

Code Modernization

  • Check the return type of _get_cron_array() in wp_schedule_event()#53635
  • Check the return type of parse_url() in WP::parse_request()#53635
  • Correct handling of null in wp_parse_str()#53635
  • Rename the readonly() function to wp_readonly()#53858
  • Replace strftime() and gmstrftime() usage in unit tests – #53897
  • Silence the deprecation warning for missing return type in phpunit/tests/compat.php#53635

Documentation

  • Add a @see reference to the wp_mail_content_type 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. in wp_staticize_emoji_for_email()#53399
  • Add a @see reference to the xmlrpc_enabled filter in wp_xmlrpc_server::set_is_enabled()#53399
  • Correct @since version for the wp_parse_str filter – #53399
  • Fix typo in the get_block_editor_settings() description – #53922
  • Improve documentation for a few functions per the documentation standards – #53399
  • Synchronize documentation for wp_get_attachment_image_attributes filter callbacks in bundled themes – #53878

Editor

  • Preserve the original template keys when preparing a list of page templates – #53898
  • Add support for variations in block.json file – #53238

General

  • Restore (un-deprecate) the sanitize_url() function – #53876

Themes

  • Make sure the theme 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. response is not an error before operating on it in themes_api()#53913
  • Twenty Seventeen: Add support for wa.me links in Social Links menu – #51946
  • Twenty Twenty: Add support for wa.me links in Social menu – #50542

Upgrade/Install

  • Update sodium_compat to v1.17.0 – #53907
  • Use consistent capitalization for “web host” in setup messages – #53926

Props

Thanks to the 31 people who contributed to WordPress Core on Trac last week: @jrf (17), @SergeyBiryukov (7), @swissspidy (4), @hellofromTonya (4), @pbearne (3), @sabernhardt (3), @mukesh27 (3), @lucatume (2), @Ipstenu (1), @thomasplevy (1), @Toro_Unit (1), @aadilali (1), @Mamaduka (1), @jorgefilipecosta (1), @youknowriad (1), @ayeshrajans (1), @haosun (1), @jeherve (1), @desrosj (1), @schlessera (1), @gwwar (1), @pierlo (1), @ankitmaru (1), @bradparbs (1), @tmatsuur (1), @dkarfa (1), @carepsules (1), @macmanx (1), @pedromendonca (1), @iluy (1), and @knutsp (1).

Congrats and welcome to our 3 new contributors of the week! @aadilali, @carepsules, and @iluy ♥️

Core committers: @sergeybiryukov (31), and @gziolo (2).

#5-8-1, #5-9, #core, #week-in-core

Preliminary Road to 5.9

This is a quick overview of the main areas and features currently underway for 5.9 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/. Some are in more advanced stages than others, but together they paint a picture of what we are looking forwards to.

To dive deeper into concrete tasks and areas of work, this tracking issue is the best place to follow.

Blocks + intrinsic web design

Collection of various patterns displayed at mobile resolutions.
  • One of the biggest points of friction for pattern and theme builders are the lack of responsive tools available at a 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. level. This needs to be solved in a way that doesn’t disproportionally increase interface complexity.
  • The block model is a good case to apply some intrinsic design principles, since a block can occupy a place in many different layouts and containers, for which prescriptive media queries that don’t take context into account are inflexible.
  • Each block area should be intrinsically responsive allowing blocks to compose together, wrap, stack, and organize themselves to fit the different spaces and screens. For this to work well, container blocks need to absorb more layout controls. (Container queries might help expand this further in the future.)
  • Typography tools need to become more fluid and internally support algorithmic clamping. Whenever possible, patterns should just work and accommodate themselves.

Patterns

Mosaic galleries showing different design patterns.
  • With the initial rollout of the new directory there’s a growing need to expand the inserter integration to accommodate broader categories of patterns and the experience of browsing them.
  • There’s more work to be done within the setup flow of single and multi-block selections. This also includes improving the mechanisms for transforming to and from patterns, which are still nascent.
  • Creation flows with patterns also need expanding from template parts and blocks to pages and templates.

Navigation Menus

  • The navigation block and navigation screen projects have been underway for quite some time and are a main target for 5.9. With the principal tracking issue about to be completed, a large part of the remaining work is to improve the user experience, reduce complexity, and test as much as possible on themes.

An interface for theme.jsonJSON JSON, or JavaScript Object Notation, is a minimal, readable format for structuring data. It is used primarily to transmit data between a server and web application, as an alternative to XML..

Global Styles panel showing the main area and the background color section.
  • 5.8 introduced the scaffolding necessary for themes to take the reins over how various aspects of blocks render and how the interface is controlled. The natural next step ahead is to develop the user interface that will allow users to interact with these style properties. This goes by the project name “global styles” and an updated design is currently in prototype stage.
  • It should be appreciated how important it is to leverage the global reach of CSSCSS Cascading Style Sheets. rules as we combine it with the power of blocks. The current structure deals with two large groups of design targets: blocks and elements. Elements represent things that can be styled globally and across blocks (such as “text”, “links”, “captions”, etc).

Design Tools: Colors, Typography, Spacing, Layout

Series of panels showing different configurations of the typography tools.
  • The effort to bring better and more consistent design tools continues to progress. These tools need to integrate smoothly with both the block 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. (through the “supports” mechanism) and theme.json. One of the main goals is consistent access to similar tools across blocks, including third-party ones.
  • Running parallel to this effort comes the work on the WordPress components system, refinements to color tools, interactivity, 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), etc.

Formalize editing flows for block themes

Displays templates as small cards in a mosaic, connecting diagrams with the different flows.
  • A large percentage of the infrastructure and features needed to build block themes are established. The UXUX User experience and design needs the most attention, though, starting by mapping into a clearer information architecture all the possible flows that are to be supported (editing templates, parts, styles, pages, etc).
  • Continue to process and take into the design process all the feedback gathered from users and theme builders.
  • Begin defining transition flows from existing widgetWidget A WordPress Widget is a small block that performs a specific function. You can add these widgets in sidebars also known as widget-ready areas on your web page. WordPress widgets were originally created to provide a simple and easy-to-use way of giving design and structure control of the WordPress theme to the user. areas to block areas when appropriate, and explore the various aspects of theme switching.
  • Finalize and commit all remaining blocks under the “theme” categoryCategory The 'category' taxonomy lets you group posts / content together that share a common bond. Categories are pre-defined and broad ranging..

#5-9, #gutenberg

A Week in Core – August 9, 2021

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

  • 58 commits
  • 22 contributors
  • 48 tickets created
  • 8 tickets reopened
  • 23 tickets closed

Pending the appointment of the WordPress 5.9 team, a number of tickets have been fixed, waiting for the next minor releaseMinor Release A set of releases or versions having the same minor version number may be collectively referred to as .x , for example version 5.2.x to refer to versions 5.2, 5.2.1, 5.2.3, and all other versions in the 5.2 (five dot two) branch of that software. Minor Releases often make improvements to existing features and functionality.(s). This week was also partly dedicated to PHPPHP The web scripting language in which WordPress is primarily architected. WordPress requires PHP 5.6.20 or higher 8.1 compatibility.

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

  • Add Composer dependency on the PHPUnit Polyfills package – #46149
  • Add branchbranch A directory in Subversion. WordPress uses branches to store the latest development code for each major release (3.9, 4.0, etc.). Branches are then updated with code for any minor releases of that branch. Sometimes, a major version of WordPress and its minor versions are collectively referred to as a "branch", such as "the 4.0 branch". filtering for 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/. notifications workflow – #52644
  • Add schema reference to PHPUnit config files – #53363
  • Alias the Getopt class conditionally, as the class no longer exists in PHPUnit 9.x – #46149
  • Change the inheritance order of the abstract test classes – #46149
  • Correct invalidinvalid A resolution on the bug tracker (and generally common in software development, sometimes also notabug) that indicates the ticket is not a bug, is a support request, or is generally invalid. JSONJSON JSON, or JavaScript Object Notation, is a minimal, readable format for structuring data. It is used primarily to transmit data between a server and web application, as an alternative to XML. in Slack payload – #52644
  • Correctly check for the trigger event when running the Slack notifications workflow – #52644
  • Declare two TestCase classes as abstract – #53363
  • Enable running the tests on PHP 8.1 – #53891, #53635
  • Expand Slack notifications for GitHubGitHub GitHub is a website that offers online implementation of git repositories that can can easily be shared, copied and modified by other developers. Public repositories are free to host, private repositories require a paid subscription. GitHub introduced the concept of the ‘pull request’ where code changes done in branches by contributors can be reviewed and discussed before being merged be the repository owner. https://github.com/ Actions – #52644
  • Fix message display in test bootstrap – #53363
  • Handle removal of TestCase::getAnnotations()#46149
  • Implement use of the void solution – #46149
  • Loosen the PHPUnit restriction – #46149
  • Remove SpeedTrapListener – #46149
  • Remove Unicode character from PHPUnit version check message – #53363
  • Remove the Composer lock file 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.#47381
  • Remove the copied-in PHPUnit 9.x MockObject files – #46149
  • Revert changes only included for testing purposes – #52644
  • Simplify redundant PHPUnit shim for setExpectedException()#46149
  • Switch to always running the tests via Composer – #47381
  • Unify the PHPUnit adapter TestCases – #46149
  • Use a custom autoloader for the PHPUnit 9.x mock object classes – #47381
  • Use the PHPUnit Polyfill TestCase as void workaround – #46149
  • Fix tests failing due to assertContains() using strict checking – #46149
  • Remove redundant @requires tags – #46149
  • Remove use of assertArraySubset() in Test_WP_Widget_Media::test_constructor()#46149
  • Replace assertFileNotExists() with assertFileDoesNotExist()#46149
  • Replace assertNotRegExp() with assertDoesNotMatchRegularExpression()#46149
  • Replace assertRegExp() with assertMatchesRegularExpression()#46149
  • Replace expectException() for PHP native errors with calls to the dedicated PHPUnit 8.4+ methods – #46149
  • Replace expectException() for PHP native errors with calls to the dedicated PHPUnit 8.4+ methods – #46149
  • Use more appropriate assertions in get_themes() tests – #53363
  • Use more appropriate assertions in get_themes() tests – #53363

Bundled Themes

  • Add / character to tags – #53870
  • Remove redundant semicolons after closing curly brackets – #53359
  • Twenty Thirteen: Correct indentation in image.php template – #53359
  • Twenty Thirteen: Remove wrapping HTMLHTML HyperText Markup Language. The semantic scripting language primarily used for outputting content in web browsers. tagtag A directory in Subversion. WordPress uses tags to store a single snapshot of a version (3.6, 3.6.1, etc.), the common convention of tags in version control systems. (Not to be confused with post tags.) from translatable string – #53359

Code Modernization

  • Pass correct default value to new DateTime() in wp_default_packages_inline_scripts()#53635
  • Rename the readonly() function to wp_readonly()#53858
  • Replace strftime() and gmstrftime() usage in unit tests – #53897
  • Set the MySQLi error reporting off for PHP 8.1 – #52825
  • Silence the deprecation warnings for missing return type in WP_Block_List#53635
  • Silence the deprecation warnings for missing return type in WP_Hook#53635
  • Silence the deprecation warnings for missing return type in WP_REST_Request#53635
  • Silence the deprecation warnings for missing return type in WP_Theme#53635

Coding Standards

  • Correct DateTimeZone class name in WP_Customize_Date_Time_Control::get_timezone_info()#53359
  • Fix incorrect alignment in two comment blocks – #53359
  • Fix incorrect comment indent in safecss_filter_attr()#53359
  • Remove redundant semicolons after closing curly brackets – #53359
  • Silence a WPCSWordPress Coding Standards A collection of PHP_CodeSniffer rules (sniffs) to validate code developed for WordPress. It ensures code quality and adherence to coding conventions, especially the official standards for WordPress Core. warning in date_i18n()#53359
  • Use strict comparisons in wp-admin/options-discussion.php#53359
  • Use strict comparisons in wp-admin/upload.php#53359

Editor

  • Prevent 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 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/. loading in other editors – #53696
  • Block Editor: Add missing border setting on button block – #53702

Media

  • Add / character to <img> tag in wp_print_media_templates()#53870
  • Hide bulk-select on new menu page – #53654

Themes

  • Correct the documented types for theme mod values – #53399

Props

Thanks to the 22 people who contributed to WordPress Core on Trac last week: @jrf (43), @SergeyBiryukov (8), @hellofromTonya (6), @johnbillion (6), @netweb (5), @desrosj (4), @ayeshrajans (3), @akabarikalpesh (2), @swissspidy (2), @shital-patel (2), @priethor (1), @daisyo (1), @Mamaduka (1), @sabernhardt (1), @dlh (1), @Clorith (1), @aristath (1), @pputzer (1), @dd32 (1), @knutsp (1), @haosun (1), and @mikeschroder (1).

Congrats and welcome to our new contributor of the week! @haosun ♥️

Core committers: @sergeybiryukov (47), @desrosj (5), @peterwilsoncc (4), @johnbillion (1), and @jorgefilipecosta (1).

#5-9, #core, #week-in-core

Dev chat summary, August 4, 2021

@francina led the chat on this agenda.

Highlighted blogblog (versus network, site) posts

From @audrasjb, A Week in Core highlights the moving parts of CoreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress. and recognizes a week’s worth of contributors at a time.

From @notlaura comes a Call for CSS Contributors. If you’ve been looking for a way to sink your teeth into CSSCSS Cascading Style Sheets. Custom Properties (aka CSS variables), this is your chance to learn them well and help land them in Core.

From @sergeybiryukov comes more news on building the auto-updater ecosystem. If you work on themes and plugins, Sergey’s group would very much appreciate your feedback. The group would also like to hear from web hosts, as @ipstenu and a couple of other folks pointed out.

If you haven’t yet read @desrosj‘s post on Consistent Minor-Release Squad Leaders for Each Major Branchbranch A directory in Subversion. WordPress uses branches to store the latest development code for each major release (3.9, 4.0, etc.). Branches are then updated with code for any minor releases of that branch. Sometimes, a major version of WordPress and its minor versions are collectively referred to as a "branch", such as "the 4.0 branch".: Trial-run Retrospective and 5.8.x Releases, you’ll want to make time for it — the post is getting great reviews.

“Super interesting! … Super insightful!” — @francina

“Yeah. That’s a good read.” — @johnbillion

@francina suggested that if you’re interested in volunteering as a Release LeadRelease Lead The community member ultimately responsible for the Release. or a Release Deputy for the 5.8.x minors, please leave a comment on @desrosj‘s post.

And, from @chanthaboune and her talented production team comes the WP Briefing podcast. It’s on hiatus now, but more episodes will arrive in September. (So you’ve got time to catch up on the ones that have already dropped!)

Component maintainers

Reporting in on Build/Test tools, @sergeybiryukov had several announcements.

Ticketticket Created for both bug reports and feature development on the bug tracker. #52644: when a workflow fails, a message now gets posted to #core. That will make it easier to notice and fix failures in testing, Sergey explained and then thanked @desrosj publicly for his help on this. For details, see the ticket.

Ticket #47381: So that the WordPress Project can use more modern PHPUnit versions, this ticket makes several changes that make it easier to run unit tests against a variety of PHPPHP The web scripting language in which WordPress is primarily architected. WordPress requires PHP 5.6.20 or higher versions:

  • It removes the composer.lock file.
  • The PHPUnit 9.x mock object classes use a custom autoloader.
  • And the tests now always run in Composer.

Sergey thanked @jrf publicly for her work on the changes.

Reporting on General, @sergeybiryukov thanked @jrf again and announced that work has started on a variety of compatibility fixes for PHP 8.1. Details are in Ticket #52644.

Open Floor

@francina started Open Floor with news of a streaming PHP brainstorming, learning and teaching session that happened on Friday, August 30.

If you missed it, it’s up on YouTube. Featuring @jrf, @hellofromtonya, @sergeybiryukov, and @johnbillion, @hellofromtonya described the session as a “working session on modernizing the test suites. Got consensus and an action plan.”

Tonya noted that commits are in process, and @francina asked for ways the community can help.

In Highlighted Posts, @francina had asked @desrosj what encouraging words he had for people who’d like to volunteer with major and minor releases. Now, in Open Floor, she circled back around, and Jonathan pointed out that you don’t have to have any previous experience leading a major or minor releaseMinor Release A set of releases or versions having the same minor version number may be collectively referred to as .x , for example version 5.2.x to refer to versions 5.2, 5.2.1, 5.2.3, and all other versions in the 5.2 (five dot two) branch of that software. Minor Releases often make improvements to existing features and functionality. to get involved.

So if you’re interested, please comment. And get involved!

@webcommsat brought two items from Marketing to Open Floor: one on promoting favorite features in WordPress 5.8 and one on search terms for release information. Full details are in the chat here.

Thanks and props to post reviewer @desrosj!

#5-8-x, #5-9, #dev-chat, #summary