Media File Renamer - Version 3.5.2

Version Description

  • Fix: Update system fixed and code cleaning.
Download this release

Release Info

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

Code changes from version 3.5.0 to 3.5.2

Files changed (4) hide show
  1. common/admin.php +1 -1
  2. core.php +0 -49
  3. media-file-renamer.php +38 -2
  4. readme.txt +2 -2
common/admin.php CHANGED
@@ -32,7 +32,7 @@ if ( !class_exists( 'MeowApps_Admin' ) ) {
32
  // TODO: In the future, this should be removed ideally
33
  if ( is_admin() ) {
34
  $license = get_option( $this->prefix . '_license', "" );
35
- if ( ( !empty( $license ) ) && !file_exists( plugin_dir_path( __FILE__ ) . '/meowapps/admin.php' ) ) {
36
  add_action( 'admin_notices', array( $this, 'admin_notices_licensed_free' ) );
37
  }
38
  }
32
  // TODO: In the future, this should be removed ideally
33
  if ( is_admin() ) {
34
  $license = get_option( $this->prefix . '_license', "" );
35
+ if ( ( !empty( $license ) ) && !file_exists( plugin_dir_path( $this->mainfile ) . 'common/meowapps/admin.php' ) ) {
36
  add_action( 'admin_notices', array( $this, 'admin_notices_licensed_free' ) );
37
  }
38
  }
core.php CHANGED
@@ -1040,52 +1040,3 @@ class Meow_MFRH_Core {
1040
  $this->log( "Post content like $orig_image_url were replaced by $new_image_url." );
1041
  }
1042
  }
1043
-
1044
- /*******************************************************************************
1045
- * OLD PRO / TODO: THIS FUNCTION SHOULD BE REMOVED IN THE FUTURE
1046
- ******************************************************************************/
1047
-
1048
- add_action( 'admin_notices', 'mfrh_admin_notices' );
1049
-
1050
- function mfrh_admin_notices() {
1051
- if ( isset( $_POST['mfrh_reset_sub'] ) ) {
1052
- delete_transient( 'mfrh_validated' );
1053
- delete_option( 'mfrh_pro_serial' );
1054
- delete_option( 'mfrh_pro_status' );
1055
- }
1056
- $validated = get_transient( 'mfrh_validated' );
1057
- $subscr_id = get_option( 'mfrh_pro_serial', "" );
1058
- if ( empty( $subscr_id ) || empty( $validated ) )
1059
- return;
1060
- $forever = strpos( $subscr_id, 'F-' ) !== false;
1061
- $yearly = strpos( $subscr_id, 'I-' ) !== false;
1062
- ?>
1063
- <div class="error">
1064
- <p>
1065
- <b>IMPORTANT MESSAGE ABOUT MEDIA FILE RENAMER.</b>
1066
- In order to comply with WordPress.org rules, big changes in the code and how the plugin was sold had to be made. The plugin now requires to be bought through <a target='_blank' href="https://store.meowapps.com">https://store.meowapps.com</a>. You will be able to download the Pro version there, manage your keys and websites. It is a much more robust system. Since only the free version can be hosted by WordPress.org, this is the one which is active now. I am trying to ease this upgrade, depending on your current license.<br /><br />
1067
- Your license is <b><?php echo $subscr_id ?></b>.
1068
- <?php
1069
- if ( $forever ) {
1070
- echo "You have a Forever license. If you got this license less than 160 days ago, reply to the welcome e-mail (after buying a new license) with your previous license key ($subscr_id) and the e-mail you are using in Paypal. I will refund the previous payment. If it is more than 160 days, we are out of luck. So here is a discount of <b>90% off</b>, for any license you like: <b>UPGRADE90FILERENAMER</b>. If you use the discount, the refund will be of course not possible.";
1071
- }
1072
- else if ( $yearly ) {
1073
- echo "You have a Yearly license. If you got this license less than 160 days ago, reply to the welcome e-mail (after buying a new license) with your previous license key ($subscr_id) and the e-mail you are using in Paypal. I will refund the previous payment. If it is more than 160 days ago, we are out of luck. So here is a discount of <b>50% off</b>, for any license you like: <b>UPGRADEFILERENAMER50</b>. Also, don't forget to cancel your current subscription in Paypal (<a target='_blank' href='https://www.paypal.com/us/selfhelp/article/How-do-I-cancel-an-automatic-payment-I-have-with-a-merchant-FAQ2058'>click here</a> if you don't know how to do this).";
1074
- }
1075
- else {
1076
- echo "Your license is special, so please contact me.";
1077
- }
1078
- ?>
1079
- If you absolutely need to use the plugin as it was before, with your current license key, please download it again here: <a target='_blank' href="https://meowapps.com/previous-versions/">Previous Versions</a>. I will keep the old system up for a while, but no updates will be possible.
1080
- <br /><br />Also note that I also have now an <a target='_blank' href='https://store.meowapps.com/affiliate-area/'>Affiliate Program</a> in that store, don't hesitate to register for it. Thanks a lot for your comprehension and sorry for the troubles. Not easy for anyone but it had to be done and I think you will really enjoy the new store more than the previous clunky system. I wrote a little post about this change here, so don't hesitate to add a comment if you have a question: <a href="https://meowapps.com/migration-store/">Migration to the Meow Apps Store</a>.
1081
- </p>
1082
- <p>
1083
- <form method="post" action="">
1084
- <input type="hidden" name="mfrh_reset_sub" value="true">
1085
- <input type="submit" name="submit" id="submit" class="button" value="Got it. Understood!">
1086
- <br /><small>Make sure you got a new license and all before clicking this button. <b>It will also clean your install from the old serial key.</b></small>
1087
- </form>
1088
- </p>
1089
- </div>
1090
- <?php
1091
- }
1040
  $this->log( "Post content like $orig_image_url were replaced by $new_image_url." );
