X-post: Proposal for Establishing a Make Diversity, Equity, Inclusion, and Belonging (โ€œDEIBโ€) Team within the WordPress Community

X-comment from +make.wordpress.org/project: Comment on Proposal for Establishing a Make Diversity, Equity, Inclusion, and Belonging (โ€œDEIBโ€) Team within the WordPress Community

Introducing the WordPress Command Palette API

WordPress 6.3 ships with a new command palette. Initially included in the post and site editors, users can open the command palette using the ctrl + k or command + k keyboard shortcuts.

An overview on how the command palette appears in the editor.

Registering commands

The command palette includes a number of coreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress. commands that you can use by default including things like:

  • Navigating the site editor.
  • Creating new posts and pages.
  • Toggling UIUI User interface elements.
  • Toggling editor preferences.
  • and more.

It also offers an 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. for third-party developers to register or unregister commands.

There are two ways to register commands: static commands and dynamic commands.

Static commands

Static commands can be registered using the wp.data.dispatch( wp.commands.store ).registerCommand action or using the wp.commands.useCommand ReactReact React is a JavaScript library that makes it easy to reason about, construct, and maintain stateless and stateful user interfaces. https://reactjs.org hook. Both methods receive a command object as an argument, which provides a unique name, a label, an icon, a callback function that is called when the command is selected, and potentially a context.

Example:

wp.commands.useCommand( {
	name: 'myplugin/my-command-name',
	label: __( 'Add new post' ),
	icon: plus,
	callback: ({ย close }) => {
		document.location.href = 'post-new.php';
		close();
	},
} );

Dynamic commands

Dynamic commands, on the other hand, are registered using โ€œcommand loaders.โ€ These are needed when the command list depends on the search term entered by the user in the command palette input or when some commands are only available when some conditions are met.

For example, when a user types โ€œcontactโ€, the command palette need to 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. the available pages using that input.

function usePageSearchCommandLoader( { search } ) {
	// Retreiving the pages for the "search" term
	const { records, isLoading } = useSelect(
		( select ) => {
			const { getEntityRecords } = select( coreStore );
			const query = {
				search: !! search ? search : undefined,
				per_page: 10,
				orderby: search ? 'relevance' : 'date',
			};
			return {
				records: getEntityRecords( 'postType', 'page', query ),
				isLoading: ! select( coreStore ).hasFinishedResolution(
					'getEntityRecords',
					[ 'postType', 'page', query ]
				),
			};
		},
		[ search ]
	);

	// Creating the commands
	const commands = useMemo( () => {
		return ( records ?? [] ).slice( 0, 10 ).map( ( record ) => {
			return {
				name: record.title?.rendered + ' ' + record.id,
				label: record.title?.rendered
					? record.title?.rendered
					: __( '(no title)' ),
				icon: icons[ postType ],
				callback: ( { close } ) => {
					const args = {
						postType,
						postId: record.id,
						...extraArgs,
					};
					document.location = addQueryArgs( 'site-editor.php', args );
					close();
				},
			};
		} );
	}, [ records, history ] );

	return {
		commands,
		isLoading,
	};
}

useCommandLoader( {
	name: 'myplugin/page-search',
	hook: usePageSearchCommandLoader,
} );

Contextual commands

Commands can be contextual. This means that in a given context (for example, when navigating the site editor, or when editing a template), some specific commands are given more priority and are visible as soon as you open the command palette. And when typing the command palette, these contextual commands are shown above the rest of the commands.

At the moment, two contexts have been implemented:

  • site-editor This is the context that is set when you are navigating in the site editor (sidebarSidebar A sidebar in WordPress is referred to a widget-ready area used by WordPress themes to display information that is not a part of the main content. It is not always a vertical column on the side. It can be a horizontal rectangle below or above the content area, footer, header, or any where in the theme. visible).
  • site-editor-edit This is the context that is set when you are editing a document (template, template part or page) in the site editor.

As the usage of the command palette expands, more contexts will be added.ย 

To attach a command or a command loader to a given context, it is as simple as adding the context property (with the right context value from the available contexts above) to the useCommand or useCommandLoader calls.

WordPress Data API

The command palette also offers a number of selectors and actions to manipulate its state which includes:

  • Retrieving the registered commands and command loaders using the following selectors getCommands and getCommandLoader
  • Checking if the command palette is open using the isOpen selector.
  • Programmatically open or close the command palette using the open and close actions.

Props toย @bph, @annezazu,ย andย @leonnugraha for reviewing.

#6-3, #dev-notes, #dev-notes6-3

Improvements to the Cache API in WordPress 6.3

As part of the release of WordPress 6.3, the new Performance team has been working on several improvements to the coreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress.. There are a few new additions to the WordPress 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., improved validation, and new actions.ย 

Change cache groups for all query caches

There are a number of places in WordPress where the results of queries are cached, for example, all the major query classes like WP_Query, WP_Comment_Query, and WP_Term_Query. As of WordPress 6.3, the class WP_User_Query also caches the result of queries. In previous versions, the query results were stored in the same cache group as the corresponding object. For instance, post query data would be stored in the โ€œpostsโ€ group. However, starting from WordPress 6.3, this approach has been modified.

The update introduces new cache groups specific to queries, offering developers greater control over the handling of objects within these groups. Core functionality now enables developers to specify the expiration time for a cache group, allowing them to set a duration of, for instance, one day. If desired, developers can also use the wp_cache_flush_group() function to clear a specific cache group (if their object cache implementation supports it). Additionally, this change allows developers to designate a cache group as non-persistent, if needed. The following are the newly added cache groups:

  • post-queries
  • term-queries
  • comment-queries
  • networknetwork (versus site, blog)-queries ( global cache group )
  • site-queriesย  ( global cache group )
  • user-queries ( global cache group )

For sites with persistent object caching enabled, ensure that it supports wp_cache_add_global_groups function (added in WP 2.6) to add global cache groups . If not, you will have to manually add the three new global cache groups.ย 

See #57625 and #40613 for additional context.

New utility function wp_cache_set_last_changed()

