-
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
opposite of allowed_block_types filter #10951
Comments
Thanks for response and sorry if I was not so clear with my questions. |
This sounds to me like what is done for the Column block which is used by the Columns block (plural) but the Column block (singular) is not offered via the block inserter. That was done in #9523. Can you check there to see if that use case helps you learn how to do what you are asking? |
great, thank you to point me to right direction! it was exactly what I was looking for and I found solution in the commit related to issue with column 5bae40e |
Hello,
I'd like to define blocks which are hidden from inserter. We can do that using allowed_block_types filter, where are defined blocks which are visible in inserter.
Is there a filter opposite to allowed_block_types? Filter where I can define exactly which blocks are not visible in inserter.
Alternative may be use of allowed_block_types filter if I loop through all blocks and remove unwanted blocks - I am not sure now, if there is a function to get all available blocks and loop through them in php, something like javascript wp.blocks.getBlockTypes().
Anyway this loop through all blocks may be useless if there could be opposite of allowed_block_types filter where could be defined blocks hidden in inserter.
Thanks, Ivan.
The text was updated successfully, but these errors were encountered: