Skip toolbar
WordPress.org

Make WordPress

Teams

  • Core

    The coreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress. team makes WordPress. Whether you’re a seasoned PHPPHP PHP (recursive acronym for PHP: Hypertext Preprocessor) is a widely-used open source general-purpose scripting language that is especially suited for web development and can be embedded into HTML. https://www.php.net/manual/en/index.php, HTMLHTML HTML is an acronym for Hyper Text Markup Language. It is a markup language that is used in the development of web pages and websites., JavaScriptJavaScript JavaScript or JS is an object-oriented computer programming language commonly used to create interactive effects within web browsers. WordPress makes extensive use of JS for a better user experience. While PHP is executed on the server, JS executes within a user’s browser. https://www.javascript.com or CSSCSS CSS is an acronym for cascading style sheets. This is what controls the design or look and feel of a site. developer or are just learning to code, we’d love to have you on board. You can write code, fix bugs, debate decisions, and help with development.

  • Design

    The design group is focused on the designing and developing the user interface. It’s a home for designers and UXers alike. There are regular discussions about mockups, design, and user testing.

  • Mobile

    The mobile team builds the iOSiOS The operating system used on iPhones and iPads. and Android apps. Lend them your Kotlin, Swift, or ReactReact React is a JavaScript library that makes it easy to reason about, construct, and maintain stateless and stateful user interfaces. https://reactjs.org Native skills. The team also needs designers, UXUX UX is an acronym for User Experience – the way the user uses the UI. Think ‘what they are doing’ and less about how they do it. experts, and testers to give users a smooth experience on every device.

  • Accessibility

    The a11yAccessibility 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) group provides 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) expertise across the project. They make sure that WordPress coreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress. and all of WordPress’ resources are accessible.

  • Polyglots

    WordPress is used all over the world in many different languages. If you’re a polyglot, you can help by translating WordPress into your own language or contributing to the GlotPress project, making translations easier and more effective for everyone.

  • Support

    Answering questions in the support forums, IRC, or SlackSlack Slack is a Collaborative Group Chat Platform https://slack.com/. The WordPress community has its own Slack Channel at https://make.wordpress.org/chat/ is one of the easiest ways to start contributing. Everyone knows the answer to something! Since the forums run on bbPress, you can also contribute by helping make the software behind them even better.

View all teams and their meetings

Latest activity

See the latest happenings across the entire project.

George Mamadashvili Core ·

Miscellaneous Editor Changes in WordPress 7.2

In this post, you will find 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 smaller changes to the editor in WordPress 7.2.

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

Removed __experimentalGroup prop from InspectorControls

WordPress 7.2 removes the __experimentalGroup prop from InspectorControls and InspectorControls.Slot. Use the group prop instead. (#83171)

The prop was stabilized as group in WordPress 6.2 (#47105). Since then, passing __experimentalGroup logged a deprecation warning that named WordPress 6.4 as the removal version. WordPress 7.2 completes that removal.

Code that still passes __experimentalGroup now renders its controls in the default group, with the block’s other settings. For example, controls meant for the Advanced panel now appear outside it. A ToolsPanelItem meant for a panel such as Typography renders without that panel around it.

To update, rename the prop. The group prop works in WordPress 6.2 and later, so no version check is needed:

// Before
<InspectorControls __experimentalGroup="advanced">
	<TextControl label={ __( 'Custom ID' ) } value={ id } onChange={ setId } />
</InspectorControls>

// After
<InspectorControls group="advanced">
	<TextControl label={ __( 'Custom ID' ) } value={ id } onChange={ setId } />
</InspectorControls>

For the Advanced panel, InspectorAdvancedControls is also available and sets group="advanced" for you.

References:

Deprecated __experimentalImageEditor component: stylesheet moved

The @wordpress/block-editor npm package and the wp.blockEditor global export an __experimentalImageEditor component for building image cropping and editing interfaces. The component was deprecated in WordPress 7.1, so avoid using it.

If your code still uses it, note a CSSCSS Cascading Style Sheets. change in WordPress 7.2. The component’s stylesheet was incorrectly defined in the @wordpress/block-library package. In 7.2 it moves to @wordpress/block-editor. Update any imports of the stylesheet to the new location.

References:

Additional CSS now applies to blocks rendered by a parent block

Starting in WordPress 7.2, Additional CSS (set in a block’s Advanced panel) works for blocks that a parent block renders itself, such as a Navigation Link inside a Navigation block.

Before, that CSS was missing on the front end. CoreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress. generated it only for blocks in a parent’s regular inner content. The Navigation block loads its inner blocks from a navigation menuNavigation Menu A theme feature introduced with Version 3.0. WordPress includes an easy to use mechanism for giving various control options to get users to click from one place to another on a site. post, so those blocks skipped that step.

Now the CSS is generated when each block renders, however its parent loaded it. Blocks that already worked are unaffected, and their CSS is not duplicated.

No code changes are needed. Rules that were previously ignored will now apply, so check for any you don’t want.

References:

Core Data

registry.subscribe no longer listens to all stores when the store is not registered yet

Starting in WordPress 7.2, registry.subscribe( listener, storeName ) is more efficient when storeName isn’t registered at the time of the call.

Previously, the listener was attached to the registry-wide listener list, so it ran on every update from every store, both before and after the target store was registered. Now the registry keeps it as a pending listener and connects it to the store once it is registered, so the listener only runs for updates from that store.

Subscribing before a store is registered works as before, and the returned unsubscribe function still works. No code changes are needed. Code that relied on such a listener firing for unrelated stores will see fewer calls, but this was never documented behavior.

References:


Props to @aaronrobertshaw, @ramonopoly, @annezazu, @jsnajdr, @scruffian for content.

#7-2, #dev-notes, #dev-notes-7-2

Krupa Nanda Accessibility ·

Accessibility Team Meeting Agenda: November 19, 2026

This is the proposed agenda for the bi-weekly 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) Team meeting on Thursday, November 199, 2026 at 08:30 PM GMT+5:30

📣 Announcements

Working groups

  • WordPress CoreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress. and the 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
  • Accessibility-ready Program
  • Documentation about Web Accessibility

Open floor

If you want to have a topic added to the agenda, please mention it in the comments of this post.

The Accessibility Team bug scrub is every Tuesday at 16:00 UTC, held in the #accessibility channel on the Make WordPress SlackSlack Slack is a Collaborative Group Chat Platform https://slack.com/. The WordPress community has its own Slack Channel at https://make.wordpress.org/chat/ (registration required).

#accessibility, #agenda

Pooja Derashri Community ·

Monthly Education Buzz Report – October 2026

Welcome to the Monthly Education Buzz Report, your go-to source for highlights and updates on the WordPress Campus Connect, WordPress Credits, and WordPress Student Club education initiatives within the WordPress community. This report celebrates, promotes, and informs people across the WordPress community and beyond about the diverse educational efforts underway.

WordPress Campus Connect

[TBD: one-line October headline.] WordCamp CentralWordCamp Central Website for all WordCamp activities globally. https://central.wordcamp.org includes a list of upcoming and past camp with links to each. lists 15 Campus Connect events held in October across Bangladesh, India, Indonesia, and Costa Rica. Campus Connect now makes up 79 of the 154 community events on the 2026 calendar, according to the Community Events dashboard.

87

Completed Events

105

Participating Institutions

8355+

Students Reached

Ajmer reaches five colleges

WordPress Campus Connect Ajmer 2026 has now completed five partner colleges: Shri RK Patni Girls College (Kishangarh), Government Mahila Engineering College, Star Infotech College, Engineering College Ajmer (hands-on workshop on October 17), and Aryan College. Each college got a pre-session seminar, then a hands-on workshop where students built their first WordPress site and redeemed free hosting and domain credits live. Several colleges also ran advanced WooCommerce tracks.

Lead organizer Bhupendra Singh Shekhawat thanked the WordPress.comWordPress.com An online implementation of WordPress code that lets you immediately access a new WordPress environment to publish your content. WordPress.com is a private company owned by Automattic that hosts the largest multisite in the world. This is arguably the best place to start blogging if you have never touched WordPress before. https://wordpress.com/ Education team for domain and hosting support, which he called the single biggest factor in making the sessions meaningful. Pooja Derashri supported as a mentorEvent Supporter Event Supporter (formerly Mentor) is someone who has already organised a WordCamp and has time to meet with their assigned mentee every 2 weeks, they talk over where they should be in their timeline, help them to identify their issues, and also identify solutions for their issues., along with Anand Upadhyay, Hardik Sharma, Satish Prajapati, Hemant Tejwani, Gajendra Singh, Aman Raj Sain, Richa Shrivastava, and Stuti.

Hackathons instead of talks in Bangladesh

In Dhaka, @devmuhib ran a hackathon-format pilot at Stamford University Bangladesh after noticing how much students there like challenge-based activities. WordPress.com provided the domain and hosting for wphackathon.com and offered free domain and hosting to up to 100 participants. Read more in a community blog post.

The format spread. At WordPress Campus Connect Rajshahi 2026 at Varendra University (October 14), about 90 students built about 57 websites in a hands-on hackathon, and interested students applied for WordPress Credits. The organizers now plan to grow the university’s student club. At Presidency University, Dhaka, a two-day Campus Connect ended with 50 websites and 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/ profiles. Full recap on WordCamp Central.

Kolhapur: a team that runs without its leads

Makarand Mane’s Kolhapur team ran two more events. Campus Connect #3 at Dr. D. Y. Patil Polytechnic (October 3) had 59 of 60 registered students attend, run by two organizers and volunteers while four organizers were at WordCampWordCamp WordCamps are casual, locally-organized conferences covering everything related to WordPress. They’re one of the places where the WordPress community comes together to teach one another what they’ve learned throughout the year and share the joy. Learn more. Rajasthan. Digvijay Zite coordinated with the college and facilitated. Campus Connect #4 at Dr. Bapuji Salunkhe Institute of Engineering and Technology (October 17) had 56 of 78 registered students attend. The team split students across three labs with three facilitators, Digvijay Zite, Makarand Mane, and first-time facilitator Harshad Dhale. Smaller groups of 20 to 25 made it much easier to give each student attention, a useful lesson for colleges with limited lab space.

Campus Connects held in October

  • Kolhapur, India: Dr. D. Y. Patil Polytechnic (October 3), 59 students; BSIET (October 17), 56 students.
  • Rajshahi, Bangladesh: Varendra University (October 14), about 90 students, about 57 websites, organized by Nazmul Hosen.
  • Puttar, India: Shodhan and four facilitators Ashwini, Nishmitha, Venu, Chethan) ran a two-day workshop at Sacred Heart College (October 15 to 16). Students received Campus Connect badges and printed certificates.
  • Ajmer, India: Engineering College Ajmer (October 17) and Aryan College completed the five-college series.
  • Dhaka, Bangladesh: Presidency University, two days (around October 25), 50 websites. Stamford University hackathon pilot.
  • Tegal, Indonesia: WPCC TCS Tegal (October 25), with @kharisulistiyo facilitating the hands-on workshop.
  • WordCamp Sylhet, Bangladesh: @chaion07 hosted an Education Table on October 2, Contributor’s Day at WordCamp Sylhet 2026.
  • WordCamp Rajasthan happened on October 3 & 4 with an Education Table on Contributor’s Day, led by Makarand Mane.

