Media from FTP - Version 10.02

Version Description

Fixed problem of cache at search. Fixed problem of translation.

Download this release

Release Info

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

Code changes from version 10.01 to 10.02

inc/MediaFromFtp.php CHANGED
@@ -272,7 +272,9 @@ class MediaFromFtp {
272
  $value_cash = FALSE;
273
  }
274
  }
275
- if ( $value_cash == FALSE ) {
 
 
276
  if ( ! file_exists( $cash_thumb_filename )) {
277
  $cash_thumb = wp_get_image_editor( $file );
278
  if ( ! is_wp_error( $cash_thumb ) ) {
@@ -283,24 +285,22 @@ class MediaFromFtp {
283
  if ( ! is_wp_error( $cash_thumb2 ) ) {
284
  $cash_thumb2->resize( 40 ,40, true );
285
  $cash_thumb2->save( $cash_thumb_filename );
 
 
 
286
  }
287
- $view_thumb_url = $this->plugin_tmp_url.'/'.$cash_thumb_key.'-pdf.jpg';
288
  } else {
289
  $cash_thumb->resize( 40 ,40, true );
290
  $cash_thumb->save( $cash_thumb_filename );
291
  $view_thumb_url = $this->plugin_tmp_url.'/'.$cash_thumb_key.'.'.$ext;
292
  }
293
  } else {
294
- $filetype2 = wp_ext2type($ext);
295
- if ( empty($filetype2) ) { $filetype2 = 'default'; }
296
  $view_thumb_url = $this->siteurl(). WPINC . '/images/media/'.$filetype2.'.png';
297
  }
298
  } else {
299
  if ( file_exists( $cash_thumb_filename )) {
300
  $view_thumb_url = $this->plugin_tmp_url.'/'.$cash_thumb_key.'.'.$ext;
301
  } else {
302
- $filetype2 = wp_ext2type($ext);
303
- if ( empty($filetype2) ) { $filetype2 = 'default'; }
304
  $view_thumb_url = $this->siteurl(). WPINC . '/images/media/'.$filetype2.'.png';
305
  }
306
  }
272
  $value_cash = FALSE;
273
  }
274
  }
275
+ if ( ! $value_cash ) {
276
+ $filetype2 = wp_ext2type($ext);
277
+ if ( empty($filetype2) ) $filetype2 = 'default';
278
  if ( ! file_exists( $cash_thumb_filename )) {
279
  $cash_thumb = wp_get_image_editor( $file );
280
  if ( ! is_wp_error( $cash_thumb ) ) {
285
  if ( ! is_wp_error( $cash_thumb2 ) ) {
286
  $cash_thumb2->resize( 40 ,40, true );
287
  $cash_thumb2->save( $cash_thumb_filename );
288
+ $view_thumb_url = $this->plugin_tmp_url.'/'.$cash_thumb_key.'-pdf.jpg';
289
+ } else {
290
+ $view_thumb_url = $this->siteurl(). WPINC . '/images/media/'.$filetype2.'.png';
291
  }
 
292
  } else {
293
  $cash_thumb->resize( 40 ,40, true );
294
  $cash_thumb->save( $cash_thumb_filename );
295
  $view_thumb_url = $this->plugin_tmp_url.'/'.$cash_thumb_key.'.'.$ext;
296
  }
297
  } else {
 
 
298
  $view_thumb_url = $this->siteurl(). WPINC . '/images/media/'.$filetype2.'.png';
299
  }
300
  } else {
301
  if ( file_exists( $cash_thumb_filename )) {
302
  $view_thumb_url = $this->plugin_tmp_url.'/'.$cash_thumb_key.'.'.$ext;
303
  } else {
 
 
304
  $view_thumb_url = $this->siteurl(). WPINC . '/images/media/'.$filetype2.'.png';
305
  }
306
  }
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: 10.01
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: 10.02
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: 10.01
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -126,6 +126,10 @@ Register to media library from files that have been uploaded by FTP.
126
 
127
  == Changelog ==
128
 
 
 
 
 
129
  = 10.01 =
130
  Fixed problem of database error when first activation.
131
  Added file type and file extension to the search options on the setting page.
5
  Requires at least: 3.6.0
6
  Requires PHP: 5.3.0
7
  Tested up to: 4.9
8
+ Stable tag: 10.02
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
126
 
127
  == Changelog ==
128
 
129
+ = 10.02 =
130
+ Fixed problem of cache at search.
131
+ Fixed problem of translation.
132
+
133
  = 10.01 =
134
  Fixed problem of database error when first activation.
135
  Added file type and file extension to the search options on the setting page.
req/MediaFromFtpAdmin.php CHANGED
@@ -769,7 +769,7 @@ class MediaFromFtpAdmin {
769
  <form method="post" id="mediafromftp_search_form" action="<?php echo $scriptname; ?>">
770
  <?php wp_nonce_field('mff_search', 'media_from_ftp_search'); ?>
771
  <div class="item-mediafromftp-settings">
772
- <h3><?php echo __('Search').' '.__('directory', 'media-from-ftp').' - '.__('type').' - '.__('extension'); ?></h3>
773
  <?php echo $mediafromftp->dir_select_box($mediafromftp_settings['searchdir'], $mediafromftp_settings['character_code'], wp_normalize_path(ABSPATH)); ?>
774
  <?php echo $mediafromftp->type_ext_select_box($mediafromftp_settings['ext2typefilter'], $mediafromftp_settings['extfilter']); ?>
775
  </div>
769
  <form method="post" id="mediafromftp_search_form" action="<?php echo $scriptname; ?>">
770
  <?php wp_nonce_field('mff_search', 'media_from_ftp_search'); ?>
771
  <div class="item-mediafromftp-settings">
772
+ <h3><?php echo __('Search').' '.__('directory', 'media-from-ftp').' - '.__('type', 'media-from-ftp').' - '.__('extension', 'media-from-ftp'); ?></h3>
773
  <?php echo $mediafromftp->dir_select_box($mediafromftp_settings['searchdir'], $mediafromftp_settings['character_code'], wp_normalize_path(ABSPATH)); ?>
774
  <?php echo $mediafromftp->type_ext_select_box($mediafromftp_settings['ext2typefilter'], $mediafromftp_settings['extfilter']); ?>
775
  </div>