Media from FTP - Version 9.98

Version Description

Search option was added to the settings page.

Download this release

Release Info

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

Code changes from version 9.97 to 9.98

inc/MediaFromFtp.php CHANGED
@@ -506,34 +506,110 @@ class MediaFromFtp {
506
  }
507
 
508
  /* ==================================================
 
509
  * @param array $mediafromftp_settings
510
- * @return string $form_html
511
- * @since 9.50
512
  */
513
- function form_html($mediafromftp_settings) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
514
 
515
- $scriptname = admin_url('admin.php?page=mediafromftp-search-register');
516
 
517
- $searchtext = NULL;
518
- if ( !empty($_POST['searchtext']) ) {
519
- $searchtext = sanitize_text_field($_POST['searchtext']);
520
- } else if ( !empty($_GET['searchtext']) ) {
521
- $searchtext = sanitize_text_field($_GET['searchtext']);
522
- }
523
 
524
- $pagemax = $mediafromftp_settings['pagemax'];
525
- $searchdir = $mediafromftp_settings['searchdir'];
526
- $ext2typefilter = $mediafromftp_settings['ext2typefilter'];
527
- $extfilter = $mediafromftp_settings['extfilter'];
 
 
 
 
528
 
529
- $dirs = $this->scan_dir(MEDIAFROMFTP_PLUGIN_UPLOAD_DIR);
530
  $linkselectbox = NULL;
531
- $wordpress_path = wp_normalize_path(ABSPATH);
 
 
 