Program updates

  • Online-only institutions: Kaito asked how to support an online-only university, since Campus Connect is an in-person format. @peiraisotta had a similar case, and Rocío Valdivia proposed an exception in the guidelines for institutions that are 100% online, so in-person campuses keep the in-person format. @webtechpooja agreed and offered to update the guidelines. Kaito will test an online Campus Connect and report back on student engagement.

Planning your own event? Join the #campusconnect SlackSlack Slack is a Collaborative Group Chat Platform https://slack.com/. The WordPress community has its own Slack Channel at https://make.wordpress.org/chat/ channel.

WordPress Credits

As of the November 1 monthly snapshot, the program counts 52 partner institutions, 370 graduates,743 WordPress sites created, and 517 first contributions made. The live dashboard shows 1042 students joined to date across 17 countries, contributing to18 WordPress teams, with an 88% graduation rate and 80% of graduates recommending the program.

Sponsorship tiers for 2027

On October 22, @peiraisotta published WordPress Credits is opening sponsorship tiers. The program will pilot tiers in 2027, from in-kind “Friend” support up to a “Partner” tier at $30,000+ per year. Current sponsors will be contacted directly to choose a tier.

The new Partners page and sponsor application form went live on the Education Hub the same week, with five levels: Friend, Supporter, Backer, Champion, and Partner. Sponsors can now manage their offers and codes, which students claim directly on the site.

Student-led highlights

  • A Campus Connect as a Credits project: WordPress Campus Connect Universidad Fidélitas 2026 is the WordPress Credits contribution project of three students, @nicolegomez, @yiqi10, and @gabrielrc, with Nicole as Lead Organizer, was a great event.
  • One graduate, four teams: a student mentored by Nazmul Hosen finished the 150-hour course with 20 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. patterns, 32 photos in the Photo Directory, 402 translations, and the website design for WordPress Youth Day Nicaragua, from Figma to the live site.
  • High school translators: students from Liceo Experimental Bilingüe José Figueres Ferrer visited Universidad Fidélitas on October 1 and set their project: translating WordPress.org 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. into Costa Rican Spanish. The school is now discussing adding the program to its International Baccalaureate curriculum.
  • Photos from Costa Rica: several new Fidélitas students chose the Photos team, contributing environmental and landscape photography.
  • Testing the AI-Powered WordPress course: students were invited to complete the course with different AI tools and compare the experience, counted as a contribution to the Training team. The feedback form is live; if you have completed this course, we would be glad to collect your feedback.

