Media from FTP - Version 11.06

Version Description

Registration date & time is now possible in seconds unit.

Download this release

Release Info

Developer Katsushi Kawamori
Plugin Icon wp plugin Media from FTP
Version 11.06
Comparing to
See all releases

Code changes from version 11.05 to 11.06

inc/class-mediafromftp.php CHANGED
@@ -477,8 +477,6 @@ class MediaFromFtp {
477
  }
478
  }
479
 
480
- $date = substr( $date, 0, strlen( $date ) - 3 );
481
-
482
  return $date;
483
 
484
  }
@@ -932,7 +930,7 @@ class MediaFromFtp {
932
  $postdategmt = date_i18n( 'Y-m-d H:i:s', false, true );
933
  }
934
  if ( 'server' === $dateset || 'exif' === $dateset ) {
935
- $postdategmt = get_gmt_from_date( $new_url_datetime . ':00' );
936
  }
937
 
938
  $path_parts = pathinfo( $filename );
@@ -1031,7 +1029,7 @@ class MediaFromFtp {
1031
  /* Date Time Regist */
1032
  if ( 'new' <> $dateset ) {
1033
  if ( 'fixed' === $dateset ) {
1034
- $postdategmt = get_gmt_from_date( $datefixed . ':00' );
1035
  }
1036
  $postdate = get_date_from_gmt( $postdategmt );
1037
  $up_post = array(
@@ -1104,7 +1102,7 @@ class MediaFromFtp {
1104
  $mimetype = $filetype['ext'] . '(' . $filetype['type'] . ')';
1105
  }
1106
 
1107
- $stamptime = get_the_time( 'Y-n-j ', $attach_id ) . get_the_time( 'G:i', $attach_id );
1108
  if ( isset( $metadata['filesize'] ) ) {
1109
  $file_size = $metadata['filesize'];
1110
  } else {
477
  }
478
  }
479
 
 
 
480
  return $date;
481
 
482
  }
930
  $postdategmt = date_i18n( 'Y-m-d H:i:s', false, true );
931
  }
932
  if ( 'server' === $dateset || 'exif' === $dateset ) {
933
+ $postdategmt = get_gmt_from_date( $new_url_datetime );
934
  }
935
 
936
  $path_parts = pathinfo( $filename );
1029
  /* Date Time Regist */
1030
  if ( 'new' <> $dateset ) {
1031
  if ( 'fixed' === $dateset ) {
1032
+ $postdategmt = get_gmt_from_date( $datefixed );
1033
  }
1034
  $postdate = get_date_from_gmt( $postdategmt );
1035
  $up_post = array(
1102
  $mimetype = $filetype['ext'] . '(' . $filetype['type'] . ')';
1103
  }
1104
 
1105
+ $stamptime = get_the_time( 'Y-n-j ', $attach_id ) . get_the_time( 'G:i:s', $attach_id );
1106
  if ( isset( $metadata['filesize'] ) ) {
1107
  $file_size = $metadata['filesize'];
1108
  } else {
js/jquery.mediafromftp.datetimepicker.js CHANGED
@@ -22,6 +22,6 @@
22
  jQuery(
23
  function(){
24
  /* Date Time Picker */
25
- jQuery( ':input[id^=datetimepicker-mediafromftp]' ).datetimepicker( {format:'Y-m-d H:i'} );
26
  }
27
  );
22
  jQuery(
23
  function(){
24
  /* Date Time Picker */
25
+ jQuery( ':input[id^=datetimepicker-mediafromftp]' ).datetimepicker( {format:'Y-m-d H:i:s'} );
26
  }
27
  );
mediafromftp.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Media from FTP
4
  * Plugin URI: https://wordpress.org/plugins/media-from-ftp/
5
  * Description: Register to media library from files that have been uploaded by FTP.
6
- * Version: 11.05
7
  * Author: Katsushi Kawamori
8
  * Author URI: https://riverforest-wp.info/
9
  * License: GPL2
3
  * Plugin Name: Media from FTP
4
  * Plugin URI: https://wordpress.org/plugins/media-from-ftp/
5
  * Description: Register to media library from files that have been uploaded by FTP.
6
+ * Version: 11.06
7
  * Author: Katsushi Kawamori
8
  * Author URI: https://riverforest-wp.info/
9
  * License: GPL2
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.6
7
  Tested up to: 5.3
8
- Stable tag: 11.05
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -132,6 +132,9 @@ Password: live789user
132
 
133
  == Changelog ==
134
 
 
 
 
135
  = 11.05 =
136
  Added error handler for XML import.
137
 
5
  Requires at least: 3.6.0
6
  Requires PHP: 5.6
7
  Tested up to: 5.3
8
+ Stable tag: 11.06
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
132
 
133
  == Changelog ==
134
 
135
+ = 11.06 =
136
+ Registration date & time is now possible in seconds unit.
137
+
138
  = 11.05 =
139
  Added error handler for XML import.
140
 
req/class-mediafromftpadmin.php CHANGED
@@ -1231,9 +1231,9 @@ class MediaFromFtpAdmin {
1231
  if ( 'server' === $mediafromftp_settings['dateset'] || 'exif' === $mediafromftp_settings['dateset'] ) {
1232
  if ( $this->is_my_plugin_screen3() ) {
1233
  if ( function_exists( 'wp_date' ) ) {
1234
- $now_date_time = wp_date( 'Y-m-d H:i' );
1235
  } else {
1236
- $now_date_time = date_i18n( 'Y-m-d H:i' );
1237
  }
1238
  $html = '<div style="float: right;">' . __( 'Bulk Change', 'media-from-ftp' ) . '<input type="text" id="datetimepicker-mediafromftp0" name="bulk_mediafromftp_datetime" value="' . $now_date_time . '" style="width: 160px; height: 1.7em;" /></div>';
1239
  $allowed_html = array(
1231
  if ( 'server' === $mediafromftp_settings['dateset'] || 'exif' === $mediafromftp_settings['dateset'] ) {
1232
  if ( $this->is_my_plugin_screen3() ) {
1233
  if ( function_exists( 'wp_date' ) ) {
1234
+ $now_date_time = wp_date( 'Y-m-d H:i:s' );
1235
  } else {
1236
+ $now_date_time = date_i18n( 'Y-m-d H:i:s' );
1237
  }
1238
  $html = '<div style="float: right;">' . __( 'Bulk Change', 'media-from-ftp' ) . '<input type="text" id="datetimepicker-mediafromftp0" name="bulk_mediafromftp_datetime" value="' . $now_date_time . '" style="width: 160px; height: 1.7em;" /></div>';
1239
  $allowed_html = array(