532
  foreach ($dirs as $linkdir) {
533
  if ( strstr($linkdir, $wordpress_path ) ) {
534
- $linkdirenc = $this->mb_utf8(str_replace($wordpress_path, '', $linkdir), $mediafromftp_settings['character_code']);
535
  } else {
536
- $linkdirenc = MEDIAFROMFTP_PLUGIN_UPLOAD_PATH.$this->mb_utf8(str_replace(MEDIAFROMFTP_PLUGIN_UPLOAD_DIR, "", $linkdir), $mediafromftp_settings['character_code']);
537
  }
538
  if( $searchdir === $linkdirenc ){
539
  $linkdirs = '<option value="'.urlencode($linkdirenc).'" selected>'.$linkdirenc.'</option>';
@@ -547,15 +623,42 @@ class MediaFromFtp {
547
  }else{
548
  $linkdirs = '<option value="'.urlencode(MEDIAFROMFTP_PLUGIN_UPLOAD_PATH).'">'.MEDIAFROMFTP_PLUGIN_UPLOAD_PATH.'</option>';
549
  }
550
- $linkselectbox = $linkselectbox.$linkdirs;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
551
  ?>
552
  <div class="wp-filter" style="margin: 0px;"> <!-- wp-admin/css/list-tables.css -->
553
  <form method="post" action="<?php echo $scriptname; ?>">
554
  <?php wp_nonce_field('mff_search', 'media_from_ftp_search'); ?>
555
- <div style="font-size: small; font-weight: bold;"><code><?php echo $wordpress_path; ?></code></div>
556
- <select name="searchdir" style="width: 250px">
557
  <?php echo $linkselectbox; ?>
558
- </select>
559
  <?php submit_button( __('Search'), 'large', '', FALSE ); ?>
560
  <span style="margin-right: 1em;"></span>
561
  <select name="ext2type" style="width: 110px;">
506
  }
507
 
508
  /* ==================================================
509
+ * Search Option html
510
  * @param array $mediafromftp_settings
511
+ * @return string $html
512
+ * @since 9.98
513
  */
514
+ function search_option_html($mediafromftp_settings){
515
+
516
+ $html = '<div class="item-mediafromftp-settings">';
517
+ $html .= '<h3>'.__('Pagination').'</h3>';
518
+ $html .= '<label>'.__('Number of items per page:').'</label>';
519
+ $html .= '<input type="number" step="1" min="1" max="999" class="screen-per-page" name="mediafromftp_pagemax" maxlength="3" value="'.$mediafromftp_settings['pagemax'].'">';
520
+ $html .= '</div>';
521
+
522
+ $html .= '<div class="item-mediafromftp-settings">';
523
+ $html .= '<h3>'.__('Display of search results', 'media-from-ftp').'</h3>';
524
+ $html .= '<div style="display: block;padding:5px 5px">';
525
+ if ($mediafromftp_settings['search_display_metadata'] == TRUE) {
526
+ $html .= '<input type="radio" name="search_display_metadata" value="1" checked>';
527
+ } else {
528
+ $html .= '<input type="radio" name="search_display_metadata" value="1">';
529
+ }
530
+ $html .= __('Usual selection. It is user-friendly. It displays a thumbnail and metadata. It is low speed.', 'media-from-ftp');
531
+ $html .= '</div>';
532
+ $html .= '<div style="display: block;padding:5px 5px">';
533
+ if ($mediafromftp_settings['search_display_metadata'] == FALSE) {
534
+ $html .= '<input type="radio" name="search_display_metadata" value="0" checked>';
535
+ } else {
536
+ $html .= '<input type="radio" name="search_display_metadata" value="0">';
537
+ }
538
+ $html .= __('Unusual selection. Only the file name and output. It is suitable for the search of large amounts of data. It is hi speed.', 'media-from-ftp');
539
+ $html .= '</div>';
540
+ $html .= '</div>';
541
+
542
+ $html .= '<div class="item-mediafromftp-settings">';
543
+ $html .= '<h3>'.__('Exclude file', 'media-from-ftp').'</h3>';
544
+ $html .= '<div style="display: block;padding:5px 5px">';
545
+ $html .= '<div>'.__('Regular expression is possible.', 'media-from-ftp').'</div>';
546
+ $html .= '<textarea id="mediafromftp_exclude" name="mediafromftp_exclude" rows="3" style="width: 100%;">'.$mediafromftp_settings['exclude'].'</textarea>';
547
+ $html .= '</div>';
548
+ $html .= '</div>';
549
+
550
+ $html .= '<div class="item-mediafromftp-settings">';
551
+ $html .= '<h3>'.__('Search method of files', 'media-from-ftp').'</h3>';
552
+ $html .= '<div style="display: block;padding:5px 5px">';
553
+ if ($mediafromftp_settings['recursive_search'] == TRUE) {
554
+ $html .= '<input type="radio" name="mediafromftp_recursive_search" value="1" checked>';
555
+ } else {
556
+ $html .= '<input type="radio" name="mediafromftp_recursive_search" value="1">';
557
+ }
558
+ $html .= __('Recursively search files below specified directory.', 'media-from-ftp');
559
+ $html .= '</div>';
560
+ $html .= '<div style="display: block;padding:5px 5px">';
561
+ if ($mediafromftp_settings['recursive_search'] == FALSE) {
562
+ $html .= '<input type="radio" name="mediafromftp_recursive_search" value="0" checked>';
563
+ } else {
564
+ $html .= '<input type="radio" name="mediafromftp_recursive_search" value="0">';
565
+ }
566
+ $html .= __('Search files only for specified directories.', 'media-from-ftp');
567
+ $html .= '</div>';
568
+ $html .= '</div>';
569
+
570
+ $html .= '<div class="item-mediafromftp-settings">';
571
+ $html .= '<h3>'.__('Search method for the exclusion of the thumbnail', 'media-from-ftp').'</h3>';
572
+ $html .= '<div style="display: block;padding:5px 5px">';
573
+ if ($mediafromftp_settings['thumb_deep_search'] == FALSE) {
574
+ $html .= '<input type="radio" name="mediafromftp_thumb_deep_search" value="0" checked>';
575
+ } else {
576
+ $html .= '<input type="radio" name="mediafromftp_thumb_deep_search" value="0">';
577
+ }
578
+ $html .= __('Usual selection. It is hi speed.', 'media-from-ftp');
579
+ $html .= '</div>';
580
+ $html .= '<div style="display: block;padding:5px 5px">';
581
+ if ($mediafromftp_settings['thumb_deep_search'] == TRUE) {
582
+ $html .= '<input type="radio" name="mediafromftp_thumb_deep_search" value="1" checked>';
583
+ } else {
584
+ $html .= '<input type="radio" name="mediafromftp_thumb_deep_search" value="1">';
585
+ }
586
+ $html .= __('Unusual selection. if you want to search for filename that contains such -0x0. It is low speed.', 'media-from-ftp');
587
+ $html .= '</div>';
588
+ $html .= '</div>';
589
 
590
+ return $html;
591
 
592
+ }
 
 
 
 
 
593
 
594
+ /* ==================================================
595
+ * @param string $searchdir
596
+ * @param string $character_code
597
+ * @param string $wordpress_path
598
+ * @return string $linkselectbox
599
+ * @since 9.98
600
+ */
601
+ function dir_select_box($searchdir, $character_code, $wordpress_path) {
602
 
 
603
  $linkselectbox = NULL;
604
+ $linkselectbox .= '<div style="font-size: small; font-weight: bold;"><code>'.$wordpress_path.'</code></div>';
605
+ $linkselectbox .= '<select name="searchdir" style="width: 250px">';
606
+
607
+ $dirs = $this->scan_dir(MEDIAFROMFTP_PLUGIN_UPLOAD_DIR);
608
  foreach ($dirs as $linkdir) {
609
  if ( strstr($linkdir, $wordpress_path ) ) {
610
+ $linkdirenc = $this->mb_utf8(str_replace($wordpress_path, '', $linkdir), $character_code);
611
  } else {
612
+ $linkdirenc = MEDIAFROMFTP_PLUGIN_UPLOAD_PATH.$this->mb_utf8(str_replace(MEDIAFROMFTP_PLUGIN_UPLOAD_DIR, "", $linkdir), $character_code);
613
  }
614
  if( $searchdir === $linkdirenc ){
615
  $linkdirs = '<option value="'.urlencode($linkdirenc).'" selected>'.$linkdirenc.'</option>';
623
  }else{
624
  $linkdirs = '<option value="'.urlencode(MEDIAFROMFTP_PLUGIN_UPLOAD_PATH).'">'.MEDIAFROMFTP_PLUGIN_UPLOAD_PATH.'</option>';
625
  }
626
+ $linkselectbox = $linkselectbox.$linkdirs.'</select>';
627
+
628
+ return $linkselectbox;
629
+
630
+ }
631
+
632
+ /* ==================================================
633
+ * @param array $mediafromftp_settings
634
+ * @return string $form_html
635
+ * @since 9.50
636
+ */
637
+ function form_html($mediafromftp_settings) {
638
+
639
+ $scriptname = admin_url('admin.php?page=mediafromftp-search-register');
640
+
641
+ $searchtext = NULL;
642
+ if ( !empty($_POST['searchtext']) ) {
643
+ $searchtext = sanitize_text_field($_POST['searchtext']);
644
+ } else if ( !empty($_GET['searchtext']) ) {
645
+ $searchtext = sanitize_text_field($_GET['searchtext']);
646
+ }
647
+
648
+ $pagemax = $mediafromftp_settings['pagemax'];
649
+ $searchdir = $mediafromftp_settings['searchdir'];
650
+ $character_code = $mediafromftp_settings['character_code'];
651
+ $ext2typefilter = $mediafromftp_settings['ext2typefilter'];
652
+ $extfilter = $mediafromftp_settings['extfilter'];
653
+ $wordpress_path = wp_normalize_path(ABSPATH);
654
+
655
+ $linkselectbox = $this->dir_select_box($searchdir, $character_code, $wordpress_path);
656
+
657
  ?>
658
  <div class="wp-filter" style="margin: 0px;"> <!-- wp-admin/css/list-tables.css -->
659
  <form method="post" action="<?php echo $scriptname; ?>">
660
  <?php wp_nonce_field('mff_search', 'media_from_ftp_search'); ?>
 
 
661
  <?php echo $linkselectbox; ?>
 
662
  <?php submit_button( __('Search'), 'large', '', FALSE ); ?>
663
  <span style="margin-right: 1em;"></span>
664
  <select name="ext2type" style="width: 110px;">
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.97
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/
2
  /*
3
  Plugin Name: Media from FTP
4
  Plugin URI: https://wordpress.org/plugins/media-from-ftp/
5
+ Version: 9.98
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/
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.97
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.97 =
130
  Add thumbnail generation of PDF when Imagick is enabled.
131
 
5
  Requires at least: 3.6.0
6
  Requires PHP: 5.3.0
7
  Tested up to: 4.9
8
+ Stable tag: 9.98
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
126
 
127
  == Changelog ==
128
 
129
+ = 9.98 =
130
+ Search option was added to the settings page.
131
+
132
  = 9.97 =
133
  Add thumbnail generation of PDF when Imagick is enabled.
134
 
req/MediaFromFtpAdmin.php CHANGED
@@ -162,88 +162,19 @@ class MediaFromFtpAdmin {
162
  $mediafromftp_settings = get_option($this->wp_options_name());
163
 
164
  $return = $status;
165
- if ( $args->base == 'media-from-ftp_page_mediafromftp-search-register' ) {
166
- $return .= '<div style="display: block; padding: 5px 15px">';
167
- $return .= '<div class="item-mediafromftp-settings">';
168
- $return .= '<legend>'.__('Pagination').'</legend>';
169
- $return .= '<label>'.__('Number of items per page:').'</label>';
170
- $return .= '<input type="number" step="1" min="1" max="999" class="screen-per-page" name="mediafromftp_pagemax" maxlength="3" value="'.$mediafromftp_settings['pagemax'].'">';
171
- $return .= '</div>';
172
-
173
- $return .= '<div class="item-mediafromftp-settings">';
174
- $return .= '<legend>'.__('Display of search results', 'media-from-ftp').'</legend>';
175
- $return .= '<div style="display: block;padding:5px 5px">';
176
- if ($mediafromftp_settings['search_display_metadata'] == TRUE) {
177
- $return .= '<input type="radio" name="search_display_metadata" value="1" checked>';
178
- } else {
179
- $return .= '<input type="radio" name="search_display_metadata" value="1">';
180
- }
181
- $return .= __('Usual selection. It is user-friendly. It displays a thumbnail and metadata. It is low speed.', 'media-from-ftp');
182
- $return .= '</div>';
183
- $return .= '<div style="display: block;padding:5px 5px">';
184
- if ($mediafromftp_settings['search_display_metadata'] == FALSE) {
185
- $return .= '<input type="radio" name="search_display_metadata" value="0" checked>';
186
- } else {
187
- $return .= '<input type="radio" name="search_display_metadata" value="0">';
188
- }
189
- $return .= __('Unusual selection. Only the file name and output. It is suitable for the search of large amounts of data. It is hi speed.', 'media-from-ftp');
190
- $return .= '</div>';
191
- $return .= '</div>';
192
-
193
- $return .= '<div class="item-mediafromftp-settings">';
194
- $return .= '<legend>'.__('Exclude file', 'media-from-ftp').'</legend>';
195
- $return .= '<div style="display: block;padding:5px 5px">';
196
- $return .= '<div>'.__('Regular expression is possible.', 'media-from-ftp').'</div>';
197
- $return .= '<textarea id="mediafromftp_exclude" name="mediafromftp_exclude" rows="3" style="width: 100%;">'.$mediafromftp_settings['exclude'].'</textarea>';
198
- $return .= '</div>';
199
- $return .= '</div>';
200
-
201
- $return .= '<div class="item-mediafromftp-settings">';
202
- $return .= '<legend>'.__('Search method of files', 'media-from-ftp').'</legend>';
203
- $return .= '<div style="display: block;padding:5px 5px">';
204
- if ($mediafromftp_settings['recursive_search'] == TRUE) {
205
- $return .= '<input type="radio" name="mediafromftp_recursive_search" value="1" checked>';
206
- } else {
207
- $return .= '<input type="radio" name="mediafromftp_recursive_search" value="1">';
208
- }
209
- $return .= __('Recursively search files below specified directory.', 'media-from-ftp');
210
- $return .= '</div>';
211
- $return .= '<div style="display: block;padding:5px 5px">';
212
- if ($mediafromftp_settings['recursive_search'] == FALSE) {
213
- $return .= '<input type="radio" name="mediafromftp_recursive_search" value="0" checked>';
214
- } else {
215
- $return .= '<input type="radio" name="mediafromftp_recursive_search" value="0">';
216
- }
217
- $return .= __('Search files only for specified directories.', 'media-from-ftp');
218
- $return .= '</div>';
219
- $return .= '</div>';
220
-
221
- $return .= '<div class="item-mediafromftp-settings">';
222
- $return .= '<legend>'.__('Search method for the exclusion of the thumbnail', 'media-from-ftp').'</legend>';
223
- $return .= '<div style="display: block;padding:5px 5px">';
224
- if ($mediafromftp_settings['thumb_deep_search'] == FALSE) {
225
- $return .= '<input type="radio" name="mediafromftp_thumb_deep_search" value="0" checked>';
226
- } else {
227
- $return .= '<input type="radio" name="mediafromftp_thumb_deep_search" value="0">';
228
- }
229
- $return .= __('Usual selection. It is hi speed.', 'media-from-ftp');
230
- $return .= '</div>';
231
- $return .= '<div style="display: block;padding:5px 5px">';
232
- if ($mediafromftp_settings['thumb_deep_search'] == TRUE) {
233
- $return .= '<input type="radio" name="mediafromftp_thumb_deep_search" value="1" checked>';
234
- } else {
235
- $return .= '<input type="radio" name="mediafromftp_thumb_deep_search" value="1">';
236
- }
237
- $return .= __('Unusual selection. if you want to search for filename that contains such -0x0. It is low speed.', 'media-from-ftp');
238
- $return .= '</div>';
239
- $return .= '</div>';
240
- $return .= '<div style="display: block;padding:5px 5px">'.get_submit_button( __( 'Apply' ), 'primary', 'media-from-ftp-screen-options-apply', FALSE ).'</div>';
241
- $return .= '</div>';
242
-
243
- $return .= '<input type="hidden" name="wp_screen_options[option]" value="media_from_ftp_show_screen" />';
244
- $return .= '<input type="hidden" name="wp_screen_options[value]" value="2" />';
245
- }
246
- return $return;
247
  }
248
 
249
  /* ==================================================
@@ -572,6 +503,12 @@ class MediaFromFtpAdmin {
572
  $this->options_updated($submenu);
573
  }
574
  }
 
 
 
 
 
 
575
  if ( isset($_POST['media_from_ftp_clear_cash']) && $_POST['media_from_ftp_clear_cash'] ) {
576
  if ( check_admin_referer('mff_clear_cash', 'media_from_ftp_clear_cash') ) {
577
  $submenu = 3;
@@ -648,7 +585,8 @@ class MediaFromFtpAdmin {
648
  <div id="mediafromftp-settings-tabs">
649
  <ul>
650
  <li><a href="#mediafromftp-settings-tabs-1"><?php _e('Register'); ?></a></li>
651
- <li><a href="#mediafromftp-settings-tabs-2"><?php _e('Other', 'media-from-ftp'); ?></a></li>
 
652
  <?php
653
  if ( $this->is_add_on_activate['cli'] ) {
654
  $mediafromftpcli = new MediaFromFtpCli();
@@ -797,6 +735,22 @@ class MediaFromFtpAdmin {
797
  </div>
798
 
799
  <div id="mediafromftp-settings-tabs-2">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
800
  <div style="display: block; padding: 5px 15px">
801
 
802
  <div class="item-mediafromftp-settings">
@@ -1715,6 +1669,7 @@ class MediaFromFtpAdmin {
1715
  $mediafromftp_settings['thumb_deep_search'] = sanitize_text_field($_POST['mediafromftp_thumb_deep_search']);
1716
  }
1717
  update_option( $this->wp_options_name(), $mediafromftp_settings );
 
1718
  break;
1719
  case 3:
1720
  if ( !empty($_POST['mediafromftp_clear_cash']) ) {
162
  $mediafromftp_settings = get_option($this->wp_options_name());
163
 
164
  $return = $status;
165
+ if ( $args->base == 'media-from-ftp_page_mediafromftp-search-register' ) {
166
+ $mediafromftp = new MediaFromFtp();
167
+ $return = '<div style="display: block; padding: 5px 15px">';
168
+ $return .= $mediafromftp->search_option_html($mediafromftp_settings);
169
+ $return .= '<div style="display: block;padding:5px 5px">'.get_submit_button( __( 'Apply' ), 'primary', 'media-from-ftp-screen-options-apply', FALSE ).'</div>';
170
+ $return .= '<input type="hidden" name="wp_screen_options[option]" value="media_from_ftp_show_screen" />';
171
+ $return .= '<input type="hidden" name="wp_screen_options[value]" value="2" />';
172
+ $return .= '</div>';
173
+ unset($mediafromftp);
174
+ }
175
+
176
+ return $return;
177
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
178
  }
179
 
180
  /* ==================================================
503
  $this->options_updated($submenu);
504
  }
505
  }
506
+ if ( isset($_POST['media_from_ftp_search']) && $_POST['media_from_ftp_search'] ) {
507
+ if ( check_admin_referer('mff_search', 'media_from_ftp_search') ) {
508
+ $submenu = 2;
509
+ $this->options_updated($submenu);
510
+ }
511
+ }
512
  if ( isset($_POST['media_from_ftp_clear_cash']) && $_POST['media_from_ftp_clear_cash'] ) {
513
  if ( check_admin_referer('mff_clear_cash', 'media_from_ftp_clear_cash') ) {
514
  $submenu = 3;
585
  <div id="mediafromftp-settings-tabs">
586
  <ul>
587
  <li><a href="#mediafromftp-settings-tabs-1"><?php _e('Register'); ?></a></li>
588
+ <li><a href="#mediafromftp-settings-tabs-2"><?php _e('Search'); ?></a></li>
589
+ <li><a href="#mediafromftp-settings-tabs-3"><?php _e('Other', 'media-from-ftp'); ?></a></li>
590
  <?php
591
  if ( $this->is_add_on_activate['cli'] ) {
592
  $mediafromftpcli = new MediaFromFtpCli();
735
  </div>
736
 
737
  <div id="mediafromftp-settings-tabs-2">
738
+ <div style="display: block; padding: 5px 15px">
739
+ <form method="post" id="mediafromftp_search_form" action="<?php echo $scriptname; ?>">
740
+ <?php wp_nonce_field('mff_search', 'media_from_ftp_search'); ?>
741
+ <div class="item-mediafromftp-settings">
742
+ <h3><?php echo __('Search').' '.__('directory', 'media-from-ftp'); ?></h3>
743
+ <?php echo $mediafromftp->dir_select_box($mediafromftp_settings['searchdir'], $mediafromftp_settings['character_code'], wp_normalize_path(ABSPATH)); ?>
744
+ </div>
745
+ <?php echo $mediafromftp->search_option_html($mediafromftp_settings); ?>
746
+ <div style="display: block;padding:5px 5px">
747
+ <?php submit_button( __('Save Changes'), 'large', 'media-from-ftp-search-options-apply', FALSE ); ?>
748
+ </div>
749
+ </form>
750
+ </div>
751
+ </div>
752
+
753
+ <div id="mediafromftp-settings-tabs-3">
754
  <div style="display: block; padding: 5px 15px">
755
 
756
  <div class="item-mediafromftp-settings">
1669
  $mediafromftp_settings['thumb_deep_search'] = sanitize_text_field($_POST['mediafromftp_thumb_deep_search']);
1670
  }
1671
  update_option( $this->wp_options_name(), $mediafromftp_settings );
1672
+ echo '<div class="notice notice-success is-dismissible"><ul><li>'.__('Settings').' --> '.__('Changes saved.').'</li></ul></div>';
1673
  break;
1674
  case 3:
1675
  if ( !empty($_POST['mediafromftp_clear_cash']) ) {
req/MediaFromFtpRegist.php CHANGED
@@ -141,7 +141,7 @@ class MediaFromFtpRegist {
141
  } else {
142
  $character_code = 'UTF-8';
143
  }
144
- $exclude = '(.ktai.)|(.backwpup_log.)|(.ps_auto_sitemap.)|\.php|\.js';
145
  $recursive_search = TRUE;
146
  $thumb_deep_search = FALSE;
147
  $search_limit_number = 100000;
141
  } else {
142
  $character_code = 'UTF-8';
143
  }
144
+ $exclude = '(.ktai.)|(.backwpup_log.)|(.ps_auto_sitemap.)|\.php|\.js|(.wpcf7_captcha.)|\.htaccess|(.woocommerce_uploads.)|(.wc-logs.)';
145
  $recursive_search = TRUE;
146
  $thumb_deep_search = FALSE;
147
  $search_limit_number = 100000;