Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Remove Gravity Forms' "Add Form" button from all WYSIWYG editors
<?php
add_filter( 'gform_display_add_form_button', function(){return false;} );
@BinaryKitten

This comment has been minimized.

Copy link

BinaryKitten commented Oct 14, 2015

you can replace the function with '__return_false' which does the same thing. This issue with Anonymous functions / lambdas is that they can't be opcode cached.

ending code would be:

@pixelcutlabs

This comment has been minimized.

Copy link

pixelcutlabs commented Dec 28, 2016

Thank you! Worked like a charm!

@gavin310

This comment has been minimized.

Copy link

gavin310 commented Nov 17, 2017

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.