A new utility function, wp_cache_set_last_changed(), has been introduced in WordPress 6.3. This function is utilized to update the last updated value in the cache. It complements the existing wp_cache_get_last_changed() function, which was added in WordPress 4.7. In the core codebase, all instances where the last changed value was updated have been replaced with calls to this new function.

In addition to the new utility function, a corresponding action called wp_cache_set_last_changed has been introduced. This action provides valuable information such as the cache group, the newly updated value, and the old value. Developers can leverage this action to implement custom cache invalidation strategies. When combined with the new cache groups mentioned earlier and the wp_cache_flush_group() function, it becomes possible to clear an entire cache group programmatically.

Here is some sample code of this action that can be used along with the wp_cache_flush_group() function.ย 

function wpdocs_cache_clear_query_groups( $group ){

ย ย switch( $group ){

ย ย ย ย ย case 'comment':

ย ย ย ย ย ย ย ย $cache_group = 'comment-queries';

ย ย ย ย ย ย ย ย break;

ย ย ย ย ย case 'sites':

ย ย ย ย ย ย ย ย $cache_group = 'site-queries';

ย ย ย ย ย ย ย ย break;

ย ย ย ย ย case 'networks':

ย ย ย ย ย ย ย ย $cache_group = 'network-queries';

ย ย ย ย ย ย ย ย break;

ย ย ย ย ย case 'posts':

ย ย ย ย ย ย ย ย $cache_group = 'post-queries';

ย ย ย ย ย ย ย ย break;

ย ย ย ย ย case 'terms':

ย ย ย ย ย ย ย ย $cache_group = 'term-queries';

ย ย ย ย ย ย ย ย break;

ย ย ย ย ย case 'users':

ย ย ย ย ย ย ย ย $cache_group = 'user-queries';

ย ย ย ย ย ย ย ย break;

ย ย ย ย ย default:

ย ย ย ย ย ย ย ย $cache_group = false;

ย ย }

ย ย if( $cache_group ){

ย ย ย ย ย wp_cache_flush_group( $cache_group );

ย ย }

}

add_action( 'wp_cache_set_last_changed', 'wpdocs_cache_clear_query_groups' );

Validation added toย  _get_non_cached_ids() forย  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. IDs

The _get_non_cached_ids() function has been updated to perform validation, ensuring that only an array of unique integers are passed as input. In the previous version, no validation was conducted on the input, leading to potential validation errors and even PHPPHP The web scripting language in which WordPress is primarily architected. WordPress requires PHP 7.4 or higher fatal errors. This function now only supports passing an array of integers. If incorrect values are passed, a _doing_in_wrong message is triggered to inform developers of the error. See #57593

Misc changesย 

The PHPUnit test suite now calls wp_cache_flush_runtime() instead of manually resetting class properties of the object cache. The wp_cache_flush_runtime() function was added into core back in WordPress 6.0. If you are running the WordPress core unit tests with an object cache drop-in enabled, please ensure that the wp_cache_flush_runtime() function is present. See #31463

The function wp_cache_get_multiple was introduced in WordPress 5.5., and in WordPress 6.3, it is now in a couple of new places. It is now used to prime network options in wp_load_core_site_options in a single cache call. The wp_cache_get_multiple was also implemented in fill_descendants in WP_Comment_Query. This method is used to fill in descendant comments. This increases the performance of sites that heavily use nested comments. See #57803 and #56913

Props toย @flixos90 and @joemcgill for peer review, toย @stevenlinx, @leonnugraha and @jyolsna for review.

#6-3, #dev-notes, #dev-notes6-3

Social Icons block: Applied colors now dynamically update based on theme.json and Global Styles

The Social Icons 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. provides options to set both an โ€œIcon colorโ€ and an โ€œIcon background colorโ€. In versions prior to WordPress 6.3, the selected colors were hardcoded as hex code values within the block, even if you chose a color from the theme palette defined in 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..

Letโ€™s take the example of the Twenty Twenty-Three theme, where the icon color is set to โ€œBaseโ€ and the background color to โ€œSecondary.โ€ The iconsโ€™ frontend markup would include inline styles like this:

<li style="color: #ffffff; background-color: #345C00;" class="wp-social-link wp-social-link-facebook wp-block-social-link">
    <a rel=" noopener nofollow" target="_blank" href="https://#" class="wp-block-social-link-anchor">
        <svg width="24" height="24">
            ...
        </svg>
        <span class="wp-block-social-link-label">Facebook</span>
    </a>
</li>

As you can see, the inline styles reflect the hardcoded hex code values for the base and secondary colors defined in Twenty Twenty-Threeโ€™s theme.json file, which are #ffffff and #345C00 respectively.

This approach caused issues when modifying the color palette in Global Styles, manually changing the theme.json file, or selecting different theme style variations. The icon colors did not update whenever the values for base or secondary were changed.

This problem is clearly demonstrated in the following video. Despite choosing different style variations, which have their own values for base or secondary, the icon colors remain fixed at #ffffff and #345C00.

To address this, WordPress 6.3 introduces CSSCSS Cascading Style Sheets. classes to the Social Icons block that correspond to the selected color values. These classes are used all over WordPress and are automatically generated based on the color palette set in the theme.json file. They follow the format:

  • has-[color_slug]-color
  • has-[color_slug]-background-color

Itโ€™s important to note that these classes will not be applied if a user selects a custom color.

With the application of these CSS classes, any changes made to the base or secondary colors in Global Styles or theme.json will be automatically reflected in the Social Icons block. Hereโ€™s an updated example of the code (scroll to the right to view the classes):

<li style="color: #ffffff; background-color: #345C00;" class="wp-social-link wp-social-link-facebook wp-block-social-link has-base-color has-secondary-background-color">
    <a rel=" noopener nofollow" target="_blank" href="https://#" class="wp-block-social-link-anchor">
        <svg width="24" height="24">
            ...
        </svg>
        <span class="wp-block-social-link-label">Facebook</span>
    </a>
</li>

Each CSS class corresponds to a specific color variable:

.has-base-color {
    color: var(--wp--preset--color--base) !important;
}

