-
-
Save tayvano/1ef1e37f503597e6165fdfeb25b14aa8 to your computer and use it in GitHub Desktop.
Revisions
-
tayvano renamed this gist
Jun 17, 2017 . 1 changed file with 11 additions and 7 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,14 +1,18 @@ // GF method: http://www.gravityhelp.com/documentation/gravity-forms/extending-gravity-forms/hooks/filters/gform_init_scripts_footer/ add_filter( 'gform_init_scripts_footer', '__return_true' ); // solution to move remaining JS from https://bjornjohansen.no/load-gravity-forms-js-in-footer add_filter( 'gform_cdata_open', 'wrap_gform_cdata_open' ); function wrap_gform_cdata_open( $content = '' ) { $content = 'document.addEventListener( "DOMContentLoaded", function() { '; return $content; } add_filter( 'gform_cdata_close', 'wrap_gform_cdata_close' ); function wrap_gform_cdata_close( $content = '' ) { $content = ' }, false );'; return $content; } -
eriteric renamed this gist
Mar 17, 2015 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
eriteric created this gist
Mar 17, 2015 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,14 @@ // GF method: http://www.gravityhelp.com/documentation/gravity-forms/extending-gravity-forms/hooks/filters/gform_init_scripts_footer/ add_filter( 'gform_init_scripts_footer', '__return_true' ); // solution to move remaining JS from https://bjornjohansen.no/load-gravity-forms-js-in-footer add_filter( 'gform_cdata_open', 'wrap_gform_cdata_open' ); function wrap_gform_cdata_open( $content = '' ) { $content = 'document.addEventListener( "DOMContentLoaded", function() { '; return $content; } add_filter( 'gform_cdata_close', 'wrap_gform_cdata_close' ); function wrap_gform_cdata_close( $content = '' ) { $content = ' }, false );'; return $content; }