Version Description
- Info: Brand new UI! Made everything much clearer.
- Fix: Method was not always taken in account.
Download this release
Release Info
Developer | TigrouMeow |
Plugin | Media File Renamer |
Version | 5.0.2 |
Comparing to | |
See all releases |
Code changes from version 5.0.1 to 5.0.2
- classes/core.php +1 -1
- classes/rest.php +3 -2
- common/admin.php +2 -2
- media-file-renamer.php +3 -3
- readme.txt +8 -6
classes/core.php
CHANGED
@@ -31,7 +31,7 @@ class Meow_MFRH_Core {
|
|
31 |
}
|
32 |
|
33 |
// Initialize
|
34 |
-
$this->method = apply_filters( 'mfrh_method', get_option( '
|
35 |
|
36 |
// Only for REST
|
37 |
if ( $this->is_rest ) {
|
31 |
}
|
32 |
|
33 |
// Initialize
|
34 |
+
$this->method = apply_filters( 'mfrh_method', get_option( 'mfrh_auto_rename', 'media_title' ) );
|
35 |
|
36 |
// Only for REST
|
37 |
if ( $this->is_rest ) {
|
classes/rest.php
CHANGED
@@ -389,7 +389,7 @@ class Meow_MFRH_Rest
|
|
389 |
|
390 |
function validate_updated_option( $option_name ) {
|
391 |
$needsCheckingOptions = [
|
392 |
-
'
|
393 |
'mfrh_sync_alt',
|
394 |
'mfrh_sync_media_title',
|
395 |
'mfrh_force_rename',
|
@@ -411,7 +411,8 @@ class Meow_MFRH_Rest
|
|
411 |
return $this->createValidationResult( false, __( 'Force Rename and Numbered Files cannot be used at the same time. Please use Force Rename only when you are trying to repair a broken install. For now, Force Rename has been disabled.', 'media-file-renamer' ));
|
412 |
|
413 |
}
|
414 |
-
else if ( $option_name === '
|
|
|
415 |
if ( $this->core->method !== 'alt_text' && $this->core->method !== 'media_title' ) {
|
416 |
return $this->createValidationResult();
|
417 |
}
|
389 |
|
390 |
function validate_updated_option( $option_name ) {
|
391 |
$needsCheckingOptions = [
|
392 |
+
'mfrh_auto_rename',
|
393 |
'mfrh_sync_alt',
|
394 |
'mfrh_sync_media_title',
|
395 |
'mfrh_force_rename',
|
411 |
return $this->createValidationResult( false, __( 'Force Rename and Numbered Files cannot be used at the same time. Please use Force Rename only when you are trying to repair a broken install. For now, Force Rename has been disabled.', 'media-file-renamer' ));
|
412 |
|
413 |
}
|
414 |
+
else if ( $option_name === 'mfrh_auto_rename' || $option_name === 'mfrh_sync_alt' ||
|
415 |
+
$option_name ==='mfrh_sync_media_title' ) {
|
416 |
if ( $this->core->method !== 'alt_text' && $this->core->method !== 'media_title' ) {
|
417 |
return $this->createValidationResult();
|
418 |
}
|
common/admin.php
CHANGED
@@ -148,11 +148,11 @@ if ( !class_exists( 'MeowCommon_Admin' ) ) {
|
|
148 |
function get_phperrorlogs() {
|
149 |
$errorpath = ini_get( 'error_log' );
|
150 |
$output_lines = array();
|
151 |
-
if ( !empty( $errorpath ) ) {
|
152 |
$file = new SplFileObject( $errorpath, 'r' );
|
153 |
$file->seek( PHP_INT_MAX );
|
154 |
$last_line = $file->key();
|
155 |
-
$iterator = new LimitIterator( $file, $last_line - 500, $last_line );
|
156 |
$lines = iterator_to_array( $iterator );
|
157 |
foreach ( $lines as $line ) {
|
158 |
$newline = '';
|
148 |
function get_phperrorlogs() {
|
149 |
$errorpath = ini_get( 'error_log' );
|
150 |
$output_lines = array();
|
151 |
+
if ( !empty( $errorpath ) && file_exists( $errorpath ) ) {
|
152 |
$file = new SplFileObject( $errorpath, 'r' );
|
153 |
$file->seek( PHP_INT_MAX );
|
154 |
$last_line = $file->key();
|
155 |
+
$iterator = new LimitIterator( $file, $last_line > 500 ? $last_line - 500 : 0, $last_line );
|
156 |
$lines = iterator_to_array( $iterator );
|
157 |
foreach ( $lines as $line ) {
|
158 |
$newline = '';
|
media-file-renamer.php
CHANGED
@@ -1,9 +1,9 @@
|
|
1 |
<?php
|
2 |
/*
|
3 |
-
Plugin Name: Media File Renamer
|
4 |
Plugin URI: https://meowapps.com
|
5 |
Description: Renames your media files for better SEO and a nicer filesystem (automatically or manually).
|
6 |
-
Version: 5.0.
|
7 |
Author: Jordy Meow
|
8 |
Author URI: https://meowapps.com
|
9 |
Text Domain: media-file-renamer
|
@@ -14,7 +14,7 @@ Originally developed for two of my websites:
|
|
14 |
- Haikyo (https://haikyo.org)
|
15 |
*/
|
16 |
|
17 |
-
define( 'MFRH_VERSION', '5.0.
|
18 |
define( 'MFRH_PREFIX', 'mfrh' );
|
19 |
define( 'MFRH_DOMAIN', 'media-file-renamer' );
|
20 |
define( 'MFRH_ENTRY', __FILE__ );
|
1 |
<?php
|
2 |
/*
|
3 |
+
Plugin Name: Media File Renamer
|
4 |
Plugin URI: https://meowapps.com
|
5 |
Description: Renames your media files for better SEO and a nicer filesystem (automatically or manually).
|
6 |
+
Version: 5.0.2
|
7 |
Author: Jordy Meow
|
8 |
Author URI: https://meowapps.com
|
9 |
Text Domain: media-file-renamer
|
14 |
- Haikyo (https://haikyo.org)
|
15 |
*/
|
16 |
|
17 |
+
define( 'MFRH_VERSION', '5.0.2' );
|
18 |
define( 'MFRH_PREFIX', 'mfrh' );
|
19 |
define( 'MFRH_DOMAIN', 'media-file-renamer' );
|
20 |
define( 'MFRH_ENTRY', __FILE__ );
|
readme.txt
CHANGED
@@ -1,11 +1,11 @@
|
|
1 |
-
=== Media File Renamer ===
|
2 |
Contributors: TigrouMeow
|
3 |
Tags: rename, file, media, seo, files, renamer, optimize, library
|
4 |
Donate link: https://commerce.coinbase.com/checkout/d047546a-77a8-41c8-9ea9-4a950f61832f
|
5 |
Requires at least: 4.8
|
6 |
Tested up to: 5.5
|
7 |
Requires PHP: 5.6
|
8 |
-
Stable tag: 5.0.
|
9 |
|
10 |
Renames your media files for better SEO and a nicer filesystem (automatically or manually).
|
11 |
|
@@ -63,13 +63,15 @@ The plugin can be tweaked in many ways, there are many actions and filters avail
|
|
63 |
|
64 |
== Changelog ==
|
65 |
|
|
|
|
|
|
|
|
|
66 |
= 5.0.1 =
|
|
|
|
|
67 |
* Update: Accessibility and usability.
|
68 |
* Fix: Field wasn't displayed if no auto mode was selected.
|
69 |
-
* Fix: Better handling of errors.
|
70 |
-
* Info: Brand new UI! Made everything much clearer.
|
71 |
-
* Fix: Issues related to WebP and PDF thumbnails.
|
72 |
-
* Fix: Issues related to breaking characters in the Media or Attached Post Title.
|
73 |
|
74 |
= 5.0.0 =
|
75 |
* Info: Brand new UI! Made everything much clearer.
|
1 |
+
=== Media File Renamer (Auto & Manual Rename) ===
|
2 |
Contributors: TigrouMeow
|
3 |
Tags: rename, file, media, seo, files, renamer, optimize, library
|
4 |
Donate link: https://commerce.coinbase.com/checkout/d047546a-77a8-41c8-9ea9-4a950f61832f
|
5 |
Requires at least: 4.8
|
6 |
Tested up to: 5.5
|
7 |
Requires PHP: 5.6
|
8 |
+
Stable tag: 5.0.2
|
9 |
|
10 |
Renames your media files for better SEO and a nicer filesystem (automatically or manually).
|
11 |
|
63 |
|
64 |
== Changelog ==
|
65 |
|
66 |
+
= 5.0.2 =
|
67 |
+
* Info: Brand new UI! Made everything much clearer.
|
68 |
+
* Fix: Method was not always taken in account.
|
69 |
+
|
70 |
= 5.0.1 =
|
71 |
+
* Info: Brand new UI! Made everything much clearer.
|
72 |
+
* Fix: Method was not always taken in account.
|
73 |
* Update: Accessibility and usability.
|
74 |
* Fix: Field wasn't displayed if no auto mode was selected.
|
|
|
|
|
|
|
|
|
75 |
|
76 |
= 5.0.0 =
|
77 |
* Info: Brand new UI! Made everything much clearer.
|