- fixed files download for sites with cache;

- changes in scripts enqueue;
This commit is contained in:
nikitozzzzzzz
2018-10-23 10:48:55 +03:00
parent be5dc07f63
commit 3f9d0b71eb
8 changed files with 21 additions and 260 deletions
+5 -3
View File
@@ -1186,9 +1186,11 @@ if ( ! class_exists( 'um\core\Uploader' ) ) {
$user_meta_keys = UM()->user()->profile;
$_array = array();
foreach ( UM()->builtin()->custom_fields as $_field ) {
if ( $_field['type'] == 'file' && ! empty( $user_meta_keys[ $_field['metakey'] ] ) ) {
$_array[ $_field['metakey'] ] = $user_meta_keys[ $_field['metakey'] ];
if ( ! empty( UM()->builtin()->custom_fields ) ) {
foreach ( UM()->builtin()->custom_fields as $_field ) {
if ( $_field['type'] == 'file' && ! empty( $user_meta_keys[ $_field['metakey'] ] ) ) {
$_array[ $_field['metakey'] ] = $user_meta_keys[ $_field['metakey'] ];
}
}
}
$_array = array_merge( $_array, $new_files );