Created
April 1, 2021 21:12
-
-
Save wpsunshine/3a51d24caa94cd22ecc4af4794a3bb63 to your computer and use it in GitHub Desktop.
Gravity Forms add body class after submission
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
add_action( 'gform_after_submission', 'wpsunshine_gf_after_submission', 10, 2 ); | |
function wpsunshine_gf_after_submission( $entry, $form ) { | |
add_filter( 'body_class', function( $classes ) { | |
return array_merge( $classes, array( 'gf-submitted' ) ); | |
} ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment