Version Description
- Fix: Issue with roles overriding and WP-CLI.
- Fix: Issue with REST in the Common Dashboard.
Download this release
Release Info
Developer | TigrouMeow |
Plugin | Media File Renamer |
Version | 5.1.1 |
Comparing to | |
See all releases |
Code changes from version 5.1.0 to 5.1.1
- classes/core.php +5 -3
- media-file-renamer.php +2 -2
- readme.txt +5 -1
classes/core.php
CHANGED
@@ -18,16 +18,18 @@ class Meow_MFRH_Core {
|
|
18 |
$this->upload_folder = wp_upload_dir();
|
19 |
$this->contentDir = substr( $this->upload_folder['baseurl'], 1 + strlen( $this->site_url ) );
|
20 |
add_action( 'plugins_loaded', array( $this, 'init' ) );
|
21 |
-
$this->is_rest = MeowCommon_Helpers::is_rest();
|
22 |
-
$this->is_cli = defined( 'WP_CLI' ) && WP_CLI;
|
23 |
}
|
24 |
|
25 |
function init() {
|
26 |
|
|
|
|
|
|
|
|
|
27 |
// Check the roles
|
28 |
$this->allow_usage = apply_filters( 'mfrh_allow_usage', current_user_can( 'administrator' ) );
|
29 |
$this->allow_setup = apply_filters( 'mfrh_allow_setup', current_user_can( 'manage_options' ) );
|
30 |
-
if ( !$this->allow_usage ) {
|
31 |
return;
|
32 |
}
|
33 |
|
18 |
$this->upload_folder = wp_upload_dir();
|
19 |
$this->contentDir = substr( $this->upload_folder['baseurl'], 1 + strlen( $this->site_url ) );
|
20 |
add_action( 'plugins_loaded', array( $this, 'init' ) );
|
|
|
|
|
21 |
}
|
22 |
|
23 |
function init() {
|
24 |
|
25 |
+
// This should be checked after the init (is_rest checks the capacities)
|
26 |
+
$this->is_rest = MeowCommon_Helpers::is_rest();
|
27 |
+
$this->is_cli = defined( 'WP_CLI' ) && WP_CLI;
|
28 |
+
|
29 |
// Check the roles
|
30 |
$this->allow_usage = apply_filters( 'mfrh_allow_usage', current_user_can( 'administrator' ) );
|
31 |
$this->allow_setup = apply_filters( 'mfrh_allow_setup', current_user_can( 'manage_options' ) );
|
32 |
+
if ( !$this->is_cli && !$this->allow_usage ) {
|
33 |
return;
|
34 |
}
|
35 |
|
media-file-renamer.php
CHANGED
@@ -3,7 +3,7 @@
|
|
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.1.
|
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.1.
|
18 |
define( 'MFRH_PREFIX', 'mfrh' );
|
19 |
define( 'MFRH_DOMAIN', 'media-file-renamer' );
|
20 |
define( 'MFRH_ENTRY', __FILE__ );
|
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.1.1
|
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.1.1' );
|
18 |
define( 'MFRH_PREFIX', 'mfrh' );
|
19 |
define( 'MFRH_DOMAIN', 'media-file-renamer' );
|
20 |
define( 'MFRH_ENTRY', __FILE__ );
|
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.5
|
7 |
Requires PHP: 5.6
|
8 |
-
Stable tag: 5.1.
|
9 |
|
10 |
Renames your media files for better SEO and a nicer filesystem (automatically or manually).
|
11 |
|
@@ -66,6 +66,10 @@ The plugin can be tweaked in many ways, there are many actions and filters avail
|
|
66 |
|
67 |
== Changelog ==
|
68 |
|
|
|
|
|
|
|
|
|
69 |
= 5.1.0 =
|
70 |
* Add: Support overriding roles.
|
71 |
* Fix: The layout of the dashboard was broken by WPBakery.
|
5 |
Requires at least: 4.8
|
6 |
Tested up to: 5.5
|
7 |
Requires PHP: 5.6
|
8 |
+
Stable tag: 5.1.1
|
9 |
|
10 |
Renames your media files for better SEO and a nicer filesystem (automatically or manually).
|
11 |
|
66 |
|
67 |
== Changelog ==
|
68 |
|
69 |
+
= 5.1.1 =
|
70 |
+
* Fix: Issue with roles overriding and WP-CLI.
|
71 |
+
* Fix: Issue with REST in the Common Dashboard.
|
72 |
+
|
73 |
= 5.1.0 =
|
74 |
* Add: Support overriding roles.
|
75 |
* Fix: The layout of the dashboard was broken by WPBakery.
|