Media from FTP - Version 9.95

Version Description

Fixed problem of robots.txt.

Download this release

Release Info

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

Code changes from version 9.94 to 9.95

Files changed (3) hide show
  1. mediafromftp.php +3 -3
  2. readme.txt +4 -1
  3. req/MediaFromFtpAdmin.php +1 -1
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.94
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/
@@ -59,7 +59,7 @@ Domain Path: /languages
59
 
60
  define("MEDIAFROMFTP_PLUGIN_TMP_URL", MEDIAFROMFTP_PLUGIN_UPLOAD_URL.'/media-from-ftp-tmp');
61
  define("MEDIAFROMFTP_PLUGIN_TMP_DIR", MEDIAFROMFTP_PLUGIN_UPLOAD_DIR.'/media-from-ftp-tmp');
62
- define("MEDIAFROMFTP_PLUGIN_DISALLOW_TMP_DIR", '/'.MEDIAFROMFTP_PLUGIN_UPLOAD_PATH.'/media-from-ftp-tmp/');
63
 
64
  // Make tmp dir
65
  if ( !is_dir( MEDIAFROMFTP_PLUGIN_TMP_DIR ) ) {
@@ -83,7 +83,7 @@ Domain Path: /languages
83
  add_action( 'screen_settings', array($mediafromftpadmin, 'search_register_show_screen_options'), 10, 2 );
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
 
2
  /*
3
  Plugin Name: Media from FTP
4
  Plugin URI: https://wordpress.org/plugins/media-from-ftp/
5
+ Version: 9.95
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/
59
 
60
  define("MEDIAFROMFTP_PLUGIN_TMP_URL", MEDIAFROMFTP_PLUGIN_UPLOAD_URL.'/media-from-ftp-tmp');
61
  define("MEDIAFROMFTP_PLUGIN_TMP_DIR", MEDIAFROMFTP_PLUGIN_UPLOAD_DIR.'/media-from-ftp-tmp');
62
+ define("MEDIAFROMFTP_PLUGIN_DISALLOW_TMP_DIR", str_replace(home_url(), '', site_url()).'/'.MEDIAFROMFTP_PLUGIN_UPLOAD_PATH.'/media-from-ftp-tmp/');
63
 
64
  // Make tmp dir
65
  if ( !is_dir( MEDIAFROMFTP_PLUGIN_TMP_DIR ) ) {
83
  add_action( 'screen_settings', array($mediafromftpadmin, 'search_register_show_screen_options'), 10, 2 );
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'), 9999 );
87
  add_action( 'admin_notices', array($mediafromftpadmin, 'notices'));
88
  unset($mediafromftpadmin);
89
 
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.94
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -126,6 +126,9 @@ Register to media library from files that have been uploaded by FTP.
126
 
127
  == Changelog ==
128
 
 
 
 
129
  = 9.94 =
130
  Changed donate link.
131
 
5
  Requires at least: 3.6.0
6
  Requires PHP: 5.3.0
7
  Tested up to: 4.9
8
+ Stable tag: 9.95
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
126
 
127
  == Changelog ==
128
 
129
+ = 9.95 =
130
+ Fixed problem of robots.txt.
131
+
132
  = 9.94 =
133
  Changed donate link.
134
 
req/MediaFromFtpAdmin.php CHANGED
@@ -1835,7 +1835,7 @@ class MediaFromFtpAdmin {
1835
 
1836
  $public = get_option( 'blog_public' );
1837
  if ( '0' != $public ) {
1838
- $output .= 'Disallow: '.MEDIAFROMFTP_PLUGIN_DISALLOW_TMP_DIR."\n";
1839
  }
1840
 
1841
  return $output;
1835
 
1836
  $public = get_option( 'blog_public' );
1837
  if ( '0' != $public ) {
1838
+ $output .= "\n".'Disallow: '.MEDIAFROMFTP_PLUGIN_DISALLOW_TMP_DIR."\n";
1839
  }
1840
 
1841
  return $output;