Media File Renamer - Version 4.2.1

Version Description

  • Add: All the actions in the Media Library are now asynchronous. No more page reload!
  • Update: Many changes and little enhancements in the code, for speed, security and code-tidyness.
  • Note: If you like it, please review the plugin here: https://wordpress.org/support/plugin/media-file-renamer/reviews/?rate=5#new-post. It's important for us :) Thank you!
Download this release

Release Info

Developer TigrouMeow
Plugin Icon 128x128 Media File Renamer
Version 4.2.1
Comparing to
See all releases

Code changes from version 4.2.0 to 4.2.1

Files changed (3) hide show
  1. media-file-renamer.php +50 -46
  2. readme.txt +3 -3
  3. ui.php +1 -1
media-file-renamer.php CHANGED
@@ -1,9 +1,9 @@
1
  <?php
2
  /*
3
- Plugin Name: Media File Auto Renamer
4
  Plugin URI: http://meowapps.com
5
  Description: Auto-rename the files when titles are modified and update and the references (links). Manual Rename is a Pro option. Please read the description.
6
- Version: 4.2.0
7
  Author: Jordy Meow
8
  Author URI: http://meowapps.com
9
  Text Domain: media-file-renamer
@@ -19,60 +19,64 @@ Originally developed for two of my websites:
19
  */
20
 
21
  if ( class_exists( 'Meow_MFRH_Core' ) ) {
22
- function mfrh_admin_notices() {
23
- echo '<div class="error"><p>Thanks for installing the Pro version of Media File Renamer :) However, the free version is still enabled. Please disable or uninstall it.</p></div>';
24
- }
25
- add_action( 'admin_notices', 'mfrh_admin_notices' );
26
- return;
27
  }
28
 
29
  if ( is_admin() ) {
30
 
31
- global $mfrh_version, $mfrh_core;
32
- $mfrh_version = '4.2.0';
33
 
34
- // Admin
35
- require( 'mfrh_admin.php');
36
- $mfrh_admin = new Meow_MFRH_Admin( 'mfrh', __FILE__, 'media-file-renamer' );
37
 
38
- // Core
39
  require( 'core.php' );
40
  global $mfrh_core;
41
  $mfrh_core = new Meow_MFRH_Core( $mfrh_admin );
42
 
43
- /*******************************************************************************
44
- * TODO: OLD PRO, THIS FUNCTION SHOULD BE REMOVED IN THE FUTURE
45
- ******************************************************************************/
46
 
47
- add_action( 'admin_notices', 'mfrh_meow_old_version_admin_notices' );
 
 
48
 
49
- function mfrh_meow_old_version_admin_notices() {
50
- if ( isset( $_POST['mfrh_reset_sub'] ) ) {
51
- delete_transient( 'mfrh_validated' );
52
- delete_option( 'mfrh_pro_serial' );
53
- delete_option( 'mfrh_pro_status' );
54
- }
55
- $subscr_id = get_option( 'mfrh_pro_serial', "" );
56
- if ( empty( $subscr_id ) )
57
- return;
58
- $forever = strpos( $subscr_id, 'F-' ) !== false;
59
- $yearly = strpos( $subscr_id, 'I-' ) !== false;
60
- if ( !$forever && !$yearly )
61
- return;
62
- ?>
63
- <div class="error">
64
- <p>
65
- <h2>IMPORTANT MESSAGE ABOUT MEDIA FILE RENAMER</h2>
66
- In order to comply with WordPress.org, BIG CHANGES in the code and how the plugin was sold were to be made. The plugin needs requires to be purchased and updated through the new <a target='_blank' href="https://store.meowapps.com">Meow Apps Store</a>. This store is also more robust (keys, websites management, invoices, etc). Now, since WordPress.org only accepts free plugins on its repository, this is the one currently installed. Therefore, you need to take an action. <b>Please click here to know more about your license and to learn what to do: <a target='_blank' href='https://meowapps.com/?mkey=<?php echo $subscr_id ?>'>License <?php echo $subscr_id ?></a></b>.
67
- </p>
68
- <p>
69
- <form method="post" action="">
70
- <input type="hidden" name="mfrh_reset_sub" value="true">
71
- <input type="submit" name="submit" id="submit" class="button" value="Got it. Clear this!">
72
- <br /><small><b>Make sure you followed the instruction before clicking this button.</b></small>
73
- </form>
74
- </p>
75
- </div>
76
- <?php
77
- }
 
 
78
  }
1
  <?php
2
  /*
3
+ Plugin Name: Media File Renamer
4
  Plugin URI: http://meowapps.com
5
  Description: Auto-rename the files when titles are modified and update and the references (links). Manual Rename is a Pro option. Please read the description.
6
+ Version: 4.2.1
7
  Author: Jordy Meow
8
  Author URI: http://meowapps.com
9
  Text Domain: media-file-renamer
19
  */
20
 
21
  if ( class_exists( 'Meow_MFRH_Core' ) ) {
22
+ function mfrh_admin_notices() {
23
+ echo '<div class="error"><p>Thanks for installing the Pro version of Media File Renamer :) However, the free version is still enabled. Please disable or uninstall it.</p></div>';
24
+ }
25
+ add_action( 'admin_notices', 'mfrh_admin_notices' );
26
+ return;
27
  }
28
 
