Skip to content

Commit

Permalink
Added checks for cssClass for form
Browse files Browse the repository at this point in the history
  • Loading branch information
joelmcdwebworks authored Aug 23, 2023
1 parent c74a5cd commit 250543c
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions functions/gravity-forms-popup-confirmation/function.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,14 @@

global $this_function;

// If no classes are set for the form, do nothing.

if( ! $form['cssClass'] ) {

return;

}

if( strpos( $form['cssClass'], 'gf_confirmation_popup' ) !== false ) {

wp_enqueue_style( $this_function['style'] );
Expand All @@ -36,6 +44,14 @@

add_filter('gform_form_args', function( $args ) {

// If no classes are set for the form, do nothing.

if( ! $form['cssClass'] ) {

return $args;

}

$form_id = $args['form_id'];

$form = GFAPI::get_form( $form_id );
Expand Down

0 comments on commit 250543c

Please sign in to comment.