Media from FTP - Version 11.13

Version Description

Fixed help tab.

Download this release

Release Info

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

Code changes from version 11.12 to 11.13

inc/class-mediafromftp.php CHANGED
@@ -137,9 +137,9 @@ class MediaFromFtp {
137
  $thumb_deep_search = $mediafromftp_settings['thumb_deep_search'];
138
  }
139
  if ( $thumb_deep_search ) {
140
- $excludefile = 'media-from-ftp-tmp'; /* tmp dir file */
141
  } else {
142
- $excludefile = '-[0-9]+x[0-9]+\.|media-from-ftp-tmp'; /* thumbnail & tmp dir file */
143
  }
144
 
145
  $recursive_search = true;
137
  $thumb_deep_search = $mediafromftp_settings['thumb_deep_search'];
138
  }
139
  if ( $thumb_deep_search ) {
140
+ $excludefile = 'media-from-ftp-tmp|bulk-media-register-tmp'; /* tmp dir file */
141
  } else {
142
+ $excludefile = '-[0-9]+x[0-9]+\.|media-from-ftp-tmp|bulk-media-register-tmp'; /* thumbnail & tmp dir file */
143
  }
144
 
145
  $recursive_search = true;
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.12
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.13
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.5
8
- Stable tag: 11.12
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -135,6 +135,9 @@ Password: live789user
135
 
136
  == Changelog ==
137
 
 
 
 
138
  = 11.12 =
139
  Fixed a problem of read logs.
140
 
5
  Requires at least: 3.6.0
6
  Requires PHP: 5.6
7
  Tested up to: 5.5
8
+ Stable tag: 11.13
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
135
 
136
  == Changelog ==
137
 
138
+ = 11.13 =
139
+ Fixed help tab.
140
+
141
  = 11.12 =
142
  Fixed a problem of read logs.
143
 
req/class-mediafromftpadmin.php CHANGED
@@ -148,8 +148,6 @@ class MediaFromFtpAdmin {
148
  add_action( 'admin_notices', array( $this, 'notices' ) );
149
  add_action( 'admin_menu', array( $this, 'add_pages' ) );
150
  add_action( 'admin_enqueue_scripts', array( $this, 'load_custom_wp_admin_style' ) );
151
- add_action( 'screen_settings', array( $this, 'search_register_show_screen_options' ), 10, 2 );
152
- add_filter( 'set-screen-option', array( $this, 'search_register_set_screen_options' ), 11, 3 );
153
  add_filter( 'admin_head', array( $this, 'search_register_help_tab' ) );
154
  add_filter( 'robots_txt', array( $this, 'custom_robots_txt' ), 9999 );
155
 
@@ -236,50 +234,6 @@ class MediaFromFtpAdmin {
236
  );
237
  }
238
 
239
- /** ==================================================
240
- * Show Screen Option Search & Register
241
- *
242
- * @param string $status status.
243
- * @param object $args args.
244
- * @since 9.52
245
- */
246
- public function search_register_show_screen_options( $status, $args ) {
247
-
248
- $mediafromftp_settings = get_user_option( 'mediafromftp', get_current_user_id() );
249
-
250
- $return = $status;
251
- if ( 'media-from-ftp_page_mediafromftp-search-register' == $args->base ) {
252
- $mediafromftp = new MediaFromFtp();
253
- $return = wp_nonce_field( 'mff_search', 'media_from_ftp_search' );
254
- $return .= '<div style="display: block; padding: 5px 15px">';
255
- $return .= $mediafromftp->search_option_html( $mediafromftp_settings );
256
- $return .= '<div style="display: block;padding:5px 5px">' . get_submit_button( __( 'Apply' ), 'primary', 'media-from-ftp-screen-options-apply', false ) . '</div>';
257
- $return .= '<input type="hidden" name="wp_screen_options[option]" value="media_from_ftp_show_screen" />';
258
- $return .= '<input type="hidden" name="wp_screen_options[value]" value="2" />';
259
- $return .= '</div>';
260
- unset( $mediafromftp );
261
- }
262
-
263
- return $return;
264
-
265
- }
266
-
267
- /** ==================================================
268
- * Save Screen Option Search & Register
269
- *
270
- * @param string $status status.
271
- * @param string $option option.
272
- * @param int $value value.
273
- * @since 9.52
274
- */
275
- public function search_register_set_screen_options( $status, $option, $value ) {
276
- if ( 'media_from_ftp_show_screen' == $option ) {
277
- $this->options_updated( $value );
278
- return $value;
279
- }
280
- return $status;
281
- }
282
-
283
  /** ==================================================
284
  * Help Tab
285
  *
@@ -325,13 +279,13 @@ class MediaFromFtpAdmin {
325
  $outline = '<p>' . sprintf( __( 'Search the upload directory(%1$s) and display files that do not exist in the media library.', 'media-from-ftp' ), $upload_dir_html ) . '</p>';
326
  /* translators: Update media */