29
  if ( is_admin() ) {
30
 
31
+ global $mfrh_version, $mfrh_core;
32
+ $mfrh_version = '4.2.1';
33
 
34
+ // Admin
35
+ require( 'mfrh_admin.php');
36
+ $mfrh_admin = new Meow_MFRH_Admin( 'mfrh', __FILE__, 'media-file-renamer' );
37
 
38
+ // Core
39
  require( 'core.php' );
40
  global $mfrh_core;
41
  $mfrh_core = new Meow_MFRH_Core( $mfrh_admin );
42
 
43
+ // UI
44
+ require( 'ui.php' );
45
+ new Meow_MFRH_UI( $mfrh_core, $mfrh_admin );
46
 
47
+ /*******************************************************************************
48
+ * TODO: OLD PRO, THIS FUNCTION SHOULD BE REMOVED IN THE FUTURE
49
+ ******************************************************************************/
50
 
51
+ add_action( 'admin_notices', 'mfrh_meow_old_version_admin_notices' );
52
+
53
+ function mfrh_meow_old_version_admin_notices() {
54
+ if ( isset( $_POST['mfrh_reset_sub'] ) ) {
55
+ delete_transient( 'mfrh_validated' );
56
+ delete_option( 'mfrh_pro_serial' );
57
+ delete_option( 'mfrh_pro_status' );
58
+ }
59
+ $subscr_id = get_option( 'mfrh_pro_serial', "" );
60
+ if ( empty( $subscr_id ) )
61
+ return;
62
+ $forever = strpos( $subscr_id, 'F-' ) !== false;
63
+ $yearly = strpos( $subscr_id, 'I-' ) !== false;
64
+ if ( !$forever && !$yearly )
65
+ return;
66
+ ?>
67
+ <div class="error">
68
+ <p>
69
+ <h2>IMPORTANT MESSAGE ABOUT MEDIA FILE RENAMER</h2>
70
+ In order to comply with WordPress.org, BIG CHANGES in the code and how the plugin was sold were to be made. The plugin needs requires to be purchased and updated through the new <a target='_blank' href="https://store.meowapps.com">Meow Apps Store</a>. This store is also more robust (keys, websites management, invoices, etc). Now, since WordPress.org only accepts free plugins on its repository, this is the one currently installed. Therefore, you need to take an action. <b>Please click here to know more about your license and to learn what to do: <a target='_blank' href='https://meowapps.com/?mkey=<?php echo $subscr_id ?>'>License <?php echo $subscr_id ?></a></b>.
71
+ </p>
72
+ <p>
73
+ <form method="post" action="">
74
+ <input type="hidden" name="mfrh_reset_sub" value="true">
75
+ <input type="submit" name="submit" id="submit" class="button" value="Got it. Clear this!">
76
+ <br /><small><b>Make sure you followed the instruction before clicking this button.</b></small>
77
+ </form>
78
+ </p>
79
+ </div>
80
+ <?php
81
+ }
82
  }
readme.txt CHANGED
@@ -1,9 +1,9 @@
1
- === Media File Auto Renamer ===
2
  Contributors: TigrouMeow
3
  Tags: rename, file, files, media, manager, image, renamer, wpml, optimization, seo, retina, gutenberg
4
  Requires at least: 4.6
5
  Tested up to: 4.9.6
6
- Stable tag: 4.2.0
7
 
8
  Automatically rename files depending on Media titles dynamically + update links. Pro version has many more options. Check the description :)
9
 
@@ -47,7 +47,7 @@ Check the FAQ on the official website, [here](https://meowapps.com/media-file-re
47
 
48
  == Changelog ==
49
 
50
- = 4.2.0 =
51
  * Add: All the actions in the Media Library are now asynchronous. No more page reload!
52
  * Update: Many changes and little enhancements in the code, for speed, security and code-tidyness.
53
  * Note: If you like it, please review the plugin here: https://wordpress.org/support/plugin/media-file-renamer/reviews/?rate=5#new-post. It's important for us :) Thank you!
1
+ === Media File Renamer ===
2
  Contributors: TigrouMeow
3
  Tags: rename, file, files, media, manager, image, renamer, wpml, optimization, seo, retina, gutenberg
4
  Requires at least: 4.6
5
  Tested up to: 4.9.6
6
+ Stable tag: 4.2.1
7
 
8
  Automatically rename files depending on Media titles dynamically + update links. Pro version has many more options. Check the description :)
9
 
47
 
48
  == Changelog ==
49
 
50
+ = 4.2.1 =
51
  * Add: All the actions in the Media Library are now asynchronous. No more page reload!
52
  * Update: Many changes and little enhancements in the code, for speed, security and code-tidyness.
53
  * Note: If you like it, please review the plugin here: https://wordpress.org/support/plugin/media-file-renamer/reviews/?rate=5#new-post. It's important for us :) Thank you!
ui.php CHANGED
@@ -146,7 +146,7 @@ class Meow_MFRH_UI {
146
  $basename = $info['basename'];
147
  $is_manual = apply_filters( 'mfrh_manual', false );
148
  $html = '<input type="text" readonly class="widefat" name="mfrh_new_filename" value="' . $basename. '" />';
149
- $html .= '<p class="description">This feature is for <a target="_blank" href="http://meowapps.com/media-file-renamer/">Pro users</a> only.</p>';
150
  echo apply_filters( "mfrh_admin_attachment_fields", $html, $post );
151
  return $post;
152
  }
146
  $basename = $info['basename'];
147
  $is_manual = apply_filters( 'mfrh_manual', false );
148
  $html = '<input type="text" readonly class="widefat" name="mfrh_new_filename" value="' . $basename. '" />';
149
+ $html .= __( '<p class="description">This feature is for <a target="_blank" href="https://store.meowapps.com/">Pro users</a> only.</p>', 'media-file-renamer' );
150
  echo apply_filters( "mfrh_admin_attachment_fields", $html, $post );
151
  return $post;
152
  }