New cohorts and partners

  • Fidélitas, Costa Rica: the largest intake of the month. Dozens of new students introduced themselves in #wpcredits through October, alongside students from Colegio Universitario de Cartago.
  • Universidad del Valle, Nicaragua: the first Nicaraguan university in the program, starting with an Intro to contribution course (50-hour) pilot while the course is added to its curriculum.
  • Indonesia: Institut Teknologi Tangerang Selatan (ITTS) started a cohort of 13 students on the WPCredits Foundation course. Universitas Muhammadiyah Purwokerto (UMP) signed its agreement and enrolled 5 students in Foundations.
  • Europe: New students from the University of Bologna, University of Pisa, Politecnico di Bari, and the School of Arts in Zaragoza. A University of Pisa graduate will present the program at WordCamp Pisa. Haaga-Helia University (Finland) got its own 100-hour Foundations track.
  • More new students: Unifranz (Bolivia), Kishoreganj Polytechnic Institute (Bangladesh; a student who first heard about Credits at a Campus Connect, graduated, and is now actively mentoring new students), and new arrivals from Uganda and India.
  • D. Y. Patil School of Engineering and Management, India: 30 students are actively continuing the internship.
  • CUC, Costa Rica: interns started on the Developer Track, building features for the program’s own platform as their contribution project.

MentorsEvent Supporter Event Supporter (formerly Mentor) is someone who has already organised a WordCamp and has time to meet with their assigned mentee every 2 weeks, they talk over where they should be in their timeline, help them to identify their issues, and also identify solutions for their issues.

  • 6 new mentors joined the mentor team. More people from Pakistan, Latvia, and Spain started the Mentors course, and we added 1 WP Credits Program managerProgram Manager Program Managers (formerly Super Deputies) are Program Supporters who can perform extra tasks on WordCamp.org like creating new sites and publishing WordCamps to the schedule. to the program.

Courses and tracks

  • Two courses moved to the Education Platform with autograding: WordPress Credits Foundations replaced the original 150-hour course on October 1, and WordPress Credits: Intro to Contribution replaced the 50-hour course on October 12. Students use a Student Report Card on the Education platform, and once it is complete, they get a code that unlocks their certificate.
  • Developer Track support: @alanabwarner published a guide for mentors without CoreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress. experience and updated the final lesson to point students to Good First Bugs on Core TracTrac Trac is the place where contributors create issues for bugs or feature requests much like GitHub.https://core.trac.wordpress.org/. and good first issues on 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/. @celigaroe asked the Core team to review the track, and @Ryanwelcher offered to record a video for students.
  • Polyglots videos in Spanish: @roblesloaiza published two WordPress.tv videos on contributing subtitles and contributing to translation.
  • Coming next: the Translation Track is being connected to the platform, and a Social Impact (NGO) program is in review for a pilot with Fidélitas students. Two draft courses explore lessons built with WordPress Playground.

Platform and outreach

WordPress Student Clubs

The baseline audit of all recognized clubs, proposed by @devmuhib in September, was set to start in October.

  • Government Mahila Engineering College, Ajmer: a new peer-learning WordPress Student Club began under the college’s Training and Placement Cell, led by student coordinators Sakshi Bhiryani and Chahat Chouhan (3rd year, CSE) with support from WordPress Community Ajmer. Sessions so far: website basics (October 22), WordPress Studio and the dashboard (October 26, online), and day one of a two-day portfolio website build led by Richa Shrivastava, 4th-year CSE (October 27).
  • Varendra University, Rajshahi: after their October 14 Campus Connect, organizers plan regular learning sessions to keep the university’s student club active.

Other Happenings

Get Involved

Education Initiatives

WordPress Education offers three practical ways for learners to develop skills, gain practical experience, and build confidence as open sourceOpen Source Open Source denotes software for which the original source code is made freely available and may be redistributed and modified. Open Source **must be** delivered via a licensing model, see GPL. contributors.

See something in the community that should be noted here or in a future newsletter? Comment below!

Stay tuned for next month’s update!

#campus-connect, #education-buzz, #wpcredits

Amy Kamala Hosting ·

Hosting Team Meeting Agenda 11-18-2026

Next Meeting

The next meetings will be in the #hosting SlackSlack Slack is a Collaborative Group Chat Platform https://slack.com/. The WordPress community has its own Slack Channel at https://make.wordpress.org/chat/ channel on Wednesday, November 18, 2026 at 0900 UTC and Wednesday, November 18, 2026 at 1800 UTC. Hope to see you there!

Agenda

Anything else? Please leave a comment with any additions or suggestions for the meeting.

Props to @jazzs3quence for the pre-publish review!

#agenda, #hosting-community, #meetings, #weekly-hosting-chat

Isabel Brison Core ·

API for style state-aware block styling controls

Custom 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. controls can now make use of the responsive and pseudo state styling system in the block editor. To implement this, controls for editing styles need to read and update the block’s style attribute for the state selected in the editor. 7.2 exposes a public 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 this.

The following hooksHooks In WordPress theme and development, hooks are functions that can be applied to an action or a Filter in WordPress. Actions are functions performed when a certain event occurs in WordPress. Filters allow you to modify certain functions. Arguments used to hook both filters and actions look the same. and selectors from @wordpress/block-editor work with both viewport and pseudo states:

getSelectedBlockStyleState reads the selected state;
hasSelectedBlockStyleState checks whether a non-default state is selected;

getStyleForState Returns the style object for the selected state;
setStyleForState Sets the new style on the selected state.

import {
    getStyleForState,
    setStyleForState,
    store as blockEditorStore,
} from '@wordpress/block-editor';
import { useSelect } from '@wordpress/data';

const selectedState = useSelect(
    ( select ) =>
        select( blockEditorStore ).getSelectedBlockStyleState( clientId ),
    [ clientId ]
);

const stateStyle = getStyleForState( attributes.style, selectedState ) || {};

setAttributes( {
    style: setStyleForState( attributes.style, selectedState, {
        ...stateStyle,
        dimensions: {
            ...stateStyle.dimensions,
            minHeight: '50vh',
        },
    } ),
} );

Displaying controls in the toolbar and inspector

By default inspector controls are hidden when a style state is selected. To display custom controls in the inspector when a viewport or a pseudo state is enabled, the style-state slot is available:

<InspectorControls group="style-state">
    <MyStyleStateControl />
</InspectorControls>

To display custom controls in the block toolbar when a viewport state is enabled, there is also a style-state slot:

<BlockControls group="style-state">
    <MyViewportControl />
</BlockControls>

(The default block toolbar slots aren’t currently hidden for pseudo states.)

Obtaining media query strings

For viewport state integrations that need media query strings, @wordpress/global-styles-engine also exports getViewportMediaQueries:

import { getViewportMediaQueries } from '@wordpress/global-styles-engine';

const mediaQueries = getViewportMediaQueries( {
    mobile: '480px',
    tablet: '782px',
} );

// {
//   '@mobile': '@media (width <= 480px)',
//   '@tablet': '@media (480px < width <= 782px)',
// }

Calling getViewportMediaQueries with no parameters will return the default coreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress. media queries (with 480px for mobile and 782px for tablet).

PHPPHP The web scripting language in which WordPress is primarily architected. WordPress requires PHP 7.4 or higher code can use the corresponding wp_get_viewport_media_queries helper:

<?php
$media_queries = wp_get_viewport_media_queries(
    array(
        'mobile' => '480px',
        'tablet' => '782px',
    ),
    array(
        'include_desktop' => true,
    )
);