.has-secondary-background-color {
    background-color: var(--wp--preset--color--secondary) !important;
}

While these CSS classes take precedence over the hardcoded hex values, itโ€™s important to mention that the hardcoded values are still retained. This design ensures that if a user switches to a theme that doesnโ€™t support the base or secondary colors, the icons will still display correctly using the original hardcoded hex values.

The following video shows that the Social Icons block now updates as the user changes the theme style variation in Global Styles.

Finally, itโ€™s worth noting that this change wonโ€™t require any action from theme developers or users unless some custom functionality has been implemented. The rendering of the Social Icons block is handled through PHPPHP The web scripting language in which WordPress is primarily architected. WordPress requires PHP 7.4 or higher, meaning that if any updates are made to the color palette defined in theme.json and the icon or background color is set to one of the colors from that palette, the icons will automatically update to reflect the changes.

For additional context and to review the technical implementation of this change, please seeย #51020.

Props to @leonugraha, @juanmaguitar, and @mburridge for review.

#6-3, #dev-notes, #dev-notes6-3

Introducing the Block Selectors API

The new 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. Selectors 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. allows more flexibility in how global styles are applied to blocks. As the available design tools grow in number and complexity, not all styles can be applied neatly to a blockโ€™s wrapping element.

In WordPress 5.8, the __experimentalSelector property was introduced and later evolved to facilitate applying feature-level global styles, such as borders, colors, and typography, to arbitrary selectors. Similarly, the __experimentalDuotone property was also introduced in WordPress 5.8 to support the application of SVG filters.

As advancements in design tools continue, the need for greater control over the application of global styles has grown more pressing. It is, for this reason, the selectors API has been extended and stabilized.

New selectors API features

Through the new API, a block can configure multiple CSSCSS Cascading Style Sheets. selectors for use in generating global styles. These can be set at three different levels; root, feature, and sub-feature.

Root selectors

A root selector is the blockโ€™s primary CSS selector.

All blocks require a primary CSS selector for their global style declarations to be included under. If one hasnโ€™t been supplied via the Block Selectors API, a default will be generated in the form of .wp-block-<name>.

Example:

{
	...
	"selectors": {
		"root": ".my-custom-block-selector"
	}
}

Feature-level selectors

This level of selector relates to styles for specific block support, such as border, color, typography, etc. They allow for a block to apply such styles to different elements within a block. For example, applying colors to the blockโ€™s wrapper but typographic styles to an inner text element.

Example:

{
	...
	"selectors": {
		"root": ".my-custom-block-selector",
		"color": ".my-custom-block-selector",
		"typography": ".my-custom-block-selector > h2"
	}
}

Subfeature selectors

These selectors relate to individual styles provided by block support e.g. background-color or border-radius.

A subfeature can now have styles generated under its own unique selector. This is most useful when a single featureโ€™s styles need to be applied to separate elements. For example, a blockโ€™s typography might require font-family on the wrapper but text-decoration and font-size on different inner elements.

Example:

{
	...
	"selectors": {
		"root": ".my-custom-block-selector",
		"color": ".my-custom-block-selector",
		"typography": {
			"root": ".my-custom-block-selector > h2",
			"text-decoration": ".my-custom-block-selector > h2 span"
		}
	}
}

Shorthand

For convenience, instead of specifying the same selector for every subfeature, you can define a simple string at the feature level.

Fallbacks

If a selector has not been configured for a given feature, it will fall back to the blockโ€™s root selector. Similarly, if a subfeature has no custom selector set, it will fall back first to its parent featureโ€™s selector before the blockโ€™s root selector.

A detailed example configuration and explanation can be found in the Block Selectors API reference guide.

Backwards compatibility

Blocks currently using the __experimentalSelector and __experimentalDuotone support properties will continue to function as before.ย 

However, if a block adds a selectors property in its block.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., that selectors configuration will be honored in its entirety. In other words, a block cannot use both the Selectors API and the old experimental properties.

Links

Props toย @bph, @annezazu, @priethorย andย @leonnugraha for reviewing.

#6-3, #dev-notes, #dev-notes6-3

Editor chat summary: 12 July, 2023

This post summarizes the weekly editor chat meeting (agenda for 12th of July meeting) held on ย Wednesday, July 12 2023, 03:00 PM GMT+1. inย Slack. Moderated byย @paaljoachim.

Help test WordPress 6.3 Beta 4.
Whatโ€™s new in Gutenberg 16.1? (June 29)
Gutenberg 16.2 RC3 is available for testing.
Final version of 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/ 16.2 will be released Wednesday.

Key project updates:

No updates of Key Projects during the coreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress. editor meeting.

Task Coordination

@mamaduka

Iโ€™m going through the 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. reports from WP 6.3 board, checking what we can fix.

@hellofromtonya

The Fonts 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. is being replaced by Font Face to support the new Font Library. Font Face has been merged into 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. but will only load into memory when Font Library is available. Making all aware that the new approach no longer includes register or enqueue of fonts, as plugins will integrate into the Font Library instead. And Font Face becomes read only of 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. merged data, which will eliminate issues with what fonts appear in typography pickers.

This work is very low level. The new Font Face will not impact the UIUI User interface directly. Indirectly, its impact is on printing the font-face CSSCSS Cascading Style Sheets. so that fonts visually look correctly, ie use their font files to render properly. That CSS generator and printer role though has not changed from the Fonts API. What has changed? Where plugins introduce their fonts for user consideration and selection. That role moves to the Font Library.

Open Floor

@hellofromtonya

FYI: Fonts API will not get replaced until the Font Library is introduced. And this work is not being introduced into WP 6.3, as itโ€™s still experimental.

WP 6.3 is dropping PHPPHP The web scripting language in which WordPress is primarily architected. WordPress requires PHP 7.4 or higher 5.6 support, raising the minimum supported version to 7.0.
Gutenberg though needs to run on the last 2 WP major releases, meaning it canโ€™t yet drop PHP 5.6 support.
The 2 PHP 5.6 PHPUnit CI jobs running on WordPress trunk have been removed from Gutenberg. Why? They were failing because Core no longer runs on PHP 5.6.

  • Update your PRs if they are failing for PHP 5.6 CI jobs.
  • When to drop PHP 5.6 support.

