- 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
+4 -2
View File
@@ -83,12 +83,14 @@ if ( ! class_exists( 'um\core\Files' ) ) {
if ( UM()->is_permalinks ) {
$url = get_site_url( get_current_blog_id() );
$nonce = wp_create_nonce( $user_id . $form_id . 'um-download-nonce' );
return $url . "/um-download/{$form_id}/{$field_key}/{$user_id}/{$nonce}";
$url = $url . "/um-download/{$form_id}/{$field_key}/{$user_id}/{$nonce}";
} else {
$url = get_site_url( get_current_blog_id() );
$nonce = wp_create_nonce( $user_id . $form_id . 'um-download-nonce' );
return add_query_arg( array( 'um_action' => 'download', 'um_form' => $form_id, 'um_field' => $field_key, 'um_user' => $user_id, 'um_verify' => $nonce ), $url );
$url = add_query_arg( array( 'um_action' => 'download', 'um_form' => $form_id, 'um_field' => $field_key, 'um_user' => $user_id, 'um_verify' => $nonce ), $url );
}
return add_query_arg( array( 't' => time() ), $url );
}