The WordPress coreCoreCore is the set of software required to run WordPress. The Core Development Team builds WordPress. development team builds WordPress! Follow this site for general updates, status reports, and the occasional code debate. There’s lots of ways to contribute:
Found a bugbugA 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.?Create a ticket in the bug tracker.
WordPress 7.1 continues to polish accessibilityAccessibilityAccessibility (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) across WordPress CoreCoreCore is the set of software required to run WordPress. The Core Development Team builds WordPress. and GutenbergGutenbergThe 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/, advancing the goals to meet accessibility standards. In this release, high-impact changes include the new accessible tooltips APIAPIAn 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 predictability for screen readers, and improved labeling in many places in the adminadmin(and super admin). The editor ships with new Tab and Playlist blocks and extensive improvements to editor navigation and interaction.
Core
Enhancements to WordPress core include 45 accessibility enhancements and bugbugA 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. Major changes include enhancements to focus states, improvements to screen reader support in post list tables, and the introduction of a tooltip mechanism for exposing accessible names in WordPress core.
Media
WordPress 7.1 delivers an enhanced media experience including refined labels for caption fields to provide clearer usage guidance (#43178). Navigation within theme and media modals was adjusted to prevent single-key arrow interactions from conflicting with screen reader patterns (#63760). Technical fixes address duplicate ID elements in figcaption elements when reusing images (#65315) and ensure accurate visible labeling for untitled items in the grid view (#65438). In the image editor, the width input label was corrected (#65685). Improvements to the Media grid include resolving unlabeled date filters (#65711), styling fixes for bulk editing toolbars (#65732), and ensuring focus indicators remain fully visible (#65755).
Classic Editor
The editing environment is landing with architectural improvements, such as support for invoker command attributes in KSES (#64576) and the autofocus attribute for dialog elements (#65491). Classic editor users will benefit from layout enhancements to the Publish box visibility controls (#65530) and status dropdown menus (#65532).
List Tables
List table structures were updated to identify the post title cell as the row headerHeaderThe 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. instead of the selection checkboxes (#32892, #65743). To assist blind users, subpages in page lists now include proper structural indicators (#64932), while untitled posts can display an excerptExcerptAn excerpt is the description of the blog post or page that will by default show on the blog archive page, in search results (SERPs), and on social media. With an SEO plugin, the excerpt may also be in that plugin’s metabox. of the content in post lists (#65022).
Labeling and Accessible Names
Work continues on semantic clarity, addressing missing plural forms for specific strings (#29299) and adding necessary visible text to responsive preview icons in the CustomizerCustomizerTool built into WordPress core that hooks into most modern themes. You can use it to preview and modify many of your site’s appearance settings. (#36447). Core now includes a standardized mechanism for accessible tooltips (#51006), which has been applied to metaboxMetaboxA post metabox is a draggable box shown on the post editing screen. Its purpose is to allow the user to select or enter information in addition to the main post content. This information should be related to the post in some way. order buttons (#50921) and the “Remember Me” login option (#55343).
Users
The user management flow was improved with better guidance during user deletion (#56914) and clearer identification of links on the login page (#65075). The language switcher now consistently employs visible labels and icons (#65464), and the “Add User” screen no longer forces initial focus onto the password field (#65630).
Administration
Administrative improvements focus on high contrast and consistency. Contrast in admin color schemes was boosted for sidebarSidebarA 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. compatibility with the blockBlockBlock 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 (#65382), and active states for buttons and tabs are now properly identified in Windows High Contrast Mode (#65153, #65419). UIUIUser interface inconsistencies during tagtagA 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.) management (#63372), Quick Draft error handling (#64952), and Settings API section titles (#65027) have been resolved. Further enhancements include toolbar visibility in the Site Editor (#65091), standardized focus indicators of at least 2 CSSCSSCascading Style Sheets. pixels (#65645), and labeling improvements for data export requests (#65246).
Focus states on the admin bar and the admin menu have been improved (#65765, #65726, #65445), enhancing the usability of the now-universal toolbar. Mouse cursor interaction inconsistencies when the admin menu is collapsed have been fixed (#65250). Route-based admin pages now all render appropriate feedback when JavaScriptJavaScriptJavaScript 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 rendering is not available or fails (#65690).
The theme browser now has consistent navigation behavior when navigating from the first theme (#65715), and the scrollbar is no longer partially hidden in the pluginPluginA 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. installer modal (#65334). When performing setup or installation, the language of the page is made available (#65454).
Front-end
On the front end, password-protected content receives styling and usability upgrades (#64569). The RSS widgetWidgetA 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. was updated to prevent accessibility issues when multiple instances are present (#47670), and the comment reply link no longer triggers unexpectedly on touch interactions (#46713).
Editor
The editor includes 43 accessibility enhancements and bug fixes covering screen reader, forced colors, and keyboard navigation improvements, as well as shipping two new front-end blocks for post content. The editor changes in 7.1 greatly improve consistency on a number of fundamental components that should lead to a better experience for all.
Editing Experience
Refinements to the editing interface include fixing keyboard activation for template action previews (#78641) and resolving focus loss issues when dismissing the pattern creation dialog (#78957). Localized aria-live regions were replaced with the more robust speak() function to improve auditory feedback (#79600). The DataForm panel layout now correctly exposes accessible names via tooltips on edit buttons (#77024), and tooltips now also display keyboard shortcuts for block movement (#76992).
Visual and interaction fixes address cursor instability in the color picker (#80205) and prevent layout shifts by relocating contrast warnings within the color popover (#79512). Advanced contrast checking now extends to viewport and pseudo-states (#80223), while note selections are now preserved across browser tab transitions (#75955).
Additional refinements include adding word-break support to screen reader classes (#75539) to prevent inconsistencies, and an error in spoken messages announced during block insertion was fixed (#79004).
Blocks
Block-level improvements focus on semantic accuracy and control. The Breadcrumbs block now hides decorative separators from assistive technologyAssistive technologyAssistive technology is an umbrella term that includes assistive, adaptive, and rehabilitative devices for people with disabilities and also includes the process used in selecting, locating, and using them. Assistive technology promotes greater independence by enabling people to perform tasks that they were formerly unable to accomplish, or had great difficulty accomplishing, by providing enhancements to, or changing methods of interacting with, the technology needed to accomplish such tasks.
https://en.wikipedia.org/wiki/Assistive_technology (#78524), while the icon browser provides full labels for better identification (#80256). The Image block introduces a dedicated toggle for marking media as decorative (#78064), and the Cover block gains attributes to restrict video providers, helping prevent inaccessible embeds (#80092).
In Accordion blocks, navigation shortcuts using arrows and the “home” and “end” keys were removed (#75891) due to conflicting behaviors, and a focus loss in settings was fixed in the Stretchy Text block (#75092).
Admin Screens
Updates to admin screens emphasize readability and standard compliance. Centered text is removed from Connectors to improve scanning (#78125), and Page component headers are promoted to h1 by default to align with core semantic structures (#77617). Focus issues in the Font Library (#78671) and labeling mismatches in the NavigableRegion (#75899) have been addressed.
Admin Components
The component library received numerous technical fixes. Focus traps broken by specific display properties were resolved (#77381), and invalidinvalidA 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. object-based labels in ValidatedRangeControl were corrected (#77042). Help text associations were improved for ComboboxControl (#76761) and ToggleGroupControl (#76740). RadioControl fieldsets now properly employ the radiogroup role (#76745).
For users in High Contrast mode, focus rings are now consistently rendered on Tab panels and CollapsibleCard headers (#77469, #77468).
Button states were also refined, addressing focusable defaults when disabled (#78526), loading indicator visibility in forced colors (#78820), and click feedback styling (#76833). Furthermore, label associations in ContentEditableControl were fixed (#80344), Dialog components now prioritize focusing content over the close button (#76910), and screen reader text for DataForm card toggles was standardized (#76039).
Visual RevisionsRevisionsThe 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.
The Visual Revisions experience received significant updates. Contrast for difference position marker stripes was increased (#78473), and title attributes were replaced with aria-describedby for better annotation support (#80440). The timeline now includes specific labels for autosaves (#79950). Navigation was improved by auto-focusing the revisions slider (#79691) when the editor is activated.
Non-color indicators were added using CSS outlines as secondary indicators for document changes (#78393), and proper pluralization for revision count labels (#78382) was added. The Post Summary sidebar now includes an aria-label for the revisions trigger (#78140) to provide better context for screen reader users.
New blocks
WordPress introduces new interactive elements, including a Playlist Block (#80203) and a Tabs Block (#80163). Both blocks have been tested for accessibility concerns, although feedback is always welcome.
Known Accessibility RegressionregressionA 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 WordPress 7.1, the default behavior of the media library is being changed from including a load more button to having infinite scroll, a known inaccessible pattern.
A feature has been added in the WP Accessibility plugin that inverts the logic, switching the default value to ‘false’ and altering the User Profile option to allow users to turn it on.
You can also try the Gutenberg Experiment to replace the media library. This feature is still in development, and has not had a full accessibility review. The infinite scroll in the updated media library will be governed by an in-modal toggle, and is not currently enabled.
There is also work continuing to try to add a similar toggle to the existing media library in #65775. That work is progressing, but the implementation did not reach consensus in time to land in WordPress 7.1
WordPress 7.1 changes when wp_new_comment_notify_postauthor() checks a comment’s approval status: the check now happens before the notify_post_authorfilterFilterFilters 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. is applied, rather than after. As a result, the filter receives an accurate default value, and its return value fully determines whether a notification is sent. See #64217.
Previous behavior
The filter received a default derived only from the comments_notify option (or the wp_notes_notify option for notes). The comment’s approval status was checked after the filter ran, which had two consequences:
The filter received a misleading default of true for unapproved comments whenever the option was enabled, even though no notification would be sent.
Returning true from the filter could not force a notification for an unapproved comment – the return value was silently discarded.
New behavior in 7.1
The approval status is now incorporated into the default value passed to the filter, and the filter’s return value is final:
The default is false for comments that are not approved, including those held in moderation, marked as spam, or trashed.
The default for approved comments continues to follow the comments_notify option, and the default for notes continues to follow the wp_notes_notify option regardless of approval status.
Returning true from the filter now sends the notification, even for an unapproved comment.
Two smaller changes ship alongside this:
The default passed to the filter is now always a strict boolean. Previously the raw option value (for example the string '1') could be passed through, so callbacks that strictly compare the incoming $maybe_notify value should compare against true/false.
When the passed comment ID does not resolve to a valid comment, the function now returns false immediately without applying the filter. Previously, the filter still fired in this case.
Who is affected
Sites or plugins using a callback such as __return_true on notify_post_author to force notifications will now also receive emails for comments held in moderation, marked as spam, or trashed. If that is not desired, the callback should check the comment’s approval status:
add_filter(
'notify_post_author',
function ( $maybe_notify, $comment_id ) {
$comment = get_comment( $comment_id );
// Only force notifications for approved comments.
if ( $comment && '1' === $comment->comment_approved ) {
return true;
}
return $maybe_notify;
},
10,
2
);
Callbacks that only suppress notifications (returning false) are unaffected, as are sites that do not filter notify_post_author at all.
WordPress 7.1 extends wp_get_abilities() with a standard way to filterFilterFilters 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. registered abilities.
The function now accepts an optional $args array that can filter abilities by category, namespace, or metadata. It also supports callbacks for custom per-item filtering and final result processing.
Two new WordPress filters allow plugins to influence ability retrieval across the site:
wp_get_abilities_item_include
wp_get_abilities_result
The REST APIREST APIThe 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/’s abilities list controller now uses wp_get_abilities() instead of implementing categoryCategoryThe 'category' taxonomy lets you group posts / content together that share a common bond. Categories are pre-defined and broad ranging. filtering separately. It also supports filtering abilities by namespace.
Why was this change needed?
Before WordPress 7.1, there were two ways to retrieve abilities:
// Retrieve every registered ability.
$abilities = wp_get_abilities();
// Retrieve one named ability.
$ability = wp_get_ability( 'my-plugin/export-users' );
wp_get_abilities() always returned the complete registry. A caller needing a subset had to retrieve every ability and filter the result manually:
Several consumers developed their own versions of this pattern for category, namespace, and metadata checks. The REST abilities controller also performed its own category filtering after retrieving the complete registry.
This led to:
Duplicated filtering code.
Inconsistent filtering semantics between consumers.
Different behaviour between the PHPPHPThe web scripting language in which WordPress is primarily architected. WordPress requires PHP 7.4 or higher and REST APIs.
No standard extension points for ability selection.
Additional filtering passes over the registry.
WordPress 7.1 moves this work into wp_get_abilities(), providing one shared filtering pipeline for CoreCoreCore is the set of software required to run WordPress. The Core Development Team builds WordPress. and plugins.
An ability such as my-plugin/export-users matches, while another-plugin/export-users does not.
Namespace matching includes the namespace delimiter. Passing my-plugin does not accidentally match an ability registered under a similarly named my-plugin-extra namespace.
Filtering by metadata
The meta argument selects abilities whose metadata contains the specified key-value pairs:
Metadata comparisons are strict. The value true does not match 1, and false does not match 0.
The metadata filter checks that every requested condition exists and matches. An ability may contain additional metadata that was not included in the query.
Combining declarative filters
The category, namespace, and meta arguments can be combined:
The result callback runs after all per-item matching has completed. It is suitable for:
Sorting.
Slicing or pagination.
Reordering.
Other final result transformations.
Like item_include_callback, result_callback applies only to the current function call.
Registered abilities are normally returned in an associative array keyed by ability name. When sorting or slicing the result, preserve those keys when downstream code depends on them.
New global filters
WordPress 7.1 also introduces two filters for plugins that need to affect ability retrieval beyond a single call site.
wp_get_abilities_item_include
The wp_get_abilities_item_include filter runs for every ability that passed the declarative conditions and the caller’s item_include_callback:
$include: Whether the ability should currently be included.
$ability: The ability being evaluated.
$args: The complete arguments passed to wp_get_abilities().
Because declarative mismatches are removed before this filter runs, the filter cannot add an ability that failed category, namespace, or meta matching. It can influence the inclusion of abilities that have reached this stage, as well as their global exclusion.
wp_get_abilities_result
The wp_get_abilities_result filter receives the complete result after the caller’s result_callback:
add_filter(
'wp_get_abilities_result',
function ( array $abilities, array $args ): array {
// Apply site-wide result processing when appropriate.
return $abilities;
},
10,
2
);
The filter receives:
$abilities: The final matched array.
$args: The complete arguments passed to wp_get_abilities().
It can be used for site-wide sorting, reordering, or other final processing.
These are global filters. Plugins should use them only when the behaviour is intended to affect every relevant caller. For logic that belongs to one operation, prefer item_include_callback or result_callback.
Filtering order
The complete pipeline runs in the following order:
Match the category argument.
Match the namespace argument.
Match the meta argument.
Run item_include_callback.
Apply wp_get_abilities_item_include.
Add included abilities to the matched result.
Run result_callback on the complete result.
Apply wp_get_abilities_result.
The declarative checks, item callback, and item filter run within a single pass over the registry.
This avoids the separate array_filter() passes that consumers previously had to implement.
Discovery over REST
The REST collection endpoint delegates to wp_get_abilities() and exposes the declarative filters as query parameters:
GET /wp-json/wp-abilities/v1/abilities?namespace=my-plugin
GET /wp-json/wp-abilities/v1/abilities?category=my-plugin-content
GET /wp-json/wp-abilities/v1/abilities?meta[annotations][readonly]=true
Parameters can be combined and use the same AND logic.
?category=data-export&namespace=my-plugin
Every collection request also forces meta.show_in_rest = true internally. Supplying another metadata query can’t reveal an ability that is hidden from REST. The endpoint still requires an authenticated WordPress user, and executing a listed ability still requires its permission callback to pass.
Custom metadata needs a REST parameter schema if its query-string values should be coerced before strict comparison. Without one, 'true' will never match boolean true. The rest_abilities_collection_params filter extends the collection argument schema:
After that declaration, the REST API casts "true" to a boolean true before the value reaches the metadata-matching logic.
GET /wp-json/wp-abilities/v1/abilities?meta[my_plugin][enabled]=true
Built-in annotation types
The known readonly, destructive, and idempotent annotation values are coerced from query strings to boolean values before strict matching. Core declares the schema for these standard ability annotations.
Each accepts a boolean or null, so REST can correctly cast their query values without a pluginPluginA 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. extending the schema:
?meta[annotations][readonly]=true
Use rest_abilities_collection_params filter when making additional metadata fields queryable, especially boolean, integer, number, array, or object values that cannot be matched correctly as untyped query strings.
Backward compatibility
The $args parameter is optional:
$abilities = wp_get_abilities();
Existing calls remain valid, and the function still returns an array of WP_Ability instances keyed by ability name.
Code that manually filters the result can continue to work:
However, plugins should migrate common category, namespace, and metadata checks to the new arguments. Doing so reduces duplicated code and allows Core and other integrations to use consistent matching behaviour.
One behavioural detail deserves particular attention: the two new global filters run even when wp_get_abilities() is called without arguments.
As a result, the following call now means “retrieve abilities through the standard filtering pipeline”:
$abilities = wp_get_abilities();
It does not necessarily mean “retrieve raw registry contents,” because another plugin can alter the result through wp_get_abilities_item_include and wp_get_abilities_result.
Retrieving the raw registry
Code that specifically needs the complete, unfiltered registry can use WP_Abilities_Registry::get_all_registered():
Most application and integration code should continue using wp_get_abilities(). Direct registry access is appropriate only when raw registered state is explicitly required, such as low-level debugging or registry inspection.
Filtering does not replace authorisation
Filtering controls which abilities are returned during discovery. It does not determine whether the current user may execute an ability.
An ability’s permission_callback remains responsible for authorisation:
Developers should not assume that an ability returned by wp_get_abilities() is executable by the current user.
Similarly, excluding an ability from a filtered result is not a security boundary. Any sensitive operation must enforce its permissions when the ability is executed.
Use wp_get_abilities_item_include or wp_get_abilities_result only for behaviour intended to affect ability retrieval across callers.
Use WP_Abilities_Registry::get_all_registered() only when code explicitly requires raw, unfiltered registry data.
Together, these changes make wp_get_abilities() the shared discovery and filtering primitive for the Abilities APIAPIAn 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., replacing duplicated filtering implementations with a consistent, extensibleExtensibleThis is the ability to add additional functionality to the code. Plugins extend the WordPress core software. pipeline.
These changes were introduced in changeset [62420] for TracTracAn open source project by Edgewall Software that serves as a bug tracker and project management tool for WordPress.ticketticketCreated for both bug reports and feature development on the bug tracker.#64990.
Props to @benjamin_zekavica for peer review, and @gziolo for review, technical guidance, and suggested improvements.
WordPress 7.1 introduces responsive style states for blocks. Styles can now be defined for Tablet and Mobile viewports both through Global Styles for each blockBlockBlock 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 and on individual block instances. They can be applied to all block types (and their block style variations) that use core block supports such as typography, color, background, border, dimensions, spacing, and layout.
The default style remains the base style and applies at every viewport. Tablet and Mobile styles override that base within their respective breakpoint ranges.
It is now also possible to define custom values for the Tablet and Mobile viewports, using px, em or rem units.
Defining responsive block styles in`theme.jsonJSONJSON, 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.`
Responsive styles for an individual block are stored in the block’s existing style attribute, using the same @mobile and @tablet keys as Global Styles:
<!-- wp:paragraph {"style":{"@mobile":{"typography":{"fontSize":"1rem"}}}} -->
<p>Text with a responsive font size.</p>
<!-- /wp:paragraph -->
On the frontend, WordPress generates media-query-scoped CSSCSSCascading Style Sheets. for the responsive values and adds a stable, generated class to the rendered block. Non-layout per-instance state declarations are marked `!important` so they can override the block’s default inline styles. Responsive layout values and `blockGap` are processed by the existing layout support and scoped with the block’s generated container class.
Configurable breakpoints
WordPress provides two responsive style breakpoints by default:
State
Media query
@mobile
@media (width <= 480px)
@tablet
@media (480px < width <= 782px)
There is no @desktop style key. The block’s default style is the desktop/base style and continues to apply at smaller sizes for any property that is not overridden.
Breakpoint values must be non-negative numeric lengths using px, em, or rem. CSS functions, percentages, unitless values, and other units are ignored.
If only one valid breakpoint is configured, it keeps its viewport name and uses a single maximum-width query. If neither value is valid, the defaults are used. When both are valid but the Tablet value is smaller than or equal to the Mobile value, only the Mobile breakpoint is used.
The configured viewport widths are used by responsive block styles and block visibility, and are previewable via the editor’s device preview.
settings.viewport is a top-level setting. It cannot be configured separately for individual block types.
Opting out of responsive editing
Sites that need to prevent users from making viewport-based styling changes can turn off responsive style editing with the responsiveEditingEnabled editor setting, which defaults to true:
When it is false, both entry points for choosing a viewport are removed: the “Responsive styles” toggle in the Editor’s View menu, and the “Viewport” group in the “States” dropdown in Global Styles. Device previews still work, and pseudo states such as Hover remain available.
The setting governs the editing interface only. Responsive styles already saved in theme.json, in Global Styles, or in a block’s style attribute are left untouched, and the media-query CSS described above is still generated for them, so existing content renders exactly as before both in the Editor and on the front end.
In WordPress 7.1, users have more power over styling the pseudo states of blocks. Currently limited to the Button and Navigation Link blocks, users are able to apply styles to ‘hover’, ‘focus’, ‘focus-visible’ and ‘active’ states.
Pseudo states support definitions in theme.jsonJSONJSON, 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. for themers, and blockBlockBlock 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. styling in global styles and on block instances for users.
Defining pseudo states for blocks in theme.json
Define pseudo states within the block object using the properties “:hover”, “:focus”, “:focus-visible”, and “:active”. Pseudo state names are always prefixed with a :.
The structure for block instance attributes is very similar to the theme.json definition with :hover properties used inside the style attribute:
<!-- wp:button {"backgroundColor":"accent-3","style":{":hover":{"color":{"background":"var:preset|color|accent-2"}}}} -->
<div class="wp-block-button"><a class="wp-block-button__link has-accent-3-background-color has-background wp-element-button">Button with pseudo state background</a></div>
<!-- /wp:button -->
Custom style states
Custom states are an early feature limited to theme.json definition only (no user facing features are exposed) and only the navigation link block. The navigation block uses this to allow styling of the current menu item – that is the menu item whose link matches that of the currently viewed page.
Defining custom states for the navigation link block in theme.json
Styles for the current menu item can be defined using the -current property. Custom states always use the -prefix.
As shown above, pseudo states can be nested within custom states. Custom states can also be nested within responsive states.
Style generation
The styles defined for custom states generate css that targets a class name selector. For the navigation link block, that would expand to something like .wp-block-navigation-link .current-menu-item { // styles ... }.
The styles css class name that’s generated in the selector would be declared on supported blocks via a block’s block.json selectors property:
When it is false, both the state dropdown in the block inspector’s block card, and the pseudo state options in the “States” dropdown in Global Styles under Styles > Blocks are hidden.
The states affected are the pseudo states, Hover, Focus, Focus-visible and Active, which currently apply to the Button and Navigation Link blocks. In the future this will extend to other states present in the dropdown, like the ability for users to set styles for the Navigation Link’s ‘Current’ state.
This setting does not affect viewport states. Those are controlled separately by responsiveEditingEnabled. Set both to false to remove the state editing interface entirely.
The setting governs the editing interface only. State styles already saved in theme.json, in Global Styles, or in a block’s style attribute are left untouched and are still applied, so existing content renders exactly as before both in the Editor and on the front end.
WordPress 7.1 introduces a new public metadata flag for abilities. The flag provides a single, high-level way to indicate that an ability is intended to be available to external clients such as the REST APIREST APIThe 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/, MCP adapters, and AI agents.
Table of contents:
Previously, ability authors had to express that intent separately for every exposure channel. For example, an ability exposed through the REST API needed to set show_in_rest directly:
'meta' => array(
'show_in_rest' => true,
),
As the Abilities APIAPIAn 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. gains more client integrations, repeating the same intent through several channel-specific flags becomes difficult to maintain. The new public flag establishes a common default while preserving granular control for each channel.
Registering a public ability
An ability intended for client exposure can now set meta.public when it is registered:
For the REST API, setting public to true makes show_in_rest default to true. The ability can therefore be discovered and invoked through the REST abilities endpoints, subject to its permission callback.
How exposure defaults are resolved
Channel-specific settings take precedence over the general public setting. The effective REST exposure value is resolved as follows:
The resolution uses null-coalescing semantics so an explicit false is preserved. It is not treated as a missing value.
A null value is treated as unset and falls back to the next value in the chain.
In practical terms:
Registration metadata
Effective public
Effective show_in_rest
No exposure metadata
false
false
public => true
true
true
public => false
false
false
show_in_rest => true
false
true
public => true, show_in_rest => false
true
false
public => false, show_in_rest => true
false
true
This precedence allows for a broad exposure default while opting in or out of individual channels.
What problem does this change fix?
Ability metadata already contained channel-specific exposure settings such as show_in_rest. As support for MCP, AI agents, and other clients develops, requiring ability authors to configure each channel independently would duplicate the same policy across multiple properties:
This also makes it difficult for a newly introduced channel to determine whether an existing ability was intended for external use.
The public flag fixes this by recording the ability author’s general exposure intent in one stable location:
'meta' => array(
'public' => true,
),
Individual integrations can use that value as their default while retaining a more specific channel-level override.
REST is the first built-in consumer of this behaviour. Other integrations can adopt the same default without adding channel-specific logic to WordPress CoreCoreCore is the set of software required to run WordPress. The Core Development Team builds WordPress..
Using public in other integrations
The resolved public value remains available in the ability’s metadata. Client integrations can inspect this value when determining whether an ability should be exposed.
The WordPress MCP Adapter will respect the unified public flag starting with its next release. WP-CLIWP-CLIWP-CLI is the Command Line Interface for WordPress, used to do administrative and development tasks in a programmatic way. The project page is http://wp-cli.org/https://make.wordpress.org/cli/ does not apply this exposure check because its ability-listing functionality returns all registered abilities.
Other integrations should generally resolve exposure when abilities are selected for that integration:
Integrations that need to derive their own channel-specific metadata during registration can use the existing wp_register_ability_argsfilterFilterFilters 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.:
An integration should follow the same precedence rule as REST:
Use an explicit channel-specific value when present.
Otherwise, inherit public.
Otherwise, use the channel’s built-in default.
Integrations should not overwrite an explicit channel opt-out merely because public is true.
Exposure is not authorisation
The public flag controls discoverability and client exposure. It does not make an ability executable without authorisation, and it does not replace the ability’s permission_callback.
Every ability must continue to implement an appropriate permission check:
An ability with public => true may be visible through a client while still requiring authentication and specific WordPress capabilitiescapabilityA capability is permission to perform one or more types of task. Checking if a user has a capability is performed by the current_user_can function. Each user of a WordPress site might have some permissions but not others, depending on their role. For example, users who have the Author role usually have permission to edit their own posts (the “edit_posts” capability), but not permission to edit other users’ posts (the “edit_others_posts” capability). to execute.
Developers should not treat public, show_in_rest, or any other exposure flag as a security boundary. Authorisation must be enforced by the ability itself.
Changes to resolved metadata
In WordPress 7.1, the resolved metadata for every ability includes a boolean public property. It defaults to false when it is not supplied during registration.
For example:
$ability = wp_get_ability( 'my-plugin/export-users' );
$meta = $ability->get_meta();
$is_public = $meta['public']; // Always a boolean in WordPress 7.1.
This gives consumers a consistent value to inspect without having to test whether the key exists.
The new property is also declared in the REST API’s ability metadata schema, allowing REST clients to inspect the general exposure intent.
Backward compatibility
The change does not alter the signature or return value of wp_register_ability() or other Abilities API functions.
Existing channel-specific registrations continue to work:
'meta' => array(
'show_in_rest' => true,
),
An explicit show_in_rest value remains authoritative. Plugins are not required to replace it with public.
Abilities that previously supplied neither public nor show_in_rest remain unavailable through REST. Their resolved metadata now contains public => false, but their exposure behaviour is unchanged.
Developers should consider migrating from show_in_rest => true to public => true when an ability is generally intended for use by multiple client types. Continue using show_in_rest directly when exposure is intentionally limited to REST or when overriding the general policy.
Existing Core abilities
The following abilities included with WordPress now use meta.public instead of setting meta.show_in_rest directly:
core/get-site-info
core/get-user-info
core/get-environment-info
Their REST availability has not changed. Because public => true supplies the default for show_in_rest, these abilities remain exposed through REST as before.
Using the high-level flag also allows other client integrations to recognise that these Core abilities are intended for external use.
When to use each flag
Use public when the ability is generally intended for consumption by external clients.
Use a channel-specific flag when:
The ability should be exposed through only that channel.
The ability needs to opt out of a channel despite being generally public.
A client integration provides behaviour that cannot be represented by the general flag.
The change was introduced in changeset [62729], with Core abilities migrated in changeset [62737]. See TracTracAn open source project by Edgewall Software that serves as a bug tracker and project management tool for WordPress.ticketticketCreated for both bug reports and feature development on the bug tracker.#65568 for the complete discussion.
In this post, you will find dev notesdev noteEach 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 smaller changes to the editor in WordPress 7.1.
Table of contents
Blocks
Navigation blockBlockBlock 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. stops propagating font-size to child items
The Navigation block will no longer forcefully propagate its font-size configurations down to the markup of individual child blocks (core/navigation-link, core/navigation-submenu, core/page-list, and core/home-link).
Currently, font size is propagated to every navigation item. Because relative units multiply against their parent container’s computed size, this caused extreme compounding (e.g., 1.5em → 2.25em → 3.375em), severely breaking the layout of deeply nested dropdown menus.
By removing the explicit application on child items, the Navigation block now safely relies on standard CSSCSSCascading Style Sheets. text inheritance. This fixes an issue where the editor canvas and the frontend displayed mismatched typography sizes when child links had their own explicit font sizes overridden by parent propagation.
As for backwards compatibility, theme developers can restore the legacy font-size propagation behavior by applying the following filterFilterFilters 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 their functions.php:
Stabilize cloneSanitizedBlock and sanitizeBlockAttributes
The @wordpress/blocks package and wp.blocks global have two functions, __experimentalCloneSanitizedBlock and __experimentalSanitizeBlockAttributes.
These functions will continue to work in WordPress 7.1, but they will now log deprecation messages to the console. The functions have been replaced with stable versions that do not have the __experimental prefix.
Developers should replace any usage of __experimentalCloneSanitizedBlock with cloneSanitizedBlock and __experimentalSanitizeBlockAttributes with sanitizeBlockAttributes.
@wordpress/blocks replaced showdown with marked for parsing pasted Markdown. The parser is internal to pasteHandler() and was never exported, so no code changes are needed.
Output should be equivalent, but edge cases now follow the CommonMark and GFM specs. Consumers calling pasteHandler() directly should re-test representative Markdown input against the blocks it produces.
Template parts can opt out of content-only editing
WordPress 7.1 introduces a disableContentOnlyForTemplateParts editor setting, letting themes and plugins restore standard block editing for Template Parts instead of the content-only editing used by default.
Set it via the block_editor_settings_all filter in PHPPHPThe web scripting language in which WordPress is primarily architected. WordPress requires PHP 7.4 or higher:
Or at runtime from JavaScriptJavaScriptJavaScript 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:
When the editor is in template-locked rendering mode, content-only editing for Template Parts is always disabled regardless of this setting.
There is no impact on backward compatibility: leaving the setting unset preserves the existing default behavior.
For a session-only toggle while editing, the command palette also offers an “Enable/Disable content-only editing for patterns and template parts” command.
Block-level preset classes now match root-level specificity
WordPress 7.1 lowers the CSS specificity of the preset utility classes (.has-*-color, -background-color, -border-color, -gradient-background, -font-size, -font-family) generated for block-level presets, so they match the specificity of top-level (root) presets.
Presets defined at the block level, that is, via theme.jsonsettings.blocks.<block> or the wp_theme_json_data_* filters, used to prepend the block selector to the preset class, raising its specificity above top-level presets.
The block selector is now wrapped in :where(), which contributes no specificity.
Scoping is unchanged. The rule still only matches the class on/within that block. Top-level presets are unchanged.
The reason for the change is that block-level presets out-ranking top-level ones was inconsistent and broke the responsive style states also landing in 7.1. Preset classes and responsive state styles both use !important, so specificity picked the winner. For example, a block-level palette colour set for Desktop overrode one set for Mobile. At equal specificity the responsive rule now wins on source order, as intended.
Affected are themes and plugins that register block-level presets and depend on their former, higher specificity. For example custom CSS written to slot between a top-level and a block-level preset. Such rules now tie block-level presets at 0-1-0.
The risk of regressionregressionA 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. is relatively contained because:
presets flow through CSS variables, so only collision tie-breaks change, not rendered values.
only !important author CSS ever competed with presets, and the drop is a single component in each case: 0-1-1 to 0-1-0 for element-based block selectors, 0-2-0 to 0-1-0 for class-based ones.
:where() is already used throughout GutenbergGutenbergThe 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/ to manage specificity.
Realistic collisions are dominated by the responsive-states bugbugA 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. this fixes. Responsive states are new to 7.1.
CoreCoreCore is the set of software required to run WordPress. The Core Development Team builds WordPress. Data
Non-paginated entities now return all records
Several REST APIREST APIThe 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/ endpoints ignore the page and per_page collection parameters and always return the entire collection. getEntityRecords() applied client-side pagination to every entity, slicing responses to the default per_page of 10 and ignoring remaining records. That was a bug.
The unintended behavior has been corrected: slicing now only happens for entities that declare supportsPagination: true, and everything else returns the full collection.
The common per_page: -1 workaround is no longer necessary, though passing it remains harmless. If you were getting a short list back from one of these entities, you’ll now get all of them, so take a look anywhere you render or loopLoopThe Loop is PHP code used by WordPress to display posts. Using The Loop, WordPress processes each post to be displayed on the current page, and formats it according to how it matches specified criteria within The Loop tags. Any HTML or PHP code in the Loop will be processed on each post. https://codex.wordpress.org/The_Loop over the results without setting your own limit. Custom entities backed by a non-paginated REST route should declare supportsPagination: false.
Starting in WordPress 7.1, the @wordpress/nux package becomes a no-op compatibility package.
The package has been deprecated since WordPress 5.4. It remains available so existing imports and script dependencies do not break, but it no longer displays tips or guides.
If you still rely on NUX for onboarding, migrate to the Guide component from @wordpress/components instead.
@wordpress/reusable-blocks: Public APIs now log deprecation warnings
The @wordpress/reusable-blocks package components and data APIs will log deprecation warnings starting from WordPress 7.1.
The package only exposed experimental APIs, and it hasn’t been used by the core since 2023. If your code needs to fetch or update Synced Patterns (formerly known as Reusable Blocks) on the client side, use the standard core entity methods.
WordPress 7.1 comes with two new functions for rendering tool tips and informational help in coreCoreCore is the set of software required to run WordPress. The Core Development Team builds WordPress.. Similar tool tips already exist in the editor, but were not available in the rest of the administration. This change brings improved accessibilityAccessibilityAccessibility (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) for icon-only controls and situations where further explanation of a user interface element is needed.
Inf #51006, two new functions were added: wp_get_tooltip() and wp_get_toggletip().
The first function, wp_get_tooltip(), provides name visibility for buttons or links are otherwise only represented as icons. The second, wp_get_toggletip(), adds a button that can be triggered to view extended information about related controls.
In 7.1, each function has one relevant implementation. wp_get_tooltip() has been implemented on post metaMetaMeta 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. box controls (move up, move down, and show/hide) to make those accessible names visible. wp_get_toggletip() has been added on the main login screen to provide an extended description of what the “Remember Me” checkbox does.
Enqueuing Required scripts and styles
The required CSSCSSCascading Style Sheets. for tooltips is loaded globally, but the JavaScriptJavaScriptJavaScript 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 is only loaded by default where post meta boxes are used and in the login screen.
You can enqueue required CSS on the front-end using:
wp_enqueue_style( 'wp-tooltip' );
You can enqueue required JavaScript as needed using:
wp_enqueue_script( 'wp-tooltip' );
Accessibility Notes
Both of these functions exist to provide support for gaps in accessibility support. It is always preferable for interface controls to have visible, persistent text labels, and it is also preferable to user interfaces to be structured so that additional help information is not required or is provided as visible descriptive text associated with the relevant input field.
However, we understand that space can be at a premium in complex web interfaces, and it is not always feasible to provide text labels for all controls. It is also a common case that explanatory text does not directly relate to one specific input, so that the aria-describedby solution is not practical. Using these functions can help make sure that the information provided for users is as accessible as possible within an interface that is imposing other limitations.
Tooltips
The function for adding tooltips is wp_get_tooltip(), and is only intended to provide visibility for controls that do not have a visible accessible name. For accessibility, it is still always the more accessible choice for a control to have persistently visible text.
Parameters for wp_get_tooltip()
string $content Plain-text tool tip content.
array $args An array of optional arguments for this tooltip.
string $id A unique ID for the popover element containing the tooltip. Default is a generated unique ID.
string $button Existing button or a markup. Used instead of a generated button.
string $label Unused for tool tips, but documented as part of the helper function.
string $close_label Unused for tool tips, but documented as part of the helper function.
string $icon A dashicons icon class for the toggle button. Default is dashicons-editor-help.
string $class Additional classes.
No additional arguments are required for wp_get_tooltip(); it will render a button with a tooltip control when only passed the $content argument. The $button parameter is available to make it easier to pass existing controls into the rendering button, and will be processed using the WP_HTML_Tag_Processor to add required attributes.
Parameters for wp_get_toggletip()
The function for adding information help text is intended for exposing additional help information.
string $content Plain-text tool tip content.
array $args An array of arguments for this tooltip.
string $id A unique ID for the popover element containing the tooltip. Default is a generated unique ID.
string $button Existing button or a markup. Used instead of a generated button.
string $label Accessible label for the toggle button. Default ‘Help’, matching the default icon. Ignored for tooltips.
string $close_label Accessible label for the close button. Default ‘Close’.
string $icon A dashicons icon class for the toggle button. Default is dashicons-editor-help.
string $class Additional classes.
Example Usages
Generate a button with a tooltip using a menu icon.
Note: All generic markup uses span elements, to ensure that the control can be validly inserted inside any element. Using div or other sectioning elements would disallow usage within a paragraph.
Generate a button with a toggle tip.
wp_get_toggletip(
__( 'Selecting "Remember Me" reduces the number of times you’ll be asked to log in using this device. To keep your account secure, use this option only on your personal devices.', 'my-text-domain' ),
array(
'id' => 'rememberme-help-toggletip',
'label' => 'Learn More',
'icon' => 'dashicons-welcome-learn-more',
)
);
Output
<span class="wp-tooltip wp-is-toggletip">
<button aria-haspopup="dialog" class="wp-tooltip__toggle" popovertarget="rememberme-help-toggletip" type="button" aria-label="Learn More">
<span class="dashicons dashicons-welcome-learn-more" aria-hidden="true"></span>
</button>
<span popover="auto" id="rememberme-help-toggletip" class="wp-tooltip__bubble" role="dialog" aria-label="Learn More" tabindex="-1" autofocus="">
<span id="rememberme-help-toggletip-text" class="wp-tooltip__text">Selecting "Remember Me" reduces the number of times you’ll be asked to log in using this device. To keep your account secure, use this option only on your personal devices.</span>
<button type="button" class="wp-tooltip__close" popovertarget="rememberme-help-toggletip" popovertargetaction="hide" aria-label="Close">
<span class="dashicons dashicons-no-alt" aria-hidden="true"></span>
</button>
</span>
</span>
The column used as the primary list table th with scope="row" was moved from the first column, containing the selection checkbox, to the second column, containing the post title and row actions in #32892.
This change significantly improves accessibilityAccessibilityAccessibility (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) for post list tables by ensuring that the naming used for screen readers to identify the current row refers consistently to the name of the relevant post, rather than referring to a selection checkbox that may not be present if the post is not currently available for editing.
This is expected to have an impact on extenders who assign custom styles or use JavaScriptJavaScriptJavaScript 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 to register events using the th.check-column selector or similar selectors that expect a checkbox inside the th in a posts row.
This is also potentially going to impact extenders who target row actions or post titles with the expectation they are inside a td.
Additionally, the CSSCSSCascading Style Sheets. for collapsed table cells in the responsive view port has been updated to use flex layout.
What you may need to change
CSS and JSJSJavaScript, a web scripting language typically executed in the browser. Often used for advanced user interfaces and behaviors. selectors targeting check columns should look for selectors targeting th.check-column or th input[type="checkbox"].
CSS and JS selectors targeting titles or row actions should look for selectors targeting td.title, td.column-title, td.page-title, td.column-primary, td .row-title, td .post-state, td .row-actions, or other similar selection patterns.
Retaining both td and th selectors will support retaining compatibility with versions of WordPress prior to 7.1.
For several releases, WordPress has been moving its editors into an iframeiframeiFrame 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., starting with the template editor back in 5.8. In WordPress 7.1, the post editor takes the final step: it is now always iframed.
Every editor except the post editor — the site editor, the template editor, and all blockBlockBlock 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. template, and device previews — has been iframed unconditionally for some time. The post editor was the exception, and until now, whether it was iframed depended on the environment: whether the GutenbergGutenbergThe 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/pluginPluginA 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. was active and the blocks in use.
In WordPress 7.0, the decision was based on the block APIAPIAn 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. versions of the blocks actually inserted in the post. If every inserted block was API version 3 or higher, the post editor was iframed; if any lower-version block was present, the iframe was dropped to preserve compatibility.
The Gutenberg plugin has been ahead of coreCoreCore is the set of software required to run WordPress. The Core Development Team builds WordPress. here: since Gutenberg 22.6, when the plugin is active the post editor is forced to be iframed regardless of the theme type or the block API versions in use, so that compatibility issues surface early and can be reported before the change reaches core.
This conditional behavior kept older blocks working, but it also meant the post editor could switch between iframed and non-iframed modes depending on a post’s content.
What’s changing in WordPress 7.1
Starting in WordPress 7.1, the post editor is always iframed, regardless of the theme type, the block API versions of the registered blocks, or the block API versions of the blocks in the content.
Starting in WordPress 7.1, the post editor is always iframed, regardless of the theme type, the block API versions of the registered blocks, or the block API versions of the blocks in the content. The site editor, template editor, and device previews have been iframed for a long time, so much of this ground is already well tested. Even so, please test that your custom blocks — and any plugins that extend blocks — work correctly in the fully iframed post editor. See WordPress/gutenberg#74042 for more details.
The site editor, template editor, and device previews have been iframed for a long time, so much of this ground is already well tested. Even so, please test that your custom blocks — and any plugins that extend blocks — work correctly in the fully iframed post editor.
Most blocks already work in the iframed editor without any changes. The issues that do come up almost always trace back to the same root cause: the iframe has its own document and window, separate from the adminadmin(and super admin) page where editor scripts run. Code that reaches for the global document or window to touch the editor canvas will be looking at the wrong document.
The usual fixes are:
Get the canvas document from an element inside it, via ownerDocument and its defaultView, rather than the global document/window.
Use useRefEffect to attach and clean up event listeners on canvas elements.