-
Notifications
You must be signed in to change notification settings - Fork 38
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
Add filter to exclude blocks with isAllowedForBlockType #835
Comments
@pcfreak30 - Sounds reasonable enough. |
Possibly related: https://secure.helpscout.net/conversation/1196422100/16578/ |
Add filter to allow excluding Popup Trigger field from specific blocks #835
@pcfreak30 We added a new filter in a recent commit which should appear in our upcoming I already tested it with the Gravity Forms block using the following code and it works as expected. You should be able to use this going forward after the update is out. add_filter( 'pum_block_editor_popup_trigger_excluded_blocks', function( $blocks ) {
$blocks[] = 'gravityforms/form';
return $blocks;
}); |
I hope it's ok to add a comment on how you can find block names you want to exclude. The way I did this was to search for the
Then added to the list of blocks to exclude as needed ...
Thanks for the filter! |
@pcfreak30 I will add to that, I found that you can get all of a current blocks info, including the block name for this filter by adding it to a builder and while it is selected entering this into the browser console.
|
Right now
excludedBlocks
is a hard coded list. Some plugins dont like having the additionalopenPopupId
added in and will cause a 400 api error.In my case, it is gravity forms doing this. I manually changed
excludedBlocks
tovar excludedBlocks = ['core/nextpage', 'gravityforms/form'];
There should be a php filter to output with ex
pum_block_editor_vars
to dynamically add compatibility with different plugins.Thanks :)
The text was updated successfully, but these errors were encountered: