Last active
December 27, 2024 20:31
Revisions
-
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 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; }