// Includes @mobile and @tablet, plus:
// '@desktop' => '@media (width > 782px)'

Calling wp_get_viewport_media_queries with no parameters will return the default core media queries (with 480px for mobile and 782px for tablet).
include_desktop defaults to false.

See the block editor data reference and 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/ PR #82741.


Props to @andrewserong, @aaronrobertshaw and @talldanwp for review.

#7-2, #dev-notes, #dev-notes-7-2

Jb Audras Core ·

Dev Chat Agenda – November 17, 2026

The next WordPress Developers Chat will take place on Wednesday, November 17, 2026, at 15:00 UTC in the core channel on Make WordPress Slack.

The live meeting focuses on upcoming releases and CoreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress. development, with time for discussions and open floor.

If you have requests for help with a ticketticket Created for both bug reports and feature development on the bug tracker. or another discussion topic, please post details in the comments section at the end of this agenda, or bring it up in Dev Chat during open floor.

Announcements 📢

WordPress 7.2

General

Discussions 💬

The discussion section of the agenda is for discussing important topics affecting the upcoming release or larger initiatives that impact the Core Team. To nominate a topic for discussion, please leave a comment on this agenda with a summary of the topic, any relevant links that will help people get context for the discussion, and what kind of feedback you are looking for from others participating in the discussion.

Open floor  🎙️

Any topic can be raised for discussion in the comments, as well as requests for assistance on tickets. Tickets in the milestone for the next major or maintenance release will be prioritized.

Please include details of tickets / PRs and the links in the comments, and indicate whether you intend to be available during the meeting for discussion or will be async.

#7-2, #agenda, #core, #dev-chat

Dennis Snell

Proposal: Disable WPCS UsedPropertyNotSnakeCase rule.

This rule rejects property accesses for properties not named in snake_case, but readers generally have to accept whatever objects are passed into them.

It’s debatable how properties should be defined, but we should not encourage developers to break code on property access. Adding additional property names to the exclusion list is a never-ending catch-up game after the linter has required defective code as well.

I would like to discuss setting <severity>0</severity> for this rule so that we can avoid either requiring people to either write broken code or pollute the codebase with fragile phpcs:disable comments.

Reply

Marius L. J. Core ·

Preparing for jQuery 4 with WordPress 7.2

The last major jQuery update in WordPress was to version 3 back in 2020, and was a process carried out over multiple releases, with the final step culminating in the disabling of jQuery Migrate by default (this final step was never finalized at the time).

WordPress 7.2 will ship with jQuery Migrate 3.6.0 to prepare for updating to jQuery 4 in coreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress.. Doing so will help extenders catch deprecation notices in their code for features that may no longer be available in jQuery 4.

The planned process is currently:

  • Update jQuery Migrate in WordPress 7.2
  • Update to the latest release of jQuery and jQuery Migrate tentatively planned for WordPress 7.3 depending on test results. Updating to the latest jQuery UIUI User interface and other libraries dependent on jQuery is also planned for 7.3.
  • Disable jQuery Migrate by default at the end of 2027 (WordPress 7.5 or 7.6, depending on the release cadence for next year), this is also dependent on testing and research into the potential impact on the ecosystem.

You can follow the progress of updating to jQuery 4 in #60478


Props to @davidbaumwald and @pbiron for copy review.

#7-2, #dev-notes, #dev-notes-7-2, #jquery

BackuPs

I found a jquery 4.0 issue in wordpress 7.2 running jQuery Migrate 3.6.0

  Uncaught SyntaxError: import declarations may only appear at top level of a module jquery.form.js:22:1

Reply

BackuPs

Uncaught SyntaxError: export declarations may only appear at top level of a module jquery.form.js:1606:1

Reply

Ryan Welcher Core ·

Call for testing: Xdebug in the WordPress Contributor Toolkit 2.1.0 beta

The next release of the Contributor Toolkit adds step debugging with Xdebug. Set a breakpoint, load the page, and walk through CoreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress. one line at a time. It’s in betaBeta A pre-release of software that is given out to a large group of users to trial under real conditions. Beta versions have gone through alpha testing in-house and are generally fairly close in look, feel and function to the final product; however, design changes often occur as part of the process. now, and it needs your help before it ships.

The plan is for the WP Credits program to recommend the Contributor Toolkit as the primary way to contribute to WordPress. That isn’t in place yet, but its developer track already asks students to set up Xdebug. If the toolkit is going to be the tool those students use, it has to handle that step too. Both official environments, wordpress-develop’s Docker setup and wp-env, already offer Xdebug as an option, so this brings the toolkit in line with them.

Grab 2.1.0-beta.1 from its release page, turn on Xdebug, and try to hit a breakpoint. It has to work on macOS (Apple Silicon), Windows and Linux, in every editor the Xdebug setup covers, before it goes into a stable release. That’s a lot of combinations for a handful of maintainers to cover, so the more people who try it, the better. Testing runs until Friday, December 4. Anything reported after that will still be read, but it may not make it into the stable release.

While you’re in there, try the new code editor setting too. The editor you pick changes what the Xdebug setup shows you, so the two are worth testing together.

Step debugging with Xdebug

PHPPHP The web scripting language in which WordPress is primarily architected. WordPress requires PHP 7.4 or higher in a Contributor Toolkit site runs inside WordPress Playground, so there’s no php.ini to edit and no extension to install. Instead, there’s a setting.

  • Turn it on: Settings Sites Step debugging (Xdebug). It’s off by default because it slows down every request, and like the PHP version setting, it takes effect the next time you start the server.
  • Set up your editor: once the server is running with Xdebug, the site’s Debugging row offers a setup for VS Code, Cursor, PhpStorm or Zed. Each one has the steps and the config to copy, such as a launch.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. for VS Code or the host, port and path mapping for PhpStorm. If you already picked an editor in Settings, the button goes straight to that editor’s setup instead (more on that below).
  • One site at a time: Playground always uses port 9003, so only one running site can have Xdebug. If you start a second one, the app tells you which site has it and what to do.
  • You can cancel a start now: while the server starts, the button reads Cancel instead of a grayed-out “Starting…”. With Xdebug on, a breakpoint can catch Playground’s own startup requests, so you’ll want this.

The full walkthrough is in the new Step debugging with Xdebug guide. It goes live on the documentation site with the stable release so images may appear broken 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/.

Pick your code editor

You can now pick the code editor you use and save it as a setting, under Settings General Applications Code editor. Once it’s set, the site menu’s Open in uses that editor, and clicking a file under Changed files opens it there too. If you haven’t picked one, or leave it on Ask each time (the default), the app asks you to choose from the editors installed on your computer.

The same setting changes the Xdebug setup. With VS Code, Cursor, PhpStorm or Zed chosen, the site’s Debugging row shows a single Set up Xdebug for Zed button (or whichever editor you picked) that opens that editor’s setup directly. With Ask each time, or an editor that has no Xdebug setup, such as Sublime Text, you get a menu of the editors the app finds instead.

What to test

