Skip to content

Fix block guard in FSE.#1119

Merged
mauteri merged 1 commit intodevelopfrom
fix-block-guard
Jul 14, 2025
Merged

Fix block guard in FSE.#1119
mauteri merged 1 commit intodevelopfrom
fix-block-guard

Conversation

@mauteri
Copy link
Copy Markdown
Contributor

@mauteri mauteri commented Jul 14, 2025

Description of the Change

Fixes block guard in context of FSE. Issue is that blocks are within iframe, so DOM selectors do not find them.

Closes #

How to test the Change

Changelog Entry

Added - New feature
Changed - Existing functionality
Deprecated - Soon-to-be removed feature
Removed - Feature
Fixed - Bug fix
Security - Vulnerability

Credits

Props @username, @username2, ...

Checklist:

  • I agree to follow this project's Code of Conduct.
  • I have updated the documentation accordingly.
  • I have added tests to cover my change.
  • All new and existing tests pass.

@what-the-diff
Copy link
Copy Markdown

what-the-diff bot commented Jul 14, 2025

PR Summary

  • Introduced a New Utility Function
    We added a new utility function called getEditorDocument. This function is designed to fetch the appropriate document details for the block editor and can handle full site editing contexts efficiently.

  • Replacement of Direct global.document Usage
    Instead of directly using global.document, we now use the aforementioned getEditorDocument function. This function provides the document's details needed when installing the BlockGuard functionality. This change makes the process more reliable.

@mauteri mauteri marked this pull request as ready for review July 14, 2025 23:30
@github-actions
Copy link
Copy Markdown
Contributor

Preview changes with Playground

You can preview the recent changes for PR#1119 with the following PHP versions:

PHP Version 8.3

PHP Version 7.4

Download .zip with build changes

Made with 💙 from GatherPress & a little bit of WordPress Playground. Changes will not persist between sessions.

@mauteri mauteri merged commit 556348b into develop Jul 14, 2025
10 checks passed
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