A Week in Core – August 1, 2022

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 July 25 and August 1st, 2022.

  • 30 commits
  • 29 contributors
  • 36 tickets created
  • 6 tickets reopened
  • 36 tickets closed

The Core team is currently working on the 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., WP 6.1 🛠

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

Administration

  • Add labels to read-only form fields – #54302
  • Correct the escaping in documentation lookup for 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 theme editor – #56007
  • Remove unused CSSCSS Cascading Style Sheets. selectors related to old format menu icons – #35717

Application Passwords

  • Link a more accurate documentation page in User profile edit screen – #56267

Build/Test Tools

  • Add 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.) pattern matching for the testing NPM workflow – #55652
  • Correctly detect the first workflow run for a 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". or tag – #55652
  • Make the 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 be the repository owner. https://github.com/ Action pattern matching for tags more specific – #55652
  • Add failure messages for site icon and custom logo tests – #55652
  • Correct the test for passing all expected parameters to the preprocess_comment 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.#55647, #56244
  • Declare custom-logo theme support for custom logo tests – #55652

Bundled Themes

  • Update NPM dependencies for Twenty Twenty and Twenty Nineteen – #55652
  • Twenty Twenty-One: Add 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. type suggestions to block patterns – #53647
  • Twenty Twenty-One: Rebuild the IE specific stylesheet – #55989
  • Twenty Twenty-One: Update NPM dependencies – #55652

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

  • Add wp_cache_flush_group function – #4476
  • Make the placement of wp_cache_flush_group() more consistent – #55647, #4476

Coding Standards

  • Adjust the logic slightly in wp_ajax_replyto_comment()#55647
  • Check if the _deprecated_file() function exists in wp-db.php#56268, #55647
  • Improve variable names in wp-trackback.php#55647, #56244
  • Move wp-includes/wp-db.php to wp-includes/class-wpdb.php#56268, #55647
  • Remove extra comma in a compact() call – #55647, #56244
  • Remove unused variable in wp-trackback.php#55647
  • Rename $comment_post_ID and $comment_author_IP variables in various files – #55647, #56244
  • Replace the old wp-db.php filename in phpcompat.xml.dist#56268, #55647
  • Standardize on user_id when passing data to comment functions – #55647, #56244
  • Use __DIR__ instead of ABSPATH in wp-db.php#56268, #55647
  • Use consistent placement for ::prepare_links() methods – #55647

Docs

  • Add a @since note for get_post_permalink() returning false on failure – #45329
  • Add function description and @since mention for get_upload_iframe_src()#55646
  • Add missing function description in wp-admin/includes/comment.php#55646
  • Add missing function description in wp-admin/includes/template.php#55646
  • Document that the $file_format parameter of metadata filters can be null – #55646, #55828
  • Fix indentation issues in block-template-utils.php docblocks, as per docs standards – #55646
  • Fix indentation issues in wp_read_video_metadata and wp_read_audio_metadata docblocks – #55646
  • List the expected type first in a few functions: – #55646
  • Provide a more accurate description for wp_is_theme_directory_ignored()#56257, #55646
  • Refine @return docblockdocblock (phpdoc, xref, inline docs) mentions for esc_sql(), wp_slash() and wp_unslash()#53946, #55646
  • Remove an obsolete function description in addslashes_gpc()#56233, #55646
  • Update do_action() docblock code example – #55977
  • Use third-person singular verbs for function descriptions in block-template.php and block-template-utils.php#55646
  • Use third-person singular verbs for function descriptions in general-template.php, as per docblocks standards – #55646
  • Use third-person singular verbs for function descriptions in wp-admin/includes/comment.php, as per docblocks standards – #55646

Editor

  • Fix register_block_type does not recognise ancestor block setting – #56184

Embeds

  • Add Pocket Casts as a trusted oEmbed provider – #55860

External Libraries

  • Update the Moment library to version 2.29.4 – #56031

Formatting

Media

  • Allow filtering audio file metadata in wp_read_audio_metadata()#55828
  • Prevent URLs from overflowing their container in the media editor – #55393
  • Enable generating multiple mime types for image uploads; specifically WebP versions for JPEG images by default – #55443

Plugins

  • Improve color contrast on plugins screen when recovery mode is activated – #56190

Posts, Post Types

  • Check if the post type exists in wp_insert_post()#55877
  • Correct the check for non-existing post in get_post_permalink()#45329

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

  • Add prepare_links method to WP_REST_Post_Types_Controller class – #56019
  • Add prepare_links method to WP_REST_Taxonomies_Controller class – #56020
  • Avoid unnecessarily preparing item links – #52992
  • Prime post caches in comments endpoint – #56272
  • Use wp_get_lastest_revision_id_and_total_count function in WP_REST_Posts_Controller class – #55857

RevisionsRevisions The WordPress revisions system stores a record of each saved draft or published update. The revision system allows you to see what changes were made in each revision by dragging a slider (or using the Next/Previous buttons). The display indicates what has changed in each revision.

  • Correct the function name for retrieving the last revision ID and total count – #55857
  • Rename the function for retrieving the latest revision ID and total count – #55857
  • Update the “last revision” wording to “latest revision” in various files – #55857

Themes

  • Add a hook to filter theme headerHeader The header of your site is typically the first thing people will experience. The masthead or header art located across the top of your page is part of the look and feel of your website. It can influence a visitor’s opinion about your content and you/ your organization’s brand. It may also look different on different screen sizes. image URLURL A specific web address of a website or web page on the Internet, such as a website’s URL www.wordpress.org#56180

Upgrade/Install

  • Improve plugin update icon alignment – #56123
  • track php extensions and image library support for WebP and AVIF – #48116

Props

Thanks to the 29 people who contributed to WordPress Core on Trac last week: @audrasjb (4), @SergeyBiryukov (3), @jrf (3), @costdev (2), @mukesh27 (2), @mordauk (1), @ironprogrammer (1), @grandeljay (1), @Mamaduka (1), @aaemnnosttv (1), @flixos90 (1), @mitogh (1), @eugenemanuilov (1), @thakkarhardik (1), @ryelle (1), @ndiego (1), @joedolson (1), @lopo (1), @chriscct7 (1), @juliemoynat (1), @sabernhardt (1), @whaze (1), @Soean (1), @azouamauriac (1), @markparnell (1), @dd32 (1), @nacin (1), @andykeith (1), and @milana_cap (1).

Congrats and welcome to our new contributor of the week: @aaemnnosttv ♥️

Core committers: @sergeybiryukov (18), @audrasjb (9), @peterwilsoncc (1), @flixos90 (1), @gziolo (1).

#6-1, #core, #week-in-core