Xdebug is the big one. Try whatever combination you have: macOS, Windows or Linux, with VS Code, Cursor, PhpStorm or Zed, on a Core or a 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/ site. If you’re on Windows, your test is especially useful, since paths there are handled differently from macOS and Linux.

  1. Xdebug: turn on the setting, restart the server, follow the setup for your editor, and set a breakpoint in a Core file (say wp-login.php). Make sure that the editor stops on it. Try it on a Gutenberg site too, and try starting two sites at once.
  2. Code editor: pick your editor in Settings and click a file under Changed files. Check that the Debugging row’s Xdebug button names your editor. Then set the setting back to Ask each time and try both again.

If something breaks, or works but confuses you, please open an issue on GitHub. Include your platform and what you clicked, and attach the app log (Help Open App Log) if you can.

If it just works, say so in the comments, with your platform and editor. A report that it worked on your setup helps too, because it shows which combinations are covered.

Problems found during the beta get fixed before WP Credits starts sending students to the toolkit. The user guide on trunk covers every feature here if you want more detail before you start.

Props to @greenshady and @psykro or review and feedback.

+make.wordpress.org/playground/ +make.wordpress.org/test/ +make.wordpress.org/community/

#contributor-day, #contributor-toolkit, #playground, #wordcamp

Adam Silverstein Core ·

Media changes in WordPress 7.2

WordPress 7.2 extends client-side media processing beyond the 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, stops rewriting crossorigin attributes on the editor page, and generates animated sub-sizes for animated GIF and WebP uploads.

In short:

  • Image uploads from the Media Library grid, the Add New Media File screen and the media modal now go through the client-side pipeline in supported browsers.
  • wp_start_cross_origin_isolation_output_buffer() and wp_add_crossorigin_attributes() are deprecated. wp_send_document_isolation_policy_header() replaces the first; the second has no replacement.
  • Sub-sizes of animated GIF and WebP images keep their animation on the client-side path. The new wp_generate_animated_image_subsizes 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. turns that off.

Client-side media processing now covers the Media Library and media modal

WordPress 7.1 introduced client-side media processing: in a cross-origin isolated page, the block editor uploads the original image through the 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/, generates the sub-sizes in the browser with wasm-vips, then sideloads them and finalizes the attachment. This takes image processing off the server and gives the same results regardless of which image libraries the server has.

