Skip to content

Ticket 65345 site icon width key: Correct width key in Site Icon additional size definitions#11973

Open
wprashed wants to merge 19 commits into
WordPress:trunkfrom
wprashed:ticket-65345-site-icon-width-key
Open

Ticket 65345 site icon width key: Correct width key in Site Icon additional size definitions#11973
wprashed wants to merge 19 commits into
WordPress:trunkfrom
wprashed:ticket-65345-site-icon-width-key

Conversation

@wprashed
Copy link
Copy Markdown

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

With the incorrect key, width can be treated as missing during subsize generation, which may produce non-square site_icon-* dimensions in some flows (for example, when assigning a non-square attachment as the site icon outside the Customizer crop UI).

This change restores expected square crops for site icon sizes such as site_icon-32, site_icon-180, site_icon-192, and site_icon-270.

Trac ticket: https://core.trac.wordpress.org/ticket/65345

wprashed and others added 19 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.
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.
@swissspidy
Copy link
Copy Markdown
Member

Please note this PR incorrectly includes changes from a bunch of different tickets. A PR should be self-contained and here should only include the site icon change, nothing else.

Also note that the ticket already had a patch, so the extra PR is a bit redundant.

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.

2 participants