Created
August 20, 2015 14:24
-
-
Save NikV/b80ee19beaef412ce0b8 to your computer and use it in GitHub Desktop.
Modify Trash Link to button, Gravity Forms
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function modify_gfroms_trash_link() { | |
| return '<button style="background: red; color: white; border: none;" class="submitdelete" title="' . __( 'Move this form to the trash', 'gravityforms' ) . '" onclick="if(confirm(\'' . __( "Would you like to move this form to the trash? \'Cancel\' to stop. \'OK\' to continue", 'gravityforms' ) . '\')){ gf_vars.isFormTrash = true; jQuery(\'#form_trash\')[0].submit();} else{return false;}">' . __( 'Trash', 'gravityforms' ) . '</button>'; | |
| } | |
| add_filter('gform_form_trash_link', 'modify_gfroms_trash_link'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment