Version Description
A dedicated notification bar has been added. Fixed a problem of target="_blank".
Download this release
Release Info
Developer | Katsushi Kawamori |
Plugin | Media from FTP |
Version | 11.09 |
Comparing to | |
See all releases |
Code changes from version 11.08 to 11.09
- inc/class-mediafromftp.php +5 -5
- mediafromftp.php +1 -1
- readme.txt +7 -1
- req/class-mediafromftpadmin.php +31 -17
- req/class-mediafromftpajax.php +5 -3
- req/class-mediafromftpregist.php +96 -0
inc/class-mediafromftp.php
CHANGED
@@ -585,7 +585,7 @@ class MediaFromFtp {
|
|
585 |
}
|
586 |
|
587 |
$input_html .= '<div style="overflow: hidden;">';
|
588 |
-
$input_html .= '<div><a href="' . $new_url . '" target="_blank" style="text-decoration: none; word-break: break-all;">' . $new_url . '</a></div>';
|
589 |
|
590 |
if ( $mediafromftp_settings['search_display_metadata'] ) {
|
591 |
$input_html .= '<div>' . __( 'File type:' ) . ' ' . $mimetype . '</div>';
|
@@ -1156,11 +1156,11 @@ class MediaFromFtp {
|
|
1156 |
$output_html .= '<div style="overflow: hidden;">';
|
1157 |
$output_html .= '<div>ID: ' . $attach_id . '</div>';
|
1158 |
$output_html .= '<div>' . __( 'Title' ) . ': ' . $new_attach_title . '</div>';
|
1159 |
-
$output_html .= '<div>' . __( 'Permalink:' ) . ' <a href="' . get_attachment_link( $attach_id ) . '" target="_blank" style="text-decoration: none; word-break: break-all;">' . get_attachment_link( $attach_id ) . '</a></div>';
|
1160 |
-
$output_html .= '<div>URL: <a href="' . wp_get_attachment_url( $attach_id ) . '" target="_blank" style="text-decoration: none; word-break: break-all;">' . wp_get_attachment_url( $attach_id ) . '</a></div>';
|
1161 |
$output_html .= '<div>' . __( 'File name:' ) . ' ' . wp_basename( wp_get_attachment_url( $attach_id ) ) . '</div>';
|
1162 |
if ( ! empty( $metadata['original_image'] ) ) {
|
1163 |
-
$output_html .= '<div>' . __( 'Original URL', 'media-from-ftp' ) . ': <a href="' . wp_get_original_image_url( $attach_id ) . '" target="_blank" style="text-decoration: none; word-break: break-all;">' . wp_get_original_image_url( $attach_id ) . '</a></div>';
|
1164 |
$output_html .= '<div>' . __( 'Original File name', 'media-from-ftp' ) . ': ' . wp_basename( wp_get_original_image_url( $attach_id ) ) . '</div>';
|
1165 |
}
|
1166 |
$output_html .= '<div>' . __( 'Date/Time' ) . ': ' . $stamptime . '</div>';
|
@@ -1179,7 +1179,7 @@ class MediaFromFtp {
|
|
1179 |
$thumbnails[ $thumb_count ] = wp_get_original_image_url( $attach_id );
|
1180 |
}
|
1181 |
foreach ( $imagethumburls as $thumbsize => $imagethumburl ) {
|
1182 |
-
$output_html .= '[<a href="' . $imagethumburl . '" target="_blank" style="text-decoration: none; word-break: break-all;">' . $thumbsize . '</a>]';
|
1183 |
++$thumb_count;
|
1184 |
$thumbnails[ $thumb_count ] = $imagethumburl;
|
1185 |
}
|
585 |
}
|
586 |
|
587 |
$input_html .= '<div style="overflow: hidden;">';
|
588 |
+
$input_html .= '<div><a href="' . $new_url . '" target="_blank" rel="noopener noreferrer" style="text-decoration: none; word-break: break-all;">' . $new_url . '</a></div>';
|
589 |
|
590 |
if ( $mediafromftp_settings['search_display_metadata'] ) {
|
591 |
$input_html .= '<div>' . __( 'File type:' ) . ' ' . $mimetype . '</div>';
|
1156 |
$output_html .= '<div style="overflow: hidden;">';
|
1157 |
$output_html .= '<div>ID: ' . $attach_id . '</div>';
|
1158 |
$output_html .= '<div>' . __( 'Title' ) . ': ' . $new_attach_title . '</div>';
|
1159 |
+
$output_html .= '<div>' . __( 'Permalink:' ) . ' <a href="' . get_attachment_link( $attach_id ) . '" target="_blank" rel="noopener noreferrer" style="text-decoration: none; word-break: break-all;">' . get_attachment_link( $attach_id ) . '</a></div>';
|
1160 |
+
$output_html .= '<div>URL: <a href="' . wp_get_attachment_url( $attach_id ) . '" target="_blank" rel="noopener noreferrer" style="text-decoration: none; word-break: break-all;">' . wp_get_attachment_url( $attach_id ) . '</a></div>';
|
1161 |
$output_html .= '<div>' . __( 'File name:' ) . ' ' . wp_basename( wp_get_attachment_url( $attach_id ) ) . '</div>';
|
1162 |
if ( ! empty( $metadata['original_image'] ) ) {
|
1163 |
+
$output_html .= '<div>' . __( 'Original URL', 'media-from-ftp' ) . ': <a href="' . wp_get_original_image_url( $attach_id ) . '" target="_blank" rel="noopener noreferrer" style="text-decoration: none; word-break: break-all;">' . wp_get_original_image_url( $attach_id ) . '</a></div>';
|
1164 |
$output_html .= '<div>' . __( 'Original File name', 'media-from-ftp' ) . ': ' . wp_basename( wp_get_original_image_url( $attach_id ) ) . '</div>';
|
1165 |
}
|
1166 |
$output_html .= '<div>' . __( 'Date/Time' ) . ': ' . $stamptime . '</div>';
|
1179 |
$thumbnails[ $thumb_count ] = wp_get_original_image_url( $attach_id );
|
1180 |
}
|
1181 |
foreach ( $imagethumburls as $thumbsize => $imagethumburl ) {
|
1182 |
+
$output_html .= '[<a href="' . $imagethumburl . '" target="_blank" rel="noopener noreferrer" style="text-decoration: none; word-break: break-all;">' . $thumbsize . '</a>]';
|
1183 |
++$thumb_count;
|
1184 |
$thumbnails[ $thumb_count ] = $imagethumburl;
|
1185 |
}
|
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.09
|
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.4
|
8 |
-
Stable tag: 11.
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
@@ -22,6 +22,7 @@ Register to media library from files that have been uploaded by FTP.
|
|
22 |
* To Import the files to Media Library from a WordPress export file.
|
23 |
* You can register a large number of files without timeout work with Ajax.
|
24 |
* Sibling plugin -> [Media from ZIP](https://wordpress.org/plugins/media-from-zip/).
|
|
|
25 |
|
26 |
= Tutorial Video =
|
27 |
[youtube https://www.youtube.com/watch?v=vdxPvOFZaDk]
|
@@ -44,6 +45,7 @@ Password: live789user
|
|
44 |
* Russian [khomenkov](https://awesomeprintstudio.com/)
|
45 |
* Spanish (Spain) [Yordan Soares](https://www.yordansoar.es/)
|
46 |
* Spanish (Venezuela) [Yordan Soares](https://www.yordansoar.es/)
|
|
|
47 |
|
48 |
== Installation ==
|
49 |
|
@@ -133,6 +135,10 @@ Password: live789user
|
|
133 |
|
134 |
== Changelog ==
|
135 |
|
|
|
|
|
|
|
|
|
136 |
= 11.08 =
|
137 |
Fixed saving per-user settings.
|
138 |
|
5 |
Requires at least: 3.6.0
|
6 |
Requires PHP: 5.6
|
7 |
Tested up to: 5.4
|
8 |
+
Stable tag: 11.09
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
22 |
* To Import the files to Media Library from a WordPress export file.
|
23 |
* You can register a large number of files without timeout work with Ajax.
|
24 |
* Sibling plugin -> [Media from ZIP](https://wordpress.org/plugins/media-from-zip/).
|
25 |
+
* Sibling plugin -> [Moving Media Library](https://wordpress.org/plugins/moving-media-library/).
|
26 |
|
27 |
= Tutorial Video =
|
28 |
[youtube https://www.youtube.com/watch?v=vdxPvOFZaDk]
|
45 |
* Russian [khomenkov](https://awesomeprintstudio.com/)
|
46 |
* Spanish (Spain) [Yordan Soares](https://www.yordansoar.es/)
|
47 |
* Spanish (Venezuela) [Yordan Soares](https://www.yordansoar.es/)
|
48 |
+
* Spanish (Mexico) [Yordan Soares](https://www.yordansoar.es/)
|
49 |
|
50 |
== Installation ==
|
51 |
|
135 |
|
136 |
== Changelog ==
|
137 |
|
138 |
+
= 11.09 =
|
139 |
+
A dedicated notification bar has been added.
|
140 |
+
Fixed a problem of target="_blank".
|
141 |
+
|
142 |
= 11.08 =
|
143 |
Fixed saving per-user settings.
|
144 |
|
req/class-mediafromftpadmin.php
CHANGED
@@ -304,13 +304,13 @@ class MediaFromFtpAdmin {
|
|
304 |
$current_screen->add_help_tab( $this->get_help_message( $screen_id ) );
|
305 |
|
306 |
$sidebar = '<p><strong>' . __( 'For more information:' ) . '</strong></p>';
|
307 |
-
$sidebar .= '<p><a href="' . __( 'https://wordpress.org/plugins/media-from-ftp/faq', 'media-from-ftp' ) . '" target="_blank">' . __( 'FAQ' ) . '</a></p>';
|
308 |
-
$sidebar .= '<p><a href="https://wordpress.org/support/plugin/media-from-ftp" target="_blank">' . __( 'Support Forums' ) . '</a></p>';
|
309 |
-
$sidebar .= '<p><a href="https://wordpress.org/support/view/plugin-reviews/media-from-ftp" target="_blank">' . __( 'Reviews', 'media-from-ftp' ) . '</a></p>';
|
310 |
/* translators: Translator */
|
311 |
-
$sidebar .= '<p><a href="https://translate.wordpress.org/projects/wp-plugins/media-from-ftp" target="_blank">' . sprintf( __( 'Translations for %s' ), 'Media from FTP' ) . '</a></p>';
|
312 |
-
$sidebar .= '<p><a style="text-decoration: none;" href="https://www.facebook.com/katsushikawamori/" target="_blank"><span class="dashicons dashicons-facebook"></span></a> <a style="text-decoration: none;" href="https://twitter.com/dodesyo312" target="_blank"><span class="dashicons dashicons-twitter"></span></a> <a style="text-decoration: none;" href="https://www.youtube.com/channel/UC5zTLeyROkvZm86OgNRcb_w" target="_blank"><span class="dashicons dashicons-video-alt3"></span></a></p>';
|
313 |
-
$sidebar .= '<p><a href="' . __( 'https://riverforest-wp.info/donate/', 'media-from-ftp' ) . '" target="_blank">' . __( 'Donate to this plugin »' ) . '</a></p>';
|
314 |
|
315 |
$current_screen->set_help_sidebar( $sidebar );
|
316 |
|
@@ -554,6 +554,8 @@ class MediaFromFtpAdmin {
|
|
554 |
wp_die( esc_html__( 'You do not have sufficient permissions to access this page.' ) );
|
555 |
}
|
556 |
|
|
|
|
|
557 |
?>
|
558 |
|
559 |
<div class="wrap">
|
@@ -636,15 +638,15 @@ class MediaFromFtpAdmin {
|
|
636 |
<span style="font-weight: bold;">
|
637 |
<div>
|
638 |
<?php echo esc_html( $plugin_version ); ?> |
|
639 |
-
<a style="text-decoration: none;" href="<?php echo esc_url( $faq ); ?>" target="_blank"><?php esc_html_e( 'FAQ' ); ?></a> | <a style="text-decoration: none;" href="<?php echo esc_url( $support ); ?>" target="_blank"><?php esc_html_e( 'Support Forums' ); ?></a> | <a style="text-decoration: none;" href="<?php echo esc_url( $review ); ?>" target="_blank"><?php sprintf( esc_html_e( 'Reviews', '%s' ), $slug ); ?></a>
|
640 |
</div>
|
641 |
<div>
|
642 |
-
<a style="text-decoration: none;" href="<?php echo esc_url( $translate ); ?>" target="_blank">
|
643 |
<?php
|
644 |
/* translators: Plugin translation link */
|
645 |
echo sprintf( esc_html__( 'Translations for %s' ), esc_html( $plugin_name ) );
|
646 |
?>
|
647 |
-
</a> | <a style="text-decoration: none;" href="<?php echo esc_url( $facebook ); ?>" target="_blank"><span class="dashicons dashicons-facebook"></span></a> | <a style="text-decoration: none;" href="<?php echo esc_url( $twitter ); ?>" target="_blank"><span class="dashicons dashicons-twitter"></span></a> | <a style="text-decoration: none;" href="<?php echo esc_url( $youtube ); ?>" target="_blank"><span class="dashicons dashicons-video-alt3"></span></a>
|
648 |
</div>
|
649 |
</span>
|
650 |
|
@@ -706,6 +708,8 @@ class MediaFromFtpAdmin {
|
|
706 |
wp_die( esc_html__( 'You do not have sufficient permissions to access this page.' ) );
|
707 |
}
|
708 |
|
|
|
|
|
709 |
$this->options_updated( 1 );
|
710 |
$this->options_updated( 2 );
|
711 |
$this->options_updated( 3 );
|
@@ -837,7 +841,7 @@ class MediaFromFtpAdmin {
|
|
837 |
|
838 |
<div style="display: block; padding:5px 5px">
|
839 |
<input type="checkbox" name="mediafromftp_datetimepicker" form="mediafromftp_settings_form" value="1" <?php checked( '1', $mediafromftp_settings['datetimepicker'] ); ?> />
|
840 |
-
<a href="https://xdsoft.net/jqplugins/datetimepicker/" target="_blank" style="text-decoration: none;">Date Time Picker</a>(jQuery <?php esc_html_e( 'Plugin' ); ?>)
|
841 |
<?php esc_html_e( 'Date and time input assistance', 'media-from-ftp' ); ?>
|
842 |
</div>
|
843 |
|
@@ -1057,7 +1061,7 @@ class MediaFromFtpAdmin {
|
|
1057 |
<p>
|
1058 |
<?php
|
1059 |
esc_html_e( 'It may fail to register if you are using a multi-byte name in the file name or folder name. In that case, please change.', 'media-from-ftp' );
|
1060 |
-
$characterencodings_none_html = '<a href="' . __( 'https://en.wikipedia.org/wiki/Variable-width_encoding', 'media-from-ftp' ) . '" target="_blank" style="text-decoration: none; word-break: break-all;">' . __( 'variable-width encoding', 'media-from-ftp' ) . '</a>';
|
1061 |
/* translators: %1$s: URL of Variable-width_encoding */
|
1062 |
echo wp_kses_post( sprintf( __( 'If you do not use the filename or directory name of %1$s, please choose "%2$s".', 'media-from-ftp' ), $characterencodings_none_html, '<font color="red">none</font>' ) );
|
1063 |
?>
|
@@ -1142,6 +1146,8 @@ class MediaFromFtpAdmin {
|
|
1142 |
wp_die( esc_html__( 'You do not have sufficient permissions to access this page.' ) );
|
1143 |
}
|
1144 |
|
|
|
|
|
1145 |
$this->options_updated( 2 );
|
1146 |
|
1147 |
$mediafromftp_settings = get_user_option( 'mediafromftp', get_current_user_id() );
|
@@ -1279,6 +1285,8 @@ class MediaFromFtpAdmin {
|
|
1279 |
wp_die( esc_html__( 'You do not have sufficient permissions to access this page.' ) );
|
1280 |
}
|
1281 |
|
|
|
|
|
1282 |
$this->options_updated( 4 );
|
1283 |
|
1284 |
?>
|
@@ -1375,6 +1383,8 @@ class MediaFromFtpAdmin {
|
|
1375 |
wp_die( esc_html__( 'You do not have sufficient permissions to access this page.' ) );
|
1376 |
}
|
1377 |
|
|
|
|
|
1378 |
$mediafromftp_settings = get_user_option( 'mediafromftp', get_current_user_id() );
|
1379 |
if ( ! $mediafromftp_settings['log'] ) {
|
1380 |
echo '<div class="notice notice-info is-dismissible"><ul><li>' . esc_html__( 'Current, log is not created. If you want to create a log, please put a check in the [Create log] in the settings.', 'media-from-ftp' ) . '</li></ul></div>';
|
@@ -1638,6 +1648,8 @@ class MediaFromFtpAdmin {
|
|
1638 |
wp_die( esc_html__( 'You do not have sufficient permissions to access this page.' ) );
|
1639 |
}
|
1640 |
|
|
|
|
|
1641 |
$scriptname = admin_url( 'admin.php?page=mediafromftp-import' );
|
1642 |
|
1643 |
?>
|
@@ -1786,6 +1798,8 @@ class MediaFromFtpAdmin {
|
|
1786 |
wp_die( esc_html__( 'You do not have sufficient permissions to access this page.' ) );
|
1787 |
}
|
1788 |
|
|
|
|
|
1789 |
$scriptname = admin_url( 'admin.php?page=mediafromftp-addons' );
|
1790 |
|
1791 |
?>
|
@@ -1833,7 +1847,7 @@ class MediaFromFtpAdmin {
|
|
1833 |
} else {
|
1834 |
?>
|
1835 |
<div>
|
1836 |
-
<a href="<?php echo esc_url( __( 'https://shop.riverforest-wp.info/media-from-ftp-add-on-cli/', 'media-from-ftp' ) ); ?>" target="_blank" class="page-title-action"><?php esc_html_e( 'BUY', 'media-from-ftp' ); ?></a>
|
1837 |
</div>
|
1838 |
<?php
|
1839 |
}
|
@@ -1868,7 +1882,7 @@ class MediaFromFtpAdmin {
|
|
1868 |
} else {
|
1869 |
?>
|
1870 |
<div>
|
1871 |
-
<a href="<?php echo esc_url( __( 'https://shop.riverforest-wp.info/media-from-ftp-add-on-wpcron/', 'media-from-ftp' ) ); ?>" target="_blank" class="page-title-action"><?php esc_html_e( 'BUY', 'media-from-ftp' ); ?></a>
|
1872 |
</div>
|
1873 |
<?php
|
1874 |
}
|
@@ -1879,7 +1893,7 @@ class MediaFromFtpAdmin {
|
|
1879 |
<h4>Media from FTP Add On Category</h4>
|
1880 |
<div style="margin: 5px; padding: 5px;"><?php esc_html_e( 'This Add-on When registering by "Media from FTP", add Category to Media Library.', 'media-from-ftp' ); ?></div>
|
1881 |
<div style="margin: 5px; padding: 5px;">
|
1882 |
-
<li><?php esc_html_e( 'Works with next plugin.', 'media-from-ftp' ); ?> [<a style="text-decoration: none;" href="https://wordpress.org/plugins/wp-media-library-categories/" target="_blank">Media Library Categories</a>] [<a style="text-decoration: none;" href="https://wordpress.org/plugins/enhanced-media-library/" target="_blank">Enhanced Media Library</a>] [<a style="text-decoration: none;" href="https://wordpress.org/plugins/media-library-assistant/" target="_blank">Media Library Assistant</a>]</li>
|
1883 |
</div>
|
1884 |
<p>
|
1885 |
<?php
|
@@ -1902,7 +1916,7 @@ class MediaFromFtpAdmin {
|
|
1902 |
} else {
|
1903 |
?>
|
1904 |
<div>
|
1905 |
-
<a href="<?php echo esc_url( __( 'https://shop.riverforest-wp.info/media-from-ftp-add-on-category/', 'media-from-ftp' ) ); ?>" target="_blank" class="page-title-action"><?php esc_html_e( 'BUY', 'media-from-ftp' ); ?></a>
|
1906 |
</div>
|
1907 |
<?php
|
1908 |
}
|
@@ -1914,7 +1928,7 @@ class MediaFromFtpAdmin {
|
|
1914 |
<div style="margin: 5px; padding: 5px;"><?php esc_html_e( 'This Add-on When registering by "Media from FTP", add Exif to Media Library Caption.', 'media-from-ftp' ); ?></div>
|
1915 |
<div style="margin: 5px; padding: 5px;">
|
1916 |
<li><?php esc_html_e( 'Sort each Exif data to an arbitrary position and insert it into the caption as text.', 'media-from-ftp' ); ?></li>
|
1917 |
-
<li><a style="text-decoration: none;" href="https://codex.wordpress.org/Function_Reference/wp_read_image_metadata#Return%20Values" target="_blank">Exif</a></li>
|
1918 |
</div>
|
1919 |
|
1920 |
<p>
|
@@ -1938,7 +1952,7 @@ class MediaFromFtpAdmin {
|
|
1938 |
} else {
|
1939 |
?>
|
1940 |
<div>
|
1941 |
-
<a href="<?php echo esc_url( __( 'https://shop.riverforest-wp.info/media-from-ftp-add-on-exif/', 'media-from-ftp' ) ); ?>" target="_blank" class="page-title-action"><?php esc_html_e( 'BUY', 'media-from-ftp' ); ?></a>
|
1942 |
</div>
|
1943 |
<?php
|
1944 |
}
|
304 |
$current_screen->add_help_tab( $this->get_help_message( $screen_id ) );
|
305 |
|
306 |
$sidebar = '<p><strong>' . __( 'For more information:' ) . '</strong></p>';
|
307 |
+
$sidebar .= '<p><a href="' . __( 'https://wordpress.org/plugins/media-from-ftp/faq', 'media-from-ftp' ) . '" target="_blank" rel="noopener noreferrer">' . __( 'FAQ' ) . '</a></p>';
|
308 |
+
$sidebar .= '<p><a href="https://wordpress.org/support/plugin/media-from-ftp" target="_blank" rel="noopener noreferrer">' . __( 'Support Forums' ) . '</a></p>';
|
309 |
+
$sidebar .= '<p><a href="https://wordpress.org/support/view/plugin-reviews/media-from-ftp" target="_blank" rel="noopener noreferrer">' . __( 'Reviews', 'media-from-ftp' ) . '</a></p>';
|
310 |
/* translators: Translator */
|
311 |
+
$sidebar .= '<p><a href="https://translate.wordpress.org/projects/wp-plugins/media-from-ftp" target="_blank" rel="noopener noreferrer">' . sprintf( __( 'Translations for %s' ), 'Media from FTP' ) . '</a></p>';
|
312 |
+
$sidebar .= '<p><a style="text-decoration: none;" href="https://www.facebook.com/katsushikawamori/" target="_blank" rel="noopener noreferrer"><span class="dashicons dashicons-facebook"></span></a> <a style="text-decoration: none;" href="https://twitter.com/dodesyo312" target="_blank" rel="noopener noreferrer"><span class="dashicons dashicons-twitter"></span></a> <a style="text-decoration: none;" href="https://www.youtube.com/channel/UC5zTLeyROkvZm86OgNRcb_w" target="_blank" rel="noopener noreferrer"><span class="dashicons dashicons-video-alt3"></span></a></p>';
|
313 |
+
$sidebar .= '<p><a href="' . __( 'https://riverforest-wp.info/donate/', 'media-from-ftp' ) . '" target="_blank" rel="noopener noreferrer">' . __( 'Donate to this plugin »' ) . '</a></p>';
|
314 |
|
315 |
$current_screen->set_help_sidebar( $sidebar );
|
316 |
|
554 |
wp_die( esc_html__( 'You do not have sufficient permissions to access this page.' ) );
|
555 |
}
|
556 |
|
557 |
+
do_action( 'media_from_ftp_notices' );
|
558 |
+
|
559 |
?>
|
560 |
|
561 |
<div class="wrap">
|
638 |
<span style="font-weight: bold;">
|
639 |
<div>
|
640 |
<?php echo esc_html( $plugin_version ); ?> |
|
641 |
+
<a style="text-decoration: none;" href="<?php echo esc_url( $faq ); ?>" target="_blank" rel="noopener noreferrer"><?php esc_html_e( 'FAQ' ); ?></a> | <a style="text-decoration: none;" href="<?php echo esc_url( $support ); ?>" target="_blank" rel="noopener noreferrer"><?php esc_html_e( 'Support Forums' ); ?></a> | <a style="text-decoration: none;" href="<?php echo esc_url( $review ); ?>" target="_blank" rel="noopener noreferrer"><?php sprintf( esc_html_e( 'Reviews', '%s' ), $slug ); ?></a>
|
642 |
</div>
|
643 |
<div>
|
644 |
+
<a style="text-decoration: none;" href="<?php echo esc_url( $translate ); ?>" target="_blank" rel="noopener noreferrer">
|
645 |
<?php
|
646 |
/* translators: Plugin translation link */
|
647 |
echo sprintf( esc_html__( 'Translations for %s' ), esc_html( $plugin_name ) );
|
648 |
?>
|
649 |
+
</a> | <a style="text-decoration: none;" href="<?php echo esc_url( $facebook ); ?>" target="_blank" rel="noopener noreferrer"><span class="dashicons dashicons-facebook"></span></a> | <a style="text-decoration: none;" href="<?php echo esc_url( $twitter ); ?>" target="_blank" rel="noopener noreferrer"><span class="dashicons dashicons-twitter"></span></a> | <a style="text-decoration: none;" href="<?php echo esc_url( $youtube ); ?>" target="_blank" rel="noopener noreferrer"><span class="dashicons dashicons-video-alt3"></span></a>
|
650 |
</div>
|
651 |
</span>
|
652 |
|
708 |
wp_die( esc_html__( 'You do not have sufficient permissions to access this page.' ) );
|
709 |
}
|
710 |
|
711 |
+
do_action( 'media_from_ftp_notices' );
|
712 |
+
|
713 |
$this->options_updated( 1 );
|
714 |
$this->options_updated( 2 );
|
715 |
$this->options_updated( 3 );
|
841 |
|
842 |
<div style="display: block; padding:5px 5px">
|
843 |
<input type="checkbox" name="mediafromftp_datetimepicker" form="mediafromftp_settings_form" value="1" <?php checked( '1', $mediafromftp_settings['datetimepicker'] ); ?> />
|
844 |
+
<a href="https://xdsoft.net/jqplugins/datetimepicker/" target="_blank" rel="noopener noreferrer" style="text-decoration: none;">Date Time Picker</a>(jQuery <?php esc_html_e( 'Plugin' ); ?>)
|
845 |
<?php esc_html_e( 'Date and time input assistance', 'media-from-ftp' ); ?>
|
846 |
</div>
|
847 |
|
1061 |
<p>
|
1062 |
<?php
|
1063 |
esc_html_e( 'It may fail to register if you are using a multi-byte name in the file name or folder name. In that case, please change.', 'media-from-ftp' );
|
1064 |
+
$characterencodings_none_html = '<a href="' . __( 'https://en.wikipedia.org/wiki/Variable-width_encoding', 'media-from-ftp' ) . '" target="_blank" rel="noopener noreferrer" style="text-decoration: none; word-break: break-all;">' . __( 'variable-width encoding', 'media-from-ftp' ) . '</a>';
|
1065 |
/* translators: %1$s: URL of Variable-width_encoding */
|
1066 |
echo wp_kses_post( sprintf( __( 'If you do not use the filename or directory name of %1$s, please choose "%2$s".', 'media-from-ftp' ), $characterencodings_none_html, '<font color="red">none</font>' ) );
|
1067 |
?>
|
1146 |
wp_die( esc_html__( 'You do not have sufficient permissions to access this page.' ) );
|
1147 |
}
|
1148 |
|
1149 |
+
do_action( 'media_from_ftp_notices' );
|
1150 |
+
|
1151 |
$this->options_updated( 2 );
|
1152 |
|
1153 |
$mediafromftp_settings = get_user_option( 'mediafromftp', get_current_user_id() );
|
1285 |
wp_die( esc_html__( 'You do not have sufficient permissions to access this page.' ) );
|
1286 |
}
|
1287 |
|
1288 |
+
do_action( 'media_from_ftp_notices' );
|
1289 |
+
|
1290 |
$this->options_updated( 4 );
|
1291 |
|
1292 |
?>
|
1383 |
wp_die( esc_html__( 'You do not have sufficient permissions to access this page.' ) );
|
1384 |
}
|
1385 |
|
1386 |
+
do_action( 'media_from_ftp_notices' );
|
1387 |
+
|
1388 |
$mediafromftp_settings = get_user_option( 'mediafromftp', get_current_user_id() );
|
1389 |
if ( ! $mediafromftp_settings['log'] ) {
|
1390 |
echo '<div class="notice notice-info is-dismissible"><ul><li>' . esc_html__( 'Current, log is not created. If you want to create a log, please put a check in the [Create log] in the settings.', 'media-from-ftp' ) . '</li></ul></div>';
|
1648 |
wp_die( esc_html__( 'You do not have sufficient permissions to access this page.' ) );
|
1649 |
}
|
1650 |
|
1651 |
+
do_action( 'media_from_ftp_notices' );
|
1652 |
+
|
1653 |
$scriptname = admin_url( 'admin.php?page=mediafromftp-import' );
|
1654 |
|
1655 |
?>
|
1798 |
wp_die( esc_html__( 'You do not have sufficient permissions to access this page.' ) );
|
1799 |
}
|
1800 |
|
1801 |
+
do_action( 'media_from_ftp_notices' );
|
1802 |
+
|
1803 |
$scriptname = admin_url( 'admin.php?page=mediafromftp-addons' );
|
1804 |
|
1805 |
?>
|
1847 |
} else {
|
1848 |
?>
|
1849 |
<div>
|
1850 |
+
<a href="<?php echo esc_url( __( 'https://shop.riverforest-wp.info/media-from-ftp-add-on-cli/', 'media-from-ftp' ) ); ?>" target="_blank" rel="noopener noreferrer" class="page-title-action"><?php esc_html_e( 'BUY', 'media-from-ftp' ); ?></a>
|
1851 |
</div>
|
1852 |
<?php
|
1853 |
}
|
1882 |
} else {
|
1883 |
?>
|
1884 |
<div>
|
1885 |
+
<a href="<?php echo esc_url( __( 'https://shop.riverforest-wp.info/media-from-ftp-add-on-wpcron/', 'media-from-ftp' ) ); ?>" target="_blank" rel="noopener noreferrer" class="page-title-action"><?php esc_html_e( 'BUY', 'media-from-ftp' ); ?></a>
|
1886 |
</div>
|
1887 |
<?php
|
1888 |
}
|
1893 |
<h4>Media from FTP Add On Category</h4>
|
1894 |
<div style="margin: 5px; padding: 5px;"><?php esc_html_e( 'This Add-on When registering by "Media from FTP", add Category to Media Library.', 'media-from-ftp' ); ?></div>
|
1895 |
<div style="margin: 5px; padding: 5px;">
|
1896 |
+
<li><?php esc_html_e( 'Works with next plugin.', 'media-from-ftp' ); ?> [<a style="text-decoration: none;" href="https://wordpress.org/plugins/wp-media-library-categories/" target="_blank" rel="noopener noreferrer">Media Library Categories</a>] [<a style="text-decoration: none;" href="https://wordpress.org/plugins/enhanced-media-library/" target="_blank" rel="noopener noreferrer">Enhanced Media Library</a>] [<a style="text-decoration: none;" href="https://wordpress.org/plugins/media-library-assistant/" target="_blank" rel="noopener noreferrer">Media Library Assistant</a>]</li>
|
1897 |
</div>
|
1898 |
<p>
|
1899 |
<?php
|
1916 |
} else {
|
1917 |
?>
|
1918 |
<div>
|
1919 |
+
<a href="<?php echo esc_url( __( 'https://shop.riverforest-wp.info/media-from-ftp-add-on-category/', 'media-from-ftp' ) ); ?>" target="_blank" rel="noopener noreferrer" class="page-title-action"><?php esc_html_e( 'BUY', 'media-from-ftp' ); ?></a>
|
1920 |
</div>
|
1921 |
<?php
|
1922 |
}
|
1928 |
<div style="margin: 5px; padding: 5px;"><?php esc_html_e( 'This Add-on When registering by "Media from FTP", add Exif to Media Library Caption.', 'media-from-ftp' ); ?></div>
|
1929 |
<div style="margin: 5px; padding: 5px;">
|
1930 |
<li><?php esc_html_e( 'Sort each Exif data to an arbitrary position and insert it into the caption as text.', 'media-from-ftp' ); ?></li>
|
1931 |
+
<li><a style="text-decoration: none;" href="https://codex.wordpress.org/Function_Reference/wp_read_image_metadata#Return%20Values" target="_blank" rel="noopener noreferrer">Exif</a></li>
|
1932 |
</div>
|
1933 |
|
1934 |
<p>
|
1952 |
} else {
|
1953 |
?>
|
1954 |
<div>
|
1955 |
+
<a href="<?php echo esc_url( __( 'https://shop.riverforest-wp.info/media-from-ftp-add-on-exif/', 'media-from-ftp' ) ); ?>" target="_blank" rel="noopener noreferrer" class="page-title-action"><?php esc_html_e( 'BUY', 'media-from-ftp' ); ?></a>
|
1956 |
</div>
|
1957 |
<?php
|
1958 |
}
|
req/class-mediafromftpajax.php
CHANGED
@@ -171,7 +171,7 @@ class MediaFromFtpAjax {
|
|
171 |
$error_url = $mediafromftp->mb_utf8( $new_url_attach, $mediafromftp_settings['character_code'] );
|
172 |
if ( -1 == $attach_id ) {
|
173 |
/* translators: error message */
|
174 |
-
echo '<div class="notice notice-error is-dismissible"><ul><li><div>' . wp_kses_post( __( 'File name:' ) . $error_title . '</div><div>' . __( 'Directory name:', 'media-from-ftp' ) . $error_url . '</div>' . sprintf( __( '<div>You need to make this directory writable before you can register this file. See <a href="%1$s" target="_blank">the Codex</a> for more information.</div><div>Or, filename or directoryname must be changed of illegal. Please change Character Encodings for Server of <a href="%2$s">Settings</a>.</div>', 'media-from-ftp' ), 'https://codex.wordpress.org/Changing_File_Permissions', admin_url( 'admin.php?page=mediafromftp-settings' ) ) ) . '</li></div>';
|
175 |
} elseif ( -2 == $attach_id ) {
|
176 |
echo '<div class="notice notice-error is-dismissible"><ul><li><div>' . wp_kses_post( __( 'Title' ) . ': ' . $error_title . '</div><div>URL: ' . $error_url . '</div><div>' . __( 'This file could not be registered in the database.', 'media-from-ftp' ) ) . '</div></li></ul></div>';
|
177 |
}
|
@@ -188,6 +188,7 @@ class MediaFromFtpAjax {
|
|
188 |
'a' => array(
|
189 |
'href' => array(),
|
190 |
'target' => array(),
|
|
|
191 |
'style' => array(),
|
192 |
),
|
193 |
'img' => array(
|
@@ -325,10 +326,10 @@ class MediaFromFtpAjax {
|
|
325 |
update_post_meta( $db_id, '_wp_attachment_image_alt', sanitize_text_field( wp_unslash( $_POST['db_wp_attachment_image_alt'] ) ) );
|
326 |
}
|
327 |
$msg = 'success_db';
|
328 |
-
$output_html = $msg . ',<div>' . __( 'Media' ) . ': <a href="' . get_permalink( $db_id ) . '" target="_blank" style="text-decoration: none; color: green;">' . $this->esc_title( $db_array['post_title'] ) . '</a>: <a href="' . $this->upload_url . '/' . $filepath . '" target="_blank" style="text-decoration: none;">' . $filepath . '</a></div>';
|
329 |
} else {
|
330 |
$msg = 'success';
|
331 |
-
$output_html = $msg . ',<div>' . __( 'Thumbnail' ) . ': <a href="' . $this->upload_url . '/' . $filepath . '" target="_blank" style="text-decoration: none;">' . $filepath . '</a></div>';
|
332 |
}
|
333 |
} else {
|
334 |
$error_string = __( 'No file!', 'media-from-ftp' );
|
@@ -341,6 +342,7 @@ class MediaFromFtpAjax {
|
|
341 |
'a' => array(
|
342 |
'href' => array(),
|
343 |
'target' => array(),
|
|
|
344 |
'style' => array(),
|
345 |
),
|
346 |
'div' => array(),
|
171 |
$error_url = $mediafromftp->mb_utf8( $new_url_attach, $mediafromftp_settings['character_code'] );
|
172 |
if ( -1 == $attach_id ) {
|
173 |
/* translators: error message */
|
174 |
+
echo '<div class="notice notice-error is-dismissible"><ul><li><div>' . wp_kses_post( __( 'File name:' ) . $error_title . '</div><div>' . __( 'Directory name:', 'media-from-ftp' ) . $error_url . '</div>' . sprintf( __( '<div>You need to make this directory writable before you can register this file. See <a href="%1$s" target="_blank" rel="noopener noreferrer">the Codex</a> for more information.</div><div>Or, filename or directoryname must be changed of illegal. Please change Character Encodings for Server of <a href="%2$s">Settings</a>.</div>', 'media-from-ftp' ), 'https://codex.wordpress.org/Changing_File_Permissions', admin_url( 'admin.php?page=mediafromftp-settings' ) ) ) . '</li></div>';
|
175 |
} elseif ( -2 == $attach_id ) {
|
176 |
echo '<div class="notice notice-error is-dismissible"><ul><li><div>' . wp_kses_post( __( 'Title' ) . ': ' . $error_title . '</div><div>URL: ' . $error_url . '</div><div>' . __( 'This file could not be registered in the database.', 'media-from-ftp' ) ) . '</div></li></ul></div>';
|
177 |
}
|
188 |
'a' => array(
|
189 |
'href' => array(),
|
190 |
'target' => array(),
|
191 |
+
'rel' => array(),
|
192 |
'style' => array(),
|
193 |
),
|
194 |
'img' => array(
|
326 |
update_post_meta( $db_id, '_wp_attachment_image_alt', sanitize_text_field( wp_unslash( $_POST['db_wp_attachment_image_alt'] ) ) );
|
327 |
}
|
328 |
$msg = 'success_db';
|
329 |
+
$output_html = $msg . ',<div>' . __( 'Media' ) . ': <a href="' . get_permalink( $db_id ) . '" target="_blank" rel="noopener noreferrer" style="text-decoration: none; color: green;">' . $this->esc_title( $db_array['post_title'] ) . '</a>: <a href="' . $this->upload_url . '/' . $filepath . '" target="_blank" rel="noopener noreferrer" style="text-decoration: none;">' . $filepath . '</a></div>';
|
330 |
} else {
|
331 |
$msg = 'success';
|
332 |
+
$output_html = $msg . ',<div>' . __( 'Thumbnail' ) . ': <a href="' . $this->upload_url . '/' . $filepath . '" target="_blank" rel="noopener noreferrer" style="text-decoration: none;">' . $filepath . '</a></div>';
|
333 |
}
|
334 |
} else {
|
335 |
$error_string = __( 'No file!', 'media-from-ftp' );
|
342 |
'a' => array(
|
343 |
'href' => array(),
|
344 |
'target' => array(),
|
345 |
+
'rel' => array(),
|
346 |
'style' => array(),
|
347 |
),
|
348 |
'div' => array(),
|
req/class-mediafromftpregist.php
CHANGED
@@ -55,6 +55,10 @@ class MediaFromFtpRegist {
|
|
55 |
register_activation_hook( plugin_dir_path( __DIR__ ) . 'mediafromftp.php', array( $this, 'log_settings' ) );
|
56 |
add_action( 'admin_init', array( $this, 'register_settings' ) );
|
57 |
|
|
|
|
|
|
|
|
|
58 |
}
|
59 |
|
60 |
/** ==================================================
|
@@ -293,6 +297,98 @@ class MediaFromFtpRegist {
|
|
293 |
update_user_option( $user->ID, 'mediafromftp', $mediafromftp_set );
|
294 |
}
|
295 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
296 |
}
|
297 |
|
298 |
}
|
55 |
register_activation_hook( plugin_dir_path( __DIR__ ) . 'mediafromftp.php', array( $this, 'log_settings' ) );
|
56 |
add_action( 'admin_init', array( $this, 'register_settings' ) );
|
57 |
|
58 |
+
add_action( 'admin_notices', array( $this, 'update_notice' ) );
|
59 |
+
/* original hook */
|
60 |
+
add_action( 'media_from_ftp_notices', array( $this, 'update_notice_option' ) );
|
61 |
+
|
62 |
}
|
63 |
|
64 |
/** ==================================================
|
297 |
update_user_option( $user->ID, 'mediafromftp', $mediafromftp_set );
|
298 |
}
|
299 |
|
300 |
+
if ( ! get_option( 'mediafromftp_notice' ) ) {
|
301 |
+
update_option( 'mediafromftp_notice', 11.08 );
|
302 |
+
}
|
303 |
+
|
304 |
+
}
|
305 |
+
|
306 |
+
/** ==================================================
|
307 |
+
* Update notice
|
308 |
+
*
|
309 |
+
* @since 11.09
|
310 |
+
*/
|
311 |
+
public function update_notice() {
|
312 |
+
|
313 |
+
if ( isset( $_POST['Notice_Dismiss'] ) && ! empty( $_POST['Notice_Dismiss'] ) ) {
|
314 |
+
if ( check_admin_referer( 'mff_nt', 'mediafromftp_notice' ) ) {
|
315 |
+
if ( isset( $_POST['notice_update_version'] ) && ! empty( $_POST['notice_update_version'] ) ) {
|
316 |
+
return;
|
317 |
+
}
|
318 |
+
}
|
319 |
+
}
|
320 |
+
|
321 |
+
$screen = get_current_screen();
|
322 |
+
if ( is_object( $screen ) && 'toplevel_page_mediafromftp' === $screen->id ||
|
323 |
+
is_object( $screen ) && 'media-from-ftp_page_mediafromftp-settings' === $screen->id ||
|
324 |
+
is_object( $screen ) && 'media-from-ftp_page_mediafromftp-search-register' === $screen->id ||
|
325 |
+
is_object( $screen ) && 'media-from-ftp_page_mediafromftp-event' === $screen->id ||
|
326 |
+
is_object( $screen ) && 'media-from-ftp_page_mediafromftp-log' === $screen->id ||
|
327 |
+
is_object( $screen ) && 'media-from-ftp_page_mediafromftp-import' === $screen->id ||
|
328 |
+
is_object( $screen ) && 'media-from-ftp_page_mediafromftp-addons' === $screen->id ) {
|
329 |
+
if ( 'toplevel_page_mediafromftp' === $screen->id ) {
|
330 |
+
$scriptname = admin_url( 'admin.php?page=mediafromftp' );
|
331 |
+
} else {
|
332 |
+
$page = str_replace( 'media-from-ftp_page_', '', $screen->id );
|
333 |
+
$scriptname = admin_url( 'admin.php?page=' . $page );
|
334 |
+
}
|
335 |
+
if ( 11.08 == get_option( 'mediafromftp_notice' ) ) {
|
336 |
+
if ( class_exists( 'MovingMediaLibrary' ) ) {
|
337 |
+
$movingmedialibrary_url = admin_url( 'admin.php?page=movingmedialibrary' );
|
338 |
+
} else {
|
339 |
+
if ( is_multisite() ) {
|
340 |
+
$movingmedialibrary_url = network_admin_url( 'plugin-install.php?tab=plugin-information&plugin=moving-media-library' );
|
341 |
+
} else {
|
342 |
+
$movingmedialibrary_url = admin_url( 'plugin-install.php?tab=plugin-information&plugin=moving-media-library' );
|
343 |
+
}
|
344 |
+
}
|
345 |
+
$import_html = '<strong><a style="text-decoration: none;" href="' . admin_url( 'admin.php?page=mediafromftp-import' ) . '">' . __( 'Import' ) . '</a></strong>';
|
346 |
+
$allowed_button_html = array(
|
347 |
+
'input' => array(
|
348 |
+
'type' => array(),
|
349 |
+
'id' => array(),
|
350 |
+
'name' => array(),
|
351 |
+
'class' => array(),
|
352 |
+
'value' => array(),
|
353 |
+
),
|
354 |
+
);
|
355 |
+
?>
|
356 |
+
<div class="notice notice-warning is-dismissible"><ul><li>
|
357 |
+
<form method="post" action="<?php echo esc_url( $scriptname ); ?>">
|
358 |
+
<?php
|
359 |
+
wp_nonce_field( 'mff_nt', 'mediafromftp_notice' );
|
360 |
+
$movingmedialibrary_link = '<strong><a style="text-decoration: none;" href="' . $movingmedialibrary_url . '">Moving Media Library</a></strong>';
|
361 |
+
$dismiss_button = get_submit_button( __( 'Dismiss' ), 'small', 'Notice_Dismiss', true );
|
362 |
+
/* translators: %1$s Plugin link %2$s Import link */
|
363 |
+
echo wp_kses_post( sprintf( __( 'Created a plugin %1$s to move your media library. You can do it with your current %2$s, but it is faster and more accurate.', 'media-from-ftp' ), $movingmedialibrary_link, $import_html ) );
|
364 |
+
?>
|
365 |
+
 
|
366 |
+
<?php echo wp_kses( $dismiss_button, $allowed_button_html ); ?>
|
367 |
+
<input type="hidden" name="notice_update_version" value="11.09">
|
368 |
+
</form>
|
369 |
+
</li></ul></div>
|
370 |
+
<?php
|
371 |
+
}
|
372 |
+
}
|
373 |
+
|
374 |
+
}
|
375 |
+
|
376 |
+
/** ==================================================
|
377 |
+
* Update notice option
|
378 |
+
*
|
379 |
+
* @since 11.09
|
380 |
+
*/
|
381 |
+
public function update_notice_option() {
|
382 |
+
|
383 |
+
if ( isset( $_POST['Notice_Dismiss'] ) && ! empty( $_POST['Notice_Dismiss'] ) ) {
|
384 |
+
if ( check_admin_referer( 'mff_nt', 'mediafromftp_notice' ) ) {
|
385 |
+
if ( isset( $_POST['notice_update_version'] ) && ! empty( $_POST['notice_update_version'] ) ) {
|
386 |
+
$notice_update_version = sanitize_text_field( wp_unslash( $_POST['notice_update_version'] ) );
|
387 |
+
update_option( 'mediafromftp_notice', $notice_update_version );
|
388 |
+
}
|
389 |
+
}
|
390 |
+
}
|
391 |
+
|
392 |
}
|
393 |
|
394 |
}
|