Skip to content
Snippets Groups Projects
Commit 9d3bccd4 authored by Lucas García's avatar Lucas García
Browse files

feat: rename uploads custom folder name

parent 84563a88
No related branches found
No related tags found
No related merge requests found
......@@ -115,13 +115,13 @@ add_filter('wpct_crm_forms_prepare_submission', 'wpct_crm_forms_prepare_submissi
/**
* Store uploads on a protected folder
* Store uploads on a custom folder
*/
add_filter('gform_upload_path', 'wpct_forms_sm_upload_path', 90);
function wpct_forms_sm_upload_path()
{
$upload_dir = wp_upload_dir();
$path = $upload_dir['basedir'] . '/protected';
$path = $upload_dir['basedir'] . '/forms';
if (!is_dir($path)) mkdir($path);
$path .= '/' . date('Y');
if (!is_dir($path)) mkdir($path);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment