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 characters
This allows your gravity forms to load via ajax to ensure they work correctly with page transitions that have no window/document.onload |
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 characters
<?php | |
//* the the default upload path to work in normal WP structure | |
add_filter("gform_upload_path", "change_upload_path", 20, 2); | |
function change_upload_path($path_info, $form_id){ | |
$wp_upload_path = wp_upload_dir(); | |
$path_info["path"] = $wp_upload_path['path'] . '/'; | |
$path_info["url"] = $wp_upload_path['url'] . '/'; | |
return $path_info; |