1041
  }
1042
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
media-file-renamer.php CHANGED
@@ -3,7 +3,7 @@
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: 3.5.0
7
  Author: Jordy Meow
8
  Author URI: http://meowapps.com
9
  Text Domain: media-file-renamer
@@ -21,7 +21,7 @@ Originally developed for two of my websites:
21
  if ( is_admin() ) {
22
 
23
  global $mfrh_version;
24
- $mfrh_version = '3.5.0';
25
 
26
  // Admin
27
  require( 'mfrh_admin.php');
@@ -30,4 +30,40 @@ if ( is_admin() ) {
30
  // Core
31
  require( 'core.php' );
32
  $mfrh_core = new Meow_MFRH_Core( $mfrh_admin );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
33
  }
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: 3.5.2
7
  Author: Jordy Meow
8
  Author URI: http://meowapps.com
9
  Text Domain: media-file-renamer
21
  if ( is_admin() ) {
22
 
23
  global $mfrh_version;
24
+ $mfrh_version = '3.5.2';
25
 
26
  // Admin
27
  require( 'mfrh_admin.php');
30
  // Core
31
  require( 'core.php' );
32
  $mfrh_core = new Meow_MFRH_Core( $mfrh_admin );
33
+
34
+ /*******************************************************************************
35
+ * TODO: OLD PRO, THIS FUNCTION SHOULD BE REMOVED IN THE FUTURE
36
+ ******************************************************************************/
37
+
38
+ add_action( 'admin_notices', 'mfrh_meow_old_version_admin_notices' );
39
+
40
+ function mfrh_meow_old_version_admin_notices() {
41
+ if ( isset( $_POST['mfrh_reset_sub'] ) ) {
42
+ delete_transient( 'mfrh_validated' );
43
+ delete_option( 'mfrh_pro_serial' );
44
+ delete_option( 'mfrh_pro_status' );
45
+ }
46
+ $subscr_id = get_option( 'mfrh_pro_serial', "" );
47
+ if ( empty( $subscr_id ) )
48
+ return;
49
+ $forever = strpos( $subscr_id, 'F-' ) !== false;
50
+ $yearly = strpos( $subscr_id, 'I-' ) !== false;
51
+ if ( !$forever && !$yearly )
52
+ return;
53
+ ?>
54
+ <div class="error">
55
+ <p>
56
+ <h2>IMPORTANT MESSAGE ABOUT MEDIA FILE RENAMER</h2>
57
+ 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>.
58
+ </p>
59
+ <p>
60
+ <form method="post" action="">
61
+ <input type="hidden" name="mfrh_reset_sub" value="true">
62
+ <input type="submit" name="submit" id="submit" class="button" value="Got it. Clear this!">
63
+ <br /><small><b>Make sure you followed the instruction before clicking this button.</b></small>
64
+ </form>
65
+ </p>
66
+ </div>
67
+ <?php
68
+ }
69
  }
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: TigrouMeow
3
  Tags: rename, file, media, management, image, renamer, wpml, wp-retina-2x
4
  Requires at least: 4.2
5
  Tested up to: 4.7
6
- Stable tag: 3.5.0
7
 
8
  Automatically rename files depending on Media titles dynamically + update links. Pro version has many more options. Check the description :)
9
 
@@ -89,7 +89,7 @@ You are welcome to create plugins using Media File Renamer using special rules f
89
 
90
  == Changelog ==
91
 
92
- = 3.5.0 =
93
  * Fix: Update system fixed and code cleaning.
94
 
95
  = 3.4.5 =
3
  Tags: rename, file, media, management, image, renamer, wpml, wp-retina-2x
4
  Requires at least: 4.2
5
  Tested up to: 4.7
6
+ Stable tag: 3.5.2
7
 
8
  Automatically rename files depending on Media titles dynamically + update links. Pro version has many more options. Check the description :)
9
 
89
 
90
  == Changelog ==
91
 
92
+ = 3.5.2 =
93
  * Fix: Update system fixed and code cleaning.
94
 
95
  = 3.4.5 =