Add has_block_style
function
#52701
Labels
[Feature] Extensibility
The ability to extend blocks or the editing experience
[Package] Style Engine
/packages/style-engine
[Type] Enhancement
A suggestion for improvement.
What problem does this address?
The
has_block
core function is very useful for e.g. conditionally enqueuing block-specific assets.However, in many cases core block styles are used, which can also require larger assets for styling and scripting.
The
has_block
function can only be used to check for the existence of specific blocks, not block styles for a specific block.What is your proposed solution?
Add a
has_block_style
function that checks for the existence of a given block style for a given block.The text was updated successfully, but these errors were encountered: