-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Block Directory: Activate deactivated blocks if already installed #22286
Conversation
Size Change: -11 B (0%) Total Size: 827 kB
ℹ️ View Unchanged
|
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.
Looks good, my inactive block is activated & added 👍
We could also check to see if its activated, not sure if its necessary
I can't think of a valid case where a plugin could be active, but the block scripts not loaded… unless the block is only added to specific pages/post types. But that would cause issue with the current flow too, so I think this is a good minimal-solution to this problem.
I think this is a fine intermediary solution. Preferably in the search results we would link to the plugins endpoint for any currently installed plugins but I think that can be implemented later. |
Are we comfortable merging this or should we take more time experimenting? |
I don't have an issue merging it. |
Description
This PR is based on this discussion. It takes the simplest possible route as a conversation piece. It also addresses #19906.
TL;DR
This PR handles the case where:
Current Issue:
Options:
How has this been tested?
wp-admin/plugins.php
Add block
Expect
Types of changes
/install
endpoint, check if the block is installed.Checklist: