Created
September 7, 2015 15:51
-
-
Save NikV/f388e7982dee6fce4551 to your computer and use it in GitHub Desktop.
Only allow users to save a form if they can use settings in the WordPress admin
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_gform_save_form_button( $save_button ) { | |
if ( current_user_can('manage_options')) { | |
return $save_button; | |
} | |
} | |
add_filter('gform_save_form_button', 'modify_gform_save_form_button'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment