Prevent plugins from using core block namespaces#2241
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2241 +/- ##
==========================================
+ Coverage 24.23% 24.67% +0.43%
==========================================
Files 142 143 +1
Lines 4460 4486 +26
Branches 756 757 +1
==========================================
+ Hits 1081 1107 +26
Misses 2854 2854
Partials 525 525
Continue to review full report at Codecov.
|
|
This should be way easier to do since we introduced the |
Yes, it sounds like a great idea. We can enable such flag at the beginning |
|
Let's close it and implement it as part of #4841. Most likely it will have to be done on PHP side. |
Support Theme Colors and Gradients
Fixes #333.
This PR prohibits plugins from registering blocks in the
coreorcore-*namespaces (we currently usecore-embed).We should reserve these for future usage by core.
The PR works by setting an
ALLOW_CORE_NAMESPACESflag when registering our core blocks, then unsetting it later. Because this flag is completely internal to theblocksmodule, it is not accessible by third-party code.