Created
November 9, 2017 14:58
-
-
Save gagimilicevic/19c9861d8935b543458ace7f7c528d82 to your computer and use it in GitHub Desktop.
Change file upload locations - Gravity Forms
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
function change_upload_path( $path_info, $form_id ) { | |
$path_info['path'] = get_home_path().'wp-content/uploads/docs/'; | |
$path_info['url'] = get_site_url().'/wp-content/uploads/docs/'; | |
return $path_info; | |
} | |
add_filter( 'gform_upload_path', 'change_upload_path', 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment