Skip to content

Administration: Guard wp_ajax_widgets_order() against missing sidebars input#11970

Open
wprashed wants to merge 18 commits into
WordPress:trunkfrom
wprashed:ticket-65341-widgets-order-sidebars-check
Open

Administration: Guard wp_ajax_widgets_order() against missing sidebars input#11970
wprashed wants to merge 18 commits into
WordPress:trunkfrom
wprashed:ticket-65341-widgets-order-sidebars-check

Conversation

@wprashed
Copy link
Copy Markdown

Prevent an undefined index notice by checking isset( $_POST['sidebars'] ) before is_array(), and add an AJAX unit test for requests missing sidebars.

wprashed and others added 17 commits April 13, 2026 17:52
Introduce a native Performance settings screen with controls for page caching, asset minification, critical CSS, lazy loading, image optimization, and database cleanup.

Add core performance helpers for:
- registering and sanitizing optimization settings
- anonymous front-end page caching with cache invalidation hooks
- front-end HTML and inline CSS/JS minification
- critical CSS generation from inline styles
- lazy-loading controls through existing media filters
- AVIF/WebP output format preference when supported
- cache clearing and database cleanup actions

Wire the new screen into Settings, load the performance runtime during bootstrap, and add focused PHPUnit coverage for the new helpers.
…sent

Add a Classic Editor warning for posts/pages whose content contains WordPress block comment syntax (<!-- wp:... -->).

This helps prevent accidental overwrites when the Visual tab appears empty but block markup still exists in the Code tab. The notice is:

Scoped to the Classic Editor content field (#content).
Shown only when block comment markup is detected.
Inserted inline above the editor (#wp-content-wrap).
Guarded against duplicate rendering.
…s input

Prevent an undefined index notice by checking isset( $_POST['sidebars'] ) before is_array(), and add an AJAX unit test covering the missing sidebars request case.
@github-actions
Copy link
Copy Markdown

Trac Ticket Missing

This pull request is missing a link to a Trac ticket. For a contribution to be considered, there must be a corresponding ticket in Trac.

To attach a pull request to a Trac ticket, please include the ticket's full URL in your pull request description. More information about contributing to WordPress on GitHub can be found in the Core Handbook.

@github-actions
Copy link
Copy Markdown

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

Unlinked Accounts

The following contributors have not linked their GitHub and WordPress.org accounts: @1178653+wordpress-develop-pr-bot[bot]@users.noreply.github.com.

Contributors, please read how to link your accounts to ensure your work is properly credited in WordPress releases.

Core Committers: Use this line as a base for the props when committing in SVN:

Props wprashed.

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@github-actions
Copy link
Copy Markdown

Test using WordPress Playground

The changes in this pull request can previewed and tested using a WordPress Playground instance.

WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser.

Some things to be aware of

  • All changes will be lost when closing a tab with a Playground instance.
  • All changes will be lost when refreshing the page.
  • A fresh instance is created each time the link below is clicked.
  • Every time this pull request is updated, a new ZIP file containing all changes is created. If changes are not reflected in the Playground instance,
    it's possible that the most recent build failed, or has not completed. Check the list of workflow runs to be sure.

For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation.

Test this pull request with WordPress Playground.

Fix a typo in WP_Site_Icon::additional_sizes() where the subsize array used 'width ' (with a trailing space) instead of 'width'.

Because of the incorrect key, width could be treated as missing when generating site icon subsizes, resulting in non-square dimensions for site_icon-* images in some flows. This change restores the expected square crop behavior for site icon sizes such as site_icon-32, site_icon-180, site_icon-192, and site_icon-270.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant