Miscellaneous Core changes for WordPress 6.1
WordPress 6.1 brings a number of new hooks and functions, which developers should be aware of. New functions is_term_publicly_viewable() ShareTweetSharePostSharePin It!
WordPress 6.1 brings a number of new hooks and functions, which developers should be aware of. New functions is_term_publicly_viewable() ShareTweetSharePostSharePin It!
Welcome back to a new issue of Week in Core. Let’s take a look at what changed on Trac between October 3 and October 10, 2022. 75 commits 120 contributors ShareTweetSharePostSharePin It!
When forms contain multiple required fields, their labels might have an asterisk with a legend to explain that those fields are required. To reduce code duplication and to help maintain globally consistent markup, WordPress has two new functions: wp_required_field_indicator() and Continue reading Functions and hooks for required fields in WordPress 6.1
WordPress 6.1 brings considerable more flexibility to the layout controls and features to the block editor. A new layout type, “constrained”, was added to the already available Flow and Flex layouts types. In addition, layout refactor efforts bring new layout Continue reading Updated editor layout support in 6.1 after refactor
As of WordPress 6.1, the send_headers hook has been moved to slightly later in the WordPress loading routine (ticket). Historically, all the is_ functions (like is_singular) wouldn’t work when you were determining which headers to send. With this change, moving Continue reading Moving the send_headers action to later in the load
WordPress 6.1 introduces a new system for managing preferences in block editors. Prior to 6.1, user preferences (like Top toolbar or Fullscreen mode) were only persisted via browser local storage. This resulted in users losing their preferences when they cleared Continue reading Changes to block editor preferences in WordPress 6.1
Extenders needed a way to present bespoke versions of the Query Loop block, with their presets, additional settings and disabled customization options when irrelevant to their use-case. With WordPress 6.1, the Query Loop block offers mighty ways to create such Continue reading Extending the Query Loop block
WordPress 6.1 has introduced some server-side filters to hook into the theme.json data provided at the different data layers: theme_json_default: hooks into the default data provided by WordPress theme_json_blocks: hooks into the data provided by the blocks ShareTweetSharePostSharePin It!
This post lists notable changes to the @wordpress/components package for the WordPress 6.1 release: Changes to the Popover componentPreparing CustomSelectControl to take up the entire width of its parent. Components with deprecated margin styles. Changes to the Popover component The Popover component Continue reading Editor Components updates in WordPress 6.1
WordPress 6.1 introduces some new elements to Styles to give block theme developers consistent styles across similar elements, and control those in the theme.json file. One of the biggest challenges for block themes has been to have consistent styles across Continue reading Styling elements in block themes
WordPress 6.1 brings a number of key improvements to the REST API to increase performance. These improvements decrease the number of database queries that are run on each REST API request. Avoid unnecessarily preparing item links Prior to WordPress 6.1, Continue reading Performance improvements to the REST API
A new API, known as the “Style Engine”, has been shipped in WordPress 6.1 to provide a single, centralized agent responsible for generating and rendering consistent block supports styles on the client-side and server-side. For the 6.1 release, the focus Continue reading Block styles generation (Style Engine)
Using the metadata API for network options The way that network options are accessed is changing in WordPress 6.1. Network options have always been stored in a meta table called sitemeta. This name is confusing, as “site” in this context Continue reading Multisite improvements in WordPress 6.1
The Problem Previously, the code to generate markup for views links had to be added in the get_views() method of each child class. This led to repetitive and inconsistent code to achieve the same result, increasing the maintenance burden for Continue reading Introducing WP_List_Table::get_views_links() in WordPress 6.1
As part of the WordPress 6.1 release, wpdb::prepare() has been updated so it can escape Identifiers (such as Table and Field names) with the %i placeholder (#52506). This ensures these values are escaped correctly and don’t lead to SQL Injection Vulnerabilities. Continue reading Escaping Table and Field names with wpdb::prepare() in WordPress 6.1
WordPress 6.1 introduces new features and updates to the @wordpress/create-block package used by developer to scaffold new blocks. Block Variants The new –variant flag allows users of the tool to choose a block variant to be scaffolded. The internal templates Continue reading Create-block scaffolding tool updates
WordPress 6.1 introduces preset values for padding, margin and block gap. With those the editor implements consistent spacing of blocks and nested blocks out of the box. The problem The block editor design tools allowed users only to add custom Continue reading Introduction of presets across padding, margin and block gap
Early block.json Registration Method Starting with WordPress 5.8, extenders were encouraged to begin to utilize block.json to register blocks through a unified registration process. The benefits offered by this update provide consistency and convenience when registering blocks through PHP or Continue reading Improved PHP performance for core blocks registration
Adding caching to database queries in WP_Query WordPress 6.1 includes an improvement to how database queries are performed in the WP_Query class, resulting in database queries will be cached. This means that if the same database query is run more Continue reading Improvements to WP_Query performance in 6.1
WordPress 6.1 introduces a new header available for theme authors. This allows third-party themes to avoid accidentally being overwritten with an update of a theme of a similar name from the WordPress.org Theme Directory. Previously, any custom theme which used the same slug as a theme Continue reading Introducing “Update URI” theme header in WordPress 6.1