Discussion is here: Increase the PHP minimum supported version to 7.0

@skorasaurus

As I low-level contributor and triagetriage The act of evaluating and sorting bug reports, in order to decide priority, severity, and other factors. member, there were some suggestions within the past couple months ( i think here or in make.wordpress.orgWordPress.org The community site where WordPress code is created and shared by the users. This is where you can download the source code for WordPress core, plugins and themes as well as the central location for community conversations and organization. https://wordpress.org/ comments), that a release be devoted primarily to bug cleanup.

Iโ€™d just like to suggest that againโ€ฆ as a triager, Iโ€™m aware that some 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 issues in 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/ can be closed when new features are introduced but there are nearly 1,000 PRs (yes, some of them are drafts and probably be disregarded) but I imagine fellow contributors recognize the frustration of keeping up with PRs and searching through issues when theyโ€™ve already been reported.

A suggested label to go through. Open Gutenberg PRโ€™s with no one to review these.

@mamaduka

Maybe we can keep track some of those PRs in separate board. Bug fixes are usually easier to review, unless they rewrite the whole editor

Read complete transcript

#core-editor, #core-editor-summary, #gutenberg, #meeting-notes, #summary

Whatโ€™s new in Gutenberg 16.2? (12 July)

โ€œWhatโ€™s new 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/โ€ฆโ€ posts (labeled with the #gutenberg-new tag) are posted following every Gutenberg release biweekly, showcasing new features included in each release. As a reminder, hereโ€™s an overview of different ways to keep up with Gutenberg.


Weโ€™re pleased to announce Gutenberg 16.2 has been recently released, and weโ€™re excited to share some highlights on whatโ€™s included in this release!

  1. Consolidating Patterns
  2. Footnotes
  3. Vertical text orientation
  4. Honorable Mentions
  5. Changelog
  6. Contributors

Consolidating Patterns

Building on our work to harmonize reusable blocks and patterns that started with the previous release, weโ€™re continuing to make the Patterns section (previously known as โ€œLibraryโ€) more intuitive: The pattern sidebarSidebar A sidebar in WordPress is referred to a widget-ready area used by WordPress themes to display information that is not a part of the main content. It is not always a vertical column on the side. It can be a horizontal rectangle below or above the content area, footer, header, or any where in the theme. now includes a patternโ€™s sync status in its โ€œDetailsโ€ section.

The pattern creation modal in the Patterns section has been updated to be consistent with the one triggered from the editor.

The โ€œCustom Patternsโ€ subsection has been renamed to โ€œMy Patternsโ€ and given a more prominent position at the top of both the Patterns sidebar, and of the inserter. Finally, the icons in the grid items in the library were updated to indicate if a given template part is a 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., footer, or uncategorized.

Footnotes

First introduced in Gutenberg 16.1, Footnotes have received a number of 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. fixes to make them more reliable. Furthermore, it is now possible to manually insert the Footnotes 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. โ€“ among other things; this makes it a lot easier to re-insert Footnotes after deleting them.

Vertical text orientation

Themes can now opt into a new Text Orientation feature (available via a blockโ€™s Typography settings panel) that allows text to be written vertically. This new feature is a first step towards full support of vertically written languages as well as for decorative purposes in website design.

Honorable Mentions

The โ€œCommand toolโ€ that was first introduced in Gutenberg 15.9 has now been named โ€œCommand Paletteโ€.

The โ€œHomeโ€ template was easily conflated with the actual homepage, so we changed it to โ€œBlogblog (versus network, site) Homeโ€.

The quick inserterโ€™s โ€œBrowse Allโ€ button, which had gone missing due to a regressionregression A software bug that breaks or degrades something that previously worked. Regressions are often treated as critical bugs or blockers. Recent regressions may be given higher priorities. A "3.6 regression" would be a bug in 3.6 that worked as intended in 3.5. in a previous Gutenberg version, has been restored.

Finally, weโ€™ve added a new Gutenberg Experiment to explore a potential path towards the deprecation of TinyMCE. When enabled, it prevents loading TinyMCE assets and Classic blocks by default, only enabling them if usage is detected. The update also handles scenarios where posts contain Classic blocks or users input raw HTMLHTML HyperText Markup Language. The semantic scripting language primarily used for outputting content in web browsers., offering conversion options or reloading to use the Classic block.

Changelog

Enhancements

Patterns

  • Rename Reusable blocks to Patterns. (51704)
  • Add sync status to pattern details screen. (51954)
  • Rename Library to Patterns. (52102)
  • Update custom patterns label to โ€˜My patternsโ€™. (51949)
  • Update pattern creation modal in library. (51946)
  • Update template part icons in the library mosaic (grid items). (51963)
  • Reinstate manage all template parts page. (51961)
  • Add lock icon for theme patterns. (51990)
  • Update section heading levels. (52273)

Site Editor

  • Change โ€œHomeโ€ template name to โ€œBlog homeโ€. (52048)
  • Edit Site: Make loading spinner colors consistent. (51857)
  • Navigation in Site View: Readd the edit button. (52111)
  • Update the icon used to reference the blog. (52075)
  • Global Styles Sidebar: Re-add Colors: Heading to selected blocks. (49131)

Block Library

  • Force full height for editor in Navigation focus mode. (51798)
  • Social links: Updating class and style attributes. (51997)

Themes

  • Add border theme_support. (51777)
  • Add link color theme_support. (51775)

Global Styles

  • Style Book: Show tabs and make blocks clickable when entering edit mode from the Styles menu. (52222)

Widgets Editor

NUX

  • Page Content Focus: Add welcome guides. (52014)

Block Editor

  • Use block label and icon for the inserter draggable chip.. (51048)
  • Wrap โ€œMove to trashTrash Trash in WordPress is like the Recycle Bin on your PC or Trash in your Macintosh computer. Users with the proper permission level (administrators and editors) have the ability to delete a post, page, and/or comments. When you delete the item, it is moved to the trash folder where it will remain for 30 days.โ€ and โ€œSwitch to draftโ€ buttons when labels are too long to fit on a single row. (52249)

Design Tools

  • Add Typography: Text orientation (writing mode). (50822)

Components

  • RangeControl: Add support for large 40px number input size. (49105)

Command Palette

  • Command palette: Rename. (52153)

Icons

  • Remove fill=โ€noneโ€ from pinSmall icon. (51979)

Copy

  • Block Editor: Unify texts for Create pattern modal. (52151)
  • Page List: Change modal text. (52116)
  • 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.: Add context to the word โ€œFiltersโ€. (52198)
  • Try: Update template titles. (51428)
  • Add a hint about the rename of reusable blocks to menu and inserter. (51771)
  • Copy: โ€œDetach patternโ€ instead of โ€œCovert to regular blockโ€. (51993)
  • Polish welcome guide copy for page / template editing. (52282)
  • Update delete page button label. (51812)

Widgets

  • Export store for the coreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress./customize-widgets package. (52189)
  • Export the store for the core/edit-widgets package. (52190)

New APIs

Block Editor

  • Add new registerInserterMediaCategory 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. to make media categories extensibleExtensible This is the ability to add additional functionality to the code. Plugins extend the WordPress core software.. (51542)

Bug Fixes

  • Adjust the position of sticky headings in preferences modal. (52248)
  • BlockRemovalWarningModal: Fix incorrect โ€˜_nโ€™ usage. (52164)
  • Editor initrial appender: Zero out margins in constrained layouts. (52026)
  • Export store from the edit-site package. (51986)
  • Fix disable DFM when opening styles command. (52165)
  • Fix unintentional toggling on of distraction free. (52090)
  • Footnotes: Increase selector specificity for anchor. (52179)
  • Respect custom aspect ratio. (52286)
  • Turn off DFM for style book and style editing. (52117)
  • Update fixed block toolbar. (52123)
  • Updating the BlockEditorProvider settings prop should reset the storeโ€™s settings entirely. (51904)
  • [Command Palette]: Remove suggestion for deleting templates/parts. (52168)
  • [Command Palette]: Add preferences and keyboard shortcuts commands. (51862)
  • Rename block theme activation nonce variable. (52398)
  • hasResolvingSelectors: Exclude from result of resolveSelect. (52038)
  • Drop-indicator: Remove white border. (52122)

Block Library

  • Fix default block dimensions visibility. (52256)
  • Fix fetching Nav fallback ID flushing Navigation entity cache. (52069)
  • Fix: Term Description block should only be available in the site editor. (51053)
  • Footnotes: Register metaMeta Meta is a term that refers to the inside workings of a group. For us, this is the team that works on internal WordPress sites like WordCamp Central and Make WordPress. field for pages. (52024)
  • Image block: Fix cursor style when lightbox is opened. (52187)
  • Navigation: Add the draft status to the navigation title. (51967)
  • Navigation: Fix end-to-end test failures caused by sidebar title change. (52308)
  • Navigation: Fix sidebar title. (52167)
  • Navigation: Remove one preloaded endpoint. (52115)
  • Page List: Fix parent block selection when converting to link. (52193)
  • Post editor: Require confirmation before removing Footnotes. (52277)
  • fix: Display heading level dropdown icons and labels. (52004)
  • RichText/Footnotes: Make getRichTextValues work with InnerBlocks.Content. (52241)
  • Post and Comment Template blocks: Change render_block_context priority to 1 (#52364)
  • Footnotes: Fix incorrect anchor position in Firefox (#52425)
  • Footnotes: fix lingering format boundary attr (#52439)
  • Footnotes: save numbering through the entity provider (#52423)
  • Allow editing existing footnote from RichText formats toolbar. (52506)
  • Revert โ€œPost editor: Require confirmation before removing Footnotes (#52277)โ€. (52486)
  • Trim footnote anchors from excerpts. (52518)

Site Editor

  • Add confirmation step when deleting a Template. (52236)
  • Command Palette: Fix incorrect path and snackbar message when template part is deleted. (52034)
  • Default to showing status slug in sidebar. (52226)
  • Fix missing MenuGroup segment in Site Editor header more menu. (51860)
  • Fix missing snackbars in Library. (52021)
  • Fix stepper styling in Home template sidebar. (52025)
  • Get the top toolbar preference from the correct scope. (51840)
  • Hide word count and reading time meta data for the Posts Page details panel. (52186)
  • Modal: Add small top padding to the content so that avoid cutting off the visible outline when hovering items. (51829)
  • Site Editor Frame: Ignore Spotlight in view mode. (52262)
  • Try restoring the site editor animation. (51956)
  • Site Editor: Restore quick inserter โ€˜Browse allโ€™ button. (52529)
  • Library: Update icons in the creation menu. (52108)
  • Update stepper styling in Home template details panel. (51972)
  • Update text color of active menu items. (51965)

Patterns

  • Fix custom patterns console error. (51947)
  • Fix history back after entering edit mode from Patterns. (52112)
  • Fix setting of sync status for fully synced patterns. (51952)
  • Fix sidebar tab label. (51953)
  • Fix: Pattern focus mode DocumentActions should use the pattern icon. (52031)
  • Include template parts for custom areas in Uncategorized categoryCategory The 'category' taxonomy lets you group posts / content together that share a common bond. Categories are pre-defined and broad ranging.. (52159)
  • Remove ability for user to toggle sync status after pattern creation. (51998)
  • Rename sync_status and move to top level field on rest return instead of a meta field. (52146)
  • Library โ€“ make pattern title clickable. (51898)
  • Check that core hasnโ€™t already moved sync status meta before moving and unsetting. (52494)

Global Styles

  • Check if experiment enabled for realsies this time. (52315)
  • Check randomizer experiment is enabled before rendering button. (52306)
  • Make the entire preview clickable in order to enter โ€œeditโ€ mode in focus mode. (51973)
  • Restore sidebar in focus mode on Pattern click through in Browse Mode Library. (51897)

Page Content Focus

  • Hide parent selector when parentโ€™s block editing mode is โ€˜disabledโ€™ or โ€˜contentOnlyโ€™. (52264)

Post Editor

  • Editor: Avoid remounting pre-publish sidebar contents during autosave. (52208)

Block Editor

  • Enable draft entity creation in Nav block offcanvas. (52166)
  • Iframeiframe iFrame is an acronym for an inline frame. An iFrame is used inside a webpage to load another HTML document and render it. This HTML document may also contain JavaScript and/or CSS which is loaded at the time when iframe tag is parsed by the userโ€™s browser.: avoid asset parsing & fix script localisation (52405)
  • [Edit Post]: Add toggle fullscreen mode and list view commands. (52184)

History

  • Update the behavior of the cached undo/redo stack. (51644)

Components

  • DropdownMenu: Fix icon style when dashicon is used. (43574)

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)

  • Fix incorrect aria-describedby attributes for theme patterns. (52263)
  • Guide: Place focus on the guideโ€™s container instead of its first tabbable. (52300)
  • Site Editor: Update headings hierarchy in the โ€˜Manage allโ€™ screens. (52271)
  • Navigation block: Do not toggle aria-expanded on hover when the overlay menu is opened. (52170)
  • Navigation block: Donโ€™t close submenu when it has focus. (52177)

Performance

  • Migrate performance tests to Playwright. (51084)
  • Social links: Reverts updating class and style attributes. (52019)
  • tests: Configure as a production environment. (52016)
  • Add caching to schema of 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/. (52045)
  • Try: Aggressive TinyMCE deprecation. (50387)

Experiments

Interactivity API

  • Create wordpress/interactivity with the Interactivity API. (50906)
  • Fix the exsisting -> existing typo. (52110)
  • First version of the Interactivity API README. (52104)
  • Block Image: Lightbox โ€“ Hide animation selector if behavior is Default or None. (51748)
  • Image block: Fix responsive sizing in lightbox. (51823)
  • Image block: Lightbox animation improvements. (51721)
  • Navigation block: Check that the modal is set before using contains. (51962)
  • Image block: Remove extra lookup for external image dimensions in lightbox. (52178)
  • Image block: Use built-in directive for mouseover event in lightbox. (52067)
  • Fix md5 class messed up with new block key. (52557)

Documentation

  • Add @examples to the wordpress/rich-text package selectors and hide the actions from documentation. (52089)
  • Add examples for core/keyboard-shortcut package. (42831)
  • Block Editor: Add README for FontFamilyControl component. (52118)
  • Block Editor: Add README for PanelColorSettings component. (52327)
  • Block Editor: Add README for RecursionProvider. (52334)
  • Docs: Update release documentation to use the right cherry-picking command. (51935)

Code Quality

  • Lodash: Refactor away from _.kebabCase() in getCleanTemplatePartSlug. (51906)
  • Lodash: Refactor away from _.kebabCase() in add page modal. (51911)
  • Lodash: Refactor away from _.kebabCase() in generic template modal. (51910)
  • Lodash: Remove completely from wordpress/style-engine package. (51726)
  • Sidebar Navigation: Refactor delete modal with ConfirmDialog component. (51867)
  • Template 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. API: Move back to experimental. (51774)
  • Block editor store: Also attach private APIs to old store descriptor. (52088)
  • Blocks: Remove gutenberg refs in PHPPHP The web scripting language in which WordPress is primarily architected. WordPress requires PHP 7.4 or higher files. (51978)
  • Navigation submenu: Remove unused doc block. (52152)
  • Refactor use-tab-nav shift+tab to use existing utils. (51817)
  • Perf logging: Change date to ISO 8601. (51833)
  • Heading Block: Remove unused HeadingLevelIcon component. (52008)
  • Image block and behaviors: Fix some warnings. (52109)
  • Lodash: Refactor embed block away from _.kebabCase(). (51916)
  • Lodash: Remove dependency from block library package. (51976)
  • Make Navigation fallback selector private. (51413)
  • Page List: Fix ESLint warnings. (52267)
  • Refactor, document, and fix image block deprecations. (52081)
  • Block Supports: Change prefix in gutenberg_apply_colors_support to wp_ in dynamic blocks. (51989)
  • Move grid function kses patchpatch A special text file that describes changes to code, by identifying the files and lines which are added, removed, and altered. It may also be referred to as a diff. A patch can be applied to a codebase for testing. into 6.3 compat folder. (52098)
  • Return primitive value for โ€˜hideInserterโ€™ in Appender component. (52161)
  • Remove redundant call to Navigation selector in Browse Mode. (51988)
  • Block removal prompt: Let consumers pass their own rules. (51841)
  • Revise LinkControl suggestions UIUI User interface to use MenuItem. (50978)

Tools

Testing

  • Drops PHP 5.6 CI jobs. (52345)
  • Revert phpcsPHP Code Sniffer PHP Code Sniffer, a popular tool for analyzing code quality. The WordPress Coding Standards rely on PHPCS. testVersion back to PHP 5.6. (52384)
  • Fix flakiness of saving entities in the site editor. (51728)
  • Fix flaky Site Editor pages end-to-end test. (52283)
  • Have createNewPost wait for editor canvas contents. (51824)
  • Add basic test for the page content focus flow. (52231)
  • Fix phpunit failures. (51950)
  • Image block: Update lightbox animation tests. (52290)
  • Restore โ€œButtons > can resize widthโ€ test. (51865)
  • Remove serverSideBlockDefinitions from a test. (52215)
  • Fix flaky tests in navigation.spec.js and other tests related to the Post Editor Template mode. (51790)

Build Tooling

  • Use moment-timezone-data-webpack-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 optimize timezones shipped in wp/date. (51519)

Plugin

  • Backportbackport A port is when code from one branch (or trunk) is merged into another branch or trunk. Some changes in WordPress point releases are the result of backporting code from trunk to the release branch. from core: Rename gutenberg_get_remote_theme_patterns to gutenberg_get_theme_directory_pattern_slugs. (51784)
  • [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/-Actions-Workflows][Plugin-Release] Allow shipping a point-release for an older stable release. (49082)
  • Global Styles Revisions API: Backport changes from Core. (52095)
  • Update versions in WP for 6.3. (51984)
  • Move block editor settings 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. into 6.3 compat folder. (52100)

Project Management

  • Add code owners for the Interactivity API runtime. (52174)

Contributors

The following contributors merged PRs in this release:

@aaronrobertshawย @ajlendeย @annezazuย @artemiomoralesย @c4rl0sbr4v0ย @carolinanย @DAreRodzย @dcalhounย @draganescuย @ellatrixย @fullofcaffeineย @getdaveย @glendaviesnzย @hellofromtonyaย @jameskosterย @jasmussenย @jeryjย @jsnajdrย @juanfraย @juanmaguitarย @kevin940726ย @luisherranzย @Mamadukaย @mcsfย @michalczaplinskiย @miminariย @noisysocksย @ntsekourasย @oandregalย @ockhamย @peterwilsonccย @priethorย @ramonjdย @richtaborย @ryanwelcherย @SaxonFย @scruffianย @spacedmonkeyย @stokesmanย @t-hamanoย @talldanย @tellthemachinesย @tyxlaย @WunderBartย @youknowriad

Kudos to all the contributors that helped with the release! ๐Ÿ‘


Props to @fullofcaffeine for leading this release with me, @jameskoster for the visual assets, and @priethor for helping with the release notes.

#gutenberg-new

Configuring development mode in 6.3

WordPress 6.3 introduces a new concept called โ€œdevelopment modeโ€, which affects certain nuances in how WordPress behaves. Going forward, sites will be able to configure their development mode using a new WP_DEVELOPMENT_MODE constant, which is recommended for any development sites.

What is the development mode?

The development mode configured on a site defines the kind of development work that the site is being used for.ย 

Possible values for WP_DEVELOPMENT_MODE are:

  • โ€œcoreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress.โ€ indicates that this site is used as a WordPress core development environment. For example, this may be relevant when you are contributing directly to WordPress core.
  • โ€œ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.โ€ indicates that this site is used as a WordPress plugin development environment. For example, this may be relevant when you are working on a plugin for the plugin repository.
  • โ€œthemeโ€ indicates that this site is used as a WordPress theme development environment. For example, this may be relevant when you are working on a theme for the theme repository.
  • โ€œallโ€ indicates that this site is used as a WordPress development environment where all three aspects may be modified. For example, this may be relevant when you are working on a specific site as a whole, e.g. for a client.
  • An empty string indicates that no particular development mode is enabled for this site. This is the default value and should be used on any site that is not used for development.

Per this definition, setting a development mode is only relevant for sites where any kind of development is occurring. For example, it is not advised or relevant to use on a production siteProduction Site A production site is a live site online meant to be viewed by your visitors, as opposed to a site that is staged for development or testing..

What specifically does the development mode do?

There are currently only a few use-cases in WordPress core which are determined by the development mode, but this will likely increase in the future. Most usage today relates to theme.json caching.

It is also a great example for the kind of nuance that the development mode of a site affects:

  • On most sites, caching certain data from theme.json is reliable since that data would only be invalidated when the theme is updated.
  • However, if you are actively developing a theme on the site and modifying theme.json constantly, having to manually invalidate the cache all the time would be detrimental to the development workflow. Therefore, that specific caching functionality is bypassed if the development mode is set to โ€œthemeโ€.
  • On the flipside, if you are directly contributing to WordPress core (i.e. setting your development mode to โ€œcoreโ€), your site should behave as close to the actual behavior as possible, so even though you are in a development environment as well, having the theme.json data cache bypassed would not represent the actual behavior intended for a regular WordPress site.
  • That is why that specific caching functionality is only bypassed during theme development, but not during core development.

Difference between development mode, environment type, and debug mode

WordPress already contains two seemingly related concepts, which are the environment type (WP_ENVIRONMENT_TYPE constant) and debug mode (WP_DEBUG constant). Here is how they differ:

  • WP_DEBUG (boolean) toggles general debugging mode, which results in additional notices being displayed or logged.
  • WP_ENVIRONMENT_TYPE (string) defines whether the site is a local, development, staging, or production environment. This value can be used to set defaults for other configuration parameters or toggle certain features on the site.
  • WP_DEVELOPMENT_MODE (string) defines a specific scope of development that applies to the current site, which results in certain low-level WordPress behavior to change. This is different from WP_DEBUG which does not affect actual behavior. Additionally, WP_DEBUG typically applies to any development environment, while WP_DEVELOPMENT_MODE is more specific, as explained in the aforementioned example.

It is likely that you will only use the WP_DEVELOPMENT_MODE constant on a site where WP_DEBUG is enabled and WP_ENVIRONMENT_TYPE is either โ€œdevelopmentโ€ or โ€œlocalโ€, since it is not advised for development to occur directly against staging or production environments. That said, the constant is still decoupled, also because it defines the kind of development that is occurring more granularly than a simple on/off switch like WP_DEBUG.

Setting the development mode for a site

To set the development mode for a site, simply add a definition of the WP_DEVELOPMENT_MODE constant to your wp-config.php file. For example, if your site is a development environment for your plugin:

define( 'WP_DEVELOPMENT_MODE', 'plugin' );

Most likely, in this case you also want to make sure you have WP_DEBUG enabled and WP_ENVIRONMENT_TYPE set to โ€œdevelopmentโ€ or โ€œlocalโ€.

Checking the development mode for a site

A new function wp_is_development_mode( $mode ) is the recommended way to check whether a given development mode is enabled for the WordPress site. The function expects you to pass a $mode parameter that you would like to check for (e.g. โ€œcoreโ€, โ€œpluginโ€, or โ€œthemeโ€) and returns a boolean for whether said mode is enabled.

Per the aforementioned list of possible values, if a site has WP_DEVELOPMENT_MODE set to โ€œallโ€, the function will return true for any $mode passed.

Here is an example:

if ( wp_is_development_mode( 'theme' ) ) {
	/*
	 * This could contain some logic that only applies when developing a theme
	 * on the site.
	 */
}

Additionally to wp_is_development_mode( $mode ), another lower-level function wp_get_development_mode() has also been added in WordPress 6.3, which returns the value of the WP_DEVELOPMENT_MODE constant directly. However, accessing the constant value directly is discouraged. Due to special values such as โ€œallโ€ that can encompass multiple other development modes, it is advised to always use wp_is_development_mode( $mode ) instead.

If you are logged into the WP Adminadmin (and super admin) interface, you can access the current value of the WP_DEVELOPMENT_MODE constant under Tools > Site Health > Info, in the WordPress Constants section.

See #57487 for additional context on this change.

Props @peterwilsoncc for technical review, @stevenlinx for proofreading.

Update July 17, 2023: The function wp_in_development_mode() was renamed to wp_is_development_mode() after initial publication of this article (see [56249]). All references have been updated.

#6-3, #dev-notes, #dev-notes6-3

Layout updates in the editor for WordPress 6.3

Here are the 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. for layout-related changes in the editor.

Layout support stabilization and updates

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. support for layout has now graduated from experimental to stable. Everything works the same; the only difference is that when adding block support for layout inย block.json, its name is nowย layoutย instead ofย __experimentalLayout. Support for theย __experimentalLayoutย syntax will be maintained for a while, but it is recommended to upgrade any custom blocks using layout to the stableย layoutย syntax. (#51434)

Code example (inย block.json):

"supports": {
    "layout": true
}

Changes in CSSCSS Cascading Style Sheets. specificity for some layout types

The CSS output for theย marginย styles of children ofย constrainedย andย flow (default) layout containers has changed. The generic rules used to have a specificity of 0,1,0 for all blocks; they have now changed to 0,0,0 for all blocks with an extra 0,2,0 rule applied only to the first and last blocks in the container.

This fixes the issue of global margin styles for specific blocks being overridden by layout styles (seeย #43404).

Compound block and layout type classname applied to inner wrapper of layout blocks

As of WP 6.2,ย layout classnames are added to the block inner wrapper. For most blocks, this is the same as the outer wrapper, but some blocks (e.g. coreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress. Cover) have multiple inner containers. In 6.3, a new classname is added to the inner wrapper of all blocks with layout, comprised of block classname + layout classname, e.g.:ย .wp-block-cover-is-layout-constrained. This is the updated Cover block markup:

&lt;div class="wp-block-cover is-light">
    &lt;span aria-hidden="true" class="wp-block-cover__background has-tertiary-background-color has-background-dim-100 has-background-dim">&lt;/span>
    &lt;div class="wp-block-cover__inner-container is-layout-constrained wp-block-cover-is-layout-constrained">
        &lt;p class="has-text-align-center has-large-font-size">&lt;/p>
    &lt;/div>
&lt;/div>

This makes it possible for blocks with a complex markup structure to support custom spacing styles.

Layout definitions removed from coreย theme.json

The layout definitions object, which stores base styles for the layout block support, has been removed from the coreย theme.jsonย (settings.layout.definitions) and moved into the internal layout support files. Extending or overriding core layout definitions was never officially supported and including those definitions in a themeย theme.jsonย file resulted in bugs such asย #49914.

Create Block Theme 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. generatedย theme.jsonย files that included the layout definitions object before the 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. was fixed inย #50268, so theme authors are advised to remove any layout definitions that may have been inadvertently included in theirย theme.jsonย files in order to prevent buggy behavior.

New Grid layout type

A new grid layout type is available, based on CSS Grid, and defaulting to an auto-fill approach with configurable column width. It is also possible to set a fixed number of columns, by using the columnCount property in the layout object. (#49018)

To create a block with a grid layout, the following needs to be added in the supports object of the blockโ€™s block.json:

"layout": {
			"default": {
				"type": "grid"
			}
		}

Layout and block spacing support added to Post Template block

Previously, the Post Template block had custom layout styles that allowed for either a โ€œlistโ€ or a โ€œgridโ€ (implemented behind the scenes with CSS flex) layout, with controls living in its parent Query block.

For 6.3, layout and block spacing support have been added to Post Template, and its controls now live in the Post Template toolbar. There is still a choice of โ€œlistโ€ and โ€œgridโ€ styles, but โ€œgridโ€ is now implemented with the grid layout type. (#49050)

Spacer block gets orientation from the parent block layout

Spacer blocks inside aย flexย type layout block will now use the orientation of the parent layout. It is still possible to pass Spacer an orientation value from the parent block context, but Spacer blocks inside flex layouts will prioritize the flex orientation over the context one. (#49322)

Props for co-editing to @andrewserong and review to @bph and @leonnugraha.

#6-3, #dev-notes, #dev-notes6-3

WP_Query used internally in get_pages()

In WordPress 6.3, the function get_pages() has been updated to utilize WP_Query internally, resolving a 13-year-old ticketticket Created for both bug reports and feature development on the bug tracker. (#12821). This modification significantly reduces the complexity of the get_pages() function by offloading the burden of querying databases and handling the cache to WP_Query. The change builds upon the previous enhancementenhancement Enhancements are simple improvements to WordPress, such as the addition of a hook, a new feature, or an improvement to an existing feature. introduced in #22176, which introduced query caching to WP_Query.

As a result, this update eliminates redundant code and ensures that all filters running in WP_Query are now also applied during the call to get_pages(). Users who leverage filters like posts_pre_query or posts_results to customize the behavior of WP_Query, such as retrieving data from alternative sources like cache or another database (e.g., elastic search), will benefit from this change.

Additionally, based on feedback from the glotpress team, a new 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. named get_pages_query_args has been added. This filter enables developers to modify the parameters passed to WP_Query, maintaining compatibility with the original parameter arguments.

See #56586 and #55806 for additional context.

Props toย @flixos90 for peer review, toย @stevenlinx and @leonnugraha for review.

#6-3, #dev-notes, #dev-notes6-3