By default all files of each user are saved under /wp-contents/uploads/[username]
,
How to change folder name
Add following script into your theme’s functions.php file:
add_filter('wpfm_users_directory', 'wpfm_change_directory', 11, 2);
function wpfm_change_directory($map, $current_user){
$author_name = $current_user->user_firstname.'_'.$current_user->user_lastname;
$dir_map = array('root' => $author_name,
'thumbs' => $author_name.'/thumbs',
'ftp' => $author_name.'/ftp');
return $dir_map;
}
add_filter('wpfm_file_url_author_dir', 'wpfm_change_url_dir', 11, 3);
function wpfm_change_url_dir($author_name, $current_user, $file_id){
$author_name = $current_user->user_firstname.'_'.$current_user->user_lastname;
return $author_name;
}
-
This topic was modified 3 years, 7 months ago by nmedia.