Remove WP_Widget_Block from the legacy dropdown list#24787
Conversation
|
Size Change: 0 B Total Size: 1.16 MB ℹ️ View Unchanged
|
|
@adamziel I wonder, could we make it that the Block widget does not show in the available widgets in the current widgets screen, but still shows up in the areas if used? :) I ask because the WP_Widget_Block adds this "Block" entry that does not provide any action in the current widgets screen. |
+1 good idea. It looks like we might need to patch Core to do this, though, as I'm not seeing any filters we can use in |
|
Great idea @draganescu ! I created an issue to track it here: #24849 |
Description
As mentioned in #24290 (comment), this is what happens when you add a legacy widget on the experimental management screen:
Before:

This is undesired, the Block widget shouldn't be visible to the user, it's just an implementation detail to ensure interoperability. This PR removes it from that dropdown like this:
After:

How has this been tested?
Types of changes
Bug fix (non-breaking change which fixes an issue)
Checklist: