Version Description
- Fixed - Multiple Drag & Drop fields in one form ( Validation Issues - Max File not working correctly )
- Added - Added "deleted..." status when removing file.
- So that the user know that file deletion is in progress...
- Fixed - Responsive issues on Mobile < 767px screen.
- Added - Added '/wpcf7-files' directory inside '/wp_dndcf7_uploads' to temporary store files instead of relying contact form 7.
- Added - Auto delete files inside '/wpcf7-files' dir 1 hour(3200 seconds) after submission.
- It was a problem with contact form 7 before that files only last 60 seconds and it will automatically deleted.
- Improved - Optimized and Improved Php Code & Javascript structure and functionalities. ( removed redundant code, removed spaces, etc )
- Added - Links going to Pro Version.
Download this release
Release Info
Developer | glenwpcoder |
Plugin | Drag and Drop Multiple File Upload – Contact Form 7 |
Version | 1.3.0 |
Comparing to | |
See all releases |
Code changes from version 1.2.6 to 1.3.0
- assets/css/dnd-upload-cf7.css +10 -0
- assets/fonts/icomoon.svg +12 -12
- assets/js/codedropz-uploader-min.js +3 -3
- assets/js/dnd-upload-cf7.js +41 -37
- drag-n-drop-upload-cf7.php +5 -2
- inc/dnd-upload-cf7.php +120 -57
- languages/dnd-upload-cf7-fr_FR.po +106 -106
- languages/dnd-upload-cf7-ko_KR.po +106 -106
- readme.txt +31 -14
assets/css/dnd-upload-cf7.css
CHANGED
@@ -27,6 +27,10 @@
|
|
27 |
.dnd-icon-remove:before { content: "\e901";}
|
28 |
.icon-upload:before { content: "\e902";}
|
29 |
|
|
|
|
|
|
|
|
|
30 |
.wpcf7-drag-n-drop-file.d-none {
|
31 |
display:none;
|
32 |
opacity:0;
|
@@ -78,6 +82,7 @@
|
|
78 |
top:6px;
|
79 |
text-decoration:none;
|
80 |
box-shadow:none;
|
|
|
81 |
}
|
82 |
|
83 |
.dnd-upload-status .dnd-upload-details span.has-error { color:#f50505; }
|
@@ -138,4 +143,9 @@
|
|
138 |
color:#fd3939;
|
139 |
padding:5px 0;
|
140 |
font-style:italic;
|
|
|
|
|
|
|
|
|
|
|
141 |
}
|
27 |
.dnd-icon-remove:before { content: "\e901";}
|
28 |
.icon-upload:before { content: "\e902";}
|
29 |
|
30 |
+
/* Delete Status */
|
31 |
+
.dnd-icon-remove.deleting { outline:none; font-family : inherit !important; font-size:12px; color:#000; font-weight:500; }
|
32 |
+
.dnd-icon-remove.deleting:before {content : '';}
|
33 |
+
|
34 |
.wpcf7-drag-n-drop-file.d-none {
|
35 |
display:none;
|
36 |
opacity:0;
|
82 |
top:6px;
|
83 |
text-decoration:none;
|
84 |
box-shadow:none;
|
85 |
+
outline:none !important;
|
86 |
}
|
87 |
|
88 |
.dnd-upload-status .dnd-upload-details span.has-error { color:#f50505; }
|
143 |
color:#fd3939;
|
144 |
padding:5px 0;
|
145 |
font-style:italic;
|
146 |
+
}
|
147 |
+
|
148 |
+
@media screen and (max-width: 767px) {
|
149 |
+
.dnd-upload-status .dnd-upload-details .name em { font-weight:normal; }
|
150 |
+
.dnd-upload-status .dnd-upload-details .name { padding-right:60px; }
|
151 |
}
|
assets/fonts/icomoon.svg
CHANGED
@@ -1,13 +1,13 @@
|
|
1 |
-
<?xml version="1.0" standalone="no"?>
|
2 |
-
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
|
3 |
-
<svg xmlns="http://www.w3.org/2000/svg">
|
4 |
-
<metadata>Generated by IcoMoon</metadata>
|
5 |
-
<defs>
|
6 |
-
<font id="icomoon" horiz-adv-x="1024">
|
7 |
-
<font-face units-per-em="1024" ascent="960" descent="-64" />
|
8 |
-
<missing-glyph horiz-adv-x="1024" />
|
9 |
-
<glyph unicode=" " horiz-adv-x="512" d="" />
|
10 |
-
<glyph unicode="" glyph-name="blank-file" d="M640 960h-512v-1024h768v768l-256 256zM576 640h256v-640h-640v896h384v-256zM640 704v192l192-192h-192z" />
|
11 |
-
<glyph unicode="" glyph-name="remove" d="M510 962c-282.773 0-512-229.227-512-512s229.227-512 512-512 512 229.227 512 512c-0.336 282.633-229.367 511.664-512 512zM510 2c-247.422 0-448 200.578-448 448s200.578 448 448 448 448-200.578 448-448c-0.266-247.313-200.688-447.734-448-448zM758.898 698.898c-12.5 12.492-32.758 12.492-45.25 0l-203.648-203.648-203.648 203.648c-12.281 12.711-32.539 13.063-45.25 0.781-12.711-12.273-13.063-32.531-0.781-45.242 0.258-0.266 0.516-0.531 0.781-0.789l203.648-203.648-203.648-203.648c-12.711-12.273-13.063-32.531-0.781-45.25 12.273-12.711 32.531-13.063 45.242-0.781 0.266 0.258 0.531 0.516 0.789 0.781l203.648 203.648 203.648-203.648c12.711-12.273 32.969-11.922 45.242 0.789 11.977 12.398 11.977 32.063 0 44.461l-203.641 203.648 203.648 203.648c12.492 12.492 12.492 32.75 0 45.25z" />
|
12 |
-
<glyph unicode="" glyph-name="upload" d="M338.082 751.396c4.443 0 8.886 1.701 12.271 5.085l144.282 144.282v-617.639c0-9.598 7.758-17.356 17.356-17.356s17.356 7.758 17.356 17.356v617.639l143.571-143.571c6.786-6.786 17.755-6.786 24.542 0s6.786 17.755 0 24.542l-173.18 173.18c-1.597 1.614-3.523 2.881-5.675 3.766-4.235 1.753-9.008 1.753-13.26 0-2.135-0.885-4.061-2.17-5.658-3.766l-173.875-173.892c-6.786-6.786-6.786-17.755 0-24.542 3.384-3.402 7.828-5.085 12.271-5.085zM633.485 682.318c-9.598 0-17.356-7.758-17.356-17.356s7.758-17.356 17.356-17.356h225.631v-676.893h-694.249v676.893h225.631c9.598 0 17.356 7.758 17.356 17.356s-7.758 17.356-17.356 17.356h-260.343v-746.318h763.674v746.318h-260.343z" />
|
13 |
</font></defs></svg>
|
1 |
+
<?xml version="1.0" standalone="no"?>
|
2 |
+
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
|
3 |
+
<svg xmlns="http://www.w3.org/2000/svg">
|
4 |
+
<metadata>Generated by IcoMoon</metadata>
|
5 |
+
<defs>
|
6 |
+
<font id="icomoon" horiz-adv-x="1024">
|
7 |
+
<font-face units-per-em="1024" ascent="960" descent="-64" />
|
8 |
+
<missing-glyph horiz-adv-x="1024" />
|
9 |
+
<glyph unicode=" " horiz-adv-x="512" d="" />
|
10 |
+
<glyph unicode="" glyph-name="blank-file" d="M640 960h-512v-1024h768v768l-256 256zM576 640h256v-640h-640v896h384v-256zM640 704v192l192-192h-192z" />
|
11 |
+
<glyph unicode="" glyph-name="remove" d="M510 962c-282.773 0-512-229.227-512-512s229.227-512 512-512 512 229.227 512 512c-0.336 282.633-229.367 511.664-512 512zM510 2c-247.422 0-448 200.578-448 448s200.578 448 448 448 448-200.578 448-448c-0.266-247.313-200.688-447.734-448-448zM758.898 698.898c-12.5 12.492-32.758 12.492-45.25 0l-203.648-203.648-203.648 203.648c-12.281 12.711-32.539 13.063-45.25 0.781-12.711-12.273-13.063-32.531-0.781-45.242 0.258-0.266 0.516-0.531 0.781-0.789l203.648-203.648-203.648-203.648c-12.711-12.273-13.063-32.531-0.781-45.25 12.273-12.711 32.531-13.063 45.242-0.781 0.266 0.258 0.531 0.516 0.789 0.781l203.648 203.648 203.648-203.648c12.711-12.273 32.969-11.922 45.242 0.789 11.977 12.398 11.977 32.063 0 44.461l-203.641 203.648 203.648 203.648c12.492 12.492 12.492 32.75 0 45.25z" />
|
12 |
+
<glyph unicode="" glyph-name="upload" d="M338.082 751.396c4.443 0 8.886 1.701 12.271 5.085l144.282 144.282v-617.639c0-9.598 7.758-17.356 17.356-17.356s17.356 7.758 17.356 17.356v617.639l143.571-143.571c6.786-6.786 17.755-6.786 24.542 0s6.786 17.755 0 24.542l-173.18 173.18c-1.597 1.614-3.523 2.881-5.675 3.766-4.235 1.753-9.008 1.753-13.26 0-2.135-0.885-4.061-2.17-5.658-3.766l-173.875-173.892c-6.786-6.786-6.786-17.755 0-24.542 3.384-3.402 7.828-5.085 12.271-5.085zM633.485 682.318c-9.598 0-17.356-7.758-17.356-17.356s7.758-17.356 17.356-17.356h225.631v-676.893h-694.249v676.893h225.631c9.598 0 17.356 7.758 17.356 17.356s-7.758 17.356-17.356 17.356h-260.343v-746.318h763.674v746.318h-260.343z" />
|
13 |
</font></defs></svg>
|
assets/js/codedropz-uploader-min.js
CHANGED
@@ -1,11 +1,11 @@
|
|
1 |
/**
|
2 |
-
* CodeDropz Uploader v1.
|
3 |
* Copyright 2018 Glen Mongaya
|
4 |
* CodeDrop Drag&Drop Uploader
|
5 |
-
* @version 1.
|
6 |
* @author CodeDropz, Glen Don L. Mongaya
|
7 |
* @license The MIT License (MIT)
|
8 |
*/
|
9 |
|
10 |
// CodeDropz Drag and Drop Plugin
|
11 |
-
!function(e){e.fn.CodeDropz_Uploader=function(a){var d=e.extend({handler:
|
1 |
/**
|
2 |
+
* CodeDropz Uploader v1.0
|
3 |
* Copyright 2018 Glen Mongaya
|
4 |
* CodeDrop Drag&Drop Uploader
|
5 |
+
* @version 1.0
|
6 |
* @author CodeDropz, Glen Don L. Mongaya
|
7 |
* @license The MIT License (MIT)
|
8 |
*/
|
9 |
|
10 |
// CodeDropz Drag and Drop Plugin
|
11 |
+
!function(e){e.fn.CodeDropz_Uploader=function(a){this.each(function(){var r=e(this),d=e.extend({handler:r,color:"#000",background:"",server_max_error:"Uploaded file exceeds the maximum upload size of your server.",max_file:r.data("max")?r.data("max"):10,max_upload_size:r.data("limit")?r.data("limit"):"5242880",supported_type:r.data("type")?r.data("type"):"jpg|jpeg|JPG|png|gif|pdf|doc|docx|ppt|pptx|odt|avi|ogg|m4a|mov|mp3|mp4|mpg|wav|wmv|xls",text:"Drag & Drop Files Here",separator:"or",button_text:"Browse Files",on_success:""},a),o=r.data("name")+"_count_files";localStorage.setItem(o,1);var s='<div class="codedropz-upload-handler"><div class="codedropz-upload-container"><div class="codedropz-upload-inner"><h3>'+d.text+"</h3><span>"+d.separator+'</span><div class="codedropz-btn-wrap"><a class="cd-upload-btn" href="javascript:void(0)">'+d.button_text+"</a></div></div></div></div>";d.handler.wrapAll('<div class="codedropz-upload-wrapper"></div>');var t=d.handler.parents("form"),n=d.handler.parents(".codedropz-upload-wrapper"),p=e('input[type="submit"]',t);d.handler.after(s),e(".codedropz-upload-handler",n).on("drag dragstart dragend dragover dragenter dragleave drop",function(e){e.preventDefault(),e.stopPropagation()}),e(".codedropz-upload-handler",n).on("dragover dragenter",function(a){e(this).addClass("codedropz-dragover")}),e(".codedropz-upload-handler",n).on("dragleave dragend drop",function(a){e(this).removeClass("codedropz-dragover")}),e("a.cd-upload-btn",n).on("click",function(e){e.preventDefault(),d.handler.val(null),d.handler.click()}),e(".codedropz-upload-handler",n).on("drop",function(e){l(e.originalEvent.dataTransfer.files,"drop")}),d.handler.on("change",function(e){l(this.files,"click")});var l=function(a,s){if(!(!a.length>1)){var p=new FormData;p.append("supported_type",d.supported_type),p.append("size_limit",d.max_upload_size),p.append("action","dnd_codedropz_upload"),p.append("type",s),e("span.has-error",d.handler).remove(),e.each(a,function(a,s){if(p.delete("upload-file"),localStorage.getItem(o)>d.max_file)return!e("span.has-error-msg",n).length>0&&(err_msg=dnd_cf7_uploader.drag_n_drop_upload.max_file_limit,n.append('<span class="has-error-msg">'+err_msg.replace("%count%",d.max_file)+"</span>")),!1;var l=i.createProgressBar(s),c=!1;if(s.size>d.max_upload_size&&(e(".dnd-upload-details",e("#"+l)).append('<span class="has-error">'+dnd_cf7_uploader.drag_n_drop_upload.large_file+"</span>"),c=!0),regex_type=new RegExp("(.*?).("+d.supported_type+")$"),!1!==c||regex_type.test(s.name.toLowerCase())||(e(".dnd-upload-details",e("#"+l)).append('<span class="has-error">'+dnd_cf7_uploader.drag_n_drop_upload.inavalid_type+"</span>"),c=!0),localStorage.setItem(o,Number(localStorage.getItem(o))+1),!1===c){p.append("upload-file",s);e.ajax({url:d.ajax_url,type:t.attr("method"),data:p,dataType:"json",cache:!1,contentType:!1,processData:!1,xhr:function(){var e=new window.XMLHttpRequest;return e.upload.addEventListener("progress",function(e){if(e.lengthComputable){var a=e.loaded/e.total,r=parseInt(100*a);i.setProgressBar(l,r)}},!1),e},complete:function(){i.setProgressBar(l,100)},success:function(a){a.success?e.isFunction(d.on_success)&&d.on_success.call(this,r,l,a):(e(".dnd-progress-bar",e("#"+l)).remove(),e(".dnd-upload-details",e("#"+l)).append('<span class="has-error">'+a.data+"</span>"),e('input[type="submit"]',t).removeClass("disabled").prop("disabled",!1))},error:function(a,r,o){e(".dnd-progress-bar",e("#"+l)).remove(),e(".dnd-upload-details",e("#"+l)).append('<span class="has-error">'+d.server_max_error+"</span>"),e('input[type="submit"]',t).removeClass("disabled").prop("disabled",!1)}})}})}},i={createProgressBar:function(a){var r=e(".codedropz-upload-handler",n),d="dnd-file-"+Math.random().toString(36).substr(2,9),s='<div class="dnd-upload-image"><span class="dnd-icon-blank-file"></span></div><div class="dnd-upload-details"><span class="name">'+a.name+" <em>("+i.bytesToSize(a.size)+')</em></span><a href="javascript:void(0)" title="Remove" class="remove-file" data-storage="'+o+'"><span class="dnd-icon-remove"></span></a><span class="dnd-progress-bar"><span></span></span></div>';return r.after('<div id="'+d+'" class="dnd-upload-status">'+s+"</div>"),d},setProgressBar:function(a,r){var d=e(".dnd-progress-bar",e("#"+a));return d.length>0&&(i.disableBtn(p),progress_width=r*d.width()/100,e("span",d).addClass("in-progress").animate({width:progress_width},10).text(r+"% "),100==r&&e("span",d).addClass("complete").removeClass("in-progress")),!1},bytesToSize:function(e){return 0===e?"0":(kBytes=e/1024,fileSize=kBytes>=1024?(kBytes/1024).toFixed(2)+"MB":kBytes.toFixed(2)+"KB",fileSize)},disableBtn:function(e){e.length>0&&e.addClass("disable").prop("disabled",!0)}}}),e(document).on("click",".dnd-icon-remove",function(r){var d=e(this),o=d.parents(".dnd-upload-status"),s=d.parents(".codedropz-upload-wrapper"),t=d.parent("a").attr("data-storage");return!(e("span.in-progress",o).length>0)&&(e(".has-error",o).length>0?(o.remove(),localStorage.setItem(t,Number(localStorage.getItem(t))-1),!1):(d.addClass("deleting").text("deleting..."),void e.post(a.ajax_url,{path:o.find('input[type="hidden"]').val(),action:"dnd_codedropz_upload_delete"},function(a){a.success&&(o.remove(),localStorage.setItem(t,Number(localStorage.getItem(t))-1),e(".dnd-upload-status",s).length<=1&&e("span.has-error-msg",s).remove())})))})}}(jQuery);
|
assets/js/dnd-upload-cf7.js
CHANGED
@@ -1,50 +1,54 @@
|
|
1 |
jQuery(document).ready(function($){
|
2 |
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
'
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
// If it's complete remove disabled attribute in button
|
24 |
-
if( $('.in-progress', dnd_input_file.parents('form') ).length === 0 ) {
|
25 |
-
setTimeout(function(){ $('input[type="submit"]', dnd_input_file.parents('form')).removeAttr('disabled'); }, 1);
|
26 |
-
}
|
27 |
-
|
28 |
-
// Append hidden input field
|
29 |
-
progressDetails
|
30 |
-
.find('.dnd-upload-details')
|
31 |
-
.append('<span><input type="hidden" name="'+ dnd_input_file.attr('data-name') +'[]" value="'+ response.data.path +'/'+ response.data.file +'"></span>');
|
32 |
}
|
33 |
-
|
|
|
|
|
|
|
|
|
|
|
34 |
});
|
35 |
|
36 |
// Fires when an Ajax form submission has completed successfully, and mail has been sent.
|
37 |
document.addEventListener( 'wpcf7mailsent', function( event ) {
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
|
|
|
|
|
|
|
|
|
|
42 |
});
|
43 |
}else {
|
44 |
-
|
|
|
45 |
}
|
46 |
-
|
47 |
-
|
|
|
|
|
|
|
48 |
}, false );
|
49 |
|
50 |
});
|
1 |
jQuery(document).ready(function($){
|
2 |
|
3 |
+
// Get text object options/settings from localize script
|
4 |
+
var TextOJB = dnd_cf7_uploader.drag_n_drop_upload;
|
5 |
+
|
6 |
+
// Support Multiple Fileds
|
7 |
+
$('.wpcf7-drag-n-drop-file').CodeDropz_Uploader({
|
8 |
+
'color' : '#fff',
|
9 |
+
'ajax_url' : dnd_cf7_uploader.ajax_url,
|
10 |
+
'text' : TextOJB.text,
|
11 |
+
'separator' : TextOJB.or_separator,
|
12 |
+
'button_text' : TextOJB.browse,
|
13 |
+
'server_max_error' : TextOJB.server_max_error,
|
14 |
+
'on_success' : function( input, progressBar, response ){
|
15 |
+
|
16 |
+
// Progressbar Object
|
17 |
+
var progressDetails = $('#' + progressBar, input.parents('.codedropz-upload-wrapper') );
|
18 |
+
|
19 |
+
// If it's complete remove disabled attribute in button
|
20 |
+
if( $('.in-progress', input.parents('form') ).length === 0 ) {
|
21 |
+
setTimeout(function(){ $('input[type="submit"]', input.parents('form')).removeAttr('disabled'); }, 1);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
22 |
}
|
23 |
+
|
24 |
+
// Append hidden input field
|
25 |
+
progressDetails
|
26 |
+
.find('.dnd-upload-details')
|
27 |
+
.append('<span><input type="hidden" name="'+ input.attr('data-name') +'[]" value="'+ response.data.path +'/'+ response.data.file +'"></span>');
|
28 |
+
}
|
29 |
});
|
30 |
|
31 |
// Fires when an Ajax form submission has completed successfully, and mail has been sent.
|
32 |
document.addEventListener( 'wpcf7mailsent', function( event ) {
|
33 |
+
|
34 |
+
// Get input type file element
|
35 |
+
var inputFile = $('.wpcf7-drag-n-drop-file');
|
36 |
+
|
37 |
+
// Reset upload list for multiple fields
|
38 |
+
if( inputFile.length > 0 ) {
|
39 |
+
$.each( inputFile, function(){
|
40 |
+
// Reset file counts
|
41 |
+
localStorage.setItem( $(this).attr('data-name') + '_count_files', 1 );
|
42 |
});
|
43 |
}else {
|
44 |
+
// Reset file counts
|
45 |
+
localStorage.setItem( inputFile.attr('data-name') + '_count_files', 1 );
|
46 |
}
|
47 |
+
|
48 |
+
// Remove status / progress bar
|
49 |
+
$('.dnd-upload-status', inputFile.parents('form')).remove();
|
50 |
+
$('span.has-error-msg').remove();
|
51 |
+
|
52 |
}, false );
|
53 |
|
54 |
});
|
drag-n-drop-upload-cf7.php
CHANGED
@@ -6,7 +6,7 @@
|
|
6 |
* Description: This simple plugin create Drag & Drop or choose Multiple File upload in your Confact Form 7 Forms.
|
7 |
* Text Domain: dnd-upload-cf7
|
8 |
* Domain Path: /languages
|
9 |
-
* Version: 1.
|
10 |
* Author: Glen Don L. Mongaya
|
11 |
* Author URI: http://codedropz.com
|
12 |
* License: GPL2
|
@@ -21,10 +21,13 @@
|
|
21 |
define( 'dnd_upload_cf7', true );
|
22 |
|
23 |
/** Define plugin Version */
|
24 |
-
define( 'dnd_upload_cf7_version', '1.
|
25 |
|
26 |
/** Define constant Plugin Directories */
|
27 |
define( 'dnd_upload_cf7_directory', untrailingslashit( dirname( __FILE__ ) ) );
|
28 |
|
|
|
|
|
|
|
29 |
// require plugin core file
|
30 |
require_once( dnd_upload_cf7_directory .'/inc/dnd-upload-cf7.php' );
|
6 |
* Description: This simple plugin create Drag & Drop or choose Multiple File upload in your Confact Form 7 Forms.
|
7 |
* Text Domain: dnd-upload-cf7
|
8 |
* Domain Path: /languages
|
9 |
+
* Version: 1.3.0
|
10 |
* Author: Glen Don L. Mongaya
|
11 |
* Author URI: http://codedropz.com
|
12 |
* License: GPL2
|
21 |
define( 'dnd_upload_cf7', true );
|
22 |
|
23 |
/** Define plugin Version */
|
24 |
+
define( 'dnd_upload_cf7_version', '1.3.0' );
|
25 |
|
26 |
/** Define constant Plugin Directories */
|
27 |
define( 'dnd_upload_cf7_directory', untrailingslashit( dirname( __FILE__ ) ) );
|
28 |
|
29 |
+
/* Define Custom Upload Directory */
|
30 |
+
define('wpcf7_dnd_dir', 'wp_dndcf7_uploads');
|
31 |
+
|
32 |
// require plugin core file
|
33 |
require_once( dnd_upload_cf7_directory .'/inc/dnd-upload-cf7.php' );
|
inc/dnd-upload-cf7.php
CHANGED
@@ -32,6 +32,12 @@
|
|
32 |
add_action('wpcf7_before_send_mail','dnd_cf7_before_send_mail', 30, 1);
|
33 |
add_action('wpcf7_mail_components','dnd_cf7_mail_components', 50, 2);
|
34 |
|
|
|
|
|
|
|
|
|
|
|
|
|
35 |
// Add custom mime-type
|
36 |
add_filter('upload_mimes', 'dnd_extra_mime_types', 1, 1);
|
37 |
|
@@ -76,10 +82,85 @@
|
|
76 |
return false;
|
77 |
}
|
78 |
|
79 |
-
//
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
80 |
function dnd_cf7_before_send_mail( $wpcf7 ){
|
81 |
global $_mail;
|
82 |
|
|
|
|
|
|
|
83 |
// Mail Counter
|
84 |
$_mail = 0;
|
85 |
|
@@ -97,9 +178,6 @@
|
|
97 |
// Get posted data
|
98 |
$submitted['posted_data'] = $submission->get_posted_data();
|
99 |
|
100 |
-
//Get an array containing the current upload directory’s path and url.
|
101 |
-
$upload_dir = wp_upload_dir();
|
102 |
-
|
103 |
// Parse fields
|
104 |
$fields = $wpcf7->scan_form_tags();
|
105 |
|
@@ -108,12 +186,7 @@
|
|
108 |
$mail_2 = $wpcf7->prop('mail_2');
|
109 |
|
110 |
// Default upload path
|
111 |
-
$simple_path = $
|
112 |
-
|
113 |
-
// Check if media upload oraganized by year and month folders
|
114 |
-
if( get_option('uploads_use_yearmonth_folders') ) {
|
115 |
-
$simple_path = $upload_dir['baseurl'] . '/wp_dndcf7_uploads' . dirname( $upload_dir['subdir'] );
|
116 |
-
}
|
117 |
|
118 |
// Loop fields and replace mfile code
|
119 |
foreach( $fields as $field ) {
|
@@ -140,10 +213,13 @@
|
|
140 |
return $wpcf7;
|
141 |
}
|
142 |
|
143 |
-
// hooks - Custom cf7 Mail components
|
144 |
function dnd_cf7_mail_components( $components, $form ) {
|
145 |
global $_mail;
|
146 |
|
|
|
|
|
|
|
147 |
// cf7 - Submission Object
|
148 |
$submission = WPCF7_Submission::get_instance();
|
149 |
|
@@ -160,12 +236,6 @@
|
|
160 |
return $components;
|
161 |
}
|
162 |
|
163 |
-
// Confirm upload dir
|
164 |
-
wpcf7_init_uploads();
|
165 |
-
|
166 |
-
// Get cf7 upload directory
|
167 |
-
$uploads_dir = wpcf7_upload_tmp_dir();
|
168 |
-
|
169 |
// Loop fields get mfile only.
|
170 |
foreach( $fields as $field ) {
|
171 |
|
@@ -179,7 +249,7 @@
|
|
179 |
foreach( $_POST[ $field->name ] as $_file ) {
|
180 |
|
181 |
// Join dir and a new file name ( get from <input type="hidden" name="upload-file-333"> )
|
182 |
-
$new_file_name =
|
183 |
|
184 |
// Check if submitted and file exists then file is ready.
|
185 |
if ( $submission && file_exists( $new_file_name ) ) {
|
@@ -397,6 +467,9 @@
|
|
397 |
// Begin process upload
|
398 |
function dnd_upload_cf7_upload() {
|
399 |
|
|
|
|
|
|
|
400 |
// input type file 'name'
|
401 |
$name = 'upload-file';
|
402 |
|
@@ -420,28 +493,6 @@
|
|
420 |
wp_send_json_error( get_option('drag_n_drop_error_files_too_large') ? get_option('drag_n_drop_error_files_too_large') : dnd_cf7_error_msg('large_file') );
|
421 |
}
|
422 |
|
423 |
-
wpcf7_init_uploads(); // Confirm upload dir from Contact Form 7
|
424 |
-
|
425 |
-
// Manage create directory ( Attach image through email or send as links )
|
426 |
-
if( get_option('drag_n_drop_mail_attachment') == 'yes' ) {
|
427 |
-
|
428 |
-
$upload = wp_upload_dir();
|
429 |
-
$uploads_dir = apply_filters('dnd_cf7_upload_path', $upload['basedir'] . '/wp_dndcf7_uploads', $upload );
|
430 |
-
|
431 |
-
// Check if upload use year and month folders
|
432 |
-
if( get_option('uploads_use_yearmonth_folders') ) {
|
433 |
-
$uploads_dir = apply_filters('dnd_cf7_upload_path', $upload['basedir'] . '/wp_dndcf7_uploads'. $upload['subdir'], $upload );
|
434 |
-
}
|
435 |
-
|
436 |
-
if ( ! is_dir( $uploads_dir ) ) {
|
437 |
-
wp_mkdir_p( $uploads_dir );
|
438 |
-
}
|
439 |
-
|
440 |
-
}else {
|
441 |
-
$uploads_dir = wpcf7_upload_tmp_dir();
|
442 |
-
$uploads_dir = wpcf7_maybe_add_random_dir( $uploads_dir );
|
443 |
-
}
|
444 |
-
|
445 |
// Create file name
|
446 |
$filename = $file['name'];
|
447 |
$filename = wpcf7_canonicalize( $filename, 'as-is' );
|
@@ -451,8 +502,8 @@
|
|
451 |
$filename = apply_filters( 'wpcf7_upload_file_name', $filename, $file['name'] );
|
452 |
|
453 |
// Generate new filename
|
454 |
-
$filename = wp_unique_filename( $
|
455 |
-
$new_file = path_join( $
|
456 |
|
457 |
// Upload File
|
458 |
if ( false === move_uploaded_file( $file['tmp_name'], $new_file ) ) {
|
@@ -460,7 +511,7 @@
|
|
460 |
}else{
|
461 |
|
462 |
$files = array(
|
463 |
-
'path' => basename($
|
464 |
'file' => str_replace('/','-', $filename )
|
465 |
);
|
466 |
|
@@ -475,24 +526,19 @@
|
|
475 |
|
476 |
// Delete file
|
477 |
function dnd_codedropz_upload_delete() {
|
478 |
-
if( get_option('drag_n_drop_mail_attachment') == 'yes' ) {
|
479 |
-
$upload_dir = wp_upload_dir();
|
480 |
-
$sub_dir = '/';
|
481 |
|
482 |
-
|
483 |
-
|
484 |
-
$sub_dir = '/wp_dndcf7_uploads' . dirname( $upload_dir['subdir'] ) . '/';
|
485 |
-
}
|
486 |
|
487 |
-
|
488 |
-
|
489 |
-
|
490 |
-
|
491 |
-
|
492 |
-
|
493 |
-
}
|
494 |
}
|
495 |
}
|
|
|
496 |
die;
|
497 |
}
|
498 |
|
@@ -529,6 +575,14 @@
|
|
529 |
function dnd_upload_admin_settings( ) {
|
530 |
echo '<div class="wrap">';
|
531 |
echo '<h1>Drag & Drop Uploader - Settings</h1>';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
532 |
echo '<form method="post" action="options.php"> ';
|
533 |
settings_fields( 'drag-n-drop-upload-file-cf7' );
|
534 |
do_settings_sections( 'drag-n-drop-upload-file-cf7' );
|
@@ -590,6 +644,15 @@
|
|
590 |
echo '</div>';
|
591 |
}
|
592 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
593 |
// Save admin settings
|
594 |
function dnd_upload_register_settings() {
|
595 |
register_setting( 'drag-n-drop-upload-file-cf7', 'drag_n_drop_mail_attachment' );
|
32 |
add_action('wpcf7_before_send_mail','dnd_cf7_before_send_mail', 30, 1);
|
33 |
add_action('wpcf7_mail_components','dnd_cf7_mail_components', 50, 2);
|
34 |
|
35 |
+
// Auto clean up dir/files
|
36 |
+
add_action('template_redirect', 'dnd_cf7_auto_clean_dir', 20, 0 );
|
37 |
+
|
38 |
+
// Add row meta links
|
39 |
+
add_filter( 'plugin_row_meta', 'dnd_custom_plugin_row_meta', 10, 2 );
|
40 |
+
|
41 |
// Add custom mime-type
|
42 |
add_filter('upload_mimes', 'dnd_extra_mime_types', 1, 1);
|
43 |
|
82 |
return false;
|
83 |
}
|
84 |
|
85 |
+
// Get folder path
|
86 |
+
function dnd_get_upload_dir() {
|
87 |
+
$upload = wp_upload_dir();
|
88 |
+
$uploads_dir = wpcf7_dnd_dir . '/wpcf7-files';
|
89 |
+
|
90 |
+
// If save as attachment ( also : Check if upload use year and month folders )
|
91 |
+
if( get_option('drag_n_drop_mail_attachment') == 'yes' ) {
|
92 |
+
$uploads_dir = ( get_option('uploads_use_yearmonth_folders') ? wpcf7_dnd_dir . $upload['subdir'] : wpcf7_dnd_dir );
|
93 |
+
}
|
94 |
+
|
95 |
+
// Create directory
|
96 |
+
if ( ! is_dir( trailingslashit( $upload['basedir'] ) . $uploads_dir ) ) {
|
97 |
+
wp_mkdir_p( trailingslashit( $upload['basedir'] ) . $uploads_dir );
|
98 |
+
}
|
99 |
+
|
100 |
+
// Make sure directory exist before returning
|
101 |
+
if( file_exists( trailingslashit( $upload['basedir'] ) . $uploads_dir ) ) {
|
102 |
+
return array(
|
103 |
+
'upload_dir' => trailingslashit( $upload['basedir'] ) . $uploads_dir,
|
104 |
+
'upload_url' => trailingslashit( $upload['baseurl'] ) . $uploads_dir
|
105 |
+
);
|
106 |
+
}
|
107 |
+
|
108 |
+
return trailingslashit( $upload['basedir'] ) . $uploads_dir;
|
109 |
+
}
|
110 |
+
|
111 |
+
// Clean up directory - From Contact Form 7
|
112 |
+
function dnd_cf7_auto_clean_dir( $seconds = 3600, $max = 60 ) {
|
113 |
+
if ( is_admin() || 'GET' != $_SERVER['REQUEST_METHOD'] || is_robots() || is_feed() || is_trackback() ) {
|
114 |
+
return;
|
115 |
+
}
|
116 |
+
|
117 |
+
// Setup dirctory path
|
118 |
+
$upload = wp_upload_dir();
|
119 |
+
$dir = trailingslashit( $upload['basedir'] ) . wpcf7_dnd_dir . '/wpcf7-files/';
|
120 |
+
|
121 |
+
// Make sure dir is readable or writable
|
122 |
+
if ( ! is_dir( $dir ) || ! is_readable( $dir ) || ! wp_is_writable( $dir ) ) {
|
123 |
+
return;
|
124 |
+
}
|
125 |
+
|
126 |
+
$seconds = apply_filters( 'dnd_cf7_auto_delete_files', $seconds );
|
127 |
+
$max = absint( $max );
|
128 |
+
$count = 0;
|
129 |
+
|
130 |
+
if ( $handle = @opendir( $dir ) ) {
|
131 |
+
while ( false !== ( $file = readdir( $handle ) ) ) {
|
132 |
+
if ( $file == "." || $file == ".." ) {
|
133 |
+
continue;
|
134 |
+
}
|
135 |
+
|
136 |
+
// Get file time of files OLD files.
|
137 |
+
$mtime = @filemtime( $dir . $file );
|
138 |
+
|
139 |
+
if ( $mtime && time() < $mtime + absint( $seconds ) ) { // less than $seconds old
|
140 |
+
continue;
|
141 |
+
}
|
142 |
+
|
143 |
+
// Delete files from dir
|
144 |
+
wp_delete_file( $dir . $file );
|
145 |
+
|
146 |
+
$count += 1;
|
147 |
+
|
148 |
+
if ( $max <= $count ) {
|
149 |
+
break;
|
150 |
+
}
|
151 |
+
}
|
152 |
+
@closedir( $handle );
|
153 |
+
}
|
154 |
+
@rmdir( $dir );
|
155 |
+
}
|
156 |
+
|
157 |
+
// Hooks before sending the email - ( append links to body email )
|
158 |
function dnd_cf7_before_send_mail( $wpcf7 ){
|
159 |
global $_mail;
|
160 |
|
161 |
+
// Get upload path / dir
|
162 |
+
$upload_path = dnd_get_upload_dir();
|
163 |
+
|
164 |
// Mail Counter
|
165 |
$_mail = 0;
|
166 |
|
178 |
// Get posted data
|
179 |
$submitted['posted_data'] = $submission->get_posted_data();
|
180 |
|
|
|
|
|
|
|
181 |
// Parse fields
|
182 |
$fields = $wpcf7->scan_form_tags();
|
183 |
|
186 |
$mail_2 = $wpcf7->prop('mail_2');
|
187 |
|
188 |
// Default upload path
|
189 |
+
$simple_path = dirname( $upload_path['upload_url'] ); // dirname - remove duplicate form dir (/wpcf-dnd-uploads/wpcf7-dnd-uploads/example.jpg)
|
|
|
|
|
|
|
|
|
|
|
190 |
|
191 |
// Loop fields and replace mfile code
|
192 |
foreach( $fields as $field ) {
|
213 |
return $wpcf7;
|
214 |
}
|
215 |
|
216 |
+
// hooks - Custom cf7 Mail components ( Attached File on Email )
|
217 |
function dnd_cf7_mail_components( $components, $form ) {
|
218 |
global $_mail;
|
219 |
|
220 |
+
// Get upload directory
|
221 |
+
$uploads_dir = dnd_get_upload_dir();
|
222 |
+
|
223 |
// cf7 - Submission Object
|
224 |
$submission = WPCF7_Submission::get_instance();
|
225 |
|
236 |
return $components;
|
237 |
}
|
238 |
|
|
|
|
|
|
|
|
|
|
|
|
|
239 |
// Loop fields get mfile only.
|
240 |
foreach( $fields as $field ) {
|
241 |
|
249 |
foreach( $_POST[ $field->name ] as $_file ) {
|
250 |
|
251 |
// Join dir and a new file name ( get from <input type="hidden" name="upload-file-333"> )
|
252 |
+
$new_file_name = trailingslashit( $uploads_dir['upload_dir'] ) . basename( $_file );
|
253 |
|
254 |
// Check if submitted and file exists then file is ready.
|
255 |
if ( $submission && file_exists( $new_file_name ) ) {
|
467 |
// Begin process upload
|
468 |
function dnd_upload_cf7_upload() {
|
469 |
|
470 |
+
// Get upload dir
|
471 |
+
$path = dnd_get_upload_dir();
|
472 |
+
|
473 |
// input type file 'name'
|
474 |
$name = 'upload-file';
|
475 |
|
493 |
wp_send_json_error( get_option('drag_n_drop_error_files_too_large') ? get_option('drag_n_drop_error_files_too_large') : dnd_cf7_error_msg('large_file') );
|
494 |
}
|
495 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
496 |
// Create file name
|
497 |
$filename = $file['name'];
|
498 |
$filename = wpcf7_canonicalize( $filename, 'as-is' );
|
502 |
$filename = apply_filters( 'wpcf7_upload_file_name', $filename, $file['name'] );
|
503 |
|
504 |
// Generate new filename
|
505 |
+
$filename = wp_unique_filename( $path['upload_dir'], $filename );
|
506 |
+
$new_file = path_join( $path['upload_dir'], $filename );
|
507 |
|
508 |
// Upload File
|
509 |
if ( false === move_uploaded_file( $file['tmp_name'], $new_file ) ) {
|
511 |
}else{
|
512 |
|
513 |
$files = array(
|
514 |
+
'path' => basename( $path['upload_dir'] ),
|
515 |
'file' => str_replace('/','-', $filename )
|
516 |
);
|
517 |
|
526 |
|
527 |
// Delete file
|
528 |
function dnd_codedropz_upload_delete() {
|
|
|
|
|
|
|
529 |
|
530 |
+
// Get upload dir
|
531 |
+
$upload_dir = dnd_get_upload_dir();
|
|
|
|
|
532 |
|
533 |
+
// Make sure path is set
|
534 |
+
if( isset( $_POST['path'] ) && ! empty( $_POST['path'] ) ) {
|
535 |
+
$file_path = trailingslashit( dirname( $upload_dir['upload_dir'] ) ) . trim( $_POST['path'] );
|
536 |
+
if( file_exists( $file_path ) ){
|
537 |
+
wp_delete_file( $file_path );
|
538 |
+
wp_send_json_success( 'true' );
|
|
|
539 |
}
|
540 |
}
|
541 |
+
|
542 |
die;
|
543 |
}
|
544 |
|
575 |
function dnd_upload_admin_settings( ) {
|
576 |
echo '<div class="wrap">';
|
577 |
echo '<h1>Drag & Drop Uploader - Settings</h1>';
|
578 |
+
|
579 |
+
echo '<div class="update-nag notice" style="width: 98%;padding: 0px 10px;margin-bottom: 5px;">';
|
580 |
+
echo '<p>Checkout more features on <a href="https://codedropz.com/purchase-plugin/" target="_blank">Pro Version</a></p>';
|
581 |
+
echo '</div>';
|
582 |
+
|
583 |
+
// Error settings
|
584 |
+
settings_errors();
|
585 |
+
|
586 |
echo '<form method="post" action="options.php"> ';
|
587 |
settings_fields( 'drag-n-drop-upload-file-cf7' );
|
588 |
do_settings_sections( 'drag-n-drop-upload-file-cf7' );
|
644 |
echo '</div>';
|
645 |
}
|
646 |
|
647 |
+
// Add custom links
|
648 |
+
function dnd_custom_plugin_row_meta( $links, $file ) {
|
649 |
+
if ( strpos( $file, 'drag-n-drop-upload-cf7.php' ) !== false ) {
|
650 |
+
$new_links = array('pro-version' => '<a href="https://codedropz.com/purchase-plugin/" target="_blank" style="font-weight:bold; color:#f4a647;">Pro Version</a>');
|
651 |
+
$links = array_merge( $links, $new_links );
|
652 |
+
}
|
653 |
+
return $links;
|
654 |
+
}
|
655 |
+
|
656 |
// Save admin settings
|
657 |
function dnd_upload_register_settings() {
|
658 |
register_setting( 'drag-n-drop-upload-file-cf7', 'drag_n_drop_mail_attachment' );
|
languages/dnd-upload-cf7-fr_FR.po
CHANGED
@@ -1,106 +1,106 @@
|
|
1 |
-
msgid ""
|
2 |
-
msgstr ""
|
3 |
-
"Project-Id-Version: \n"
|
4 |
-
"POT-Creation-Date: 2019-03-18 18:47+0800\n"
|
5 |
-
"PO-Revision-Date: 2019-03-18 18:49+0800\n"
|
6 |
-
"Last-Translator: \n"
|
7 |
-
"Language-Team: \n"
|
8 |
-
"Language: fr\n"
|
9 |
-
"MIME-Version: 1.0\n"
|
10 |
-
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
-
"Content-Transfer-Encoding: 8bit\n"
|
12 |
-
"X-Generator: Poedit 2.2.1\n"
|
13 |
-
"X-Poedit-Basepath: ..\n"
|
14 |
-
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
|
15 |
-
"X-Poedit-KeywordsList: __;__e;esc_html__\n"
|
16 |
-
"X-Poedit-SearchPath-0: .\n"
|
17 |
-
|
18 |
-
#: inc/dnd-upload-cf7.php:50
|
19 |
-
msgid "The uploaded file exceeds the maximum upload size of your server."
|
20 |
-
msgstr ""
|
21 |
-
|
22 |
-
#: inc/dnd-upload-cf7.php:51
|
23 |
-
msgid "Uploading a file fails for any reason"
|
24 |
-
msgstr ""
|
25 |
-
|
26 |
-
#: inc/dnd-upload-cf7.php:52
|
27 |
-
msgid "Uploaded file is too large"
|
28 |
-
msgstr ""
|
29 |
-
|
30 |
-
#: inc/dnd-upload-cf7.php:53
|
31 |
-
msgid "Uploaded file is not allowed for file type"
|
32 |
-
msgstr ""
|
33 |
-
|
34 |
-
#: inc/dnd-upload-cf7.php:192
|
35 |
-
msgid "Drag & Drop Files Here"
|
36 |
-
msgstr "Faites glisser et déposez les fichiers ici"
|
37 |
-
|
38 |
-
#: inc/dnd-upload-cf7.php:193
|
39 |
-
msgid "or"
|
40 |
-
msgstr "ou"
|
41 |
-
|
42 |
-
#: inc/dnd-upload-cf7.php:194
|
43 |
-
msgid "Browse Files"
|
44 |
-
msgstr "Parcourir les fichiers"
|
45 |
-
|
46 |
-
#: inc/dnd-upload-cf7.php:309
|
47 |
-
msgid "multiple file upload"
|
48 |
-
msgstr ""
|
49 |
-
|
50 |
-
#: inc/dnd-upload-cf7.php:321
|
51 |
-
#, php-format
|
52 |
-
msgid ""
|
53 |
-
"Generate a form-tag for a file uploading field. For more details, see %s."
|
54 |
-
msgstr ""
|
55 |
-
|
56 |
-
#: inc/dnd-upload-cf7.php:322
|
57 |
-
msgid "https://contactform7.com/file-uploading-and-attachment/"
|
58 |
-
msgstr ""
|
59 |
-
|
60 |
-
#: inc/dnd-upload-cf7.php:322
|
61 |
-
msgid "File Uploading and Attachment"
|
62 |
-
msgstr ""
|
63 |
-
|
64 |
-
#: inc/dnd-upload-cf7.php:332 inc/dnd-upload-cf7.php:335
|
65 |
-
msgid "Field type"
|
66 |
-
msgstr ""
|
67 |
-
|
68 |
-
#: inc/dnd-upload-cf7.php:336
|
69 |
-
msgid "Required field"
|
70 |
-
msgstr ""
|
71 |
-
|
72 |
-
#: inc/dnd-upload-cf7.php:341
|
73 |
-
msgid "Name"
|
74 |
-
msgstr ""
|
75 |
-
|
76 |
-
#: inc/dnd-upload-cf7.php:345
|
77 |
-
msgid "File size limit (bytes)"
|
78 |
-
msgstr ""
|
79 |
-
|
80 |
-
#: inc/dnd-upload-cf7.php:349
|
81 |
-
msgid "Acceptable file types"
|
82 |
-
msgstr ""
|
83 |
-
|
84 |
-
#: inc/dnd-upload-cf7.php:353
|
85 |
-
msgid "Max file upload"
|
86 |
-
msgstr ""
|
87 |
-
|
88 |
-
#: inc/dnd-upload-cf7.php:357
|
89 |
-
msgid "Id attribute"
|
90 |
-
msgstr ""
|
91 |
-
|
92 |
-
#: inc/dnd-upload-cf7.php:361
|
93 |
-
msgid "Class attribute"
|
94 |
-
msgstr ""
|
95 |
-
|
96 |
-
#: inc/dnd-upload-cf7.php:372
|
97 |
-
msgid "Insert Tag"
|
98 |
-
msgstr ""
|
99 |
-
|
100 |
-
#: inc/dnd-upload-cf7.php:376
|
101 |
-
#, php-format
|
102 |
-
msgid ""
|
103 |
-
"To attach the file uploaded through this field to mail, you need to insert "
|
104 |
-
"the corresponding mail-tag (%s) into the File Attachments field on the Mail "
|
105 |
-
"tab."
|
106 |
-
msgstr ""
|
1 |
+
msgid ""
|
2 |
+
msgstr ""
|
3 |
+
"Project-Id-Version: \n"
|
4 |
+
"POT-Creation-Date: 2019-03-18 18:47+0800\n"
|
5 |
+
"PO-Revision-Date: 2019-03-18 18:49+0800\n"
|
6 |
+
"Last-Translator: \n"
|
7 |
+
"Language-Team: \n"
|
8 |
+
"Language: fr\n"
|
9 |
+
"MIME-Version: 1.0\n"
|
10 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
+
"Content-Transfer-Encoding: 8bit\n"
|
12 |
+
"X-Generator: Poedit 2.2.1\n"
|
13 |
+
"X-Poedit-Basepath: ..\n"
|
14 |
+
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
|
15 |
+
"X-Poedit-KeywordsList: __;__e;esc_html__\n"
|
16 |
+
"X-Poedit-SearchPath-0: .\n"
|
17 |
+
|
18 |
+
#: inc/dnd-upload-cf7.php:50
|
19 |
+
msgid "The uploaded file exceeds the maximum upload size of your server."
|
20 |
+
msgstr ""
|
21 |
+
|
22 |
+
#: inc/dnd-upload-cf7.php:51
|
23 |
+
msgid "Uploading a file fails for any reason"
|
24 |
+
msgstr ""
|
25 |
+
|
26 |
+
#: inc/dnd-upload-cf7.php:52
|
27 |
+
msgid "Uploaded file is too large"
|
28 |
+
msgstr ""
|
29 |
+
|
30 |
+
#: inc/dnd-upload-cf7.php:53
|
31 |
+
msgid "Uploaded file is not allowed for file type"
|
32 |
+
msgstr ""
|
33 |
+
|
34 |
+
#: inc/dnd-upload-cf7.php:192
|
35 |
+
msgid "Drag & Drop Files Here"
|
36 |
+
msgstr "Faites glisser et déposez les fichiers ici"
|
37 |
+
|
38 |
+
#: inc/dnd-upload-cf7.php:193
|
39 |
+
msgid "or"
|
40 |
+
msgstr "ou"
|
41 |
+
|
42 |
+
#: inc/dnd-upload-cf7.php:194
|
43 |
+
msgid "Browse Files"
|
44 |
+
msgstr "Parcourir les fichiers"
|
45 |
+
|
46 |
+
#: inc/dnd-upload-cf7.php:309
|
47 |
+
msgid "multiple file upload"
|
48 |
+
msgstr ""
|
49 |
+
|
50 |
+
#: inc/dnd-upload-cf7.php:321
|
51 |
+
#, php-format
|
52 |
+
msgid ""
|
53 |
+
"Generate a form-tag for a file uploading field. For more details, see %s."
|
54 |
+
msgstr ""
|
55 |
+
|
56 |
+
#: inc/dnd-upload-cf7.php:322
|
57 |
+
msgid "https://contactform7.com/file-uploading-and-attachment/"
|
58 |
+
msgstr ""
|
59 |
+
|
60 |
+
#: inc/dnd-upload-cf7.php:322
|
61 |
+
msgid "File Uploading and Attachment"
|
62 |
+
msgstr ""
|
63 |
+
|
64 |
+
#: inc/dnd-upload-cf7.php:332 inc/dnd-upload-cf7.php:335
|
65 |
+
msgid "Field type"
|
66 |
+
msgstr ""
|
67 |
+
|
68 |
+
#: inc/dnd-upload-cf7.php:336
|
69 |
+
msgid "Required field"
|
70 |
+
msgstr ""
|
71 |
+
|
72 |
+
#: inc/dnd-upload-cf7.php:341
|
73 |
+
msgid "Name"
|
74 |
+
msgstr ""
|
75 |
+
|
76 |
+
#: inc/dnd-upload-cf7.php:345
|
77 |
+
msgid "File size limit (bytes)"
|
78 |
+
msgstr ""
|
79 |
+
|
80 |
+
#: inc/dnd-upload-cf7.php:349
|
81 |
+
msgid "Acceptable file types"
|
82 |
+
msgstr ""
|
83 |
+
|
84 |
+
#: inc/dnd-upload-cf7.php:353
|
85 |
+
msgid "Max file upload"
|
86 |
+
msgstr ""
|
87 |
+
|
88 |
+
#: inc/dnd-upload-cf7.php:357
|
89 |
+
msgid "Id attribute"
|
90 |
+
msgstr ""
|
91 |
+
|
92 |
+
#: inc/dnd-upload-cf7.php:361
|
93 |
+
msgid "Class attribute"
|
94 |
+
msgstr ""
|
95 |
+
|
96 |
+
#: inc/dnd-upload-cf7.php:372
|
97 |
+
msgid "Insert Tag"
|
98 |
+
msgstr ""
|
99 |
+
|
100 |
+
#: inc/dnd-upload-cf7.php:376
|
101 |
+
#, php-format
|
102 |
+
msgid ""
|
103 |
+
"To attach the file uploaded through this field to mail, you need to insert "
|
104 |
+
"the corresponding mail-tag (%s) into the File Attachments field on the Mail "
|
105 |
+
"tab."
|
106 |
+
msgstr ""
|
languages/dnd-upload-cf7-ko_KR.po
CHANGED
@@ -1,106 +1,106 @@
|
|
1 |
-
msgid ""
|
2 |
-
msgstr ""
|
3 |
-
"Project-Id-Version: \n"
|
4 |
-
"POT-Creation-Date: 2019-03-18 18:47+0800\n"
|
5 |
-
"PO-Revision-Date: 2019-03-18 19:01+0800\n"
|
6 |
-
"Language-Team: \n"
|
7 |
-
"MIME-Version: 1.0\n"
|
8 |
-
"Content-Type: text/plain; charset=UTF-8\n"
|
9 |
-
"Content-Transfer-Encoding: 8bit\n"
|
10 |
-
"X-Generator: Poedit 2.2.1\n"
|
11 |
-
"X-Poedit-Basepath: ..\n"
|
12 |
-
"Plural-Forms: nplurals=1; plural=0;\n"
|
13 |
-
"X-Poedit-KeywordsList: __;__e;esc_html__\n"
|
14 |
-
"Last-Translator: \n"
|
15 |
-
"Language: ko\n"
|
16 |
-
"X-Poedit-SearchPath-0: .\n"
|
17 |
-
|
18 |
-
#: inc/dnd-upload-cf7.php:50
|
19 |
-
msgid "The uploaded file exceeds the maximum upload size of your server."
|
20 |
-
msgstr ""
|
21 |
-
|
22 |
-
#: inc/dnd-upload-cf7.php:51
|
23 |
-
msgid "Uploading a file fails for any reason"
|
24 |
-
msgstr ""
|
25 |
-
|
26 |
-
#: inc/dnd-upload-cf7.php:52
|
27 |
-
msgid "Uploaded file is too large"
|
28 |
-
msgstr ""
|
29 |
-
|
30 |
-
#: inc/dnd-upload-cf7.php:53
|
31 |
-
msgid "Uploaded file is not allowed for file type"
|
32 |
-
msgstr ""
|
33 |
-
|
34 |
-
#: inc/dnd-upload-cf7.php:192
|
35 |
-
msgid "Drag & Drop Files Here"
|
36 |
-
msgstr "드래그 앤 드롭 파일"
|
37 |
-
|
38 |
-
#: inc/dnd-upload-cf7.php:193
|
39 |
-
msgid "or"
|
40 |
-
msgstr "또는"
|
41 |
-
|
42 |
-
#: inc/dnd-upload-cf7.php:194
|
43 |
-
msgid "Browse Files"
|
44 |
-
msgstr "파일 찾아보기"
|
45 |
-
|
46 |
-
#: inc/dnd-upload-cf7.php:309
|
47 |
-
msgid "multiple file upload"
|
48 |
-
msgstr ""
|
49 |
-
|
50 |
-
#: inc/dnd-upload-cf7.php:321
|
51 |
-
#, php-format
|
52 |
-
msgid ""
|
53 |
-
"Generate a form-tag for a file uploading field. For more details, see %s."
|
54 |
-
msgstr ""
|
55 |
-
|
56 |
-
#: inc/dnd-upload-cf7.php:322
|
57 |
-
msgid "https://contactform7.com/file-uploading-and-attachment/"
|
58 |
-
msgstr ""
|
59 |
-
|
60 |
-
#: inc/dnd-upload-cf7.php:322
|
61 |
-
msgid "File Uploading and Attachment"
|
62 |
-
msgstr ""
|
63 |
-
|
64 |
-
#: inc/dnd-upload-cf7.php:332 inc/dnd-upload-cf7.php:335
|
65 |
-
msgid "Field type"
|
66 |
-
msgstr ""
|
67 |
-
|
68 |
-
#: inc/dnd-upload-cf7.php:336
|
69 |
-
msgid "Required field"
|
70 |
-
msgstr ""
|
71 |
-
|
72 |
-
#: inc/dnd-upload-cf7.php:341
|
73 |
-
msgid "Name"
|
74 |
-
msgstr ""
|
75 |
-
|
76 |
-
#: inc/dnd-upload-cf7.php:345
|
77 |
-
msgid "File size limit (bytes)"
|
78 |
-
msgstr ""
|
79 |
-
|
80 |
-
#: inc/dnd-upload-cf7.php:349
|
81 |
-
msgid "Acceptable file types"
|
82 |
-
msgstr ""
|
83 |
-
|
84 |
-
#: inc/dnd-upload-cf7.php:353
|
85 |
-
msgid "Max file upload"
|
86 |
-
msgstr ""
|
87 |
-
|
88 |
-
#: inc/dnd-upload-cf7.php:357
|
89 |
-
msgid "Id attribute"
|
90 |
-
msgstr ""
|
91 |
-
|
92 |
-
#: inc/dnd-upload-cf7.php:361
|
93 |
-
msgid "Class attribute"
|
94 |
-
msgstr ""
|
95 |
-
|
96 |
-
#: inc/dnd-upload-cf7.php:372
|
97 |
-
msgid "Insert Tag"
|
98 |
-
msgstr ""
|
99 |
-
|
100 |
-
#: inc/dnd-upload-cf7.php:376
|
101 |
-
#, php-format
|
102 |
-
msgid ""
|
103 |
-
"To attach the file uploaded through this field to mail, you need to insert "
|
104 |
-
"the corresponding mail-tag (%s) into the File Attachments field on the Mail "
|
105 |
-
"tab."
|
106 |
-
msgstr ""
|
1 |
+
msgid ""
|
2 |
+
msgstr ""
|
3 |
+
"Project-Id-Version: \n"
|
4 |
+
"POT-Creation-Date: 2019-03-18 18:47+0800\n"
|
5 |
+
"PO-Revision-Date: 2019-03-18 19:01+0800\n"
|
6 |
+
"Language-Team: \n"
|
7 |
+
"MIME-Version: 1.0\n"
|
8 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
9 |
+
"Content-Transfer-Encoding: 8bit\n"
|
10 |
+
"X-Generator: Poedit 2.2.1\n"
|
11 |
+
"X-Poedit-Basepath: ..\n"
|
12 |
+
"Plural-Forms: nplurals=1; plural=0;\n"
|
13 |
+
"X-Poedit-KeywordsList: __;__e;esc_html__\n"
|
14 |
+
"Last-Translator: \n"
|
15 |
+
"Language: ko\n"
|
16 |
+
"X-Poedit-SearchPath-0: .\n"
|
17 |
+
|
18 |
+
#: inc/dnd-upload-cf7.php:50
|
19 |
+
msgid "The uploaded file exceeds the maximum upload size of your server."
|
20 |
+
msgstr ""
|
21 |
+
|
22 |
+
#: inc/dnd-upload-cf7.php:51
|
23 |
+
msgid "Uploading a file fails for any reason"
|
24 |
+
msgstr ""
|
25 |
+
|
26 |
+
#: inc/dnd-upload-cf7.php:52
|
27 |
+
msgid "Uploaded file is too large"
|
28 |
+
msgstr ""
|
29 |
+
|
30 |
+
#: inc/dnd-upload-cf7.php:53
|
31 |
+
msgid "Uploaded file is not allowed for file type"
|
32 |
+
msgstr ""
|
33 |
+
|
34 |
+
#: inc/dnd-upload-cf7.php:192
|
35 |
+
msgid "Drag & Drop Files Here"
|
36 |
+
msgstr "드래그 앤 드롭 파일"
|
37 |
+
|
38 |
+
#: inc/dnd-upload-cf7.php:193
|
39 |
+
msgid "or"
|
40 |
+
msgstr "또는"
|
41 |
+
|
42 |
+
#: inc/dnd-upload-cf7.php:194
|
43 |
+
msgid "Browse Files"
|
44 |
+
msgstr "파일 찾아보기"
|
45 |
+
|
46 |
+
#: inc/dnd-upload-cf7.php:309
|
47 |
+
msgid "multiple file upload"
|
48 |
+
msgstr ""
|
49 |
+
|
50 |
+
#: inc/dnd-upload-cf7.php:321
|
51 |
+
#, php-format
|
52 |
+
msgid ""
|
53 |
+
"Generate a form-tag for a file uploading field. For more details, see %s."
|
54 |
+
msgstr ""
|
55 |
+
|
56 |
+
#: inc/dnd-upload-cf7.php:322
|
57 |
+
msgid "https://contactform7.com/file-uploading-and-attachment/"
|
58 |
+
msgstr ""
|
59 |
+
|
60 |
+
#: inc/dnd-upload-cf7.php:322
|
61 |
+
msgid "File Uploading and Attachment"
|
62 |
+
msgstr ""
|
63 |
+
|
64 |
+
#: inc/dnd-upload-cf7.php:332 inc/dnd-upload-cf7.php:335
|
65 |
+
msgid "Field type"
|
66 |
+
msgstr ""
|
67 |
+
|
68 |
+
#: inc/dnd-upload-cf7.php:336
|
69 |
+
msgid "Required field"
|
70 |
+
msgstr ""
|
71 |
+
|
72 |
+
#: inc/dnd-upload-cf7.php:341
|
73 |
+
msgid "Name"
|
74 |
+
msgstr ""
|
75 |
+
|
76 |
+
#: inc/dnd-upload-cf7.php:345
|
77 |
+
msgid "File size limit (bytes)"
|
78 |
+
msgstr ""
|
79 |
+
|
80 |
+
#: inc/dnd-upload-cf7.php:349
|
81 |
+
msgid "Acceptable file types"
|
82 |
+
msgstr ""
|
83 |
+
|
84 |
+
#: inc/dnd-upload-cf7.php:353
|
85 |
+
msgid "Max file upload"
|
86 |
+
msgstr ""
|
87 |
+
|
88 |
+
#: inc/dnd-upload-cf7.php:357
|
89 |
+
msgid "Id attribute"
|
90 |
+
msgstr ""
|
91 |
+
|
92 |
+
#: inc/dnd-upload-cf7.php:361
|
93 |
+
msgid "Class attribute"
|
94 |
+
msgstr ""
|
95 |
+
|
96 |
+
#: inc/dnd-upload-cf7.php:372
|
97 |
+
msgid "Insert Tag"
|
98 |
+
msgstr ""
|
99 |
+
|
100 |
+
#: inc/dnd-upload-cf7.php:376
|
101 |
+
#, php-format
|
102 |
+
msgid ""
|
103 |
+
"To attach the file uploaded through this field to mail, you need to insert "
|
104 |
+
"the corresponding mail-tag (%s) into the File Attachments field on the Mail "
|
105 |
+
"tab."
|
106 |
+
msgstr ""
|
readme.txt
CHANGED
@@ -2,45 +2,51 @@
|
|
2 |
Donate link : http://codedropz.com/donation
|
3 |
Tags: drag and drop, contact form 7, ajax uploader, multiple file, upload, contact form 7 uploader
|
4 |
Requires at least: 3.0.1
|
5 |
-
Tested up to: 5.2
|
6 |
-
Stable tag: 1.
|
7 |
Requires PHP: 5.2.4
|
8 |
License: GPLv2 or later
|
9 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
11 |
== Description ==
|
12 |
|
13 |
-
Drag and Drop Uploader a simple Wordpress plugin extension for Contact Form 7, this will allow
|
14 |
|
15 |
-
Here's a little
|
16 |
|
17 |
### Features
|
18 |
|
19 |
* File Type Validation
|
20 |
* File Size Validation
|
21 |
-
* Ajax
|
22 |
* Limit number of files Upload.
|
|
|
|
|
|
|
23 |
* Drag & Drop or Browse File - Multiple Upload
|
24 |
* Support Multiple Drag and Drop in One Form.
|
25 |
-
*
|
|
|
|
|
26 |
* Mobile Responsive
|
27 |
* Cool Progress Bar
|
28 |
-
*
|
29 |
|
30 |
### Premium Features
|
31 |
|
32 |
-
Checkout available features on PRO version
|
33 |
|
34 |
-
* Image Preview
|
35 |
-
* Auto Delete Files - After Submission
|
36 |
-
|
|
|
37 |
* Save Files To Media Library
|
38 |
* Change Upload Directory
|
39 |
-
- Generated Name
|
40 |
- Random Folder
|
41 |
-
- By User
|
42 |
- Custom Folder
|
43 |
-
*
|
44 |
* Improved Security
|
45 |
* Optimized Code and Performance
|
46 |
* 1 Month Premium Support
|
@@ -105,6 +111,17 @@ To install this plugin see below:
|
|
105 |
|
106 |
== Changelog ==
|
107 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
108 |
= 1.2.6.0 =
|
109 |
* Fixed - Allow to upload file with the same filename.
|
110 |
* Fixed - Can't upload image after delecting (https://wordpress.org/support/topic/cant-upload-image-after-deleting-it/)
|
2 |
Donate link : http://codedropz.com/donation
|
3 |
Tags: drag and drop, contact form 7, ajax uploader, multiple file, upload, contact form 7 uploader
|
4 |
Requires at least: 3.0.1
|
5 |
+
Tested up to: 5.2.4
|
6 |
+
Stable tag: 1.3.0
|
7 |
Requires PHP: 5.2.4
|
8 |
License: GPLv2 or later
|
9 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
11 |
== Description ==
|
12 |
|
13 |
+
Drag and Drop Uploader a simple Wordpress plugin extension for Contact Form 7, this will allow user to upload multiple files using **"Drag & Drop"** or **"Browse File"** in uploading area of your contact form.
|
14 |
|
15 |
+
Here's a little [DEMO](http://codedropz.com/contact).
|
16 |
|
17 |
### Features
|
18 |
|
19 |
* File Type Validation
|
20 |
* File Size Validation
|
21 |
+
* Ajax Uploader
|
22 |
* Limit number of files Upload.
|
23 |
+
* Limit files size for each field
|
24 |
+
* Can specify custom file types or extension
|
25 |
+
* Manage Text and Error message in admin settings
|
26 |
* Drag & Drop or Browse File - Multiple Upload
|
27 |
* Support Multiple Drag and Drop in One Form.
|
28 |
+
* Able to delete uploaded file before being sent
|
29 |
+
* Send files as email attachment or as a links.
|
30 |
+
* Support multiple languages
|
31 |
* Mobile Responsive
|
32 |
* Cool Progress Bar
|
33 |
+
* Compatible with any browser
|
34 |
|
35 |
### Premium Features
|
36 |
|
37 |
+
Checkout available features on **PRO version**.
|
38 |
|
39 |
+
* Image Preview - Show Thumbnail for images
|
40 |
+
* Auto Delete Files - After Form Submission
|
41 |
+
- 1 hour, 4 hours, 8 hours or 1 day
|
42 |
+
* Zip Files ( Compressed File )
|
43 |
* Save Files To Media Library
|
44 |
* Change Upload Directory
|
45 |
+
- Generated Name - timestamp
|
46 |
- Random Folder
|
47 |
+
- By User ( *must login* )
|
48 |
- Custom Folder
|
49 |
+
* Send to email as individual attachment, zip archive or as a links
|
50 |
* Improved Security
|
51 |
* Optimized Code and Performance
|
52 |
* 1 Month Premium Support
|
111 |
|
112 |
== Changelog ==
|
113 |
|
114 |
+
= 1.3.0 =
|
115 |
+
* Fixed - Multiple Drag & Drop fields in one form ( Validation Issues - Max File not working correctly )
|
116 |
+
* Added - Added "deleted..." status when removing file.
|
117 |
+
- So that the user know that file deletion is in progress...
|
118 |
+
* Fixed - Responsive issues on Mobile < 767px screen.
|
119 |
+
* Added - Added '/wpcf7-files' directory inside '/wp_dndcf7_uploads' to temporary store files instead of relying contact form 7.
|
120 |
+
* Added - Auto delete files inside '/wpcf7-files' dir 1 hour(3200 seconds) after submission.
|
121 |
+
- It was a problem with contact form 7 before that files only last 60 seconds and it will automatically deleted.
|
122 |
+
* Improved - Optimized and Improved Php Code & Javascript structure and functionalities. ( removed redundant code, removed spaces, etc )
|
123 |
+
* Added - Links going to Pro Version.
|
124 |
+
|
125 |
= 1.2.6.0 =
|
126 |
* Fixed - Allow to upload file with the same filename.
|
127 |
* Fixed - Can't upload image after delecting (https://wordpress.org/support/topic/cant-upload-image-after-deleting-it/)
|