In 7.1 this only ran in the block editor. The Media Library grid, the Add New Media File screen and the media modal still uploaded through wp.Uploader and plupload to async-upload.php, with all processing on the server. A HEIC file that converted when dropped on an Image block could fail in the media modal on a server without HEIC support (#65661, #66220).

What changed in 7.2

Uploads from these three places now use the same pipeline as the editor:

  • The Media Library grid (upload.php in grid mode).
  • The Add New Media File screen (media-new.php).
  • The media modal, meaning every wp.media frame that uploads through wp.Uploader: the Image block’s “Media Library” button, the featured imageFeatured image A featured image is the main image used on your blog archive page and is pulled when the post or page is shared on social media. The image can be used to display in widget areas on your site or in a summary list of posts. panel, and the same frame in the site editor and the block widgets screen.

The existing UIUI User interface is reused, so progress bars, grid tiles and error notices look and behave as before. Error messages come from the pipeline, so the platform-specific HEIC wording from the editor shows up on these screens too. While an upload is in flight, the page warns before navigating away, since an interrupted client-side upload could lose sub-sizes that were not yet sideloaded.

Cross-origin isolation on more screens

wp_set_up_cross_origin_isolation() now also runs on load-upload.php and load-media-new.php. The Media Library is only isolated in grid mode, since list mode uploads go through the Add New Media File screen. The action query parameter check that skips third-party editors does not apply to these screens.

New functions:

  • wp_is_document_isolation_policy_supported() returns whether the requesting browser honors the 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., based on its User-Agent. Today that means Chromium 137 or newer.
  • wp_is_cross_origin_isolated_request() returns whether coreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress. isolated the current response, meaning wp_send_document_isolation_policy_header() (see below) sent the header. A header a 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. sends itself does not count.
  • wp_get_media_library_mode() returns grid or list using the same resolution as upload.php, without updating the saved user option.
  • wp_get_media_library_upload_settings() returns the settings the pipeline needs: maximum upload size, allowed mime types, the registered image sub-sizes, and the image processing settings described below.
  • wp_enqueue_media_frame_upload() and wp_enqueue_media_new_upload() enqueue the screen scripts. wp_enqueue_media() calls the first one, so most code never needs to.

The image processing settings pass through the same filters the server uses: big_image_size_threshold, image_strip_meta and image_max_bit_depth. A plugin that changes them affects client-side uploads too. Because the server never decodes the image on this path, image_max_bit_depth receives 16, the maximum the client encoder can produce, as both its value and the current depth.

Three scripts were added: media-upload-pipeline, which configures the @wordpress/upload-media store and exposes wp.mediaUploadPipeline, plus media-frame-upload and media-new-upload, which hand files added to the existing uploader to the pipeline. They are only enqueued when client-side media processing is enabled, the browser supports Document-Isolation-Policy and core isolated the request.

What still uses the classic upload

When client-side processing is turned off with the wp_client_side_media_processing_enabled filter, or the browser does not support it (Firefox and Safari today), uploads work as they did in 7.1 through async-upload.php. Some uploads stay on the classic path even in a supported browser:

  • Anything that is not an image the pipeline can process (JPEG, PNG, GIF, WebP, AVIF, HEIC/HEIF). Audio, video, PDF, SVG, 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. and archives upload through async-upload.php as before. So does an image whose type is not in the allowed mime types the page was rendered with, which leaves the decision to the server.
  • Uploaders that do not post attachments. Only uploaders using async-upload.php with the upload-attachment action are intercepted, so a plugin’s own wp.Uploader pointed elsewhere is left alone.
  • JPEG and PNG files while plupload resizing is enabled, through the “Scale images” setting or a resize value passed through plupload_init.
  • A HEIC file the browser cannot decode (Linux, and Windows without the HEVC extension), when the server’s image editor supports HEIC. When neither can convert it, the pipeline’s error is shown.
  • Screens core did not isolate: the CustomizerCustomizer Tool 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., the Site Icon picker, the classic editor’s media modal, and any screen where a plugin sends its own Document-Isolation-Policy header.

Extra multipart params added through plupload_default_params or wp.Uploader.param() are forwarded to the REST request, so they still arrive in $_POST.

Multisitemultisite Used to describe a WordPress installation with a network of multiple blogs, grouped by sites. This installation type has shared users tables, and creates separate database tables for each blog (wp_posts becomes wp_0_posts). See also network, blog, site: sub-sizes count against the site’s upload space

On a multisite networknetwork (versus site, blog) with the “Site upload space” limit turned on, client-side media checks every file (including generated sub-sizes) against the site’s storage quota, not just the original.

On the classic path, only the original upload is checked (through check_upload_size() on wp_handle_upload_prefilter). The server then writes the sub-sizes straight to disk, so they never hit the quota check. With client-side media, each sub-size generated in the browser is a separate request to /wp/v2/media/{id}/sideload, and each one is checked for space left, the network’s maximum upload file size (fileupload_maxk) and the site quota.

In practice this only matters for a site that is close to its limit: the original fits, then some or all of the sub-sizes are rejected with rest_upload_limited_space or rest_upload_user_quota_exceeded.

When that happens:

  • If some sub-sizes fit, the image is saved with only those sizes. The missing sizes are not currently reported to the user.
  • If none fit, the upload fails: the attachment is deleted and the block resets. The error shown is the server’s message for the rejected sub-size, eg. “Not enough space to upload. 2 KB needed.”

Better handling for both cases is being worked on in #86834.

Note that networks with the upload space check disabled (the upload_space_check_disabled site option) are not affected.

A site that needs the old behavior can turn off client-side media processing:

add_filter( 'wp_client_side_media_processing_enabled', '__return_false' );

Sub-sizes in the attachment’s output format are allowed

Sideloaded sub-sizes also go through the network’s “Upload file types” setting (upload_filetypes). Networks created before 5.8 have no webp in that list and those created before 6.5 have no avif, so with a plugin filtering image_editor_output_format to either format, every sub-size was rejected and the upload failed.

In 7.2, the attachment’s output format is added to upload_filetypes for the duration of a sideload only, matching the classic path where the server writes sub-sizes in any output format. Other formats are still checked against the network setting, and a type removed through upload_mimes is still blocked. Single site is not affected.

Related: #66680, #66681, r65533.

Running the pipeline on a plugin’s own screen

The media frame integration only loads on a screen where wp_send_document_isolation_policy_header() sent the header. A Document-Isolation-Policy header a plugin sends itself does not count, so a page builder that isolates its editor for its own reasons keeps classic uploads in every wp.media frame on that screen, as in 7.1.

To opt a screen into the client-side pipeline, send the header through core before wp_enqueue_media() runs:

add_action( 'load-toplevel_page_my-plugin', function () {
	if ( wp_is_client_side_media_processing_enabled() ) {
		wp_send_document_isolation_policy_header();
	}
} );

The function returns false and sends nothing when headers were already sent or the browser does not support the header. Isolating a screen blocks same-origin access to iframes that are not isolated too, so test the screen before opting in.

The GutenbergGutenberg The Gutenberg project is the new Editor Interface for WordPress. The editor improves the process and experience of creating new content, making writing rich content much simpler. It uses ‘blocks’ to add richness rather than shortcodes, custom HTML etc. https://wordpress.org/gutenberg/ plugin sends the header itself on the editor screens, so its media modal uses classic uploads until the site runs a Gutenberg release that includes #86542. Uploads made in the block editor itself are not affected.

Related: #66490, r65356, r65532.

What changes for upload hooksHooks In WordPress theme and development, hooks are functions that can be applied to an action or a Filter in WordPress. Actions are functions performed when a certain event occurs in WordPress. Filters allow you to modify certain functions. Arguments used to hook both filters and actions look the same.

Pipeline uploads go to the REST API (POST /wp/v2/media, then /sideload per sub-size and /finalize) instead of async-upload.php. Most upload hooks still run, but a few things differ:

  • Extra params added through plupload_default_params or wp.Uploader.param() are sent as POST fields, so they still arrive in $_POST and $_REQUEST. action, _wpnonce and post_id are not forwarded: the attachment’s parent is sent as post.
  • $_POST['action'] is not upload-attachment and DOING_AJAX is not defined. Code that detects media uploads that way will miss pipeline uploads; check for a REST request, or hook the upload filters directly.
  • The original file goes through wp_handle_upload(), so wp_handle_upload_prefilter and upload_mimes run as before. Sub-sizes generated in the browser go through wp_handle_sideload(), so they run wp_handle_sideload_prefilter.

Related: r64588, #12585, Gutenberg #82409.

The editor no longer rewrites crossorigin attributes

In 7.1 the editor page was buffered with ob_start() and rewritten with WP_HTML_Tag_Processor to add crossorigin="anonymous" to cross-origin scripts, stylesheets, audio and video, alongside the Document-Isolation-Policy: isolate-and-credentialless header. That caused two problems:

  • Running the tagtag A directory in Subversion. WordPress uses tags to store a single snapshot of a version (3.6, 3.6.1, etc.), the common convention of tags in version control systems. (Not to be confused with post tags.) processor inside an output buffer display handler could end in a fatal error and a blank screen on Chromium 137+ when the page loaded any cross-origin resource (#65930).
  • Forcing crossorigin="anonymous" turns a subresource load into a CORS request, which fails for any host that does not send Access-Control-Allow-Origin, such as media offloaded to a CDN (#65673).

With isolate-and-credentialless, cross-origin subresources load without credentials instead of being blocked, so the attribute was never needed. In testing with current Chromium builds, resources without the attribute loaded identically with and without the header.

What changed in 7.2

  • The new wp_send_document_isolation_policy_header() sends the header and returns whether it did. It returns false if headers were already sent or the browser does not support Document-Isolation-Policy.
  • wp_set_up_cross_origin_isolation() now returns that boolean instead of void.
  • The editor page is no longer buffered or rewritten, and wp_print_media_templates() no longer adds crossorigin="anonymous" to AUDIO and VIDEO tags in the media modal templates.
  • wp_start_cross_origin_isolation_output_buffer() and wp_add_crossorigin_attributes(), both added in 7.1, are deprecated. They still exist and trigger a deprecation notice. The first now only sends the header; the second returns the HTMLHTML HyperText Markup Language. The semantic scripting language primarily used for outputting content in web browsers. unchanged, so calls can be removed.
// Before (7.1).
wp_start_cross_origin_isolation_output_buffer();

// After (7.2).
wp_send_document_isolation_policy_header();

What plugin and theme developers should check

  • Code that calls either deprecated function, or that parsed the editor output expecting crossorigin attributes, needs updating. Hooking or removing wp_set_up_cross_origin_isolation on the load-* actions keeps working.
  • Plugins that added their own crossorigin injection to make cross-origin media work in the editor can drop it. Under isolate-and-credentialless it is not required, and it breaks hosts without CORS headers.
  • To confirm isolation is active on a screen, check window.crossOriginIsolated in the browser console. In browsers without Document-Isolation-Policy support, such as Firefox and Safari, it is false and uploads use the server as before.
  • Safari support needs require-corp, which does need the attribute. The Client-Side Media Everywhere plugin keeps the injection for that case.
  • A response that has already sent headers before the load-* action fires cannot receive the policy header. Debug output or early echo calls in a plugin are the usual cause.

Related: r64489, #13446, Gutenberg #82614.

Animated image sub-sizes are generated by default

Resized versions of animated GIFs have always lost their animation, because both GD and Imagick flatten animated images when resizing #28474 (open since 2014). Server-side it stalled because GD cannot preserve frames at all, Imagick is only available on some hosts, and re-encoding every frame is costly on shared CPU.

Client-side media processing changes that. Decoding, scaling and encoding happen in the uploader’s browser, so every frame can be processed regardless of the host, and the cost is paid once by the uploader #65656.

What changed in 7.2

When client-side media processing is used, every sub-size of an animated GIF or WebP keeps its animation by default, including cropped sizes such as thumbnail, where each frame is cropped with the same rectangle. If an animation is too large to decode in the browser, the pipeline falls back to a static first-frame sub-size instead of failing the upload.

Server-side uploads still produce static sub-sizes. The change only affects the client-side path.

The wp_generate_animated_image_subsizes filter

The new filter takes a boolean and defaults to true. Returning false generates static first-frame sub-sizes, matching the server-side path, which keeps upload times down on low powered devices or sites that upload many large animations.

add_filter( 'wp_generate_animated_image_subsizes', '__return_false' );

The Disable Animated Sub-sizes plugin does exactly this, for sites that prefer not to add code.

The filtered value is exposed on the REST API index as generate_animated_image_subsizes, alongside image_size_threshold and image_max_bit_depth, for users who can upload_files. The Media Library screens receive the same value through wp_get_media_library_upload_settings().

What developers should check

  • Themes and plugins that assumed sub-sizes of an uploaded GIF or WebP are static first frames may now receive animated files, which are larger than a still frame.
  • wp_calculate_image_srcset() still declines to mix a full-size animated GIF with its sub-sizes in one srcset. With animated sub-sizes that guard is more conservative than it needs to be but harmless. Relaxing it is a possible follow-up.
  • The client-side code ships through the Gutenberg package sync (Gutenberg #80385), so the filter and the REST field are the core-side surface.

Related: r64490, #12572, #28474.

Unattached images are auto-attached to posts when saved in the block editor

In the classic editor, images are auto-attached to a post as soon as a user picks them from the Media Library. This feature has been a gap in the block editor, where only images uploaded to a post were auto-attached. In WordPress 7.2 when a post is saved in the block editor, unattached images are auto-attached. This occurs later in the process than in the classic editor, so that an image added and then removed is not auto-attached.

Some details:

  • This only runs on a successful manual save or publish of a post or page
  • Only counts Image blocks (including within Galleries), and skips if there are more than 100 images to check
  • Images already attached to another post or page are ignored
  • Once a post is published, only images added since the last save are attached, so as not to unintentionally re-attach images that have been detached from a post
  • Images in templates, template parts, and synced patterns are not affected
  • This behaviour is editor-only as it’s part of a UXUX User experience workflow, so posts saved via REST API, WP-CLIWP-CLI WP-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/ etc are not affected

The feature is automatically disabled for sites with attachment pages enabled (the wp_attachment_pages_enabled option). On such sites, changing the attachment parent changes the attachment’s URLURL A specific web address of a website or web page on the Internet, such as a website’s URL www.wordpress.org resulting in a 404 for the old URL, so the feature defaults to false.

For sites or plugins that wish to switch this feature on or off, the editor setting autoAttachMediaEnabled controls the behaviour. To turn it off, use the block_editor_settings_all filter:

add_filter( 'block_editor_settings_all', static function ( array $settings ): array {
    $settings['autoAttachMediaEnabled'] = false;
    return $settings;
} );

A site with attachment pages enabled can switch the feature on by setting the value above to true.

References

#7-2, #client-side-media, #dev-notes, #dev-notes-7-2, #media, #media-library

Adam Silverstein Core ·

REST API changes in WordPress 7.2

WordPress 7.2 includes three 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/ changes. The first two change response and parameter shapes that existing code may depend on.

In short:

  • Revision and autosave responses no longer include 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. keys that are not revisioned. Plugins that write meta onto 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. directly need to register those keys with revisions_enabled or add them with the wp_post_revision_meta_keys 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 comments endpoint’s status parameter is now an array. Code that compared $request['status'] to a string needs updating.
  • The new rest_allowed_cors_methods filter controls the Access-Control-Allow-Methods 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., and a value set on a REST response is no longer discarded.

Revision and autosave responses only include revisioned meta

Visual Revisions in the 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 (new in 7.0) restores a revision by reading it from the REST API and saving its meta onto the post. Before 7.2, WP_REST_Revisions_Controller returned every show_in_rest meta key registered for the parent post type, read from the revision ID. Only revisioned keys are stored on a revision, so every other key came back as its registered default, or null when the default did not pass the key’s schema, and the restore wrote those values over the post’s real meta.

The visible effects were:

  • Restoring an unsynced pattern sent null for wp_pattern_sync_status, which deleted the status and made the pattern synced.
  • Restoring a synced pattern failed with a rest_invalid_stored_value error after the content had already been saved.
  • On other post types, non-revisioned show_in_rest keys were silently reset.

The classic revisions screen was never affected, because wp_restore_post_revision() only restores the keys from wp_post_revision_meta_keys(). The editor cannot tell which keys are revisioned, since revisions_enabled is not exposed over REST, so the fix had to happen in the endpoint (#66329).

What changed in 7.2

The new WP_REST_Revision_Meta_Fields class, a subclass of WP_REST_Post_Meta_Fields, limits a revision’s meta response and schema to the keys returned by wp_post_revision_meta_keys() for the parent post type. WP_REST_Revisions_Controller uses it for its $meta property. Keys registered with a custom show_in_rest name are handled the same way.

  • Autosave responses follow the same rules, because the revisions controller prepares them. Autosave requests are still validated against the parent post type’s meta schema, but only revisioned keys are stored, and only on an autosave revision. An author’s autosave of their own draft doesn’t store the meta it receives.
  • When an author autosaves their own draft, the autosaves controller updates the post itself and returns it instead of an autosave. That response still includes all of the post’s meta.
  • Anything returned by the wp_post_revision_meta_keys filter that is not a string is ignored.

What 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. developers should check

A meta key is revisioned when it is registered with revisions_enabled set to true, or when it is added with the wp_post_revision_meta_keys filter.

register_post_meta(
	'post',
	'my_meta',
	array(
		'show_in_rest'      => true,
		'single'            => true,
		'type'              => 'string',
		'revisions_enabled' => true,
	)
);

For meta registered elsewhere, or by code that cannot be changed, use the filter:

add_filter(
	'wp_post_revision_meta_keys',
	static function ( array $keys ): array {
		$keys[] = 'my_meta';
		return $keys;
	}
);
  • Plugins that write meta onto revisions directly, without either of the above, will no longer see those keys in REST revision and autosave responses. Adding the key to wp_post_revision_meta_keys brings it back, and also makes the key part of what the classic screen restores, so confirm that is wanted.
  • Clients that read revision meta over REST should expect non-revisioned keys to be absent rather than present with a default value. The meta schema for revisions shrinks to match.
  • When a post type has no revisioned meta, a revision’s meta is now an empty 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. array ([]) instead of an object holding each key’s default. JavaScriptJavaScript JavaScript or JS is an object-oriented computer programming language commonly used to create interactive effects within web browsers. WordPress makes extensive use of JS for a better user experience. While PHP is executed on the server, JS executes within a user’s browser. https://www.javascript.com clients that read revision.meta.some_key get undefined either way, but code that checks the type of meta, or a PHPPHP The web scripting language in which WordPress is primarily architected. WordPress requires PHP 7.4 or higher client that decodes it, will see an array.
  • Visual Revisions restores meta through the REST API, so a revisioned key also needs show_in_rest to be restored from the block editor. The classic revisions screen restores it either way (Gutenberg #85549).
  • Code that inspects the controller’s $meta property now finds a WP_REST_Revision_Meta_Fields instance. It still extends WP_REST_Post_Meta_Fields.

Sites running the GutenbergGutenberg The Gutenberg project is the new Editor Interface for WordPress. The editor improves the process and experience of creating new content, making writing rich content much simpler. It uses ‘blocks’ to add richness rather than shortcodes, custom HTML etc. https://wordpress.org/gutenberg/ plugin on WordPress 7.0 and 7.1 get the same filtering from a compat change in Gutenberg (#85509), but the meta schema isn’t changed.

Related: r64731, #14359, Gutenberg #84809.

The comments endpoint accepts multiple statuses

The comments collection endpoint (/wp/v2/comments) now accepts several statuses in one request. WP_Comment_Query has always supported an array of statuses, but the endpoint only accepted a single string, so clients that needed comments in more than one status had to make a request for each (#63982).

/wp/v2/comments?status=approve,hold
/wp/v2/comments?status[]=approve&status[]=hold

Single status requests work as before, and so does the all status. The permission check is unchanged: users without the edit_posts capabilitycapability A 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)., including unauthenticated requests, may only use the default approve status. Anything else, including a list that contains approve, is rejected with rest_forbidden_param.

What changed in 7.2

  • The status collection parameter is now an array of strings with a default of array( 'approve' ), and the route’s argument schema says so.
  • The new WP_REST_Comments_Controller::sanitize_comment_statuses() accepts a string, a comma-separated list or an array. It sanitizes each value with sanitize_key, removes duplicates and drops empty values. A literal 0 is kept, because held comments are stored with a comment_approved value of 0.
  • No enum of allowed values was added. WP_Comment_Query supports custom comment statuses, so an enum would have broken existing requests.

What plugin developers should check

After sanitization, $request['status'] is always an array, and so is status in the arguments passed to the rest_comment_query filter. Code that compared it to a string will no longer match:

// Before: only matches in 7.1 and earlier.
if ( 'hold' === $request['status'] ) {
	// ...
}

// After: works in 7.1 and in 7.2.
if ( in_array( 'hold', (array) $request['status'], true ) ) {
	// ...
}

Clients and tools that read the route’s argument schema will see status as an array rather than a string.

Related: r64494, #9870, Gutenberg #71271.

New rest_allowed_cors_methods filter

WordPress 7.2 adds a rest_allowed_cors_methods filter for the Access-Control-Allow-Methods header that the REST API sends with cross-origin (CORS) requests. It also stops discarding an Access-Control-Allow-Methods value set on a REST response (#46992).

The problem

When a request carries an Origin header, rest_send_cors_headers() sent a hardcoded list of methods: OPTIONS, GET, POST, PUT, PATCH, DELETE. The only ways to change it were to unhook rest_send_cors_headers() and re-implement it, or to call header() at a later priority. Both are fragile, and two plugins doing it will conflictconflict A conflict occurs when a patch changes code that was modified after the patch was created. These patches are considered stale, and will require a refresh of the changes before it can be applied, or the conflicts will need to be resolved..

Setting the header on the response through rest_post_dispatch did not work either. rest_send_cors_headers() runs after the response’s own headers have been sent, and replaced whatever value the response set.

The two sibling CORS headers have had filters since 5.5: rest_exposed_cors_headers for Access-Control-Expose-Headers and rest_allowed_cors_headers for Access-Control-Allow-Headers. This filter fills in the third.

The new filter

rest_allowed_cors_methods follows the same shape as its siblings. It receives the list of methods as an array, along with the request in context, and the result is joined into the header. The request is null when rest_send_cors_headers() is called directly rather than while serving a REST request.

/**
 * @param string[]             $allow_methods The list of HTTP methods to allow.
 * @param WP_REST_Request|null $request       The request in context, if available.
 */
apply_filters( 'rest_allowed_cors_methods', $allow_methods, $request );

Callbacks should return an array, though coreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress. also accepts a comma-separated string such as 'OPTIONS, GET'. Because callbacks run in a chain, a callback can receive a string returned by an earlier one, so avoid an array type hint on $methods and normalize the value with wp_parse_list() before changing it.

Advertise an extra method, for example for a route that accepts PROPFIND:

add_filter(
	'rest_allowed_cors_methods',
	static function ( $methods ): array {
		$methods   = wp_parse_list( $methods );
		$methods[] = 'PROPFIND';
		return $methods;
	}
);

Narrow the list for cross-origin requests to a read-only namespace:

add_filter(
	'rest_allowed_cors_methods',
	static function ( $methods, ?WP_REST_Request $request ) {
		if ( $request && str_starts_with( $request->get_route(), '/my-plugin/v1/public' ) ) {
			return array( 'OPTIONS', 'GET' );
		}
		return $methods;
	},
	10,
	2
);

This is not a permission check. Access-Control-Allow-Methods only affects the preflight requests browsers send for some cross-origin requests. Simple cross-origin requests, such as a POST with a form content type, are not preflighted, and non-browser clients ignore the header. Use permission_callback on the route to restrict who can do what.

Returning an empty array omits the header entirely. Entries that are not valid HTTPHTTP HTTP is an acronym for Hyper Text Transfer Protocol. HTTP is the underlying protocol used by the World Wide Web and this protocol defines how messages are formatted and transmitted, and what actions Web servers and browsers should take in response to various commands. method tokens are dropped, an array entry such as 'GET, POST' is split into its methods, and a callback that returns something other than an array or a string is ignored in favor of the unfiltered list.

Response values are no longer discarded

If a response sets its own Access-Control-Allow-Methods header, for example from rest_post_dispatch, that value is now the starting list passed to the filter instead of being overwritten by the default:

add_filter(
	'rest_post_dispatch',
	static function ( WP_HTTP_Response $response ): WP_HTTP_Response {
		$response->header( 'Access-Control-Allow-Methods', 'OPTIONS, GET' );
		return $response;
	}
);

The filter still runs after that, so a site always has the last word. If the response value names no valid methods, the default list is used. With ?_envelope=1, the response’s headers are moved into the body before rest_send_cors_headers() runs, so a value set on the response is not seen and the filtered default is sent.

Backward compatibility

The default output is unchanged. A site that neither sets the header on a response nor uses the filter sends the same OPTIONS, GET, POST, PUT, PATCH, DELETE list as before.

rest_send_cors_headers() gains three optional parameters, $result, $request and $server, and is now hooked to rest_pre_serve_request with four accepted arguments. Existing calls with a single argument keep working, and remove_filter( 'rest_pre_serve_request', 'rest_send_cors_headers' ) still removes it, since the priority is unchanged at 10. When serving a REST request, the CORS headers are now sent through WP_REST_Server::send_header() rather than a direct header() call.

Related: r64730, #13151, #57752 (the sibling filters gained the $request parameter in 6.3).

#7-2, #dev-notes, #dev-notes-7-2, #rest-api

Not sure which team to contribute to?

Check out our contributor wizard and find how to get started.