Version Description
Fixed problem of date and time acquisition at registration.
Download this release
Release Info
Developer | Katsushi Kawamori |
Plugin | Media from FTP |
Version | 9.89 |
Comparing to | |
See all releases |
Code changes from version 9.88 to 9.89
- js/jquery.mediafromftp.js +90 -33
- mediafromftp.php +1 -1
- readme.txt +4 -1
- req/MediaFromFtpListTable.php +3 -3
js/jquery.mediafromftp.js
CHANGED
@@ -55,6 +55,7 @@ jQuery(function(){
|
|
55 |
jQuery('#mediafromftp_ajax_update').submit(function(){
|
56 |
|
57 |
var new_url = new Array();
|
|
|
58 |
var new_datetime = new Array();
|
59 |
var new_mlccategory = new Array();
|
60 |
var new_emlcategory = new Array();
|
@@ -65,56 +66,112 @@ jQuery(function(){
|
|
65 |
var emlcount = 0;
|
66 |
var mlacatcount = 0;
|
67 |
var mlatagcount = 0;
|
68 |
-
|
|
|
|
|
69 |
if ( form_names[i].name.indexOf("[url]") != -1 ) {
|
70 |
-
new_url[
|
|
|
|
|
|
|
|
|
|
|
71 |
}
|
|
|
|
|
|
|
72 |
if ( form_names[i].name.indexOf("[datetime]") != -1 ) {
|
73 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
74 |
}
|
|
|
|
|
|
|
75 |
if ( form_names[i].name.indexOf("[mlccount]") != -1 ) {
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
81 |
});
|
82 |
-
new_mlccategory[i] = value.substr( 0, value.length-1 );
|
83 |
}
|
|
|
|
|
|
|
84 |
if ( form_names[i].name.indexOf("[emlcount]") != -1 ) {
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
90 |
});
|
91 |
-
new_emlcategory[i] = value.substr( 0, value.length-1 );
|
92 |
}
|
|
|
|
|
|
|
93 |
if ( form_names[i].name.indexOf("[mlacatcount]") != -1 ) {
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
99 |
});
|
100 |
-
new_mlacategory[i] = value.substr( 0, value.length-1 );
|
101 |
}
|
|
|
|
|
|
|
102 |
if ( form_names[i].name.indexOf("[mlatagcount]") != -1 ) {
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
108 |
});
|
109 |
-
new_mlatags[i] = value.substr( 0, value.length-1 );
|
110 |
}
|
111 |
});
|
112 |
-
var new_url = jQuery.grep(new_url, function(e){return e;});
|
113 |
-
var new_datetime = jQuery.grep(new_datetime, function(e){return e;});
|
114 |
-
var new_mlccategory = jQuery.grep(new_mlccategory, function(e){return e;});
|
115 |
-
var new_emlcategory = jQuery.grep(new_emlcategory, function(e){return e;});
|
116 |
-
var new_mlacategory = jQuery.grep(new_mlacategory, function(e){return e;});
|
117 |
-
var new_mlatags = jQuery.grep(new_mlatags, function(e){return e;});
|
118 |
|
119 |
jQuery("#mediafromftp-loading-container").empty();
|
120 |
jQuery("#screen-options-wrap").remove();
|
55 |
jQuery('#mediafromftp_ajax_update').submit(function(){
|
56 |
|
57 |
var new_url = new Array();
|
58 |
+
var check_id = new Array();
|
59 |
var new_datetime = new Array();
|
60 |
var new_mlccategory = new Array();
|
61 |
var new_emlcategory = new Array();
|
66 |
var emlcount = 0;
|
67 |
var mlacatcount = 0;
|
68 |
var mlatagcount = 0;
|
69 |
+
var j = 0;
|
70 |
+
jQuery.each(form_names, function(i) {
|
71 |
+
check_id[i] = "";
|
72 |
if ( form_names[i].name.indexOf("[url]") != -1 ) {
|
73 |
+
new_url[j] = form_names[i].value;
|
74 |
+
var id = form_names[i].name;
|
75 |
+
id = id.replace(/new_url_attaches\[/g, '');
|
76 |
+
id = id.replace(/\]\[url\]/g, '');
|
77 |
+
check_id[i] = id;
|
78 |
+
j = j + 1;
|
79 |
}
|
80 |
+
});
|
81 |
+
var j = 0;
|
82 |
+
jQuery.each(form_names, function(i) {
|
83 |
if ( form_names[i].name.indexOf("[datetime]") != -1 ) {
|
84 |
+
var id = form_names[i].name;
|
85 |
+
id = id.replace(/new_url_attaches\[/g, '');
|
86 |
+
id = id.replace(/\]\[datetime\]/g, '');
|
87 |
+
jQuery.each(check_id, function(k) {
|
88 |
+
if ( id == check_id[k] ) {
|
89 |
+
new_datetime[j] = form_names[i].value;
|
90 |
+
j = j + 1;
|
91 |
+
}
|
92 |
+
});
|
93 |
}
|
94 |
+
});
|
95 |
+
var j = 0;
|
96 |
+
jQuery.each(form_names, function(i) {
|
97 |
if ( form_names[i].name.indexOf("[mlccount]") != -1 ) {
|
98 |
+
var id = form_names[i].name;
|
99 |
+
id = id.replace(/new_url_attaches\[/g, '');
|
100 |
+
id = id.replace(/\]\[mlccount\]/g, '');
|
101 |
+
jQuery.each(check_id, function(k) {
|
102 |
+
if ( id == check_id[k] ) {
|
103 |
+
mlccount = form_names[i].value;
|
104 |
+
var form_checkbox = ".mlccheckbox" + mlccount + " input:checked";
|
105 |
+
var value="";
|
106 |
+
jQuery(form_checkbox).each(function() {
|
107 |
+
value = jQuery(this).val() + ',' + value;
|
108 |
+
});
|
109 |
+
new_mlccategory[j] = value.substr( 0, value.length-1 );
|
110 |
+
j = j + 1;
|
111 |
+
}
|
112 |
});
|
|
|
113 |
}
|
114 |
+
});
|
115 |
+
var j = 0;
|
116 |
+
jQuery.each(form_names, function(i) {
|
117 |
if ( form_names[i].name.indexOf("[emlcount]") != -1 ) {
|
118 |
+
var id = form_names[i].name;
|
119 |
+
id = id.replace(/new_url_attaches\[/g, '');
|
120 |
+
id = id.replace(/\]\[emlcount\]/g, '');
|
121 |
+
jQuery.each(check_id, function(k) {
|
122 |
+
if ( id == check_id[k] ) {
|
123 |
+
emlcount = form_names[i].value;
|
124 |
+
var form_checkbox = ".emlcheckbox" + emlcount + " input:checked";
|
125 |
+
var value="";
|
126 |
+
jQuery(form_checkbox).each(function() {
|
127 |
+
value = jQuery(this).val() + ',' + value;
|
128 |
+
});
|
129 |
+
new_emlcategory[j] = value.substr( 0, value.length-1 );
|
130 |
+
j = j + 1;
|
131 |
+
}
|
132 |
});
|
|
|
133 |
}
|
134 |
+
});
|
135 |
+
var j = 0;
|
136 |
+
jQuery.each(form_names, function(i) {
|
137 |
if ( form_names[i].name.indexOf("[mlacatcount]") != -1 ) {
|
138 |
+
var id = form_names[i].name;
|
139 |
+
id = id.replace(/new_url_attaches\[/g, '');
|
140 |
+
id = id.replace(/\]\[mlacatcount\]/g, '');
|
141 |
+
jQuery.each(check_id, function(k) {
|
142 |
+
if ( id == check_id[k] ) {
|
143 |
+
mlacatcount = form_names[i].value;
|
144 |
+
var form_checkbox = ".mlacatcheckbox" + mlacatcount + " input:checked";
|
145 |
+
var value="";
|
146 |
+
jQuery(form_checkbox).each(function() {
|
147 |
+
value = jQuery(this).val() + ',' + value;
|
148 |
+
});
|
149 |
+
new_mlacategory[j] = value.substr( 0, value.length-1 );
|
150 |
+
j = j + 1;
|
151 |
+
}
|
152 |
});
|
|
|
153 |
}
|
154 |
+
});
|
155 |
+
var j = 0;
|
156 |
+
jQuery.each(form_names, function(i) {
|
157 |
if ( form_names[i].name.indexOf("[mlatagcount]") != -1 ) {
|
158 |
+
var id = form_names[i].name;
|
159 |
+
id = id.replace(/new_url_attaches\[/g, '');
|
160 |
+
id = id.replace(/\]\[mlatagcount\]/g, '');
|
161 |
+
jQuery.each(check_id, function(k) {
|
162 |
+
if ( id == check_id[k] ) {
|
163 |
+
mlatagcount = form_names[i].value;
|
164 |
+
var form_checkbox = ".mlatagcheckbox" + mlatagcount + " input:checked";
|
165 |
+
var value="";
|
166 |
+
jQuery(form_checkbox).each(function() {
|
167 |
+
value = jQuery(this).val() + ',' + value;
|
168 |
+
});
|
169 |
+
new_mlatags[j] = value.substr( 0, value.length-1 );
|
170 |
+
j = j + 1;
|
171 |
+
}
|
172 |
});
|
|
|
173 |
}
|
174 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
175 |
|
176 |
jQuery("#mediafromftp-loading-container").empty();
|
177 |
jQuery("#screen-options-wrap").remove();
|
mediafromftp.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/*
|
3 |
Plugin Name: Media from FTP
|
4 |
Plugin URI: https://wordpress.org/plugins/media-from-ftp/
|
5 |
-
Version: 9.
|
6 |
Description: Register to media library from files that have been uploaded by FTP.
|
7 |
Author: Katsushi Kawamori
|
8 |
Author URI: https://riverforest-wp.info/
|
2 |
/*
|
3 |
Plugin Name: Media from FTP
|
4 |
Plugin URI: https://wordpress.org/plugins/media-from-ftp/
|
5 |
+
Version: 9.89
|
6 |
Description: Register to media library from files that have been uploaded by FTP.
|
7 |
Author: Katsushi Kawamori
|
8 |
Author URI: https://riverforest-wp.info/
|
readme.txt
CHANGED
@@ -5,7 +5,7 @@ Tags: files, ftp, import, media, sync, uploads
|
|
5 |
Requires at least: 3.6.0
|
6 |
Requires PHP: 5.3.0
|
7 |
Tested up to: 4.9
|
8 |
-
Stable tag: 9.
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
@@ -116,6 +116,9 @@ Register to media library from files that have been uploaded by FTP.
|
|
116 |
|
117 |
== Changelog ==
|
118 |
|
|
|
|
|
|
|
119 |
= 9.88 =
|
120 |
Security measures.
|
121 |
|
5 |
Requires at least: 3.6.0
|
6 |
Requires PHP: 5.3.0
|
7 |
Tested up to: 4.9
|
8 |
+
Stable tag: 9.89
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
116 |
|
117 |
== Changelog ==
|
118 |
|
119 |
+
= 9.89 =
|
120 |
+
Fixed problem of date and time acquisition at registration.
|
121 |
+
|
122 |
= 9.88 =
|
123 |
Security measures.
|
124 |
|
req/MediaFromFtpListTable.php
CHANGED
@@ -204,9 +204,9 @@ class TT_MediaFromFtp_List_Table extends WP_List_Table {
|
|
204 |
function column_cb($item){
|
205 |
return sprintf(
|
206 |
'<input type="checkbox" name="%1$s[%2$s][url]" value="%3$s" form="mediafromftp_ajax_update" />',
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
);
|
211 |
}
|
212 |
|
204 |
function column_cb($item){
|
205 |
return sprintf(
|
206 |
'<input type="checkbox" name="%1$s[%2$s][url]" value="%3$s" form="mediafromftp_ajax_update" />',
|
207 |
+
/*%1$s*/ $this->_args['singular'],
|
208 |
+
/*%2$s*/ $item['ID'],
|
209 |
+
/*%3$s*/ $item['new_url']
|
210 |
);
|
211 |
}
|
212 |
|