Version Description
Fixed an issue where the original image was searched when media reduced with a large image was registered.
Download this release
Release Info
Developer | Katsushi Kawamori |
Plugin | Media from FTP |
Version | 11.03 |
Comparing to | |
See all releases |
Code changes from version 11.02 to 11.03
- inc/class-mediafromftp.php +10 -2
- mediafromftp.php +1 -1
- readme.txt +4 -1
inc/class-mediafromftp.php
CHANGED
@@ -514,9 +514,17 @@ class MediaFromFtp {
|
|
514 |
$new_file = true;
|
515 |
$new_url = $this->mb_utf8( $new_url, $character_code );
|
516 |
foreach ( $attachments as $attachment ) {
|
517 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
518 |
$pdf_thumb_url = rtrim( $attach_url, '.pdf' ) . '-pdf.jpg'; /* for pdf thumbnail by imagick */
|
519 |
-
if ( $attach_url === $new_url || $attach_url === $new_url_md5 || $pdf_thumb_url === $new_url || $pdf_thumb_url === $new_url_md5 ) {
|
520 |
$new_file = false;
|
521 |
} else {
|
522 |
if ( $thumb_deep_search ) {
|
514 |
$new_file = true;
|
515 |
$new_url = $this->mb_utf8( $new_url, $character_code );
|
516 |
foreach ( $attachments as $attachment ) {
|
517 |
+
$path_file = get_post_meta( $attachment->ID, '_wp_attached_file', true );
|
518 |
+
$attach_url = $this->upload_url . '/' . $path_file;
|
519 |
+
$metadata = wp_get_attachment_metadata( $attachment->ID );
|
520 |
+
$orginal_image_url = null;
|
521 |
+
if ( ! empty( $metadata['original_image'] ) ) {
|
522 |
+
$only_file = wp_basename( $path_file );
|
523 |
+
$orginal_image_url = $this->upload_url . '/' . str_replace( $only_file, '', $path_file ) . $metadata['original_image'];
|
524 |
+
}
|
525 |
+
$original_url = $this->upload_url . '/' . get_post_meta( $attachment->ID, '_wp_attached_file', true );
|
526 |
$pdf_thumb_url = rtrim( $attach_url, '.pdf' ) . '-pdf.jpg'; /* for pdf thumbnail by imagick */
|
527 |
+
if ( $attach_url === $new_url || $attach_url === $new_url_md5 || $pdf_thumb_url === $new_url || $pdf_thumb_url === $new_url_md5 || $orginal_image_url === $new_url ) {
|
528 |
$new_file = false;
|
529 |
} else {
|
530 |
if ( $thumb_deep_search ) {
|
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.
|
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.03
|
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.
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
@@ -131,6 +131,9 @@ Password: live789user
|
|
131 |
|
132 |
== Changelog ==
|
133 |
|
|
|
|
|
|
|
134 |
= 11.02 =
|
135 |
Fixed problem of sites dir exclusion on multisite.
|
136 |
|
5 |
Requires at least: 3.6.0
|
6 |
Requires PHP: 5.6
|
7 |
Tested up to: 5.3
|
8 |
+
Stable tag: 11.03
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
131 |
|
132 |
== Changelog ==
|
133 |
|
134 |
+
= 11.03 =
|
135 |
+
Fixed an issue where the original image was searched when media reduced with a large image was registered.
|
136 |
+
|
137 |
= 11.02 =
|
138 |
Fixed problem of sites dir exclusion on multisite.
|
139 |
|