티스토리 수익 글 보기
Navigation Menu
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Editor: Allow replacing the ‘PostLockedModal’ component #70586
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| export default globalThis.IS_GUTENBERG_PLUGIN | ||
| ? withFilters( 'editor.PostLockedModal' )( PostLockedModal ) | ||
| : PostLockedModal; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could also use a Symbol for a private filter, but this way we avoid unnecessarily wrapping the component.
const HOOK_NAME = globalThis.IS_GUTENBERG_PLUGIN
? 'editor.PostLockedModal'
: Symbol( 'editor.PostLockedModal' );|
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 If you’re merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project’s expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
|
Size Change: 0 B Total Size: 1.87 MB ℹ️ View Unchanged
|
|
Flaky tests detected in 165bb69. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/16006202554
|
t-hamano
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! I also confirmed that when I set the IS_GUTENBERG_PLUGIN variable to false, the filter does not work.
|
Thanks for testing, @t-hamano! |
What?
Closes #70537.
PR introduces a new
editor.PostLockedModalfilter, allowing replacement of thePostLockedModalcore component in editors.Note
The new filter is limited to the Gutenberg plugin and won’t ship in WordPress core, at least for now.
Why?
Prepares for the upcoming collaborating editing work in the block editor, which will be developed as a separate plugin.
Testing Instructions
Test Snippet
Testing Instructions for Keyboard
Same.