- fixed upload dir on UM upload process for avoid the conflicts;

This commit is contained in:
nikitasinelnikov
2019-02-08 11:43:01 +02:00
parent bad51f49f6
commit 21f266f407
6 changed files with 75 additions and 56 deletions
+10 -2
View File
@@ -22,6 +22,12 @@ if ( ! class_exists( 'um\core\Uploader' ) ) {
var $user_id;
/**
* @var integer
*/
var $replace_upload_dir = false;
/**
* @var string
*/
@@ -270,8 +276,10 @@ if ( ! class_exists( 'um\core\Uploader' ) ) {
list( $this->upload_user_baseurl, $this->upload_user_basedir ) = apply_filters( 'um_change_upload_user_path', array( $this->upload_user_baseurl, $this->upload_user_basedir ), $this->field_key, $this->upload_type );
$args['path'] = $this->upload_user_basedir;
$args['url'] = $this->upload_user_baseurl;
if ( $this->replace_upload_dir ) {
$args['path'] = $this->upload_user_basedir;
$args['url'] = $this->upload_user_baseurl;
}
return $args;
}