Archived topic
Hiding generateblocks settings pannels based on user groups, or post types ...
1 reply · Started by Elvis on April 13, 2022
Hello,
I did a search about this but no luck.
Tom posted this in GB forum https://community.generateblocks.com/t/remove-documentation-panels/240?u=thisbit and my question would be if you could show how to get names of all pannels so we can control which pannels are available an which not.
I am talking about these names: removeDocumentationPanels, buttonContainerDocumentation, containerDocumentation … is there a way to get a list of these in console?
Something along the lines of this:
wp.blocks.getBlockTypes().filter((block) => { return block.name.indexOf(‘generateblocks’) !== -1});
which in console gives a list of all generateblocks. Is there such a thing for pannels?
Thanks
Hey Elvis,
There isn't an easy way to get a list of these.
However, they're quite easy to find.
For example, here is each block: https://github.com/tomusborne/generateblocks/tree/1.4.2/src/blocks
If you go into one and go into the edit.js file, you can do a ctrl+f for "PanelArea": https://github.com/tomusborne/generateblocks/blob/1.4.2/src/blocks/button-container/edit.js
Each PanelArea will have an id, which is what you're looking for.
Hope this helps!