327
  $outline .= '<p>' . sprintf( __( 'Please check and press the "%1$s" button.', 'media-from-ftp' ), __( 'Update Media' ) ) . '</p>';
328
- /* translators: Screen option */
329
- $outline .= '<p>' . sprintf( __( 'Options for searching can be specified with "%1$s".', 'media-from-ftp' ), __( 'Screen Options' ) ) . '</p>';
330
  break;
331
  case 'media-from-ftp_page_mediafromftp-settings':
332
  /* translators: Register */
333
  $outline = '<p>' . sprintf( __( '"%1$s" sets options for %2$s registration.', 'media-from-ftp' ), __( 'Register' ), __( 'Media Library' ) ) . '</p>';
334
- /* translators: Register option */
 
 
335
  $outline .= '<p>' . sprintf( __( '"%1$s" sets other options.', 'media-from-ftp' ), __( 'Other', 'media-from-ftp' ) ) . '</p>';
336
  if ( $this->is_add_on_activate['cli'] ) {
337
  $mediafromftpcli = new MediaFromFtpCli();
148
  add_action( 'admin_notices', array( $this, 'notices' ) );
149
  add_action( 'admin_menu', array( $this, 'add_pages' ) );
150
  add_action( 'admin_enqueue_scripts', array( $this, 'load_custom_wp_admin_style' ) );
 
 
151
  add_filter( 'admin_head', array( $this, 'search_register_help_tab' ) );
152
  add_filter( 'robots_txt', array( $this, 'custom_robots_txt' ), 9999 );
153
 
234
  );
235
  }
236
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
237
  /** ==================================================
238
  * Help Tab
239
  *
279
  $outline = '<p>' . sprintf( __( 'Search the upload directory(%1$s) and display files that do not exist in the media library.', 'media-from-ftp' ), $upload_dir_html ) . '</p>';
280
  /* translators: Update media */
281
  $outline .= '<p>' . sprintf( __( 'Please check and press the "%1$s" button.', 'media-from-ftp' ), __( 'Update Media' ) ) . '</p>';
 
 
282
  break;
283
  case 'media-from-ftp_page_mediafromftp-settings':
284
  /* translators: Register */
285
  $outline = '<p>' . sprintf( __( '"%1$s" sets options for %2$s registration.', 'media-from-ftp' ), __( 'Register' ), __( 'Media Library' ) ) . '</p>';
286
+ /* translators: Search option */
287
+ $outline .= '<p>' . sprintf( __( '"%1$s" sets searching options.', 'media-from-ftp' ), __( 'Search' ) ) . '</p>';
288
+ /* translators: Other option */
289
  $outline .= '<p>' . sprintf( __( '"%1$s" sets other options.', 'media-from-ftp' ), __( 'Other', 'media-from-ftp' ) ) . '</p>';
290
  if ( $this->is_add_on_activate['cli'] ) {
291
  $mediafromftpcli = new MediaFromFtpCli();
req/class-mediafromftpregist.php CHANGED
@@ -415,6 +415,32 @@ class MediaFromFtpRegist {
415
  </li></ul></div>
416
  <?php
417
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
418
  }
419
 
420
  }
415
  </li></ul></div>
416
  <?php
417
  }
418
+ if ( 11.11 == get_option( 'mediafromftp_notice' ) ) {
419
+ if ( class_exists( 'BulkMediaRegister' ) ) {
420
+ $bulkmediaregister_url = admin_url( 'admin.php?page=bulkmediaregister' );
421
+ } else {
422
+ if ( is_multisite() ) {
423
+ $bulkmediaregister_url = network_admin_url( 'plugin-install.php?tab=plugin-information&plugin=bulk-media-register' );
424
+ } else {
425
+ $bulkmediaregister_url = admin_url( 'plugin-install.php?tab=plugin-information&plugin=bulk-media-register' );
426
+ }
427
+ }
428
+ $bulkmediaregister_link = '<strong><a style="text-decoration: none;" href="' . $bulkmediaregister_url . '">Bulk Media Register</a></strong>';
429
+ ?>
430
+ <div class="notice notice-warning is-dismissible"><ul><li>
431
+ <form method="post" action="<?php echo esc_url( $scriptname ); ?>">
432
+ <?php
433
+ wp_nonce_field( 'mff_nt', 'mediafromftp_notice' );
434
+ /* translators: %1$s Plugin link */
435
+ echo wp_kses_post( sprintf( __( '%1$s is the successor to "Media from FTP". It has the same functions and greatly improved the search speed. Please switch to it.', 'media-from-ftp' ), $bulkmediaregister_link ) );
436
+ ?>
437
+ &nbsp
438
+ <?php echo wp_kses( $dismiss_button, $allowed_button_html ); ?>
439
+ <input type="hidden" name="notice_update_version" value="11.13">
440
+ </form>
441
+ </li></ul></div>
442
+ <?php
443
+ }
444
  }
445
 
446
  }