Version Description
- Fix: AJAX/REST check.
- Update: Admin refresh.
Download this release
Release Info
Developer | TigrouMeow |
Plugin | Media File Renamer |
Version | 4.5.7 |
Comparing to | |
See all releases |
Code changes from version 4.5.6 to 4.5.7
- helpers.php +8 -4
- media-file-renamer.php +2 -2
- readme.txt +4 -3
helpers.php
CHANGED
@@ -6,7 +6,9 @@ if ( !function_exists( 'is_rest' ) ) {
|
|
6 |
*
|
7 |
* Case #1: After WP_REST_Request initialisation
|
8 |
* Case #2: Support "plain" permalink settings
|
9 |
-
* Case #3:
|
|
|
|
|
10 |
* Also supports WP installations in subfolders
|
11 |
*
|
12 |
* @returns boolean
|
@@ -19,10 +21,12 @@ if ( !function_exists( 'is_rest' ) ) {
|
|
19 |
&& strpos( trim( $_GET['rest_route'], '\\/' ), $prefix , 0 ) === 0)
|
20 |
return true;
|
21 |
// (#3)
|
22 |
-
|
|
|
|
|
|
|
|
|
23 |
$current_url = wp_parse_url( add_query_arg( array( ) ) );
|
24 |
-
if ( !isset( $current_url['path'] ) || !isset( $rest_url['path'] ) )
|
25 |
-
return false;
|
26 |
return strpos( $current_url['path'], $rest_url['path'], 0 ) === 0;
|
27 |
}
|
28 |
}
|
6 |
*
|
7 |
* Case #1: After WP_REST_Request initialisation
|
8 |
* Case #2: Support "plain" permalink settings
|
9 |
+
* Case #3: It can happen that WP_Rewrite is not yet initialized,
|
10 |
+
* so do this (wp-settings.php)
|
11 |
+
* Case #4: URL Path begins with wp-json/ (your REST prefix)
|
12 |
* Also supports WP installations in subfolders
|
13 |
*
|
14 |
* @returns boolean
|
21 |
&& strpos( trim( $_GET['rest_route'], '\\/' ), $prefix , 0 ) === 0)
|
22 |
return true;
|
23 |
// (#3)
|
24 |
+
global $wp_rewrite;
|
25 |
+
if ($wp_rewrite === null) $wp_rewrite = new WP_Rewrite();
|
26 |
+
|
27 |
+
// (#4)
|
28 |
+
$rest_url = wp_parse_url( trailingslashit( rest_url( ) ) );
|
29 |
$current_url = wp_parse_url( add_query_arg( array( ) ) );
|
|
|
|
|
30 |
return strpos( $current_url['path'], $rest_url['path'], 0 ) === 0;
|
31 |
}
|
32 |
}
|
media-file-renamer.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Media File Renamer (Auto Rename)
|
4 |
Plugin URI: https://meowapps.com
|
5 |
Description: Renames automatically the files depending on Media titles and updates the links.
|
6 |
-
Version: 4.5.
|
7 |
Author: Jordy Meow
|
8 |
Author URI: https://jordymeow.com
|
9 |
Text Domain: media-file-renamer
|
@@ -32,7 +32,7 @@ require( 'helpers.php');
|
|
32 |
if ( is_admin() || is_rest() ) {
|
33 |
|
34 |
global $mfrh_version, $mfrh_core;
|
35 |
-
$mfrh_version = '4.5.
|
36 |
|
37 |
// Admin
|
38 |
require( 'mfrh_admin.php');
|
3 |
Plugin Name: Media File Renamer (Auto Rename)
|
4 |
Plugin URI: https://meowapps.com
|
5 |
Description: Renames automatically the files depending on Media titles and updates the links.
|
6 |
+
Version: 4.5.7
|
7 |
Author: Jordy Meow
|
8 |
Author URI: https://jordymeow.com
|
9 |
Text Domain: media-file-renamer
|
32 |
if ( is_admin() || is_rest() ) {
|
33 |
|
34 |
global $mfrh_version, $mfrh_core;
|
35 |
+
$mfrh_version = '4.5.7';
|
36 |
|
37 |
// Admin
|
38 |
require( 'mfrh_admin.php');
|
readme.txt
CHANGED
@@ -5,7 +5,7 @@ Donate link: https://commerce.coinbase.com/checkout/d047546a-77a8-41c8-9ea9-4a95
|
|
5 |
Requires at least: 4.8
|
6 |
Tested up to: 5.2
|
7 |
Requires PHP: 7.0
|
8 |
-
Stable tag: 4.5.
|
9 |
|
10 |
Physically renames your files nicely for a cleaner system and for a better SEO. Please read the description.
|
11 |
|
@@ -57,8 +57,9 @@ Check the FAQ on the official website, [here](https://meowapps.com/media-file-re
|
|
57 |
|
58 |
== Changelog ==
|
59 |
|
60 |
-
= 4.5.
|
61 |
-
*
|
|
|
62 |
|
63 |
= 4.5.5 =
|
64 |
* Update: Dashboard and Updater... updated.
|
5 |
Requires at least: 4.8
|
6 |
Tested up to: 5.2
|
7 |
Requires PHP: 7.0
|
8 |
+
Stable tag: 4.5.7
|
9 |
|
10 |
Physically renames your files nicely for a cleaner system and for a better SEO. Please read the description.
|
11 |
|
57 |
|
58 |
== Changelog ==
|
59 |
|
60 |
+
= 4.5.7 =
|
61 |
+
* Fix: AJAX/REST check.
|
62 |
+
* Update: Admin refresh.
|
63 |
|
64 |
= 4.5.5 =
|
65 |
* Update: Dashboard and Updater... updated.
|