Media File Renamer - Version 3.5.0

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.0
Comparing to
See all releases

Code changes from version 3.4.6 to 3.5.0

common/admin.php CHANGED
@@ -145,19 +145,32 @@ if ( !class_exists( 'MeowApps_Admin' ) ) {
145
  }
146
 
147
  function check_install( $plugin ) {
148
- $pluginpath = get_home_path() . 'wp-content/plugins/' . $plugin;
 
149
  if ( !file_exists( $pluginpath ) ) {
150
- $url = wp_nonce_url( "update.php?action=install-plugin&plugin=$plugin", "install-plugin_$plugin" );
151
- return "<a href='$url'><small><span class='' style='float: right;'>install</span></small></a>";
 
 
 
 
 
 
 
152
  }
 
153
  $plugin_file = $plugin . '/' . $plugin . '.php';
154
- if ( is_plugin_active( $plugin_file ) )
155
- return "<small><span style='float: right; color: green;'><span class='dashicons dashicons-yes'></span></span></small>";
 
 
 
 
156
  else {
157
  $url = wp_nonce_url( self_admin_url( 'plugins.php?action=activate&plugin=' . $plugin_file ),
158
  'activate-plugin_' . $plugin_file );
159
- return '<small><span style="color: orange; float: right;">off
160
- (<a style="color: rgba(30,140,190,.8); text-decoration: none;" href="' .
161
  $url . '">enable</a>)</span></small>';
162
  }
163
  }
@@ -216,7 +229,7 @@ if ( !class_exists( 'MeowApps_Admin' ) ) {
216
  ?>
217
  <?php $this->display_title(); ?>
218
  <p>
219
- <?php _e( 'Meow Apps is run by <a href="http://jordymeow.com">Jordy Meow</a>, a photographer and software developer based in Japan. When he realized that WordPress was an environment not so friendly to photographers, Meow Apps was born. It is a suite of plugins dedicate to make the blogging life of image lovers easy and pretty. Meow Apps also teams up with the best players in the community (other themes or plugins developers). For more information, please check <a href="http://meowapps.com" target="_blank">Meow Apps</a>.', 'meowapps' )
220
  ?>
221
  </p>
222
  <div class="meow-row">
@@ -239,9 +252,9 @@ if ( !class_exists( 'MeowApps_Admin' ) ) {
239
  <li><b>Media File Renamer</b> <?php echo $this->check_install( 'media-file-renamer' ) ?><br />
240
  Nicer filenames and better SEO, automatically.</li>
241
  <li><b>Media Cleaner</b> <?php echo $this->check_install( 'media-cleaner' ) ?><br />
242
- Detect the files you are not using to clean your system.</li>
243
  <li><b>WP Retina 2x</b> <?php echo $this->check_install( 'wp-retina-2x' ) ?><br />
244
- Make your website perfect for retina devices.</li>
245
  <li><b>WP Category Permalink</b> <?php echo $this->check_install( 'wp-category-permalink' ) ?><br />
246
  Allows you to select a main category (or taxonomy) for nicer permalinks.</li>
247
  </ul>
145
  }
146
 
147
  function check_install( $plugin ) {
148
+ $pro = false;
149
+ $pluginpath = get_home_path() . 'wp-content/plugins/' . $plugin . '-pro';
150
  if ( !file_exists( $pluginpath ) ) {
151
+ $pluginpath = get_home_path() . 'wp-content/plugins/' . $plugin;
152
+ if ( !file_exists( $pluginpath ) ) {
153
+ $url = wp_nonce_url( "update.php?action=install-plugin&plugin=$plugin", "install-plugin_$plugin" );
154
+ return "<a href='$url'><small><span class='' style='float: right;'>install</span></small></a>";
155
+ }
156
+ }
157
+ else {
158
+ $pro = true;
159
+ $plugin = $plugin . "-pro";
160
  }
161
+
162
  $plugin_file = $plugin . '/' . $plugin . '.php';
163
+ if ( is_plugin_active( $plugin_file ) ) {
164
+ if ( $pro )
165
+ return "<small><span style='float: right;'><span class='dashicons dashicons-heart' style='color: rgba(255, 63, 0, 1); font-size: 30px !important; margin-right: 10px;'></span></span></small>";
166
+ else
167
+ return "<small><span style='float: right;'><span class='dashicons dashicons-yes' style='color: #00b4ff; font-size: 30px !important; margin-right: 10px;'></span></span></small>";
168
+ }
169
  else {
170
  $url = wp_nonce_url( self_admin_url( 'plugins.php?action=activate&plugin=' . $plugin_file ),
171
  'activate-plugin_' . $plugin_file );
172
+ return '<small><span style="color: black; float: right;">off
173
+ (<a style="color: rgba(30,140,190,1); text-decoration: none;" href="' .
174
  $url . '">enable</a>)</span></small>';
175
  }
176
  }
229
  ?>
230
  <?php $this->display_title(); ?>
231
  <p>
232
+ <?php _e( 'Meow Apps is run by Jordy Meow, a photographer and software developer living in Japan (and taking <a target="_blank" href="http://offbeatjapan.org">a lot of photos</a>). Meow Apps is a suite of plugins focusing on photography, imaging, optimization and it teams up with the best players in the community (other themes and plugins developers). For more information, please check <a href="http://meowapps.com" target="_blank">Meow Apps</a>.', 'meowapps' )
233
  ?>
234
  </p>
235
  <div class="meow-row">
252
  <li><b>Media File Renamer</b> <?php echo $this->check_install( 'media-file-renamer' ) ?><br />
253
  Nicer filenames and better SEO, automatically.</li>
254
  <li><b>Media Cleaner</b> <?php echo $this->check_install( 'media-cleaner' ) ?><br />
255
+ Detect the files which are not in use.</li>
256
  <li><b>WP Retina 2x</b> <?php echo $this->check_install( 'wp-retina-2x' ) ?><br />
257
+ The famous plugin that adds Retina support.</li>
258
  <li><b>WP Category Permalink</b> <?php echo $this->check_install( 'wp-category-permalink' ) ?><br />
259
  Allows you to select a main category (or taxonomy) for nicer permalinks.</li>
260
  </ul>
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.4.6
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.4.6';
25
 
26
  // Admin
27
  require( 'mfrh_admin.php');
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
  if ( is_admin() ) {
22
 
23
  global $mfrh_version;
24
+ $mfrh_version = '3.5.0';
25
 
26
  // Admin
27
  require( 'mfrh_admin.php');
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.4.6
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.4.6 =
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.0
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.0 =
93
  * Fix: Update system fixed and code cleaning.
94
 
95
  = 3.4.5 =
screenshot-1.png DELETED
Binary file
screenshot-2.png DELETED
Binary file
screenshot-3.png DELETED
Binary file
screenshot-4.png DELETED
Binary file
screenshot-5.png DELETED
Binary file