Skip to content

Instantly share code, notes, and snippets.

@gagimilicevic
Created November 9, 2017 14:58
Show Gist options
  • Save gagimilicevic/19c9861d8935b543458ace7f7c528d82 to your computer and use it in GitHub Desktop.
Save gagimilicevic/19c9861d8935b543458ace7f7c528d82 to your computer and use it in GitHub Desktop.
Change file upload locations - Gravity Forms
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