Media from FTP - Version 9.84

Version Description

Notices for when "Organize my uploads into month- and year-based folders" is checked.

Download this release

Release Info

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

Code changes from version 9.83 to 9.84

Files changed (3) hide show
  1. mediafromftp.php +2 -1
  2. readme.txt +5 -1
  3. req/MediaFromFtpAdmin.php +25 -4
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.83
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/
@@ -84,6 +84,7 @@ Domain Path: /languages
84
  add_filter( 'set-screen-option', array($mediafromftpadmin, 'search_register_set_screen_options'), 11, 3 );
85
  add_filter( 'contextual_help', array($mediafromftpadmin, 'search_register_help_tab'), 12, 3);
86
  add_filter( 'robots_txt', array($mediafromftpadmin, 'custom_robots_txt') );
 
87
  unset($mediafromftpadmin);
88
 
89
  require_once( MEDIAFROMFTP_PLUGIN_BASE_DIR.'/req/MediaFromFtpAjax.php' );
2
  /*
3
  Plugin Name: Media from FTP
4
  Plugin URI: https://wordpress.org/plugins/media-from-ftp/
5
+ Version: 9.84
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/
84
  add_filter( 'set-screen-option', array($mediafromftpadmin, 'search_register_set_screen_options'), 11, 3 );
85
  add_filter( 'contextual_help', array($mediafromftpadmin, 'search_register_help_tab'), 12, 3);
86
  add_filter( 'robots_txt', array($mediafromftpadmin, 'custom_robots_txt') );
87
+ add_action( 'admin_notices', array($mediafromftpadmin, 'notices'));
88
  unset($mediafromftpadmin);
89
 
90
  require_once( MEDIAFROMFTP_PLUGIN_BASE_DIR.'/req/MediaFromFtpAjax.php' );
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.83
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -32,6 +32,7 @@ Register to media library from files that have been uploaded by FTP.
32
  * Deutsch [pixelverbieger](https://www.pixelverbieger.de/)
33
  * Español [apasionados](https://apasionados.es/)
34
  * Français [Li-An](https://www.echodesplugins.li-an.fr/)
 
35
 
36
  == Installation ==
37
 
@@ -115,6 +116,9 @@ Register to media library from files that have been uploaded by FTP.
115
 
116
  == Changelog ==
117
 
 
 
 
118
  = 9.83 =
119
  Fixed by adding some functions of addon.
120
 
5
  Requires at least: 3.6.0
6
  Requires PHP: 5.3.0
7
  Tested up to: 4.9
8
+ Stable tag: 9.84
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
32
  * Deutsch [pixelverbieger](https://www.pixelverbieger.de/)
33
  * Español [apasionados](https://apasionados.es/)
34
  * Français [Li-An](https://www.echodesplugins.li-an.fr/)
35
+ * Russian [khomenkov](https://awesomeprintstudio.com/)
36
 
37
  == Installation ==
38
 
116
 
117
  == Changelog ==
118
 
119
+ = 9.84 =
120
+ Notices for when "Organize my uploads into month- and year-based folders" is checked.
121
+
122
  = 9.83 =
123
  Fixed by adding some functions of addon.
124
 
req/MediaFromFtpAdmin.php CHANGED
@@ -1377,7 +1377,7 @@ class MediaFromFtpAdmin {
1377
  </h2>
1378
  <div style="clear: both;"></div>
1379
 
1380
- <div style="width: 300px; height: 100%; margin: 5px; padding: 5px; border: #CCC 2px solid; float: left;">
1381
  <h4>Media from FTP Add On Commandline</h4>
1382
  <div style="margin: 5px; padding: 5px;"><?php _e('This add-on can use "Media from FTP" on the command-line.', 'media-from-ftp'); ?></div>
1383
  <div style="margin: 5px; padding: 5px;">
@@ -1404,7 +1404,7 @@ class MediaFromFtpAdmin {
1404
  ?>
1405
  </div>
1406
 
1407
- <div style="width: 300px; height: 100%; margin: 5px; padding: 5px; border: #CCC 2px solid; float: left;">
1408
  <h4>Media from FTP Add On Wp Cron</h4>
1409
  <div style="margin: 5px; padding: 5px;"><?php _e('This add-on can register and execute Cron Event with multiple settings by "Media from FTP".', 'media-from-ftp'); ?></div>
1410
  <div style="margin: 5px; padding: 5px;">
@@ -1432,7 +1432,7 @@ class MediaFromFtpAdmin {
1432
  ?>
1433
  </div>
1434
 
1435
- <div style="width: 300px; height: 100%; margin: 5px; padding: 5px; border: #CCC 2px solid; float: left;">
1436
  <h4>Media from FTP Add On Category</h4>
1437
  <div style="margin: 5px; padding: 5px;"><?php _e('This Add-on When registering by "Media from FTP", add Category to Media Library.', 'media-from-ftp'); ?></div>
1438
  <div style="margin: 5px; padding: 5px;">
@@ -1459,7 +1459,7 @@ class MediaFromFtpAdmin {
1459
  ?>
1460
  </div>
1461
 
1462
- <div style="width: 300px; height: 100%; margin: 5px; padding: 5px; border: #CCC 2px solid; float: left;">
1463
  <h4>Media from FTP Add On Exif</h4>
1464
  <div style="margin: 5px; padding: 5px;"><?php _e('This Add-on When registering by "Media from FTP", add Exif to Media Library Caption.', 'media-from-ftp'); ?></div>
1465
  <div style="margin: 5px; padding: 5px;">
@@ -1841,5 +1841,26 @@ class MediaFromFtpAdmin {
1841
 
1842
  }
1843
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1844
  }
1845
  ?>
1377
  </h2>
1378
  <div style="clear: both;"></div>
1379
 
1380
+ <div style="width: 300px; height: 100%; margin: 10px; padding: 10px; border: #CCC 2px solid; float: left;">
1381
  <h4>Media from FTP Add On Commandline</h4>
1382
  <div style="margin: 5px; padding: 5px;"><?php _e('This add-on can use "Media from FTP" on the command-line.', 'media-from-ftp'); ?></div>
1383
  <div style="margin: 5px; padding: 5px;">
1404
  ?>
1405
  </div>
1406
 
1407
+ <div style="width: 300px; height: 100%; margin: 10px; padding: 10px; border: #CCC 2px solid; float: left;">
1408
  <h4>Media from FTP Add On Wp Cron</h4>
1409
  <div style="margin: 5px; padding: 5px;"><?php _e('This add-on can register and execute Cron Event with multiple settings by "Media from FTP".', 'media-from-ftp'); ?></div>
1410
  <div style="margin: 5px; padding: 5px;">
1432
  ?>
1433
  </div>
1434
 
1435
+ <div style="width: 300px; height: 100%; margin: 10px; padding: 10px; border: #CCC 2px solid; float: left;">
1436
  <h4>Media from FTP Add On Category</h4>
1437
  <div style="margin: 5px; padding: 5px;"><?php _e('This Add-on When registering by "Media from FTP", add Category to Media Library.', 'media-from-ftp'); ?></div>
1438
  <div style="margin: 5px; padding: 5px;">
1459
  ?>
1460
  </div>
1461
 
1462
+ <div style="width: 300px; height: 100%; margin: 10px; padding: 10px; border: #CCC 2px solid; float: left;">
1463
  <h4>Media from FTP Add On Exif</h4>
1464
  <div style="margin: 5px; padding: 5px;"><?php _e('This Add-on When registering by "Media from FTP", add Exif to Media Library Caption.', 'media-from-ftp'); ?></div>
1465
  <div style="margin: 5px; padding: 5px;">
1841
 
1842
  }
1843
 
1844
+ /* ==================================================
1845
+ * @param none
1846
+ * @return string
1847
+ * @since 9.84
1848
+ */
1849
+ function notices() {
1850
+
1851
+ $screen = get_current_screen();
1852
+ if (is_object($screen) && $screen->id == 'media-from-ftp_page_mediafromftp-search-register') {
1853
+ $html1 = '<strong>'.__('Organize my uploads into month- and year-based folders').'</strong>';
1854
+ $link_url1 = admin_url('options-media.php');
1855
+ $link1 = '<a href="'.$link_url1.'">'.__('Media Settings').'</a>';
1856
+ $link_url2 = admin_url('admin.php?page=mediafromftp-settings');
1857
+ $link2 = '<a href="'.$link_url2.'">'.__('Settings').'</a>';
1858
+ if ( get_option('uploads_use_yearmonth_folders') ) {
1859
+ echo '<div class="notice notice-warning is-dismissible"><ul><li>'.sprintf(__('"%1$s" is checked. This is the default setting for the WordPress Media Library. In this setting, the file is moved to month- and year-based folders. If you do not want to move, please uncheck.(%2$s,%3$s)', 'media-from-ftp'), $html1, $link1, $link2).'</li></ul></div>';
1860
+ }
1861
+ }
1862
+
1863
+ }
1864
+
1865
  }
1866
  ?>