Skip to content

Add is_admin() guard to unregisterDefaultStyleOverrides#494

Merged
iruzevic merged 1 commit into
mainfrom
feature/enqueue-admin-check
Jun 18, 2026
Merged

Add is_admin() guard to unregisterDefaultStyleOverrides#494
iruzevic merged 1 commit into
mainfrom
feature/enqueue-admin-check

Conversation

@iobrado

@iobrado iobrado commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Description

Prevents a frontend request to wp-admin/css caused by re-registering the forms/reset style handles with a fake URL.

Theoretically, this isn't needed as the EnqueueBlocksExample file does use enqueue_block_editor_assets, but in case your agent misreads the migration guide and updates this one as well to enqueue_block_assets, you'll be safe.

Prevents a frontend request to wp-admin/css caused by re-registering
the forms/reset style handles with a fake URL. Also acts as a safeguard
if the hook is changed from enqueue_block_editor_assets to
enqueue_block_assets which fires on the frontend too.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@iobrado iobrado requested a review from a team June 18, 2026 12:19
@iobrado iobrado self-assigned this Jun 18, 2026
@iruzevic

Copy link
Copy Markdown
Member

legend

@iruzevic iruzevic merged commit 0e58d06 into main Jun 18, 2026
1 check passed
@iruzevic iruzevic deleted the feature/enqueue-admin-check branch June 18, 2026 12:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants