Skip to content

Instantly share code, notes, and snippets.

@wpsunshine
Created April 1, 2021 21:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wpsunshine/3a51d24caa94cd22ecc4af4794a3bb63 to your computer and use it in GitHub Desktop.
Save wpsunshine/3a51d24caa94cd22ecc4af4794a3bb63 to your computer and use it in GitHub Desktop.
Gravity Forms add body class after submission
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