Version Description
- Fix: Search was sometimes not working properly in the Media Library.
Download this release
Release Info
Developer | TigrouMeow |
Plugin | Media File Renamer |
Version | 4.5.4 |
Comparing to | |
See all releases |
Code changes from version 4.5.2 to 4.5.4
- common/admin.css +21 -1
- common/admin.php +24 -11
- common/img/default.png +0 -0
- common/img/media-cleaner.jpg +0 -0
- common/img/media-file-renamer.jpg +0 -0
- common/img/meow-gallery.jpg +0 -0
- common/img/meow-lightbox.jpg +0 -0
- common/img/wp-retina-2x.jpg +0 -0
- common/img/wpengine.png +0 -0
- common/img/wplr-sync.jpg +0 -0
- core.php +5 -0
- media-file-renamer.php +3 -3
- readme.txt +8 -4
- scripts/media-library.js +5 -5
- style.css +5 -5
- views/column.php +3 -3
common/admin.css
CHANGED
@@ -299,9 +299,29 @@
|
|
299 |
|
300 |
/* DASHBOARD */
|
301 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
302 |
.meow-dashboard .meow-box li {
|
303 |
border-bottom: 1px solid #eee;
|
304 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
305 |
}
|
306 |
|
307 |
.meow-dashboard .meow-box li:last-child {
|
299 |
|
300 |
/* DASHBOARD */
|
301 |
|
302 |
+
.meow-dashboard {
|
303 |
+
box-sizing: border-box;
|
304 |
+
}
|
305 |
+
|
306 |
+
.meow-dashboard .meow-box ul {
|
307 |
+
padding: 0px;
|
308 |
+
margin: 0px;
|
309 |
+
}
|
310 |
+
|
311 |
.meow-dashboard .meow-box li {
|
312 |
border-bottom: 1px solid #eee;
|
313 |
+
margin: 0px;
|
314 |
+
padding: 10px;
|
315 |
+
min-height: 80px;
|
316 |
+
box-sizing: border-box;
|
317 |
+
}
|
318 |
+
|
319 |
+
.meow-dashboard .meow-box li img {
|
320 |
+
width: 80px;
|
321 |
+
height: 80px;
|
322 |
+
float: left;
|
323 |
+
margin: -10px 10px -10px -10px;
|
324 |
+
|
325 |
}
|
326 |
|
327 |
.meow-dash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AwIDUgMCA3LTJzMy0zIDItNnoiLz4KICA8cGF0aCBkPSJNODIgNzRoMTJsNSAxOCAzIDExIDgtMjloMTNsMiA0MmgtOGwtMS0yLTEtMzEtMTAgMzItNyAxLTktMzMtMSAyOS0xIDRoLThsMy00MnoiIGZpbGw9IiNmZmYiLz4KICA8cGF0aCBjbGFzcz0ic3QzIiBkPSJNNTggNzdsNSA1Yy0xIDQtMiA4LTcgOGwtNy01YzQtMiA2LTUgOS04eiIvPgogIDxwYXRoIGNsYXNzPSJzdDIiIGQ9Ik02MyA4Mmw5IDUtNiA5LTEwLTZjNSAwIDYtNCA3LTh6Ii8+CiAgPHBhdGggY2xhc3M9InN0MyIgZD0iTTcyIDg3bDMgMS0xIDExLTgtMyA2LTEweiIvPgo8L3N2Zz4K';
|
8 |
|
9 |
public static $loaded = false;
|
10 |
-
public static $admin_version = "1.
|
11 |
|
12 |
public $prefix; // prefix used for actions, filters (mfrh)
|
13 |
public $mainfile; // plugin main file (media-file-renamer.php)
|
@@ -286,7 +286,7 @@ if ( !class_exists( 'MeowApps_Admin' ) ) {
|
|
286 |
function plugins_loaded() {
|
287 |
if ( isset( $_GET[ 'tool' ] ) && $_GET[ 'tool' ] == 'error_log' ) {
|
288 |
$sec = "5";
|
289 |
-
header("Refresh: $sec;");
|
290 |
}
|
291 |
}
|
292 |
|
@@ -305,11 +305,20 @@ if ( !class_exists( 'MeowApps_Admin' ) ) {
|
|
305 |
echo "</div>";
|
306 |
}
|
307 |
else if ( isset( $_GET['tool'] ) && $_GET['tool'] == 'error_log' ) {
|
|
|
|
|
|
|
|
|
308 |
$errorpath = ini_get( 'error_log' );
|
309 |
echo "<a href=\"javascript:history.go(-1)\">< Go back</a><br /><br />";
|
|
|
|
|
|
|
|
|
|
|
310 |
echo '<div id="error_log">';
|
311 |
if ( file_exists( $errorpath ) ) {
|
312 |
-
echo "Now (auto-reload every 5 seconds)
|
313 |
$errors = file_get_contents( $errorpath );
|
314 |
$errors = explode( "\n", $errors );
|
315 |
$errors = array_reverse( $errors );
|
@@ -334,24 +343,28 @@ if ( !class_exists( 'MeowApps_Admin' ) ) {
|
|
334 |
<div class="meow-box meow-col meow-span_1_of_2 ">
|
335 |
<h3 class=""><span class="dashicons dashicons-camera"></span> UI Plugins </h3>
|
336 |
<ul class="">
|
337 |
-
<li><
|
|
|
338 |
Synchronize photos (folders, collections, keywords) from Lightroom to WordPress.</li>
|
339 |
-
<li><
|
|
|
340 |
Light but powerful lightbox that can also display photo information (EXIF).</li>
|
341 |
-
<li><
|
|
|
342 |
Gallery (using the built-in WP gallery) that makes your website look better.</li>
|
343 |
-
<!-- <li><b>Audio Story for Images</b> <?php echo $this->check_install( 'audio-story-images' ) ?><br />
|
344 |
-
Add audio (music, explanation, ambiance) to your images.</li> -->
|
345 |
</ul>
|
346 |
</div>
|
347 |
<div class="meow-box meow-col meow-span_1_of_2">
|
348 |
<h3 class=""><span class="dashicons dashicons-admin-tools"></span> System Plugins</h3>
|
349 |
<ul class="">
|
350 |
-
<li><
|
|
|
351 |
For nicer filenames and better SEO.</li>
|
352 |
-
<li><
|
|
|
353 |
Detect the files which are not in use.</li>
|
354 |
-
<li><
|
|
|
355 |
The famous plugin that adds Retina support.</li>
|
356 |
</ul>
|
357 |
</div>
|
7 |
public static $logo = 'data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxIiB2aWV3Qm94PSIwIDAgMTY1IDE2NSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICA8c3R5bGU+CiAgICAuc3Qye2ZpbGw6IzgwNDYyNX0uc3Qze2ZpbGw6I2ZkYTk2MH0KICA8L3N0eWxlPgogIDxwYXRoIGQ9Ik03MiA3YTc2IDc2IDAgMCAxIDg0IDkxQTc1IDc1IDAgMSAxIDcyIDd6IiBmaWxsPSIjNGE2YjhjIi8+CiAgPHBhdGggZD0iTTQ4IDQ4YzIgNSAyIDEwIDUgMTQgNSA4IDEzIDE3IDIyIDIwbDEtMTB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
|
11 |
|
12 |
public $prefix; // prefix used for actions, filters (mfrh)
|
13 |
public $mainfile; // plugin main file (media-file-renamer.php)
|
286 |
function plugins_loaded() {
|
287 |
if ( isset( $_GET[ 'tool' ] ) && $_GET[ 'tool' ] == 'error_log' ) {
|
288 |
$sec = "5";
|
289 |
+
header( "Refresh: $sec;" );
|
290 |
}
|
291 |
}
|
292 |
|
305 |
echo "</div>";
|
306 |
}
|
307 |
else if ( isset( $_GET['tool'] ) && $_GET['tool'] == 'error_log' ) {
|
308 |
+
$log_msg = '=== MEOW APPS DEBUG (This is not an error) ===';
|
309 |
+
if ( isset( $_POST['write_logs'] ) ) {
|
310 |
+
error_log( $log_msg );
|
311 |
+
}
|
312 |
$errorpath = ini_get( 'error_log' );
|
313 |
echo "<a href=\"javascript:history.go(-1)\">< Go back</a><br /><br />";
|
314 |
+
echo '
|
315 |
+
<form method="post">
|
316 |
+
<input type="hidden" name="write_logs" value="true">
|
317 |
+
<input class="button button-primary" type="submit" value="Write in the Error Logs">
|
318 |
+
</form><br />';
|
319 |
echo '<div id="error_log">';
|
320 |
if ( file_exists( $errorpath ) ) {
|
321 |
+
echo "Now (auto-reload every 5 seconds): [" . date( "d-M-Y H:i:s", time() ) . " UTC]<br /><br /><h2 style='margin: 0px;'>Errors (order by latest)</h2>";
|
322 |
$errors = file_get_contents( $errorpath );
|
323 |
$errors = explode( "\n", $errors );
|
324 |
$errors = array_reverse( $errors );
|
343 |
<div class="meow-box meow-col meow-span_1_of_2 ">
|
344 |
<h3 class=""><span class="dashicons dashicons-camera"></span> UI Plugins </h3>
|
345 |
<ul class="">
|
346 |
+
<li><img src='<?= $this->common_url( 'img/wplr-sync.jpg' ) ?>' /><b>WP/LR Sync</b>
|
347 |
+
<?php echo $this->check_install( 'wplr-sync' ) ?><br />
|
348 |
Synchronize photos (folders, collections, keywords) from Lightroom to WordPress.</li>
|
349 |
+
<li><img src='<?= $this->common_url( 'img/meow-lightbox.jpg' ) ?>' /><b>Meow Lightbox</b>
|
350 |
+
<?php echo $this->check_install( 'meow-lightbox' ) ?><br />
|
351 |
Light but powerful lightbox that can also display photo information (EXIF).</li>
|
352 |
+
<li><img src='<?= $this->common_url( 'img/meow-gallery.jpg' ) ?>' /><b>Meow Gallery</b>
|
353 |
+
<?php echo $this->check_install( 'meow-gallery' ) ?><br />
|
354 |
Gallery (using the built-in WP gallery) that makes your website look better.</li>
|
|
|
|
|
355 |
</ul>
|
356 |
</div>
|
357 |
<div class="meow-box meow-col meow-span_1_of_2">
|
358 |
<h3 class=""><span class="dashicons dashicons-admin-tools"></span> System Plugins</h3>
|
359 |
<ul class="">
|
360 |
+
<li><img src='<?= $this->common_url( 'img/media-file-renamer.jpg' ) ?>' /><b>Media File Renamer</b>
|
361 |
+
<?php echo $this->check_install( 'media-file-renamer' ) ?><br />
|
362 |
For nicer filenames and better SEO.</li>
|
363 |
+
<li><img src='<?= $this->common_url( 'img/media-cleaner.jpg' ) ?>' /><b>Media Cleaner</b>
|
364 |
+
<?php echo $this->check_install( 'media-cleaner' ) ?><br />
|
365 |
Detect the files which are not in use.</li>
|
366 |
+
<li><img src='<?= $this->common_url( 'img/wp-retina-2x.jpg' ) ?>' /><b>WP Retina 2x</b>
|
367 |
+
<?php echo $this->check_install( 'wp-retina-2x' ) ?><br />
|
368 |
The famous plugin that adds Retina support.</li>
|
369 |
</ul>
|
370 |
</div>
|
common/img/default.png
ADDED
Binary file
|
common/img/media-cleaner.jpg
ADDED
Binary file
|
common/img/media-file-renamer.jpg
ADDED
Binary file
|
common/img/meow-gallery.jpg
ADDED
Binary file
|
common/img/meow-lightbox.jpg
ADDED
Binary file
|
common/img/wp-retina-2x.jpg
ADDED
Binary file
|
common/img/wpengine.png
DELETED
Binary file
|
common/img/wplr-sync.jpg
ADDED
Binary file
|
core.php
CHANGED
@@ -217,6 +217,11 @@ SQL;
|
|
217 |
$old_filepath = get_attached_file( $id );
|
218 |
$old_filepath = Meow_MFRH_Core::sensitive_file_exists( $old_filepath );
|
219 |
$path_parts = mfrh_pathinfo( $old_filepath );
|
|
|
|
|
|
|
|
|
|
|
220 |
//print_r( $path_parts );
|
221 |
$directory = $path_parts['dirname'];
|
222 |
$old_filename = $path_parts['basename'];
|
217 |
$old_filepath = get_attached_file( $id );
|
218 |
$old_filepath = Meow_MFRH_Core::sensitive_file_exists( $old_filepath );
|
219 |
$path_parts = mfrh_pathinfo( $old_filepath );
|
220 |
+
|
221 |
+
// If the file doesn't exist, let's not go further.
|
222 |
+
if ( !isset( $path_parts['dirname'] ) || !isset( $path_parts['basename'] ) )
|
223 |
+
return false;
|
224 |
+
|
225 |
//print_r( $path_parts );
|
226 |
$directory = $path_parts['dirname'];
|
227 |
$old_filename = $path_parts['basename'];
|
media-file-renamer.php
CHANGED
@@ -1,9 +1,9 @@
|
|
1 |
<?php
|
2 |
/*
|
3 |
-
Plugin Name: Media File Renamer Auto
|
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');
|
1 |
<?php
|
2 |
/*
|
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.4
|
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.4';
|
36 |
|
37 |
// Admin
|
38 |
require( 'mfrh_admin.php');
|
readme.txt
CHANGED
@@ -1,9 +1,10 @@
|
|
1 |
-
=== Media File Renamer Auto ===
|
2 |
Contributors: TigrouMeow, amekusa
|
3 |
-
Tags: rename, seo, file, files, media, renamer
|
4 |
Requires at least: 4.8
|
5 |
-
Tested up to: 5.
|
6 |
-
|
|
|
7 |
|
8 |
Physically renames your files nicely for a cleaner system and for a better SEO. Please read the description.
|
9 |
|
@@ -55,6 +56,9 @@ Check the FAQ on the official website, [here](https://meowapps.com/media-file-re
|
|
55 |
|
56 |
== Changelog ==
|
57 |
|
|
|
|
|
|
|
58 |
= 4.5.2 =
|
59 |
* Update: Code cleaning, Youtube video.
|
60 |
* Fix: Issue with updating the ALT field.
|
1 |
+
=== Media File Renamer (Auto Rename) ===
|
2 |
Contributors: TigrouMeow, amekusa
|
3 |
+
Tags: rename, seo, file, files, media, renamer, optimize, library
|
4 |
Requires at least: 4.8
|
5 |
+
Tested up to: 5.1
|
6 |
+
Requires PHP: 7.0
|
7 |
+
Stable tag: 4.5.4
|
8 |
|
9 |
Physically renames your files nicely for a cleaner system and for a better SEO. Please read the description.
|
10 |
|
56 |
|
57 |
== Changelog ==
|
58 |
|
59 |
+
= 4.5.4 =
|
60 |
+
* Fix: Search was sometimes not working properly in the Media Library.
|
61 |
+
|
62 |
= 4.5.2 =
|
63 |
* Update: Code cleaning, Youtube video.
|
64 |
* Fix: Issue with updating the ALT field.
|
scripts/media-library.js
CHANGED
@@ -23,13 +23,13 @@
|
|
23 |
cols = $(cols);
|
24 |
cols.each(function() {
|
25 |
var col = $(this);
|
26 |
-
var id = col.find('input[name="id"]').val();
|
27 |
|
28 |
// Quick Renamer
|
29 |
(function() {
|
30 |
var wrap = col;
|
31 |
var button = wrap.find('.button.rename');
|
32 |
-
var input = wrap.find('input[name="filename"]');
|
33 |
|
34 |
button.on('click', function(ev) {
|
35 |
ev.preventDefault();
|
@@ -53,7 +53,7 @@
|
|
53 |
(function() {
|
54 |
var wrap = col;
|
55 |
var button = wrap.find('.button.auto-rename');
|
56 |
-
var input = wrap.find('input[name="filename"]');
|
57 |
|
58 |
button.on('mouseover', function(ev) {
|
59 |
if (isBusy(col)) return;
|
@@ -202,7 +202,7 @@
|
|
202 |
*/
|
203 |
function rename(col, newName) {
|
204 |
col = $(col);
|
205 |
-
var id = col.find('input[name="id"]').val();
|
206 |
|
207 |
var data = {
|
208 |
action: 'mfrh_rename_media',
|
@@ -246,7 +246,7 @@
|
|
246 |
*/
|
247 |
function update(col, newName) {
|
248 |
col = $(col);
|
249 |
-
var id = col.find('input[name="id"]').val();
|
250 |
|
251 |
// Update the filename information in 'File' column
|
252 |
if (typeof newName == 'string') {
|
23 |
cols = $(cols);
|
24 |
cols.each(function() {
|
25 |
var col = $(this);
|
26 |
+
var id = col.find('input[data-name="id"]').val();
|
27 |
|
28 |
// Quick Renamer
|
29 |
(function() {
|
30 |
var wrap = col;
|
31 |
var button = wrap.find('.button.rename');
|
32 |
+
var input = wrap.find('input[data-name="filename"]');
|
33 |
|
34 |
button.on('click', function(ev) {
|
35 |
ev.preventDefault();
|
53 |
(function() {
|
54 |
var wrap = col;
|
55 |
var button = wrap.find('.button.auto-rename');
|
56 |
+
var input = wrap.find('input[data-name="filename"]');
|
57 |
|
58 |
button.on('mouseover', function(ev) {
|
59 |
if (isBusy(col)) return;
|
202 |
*/
|
203 |
function rename(col, newName) {
|
204 |
col = $(col);
|
205 |
+
var id = col.find('input[data-name="id"]').val();
|
206 |
|
207 |
var data = {
|
208 |
action: 'mfrh_rename_media',
|
246 |
*/
|
247 |
function update(col, newName) {
|
248 |
col = $(col);
|
249 |
+
var id = col.find('input[data-name="id"]').val();
|
250 |
|
251 |
// Update the filename information in 'File' column
|
252 |
if (typeof newName == 'string') {
|
style.css
CHANGED
@@ -75,20 +75,20 @@
|
|
75 |
height: 28px;
|
76 |
font-size: 11px;
|
77 |
}
|
78 |
-
.mfrh_column input[name="recommended-filename"] {
|
79 |
display: none;
|
80 |
background-color: white;
|
81 |
color: #0073aa;
|
82 |
}
|
83 |
-
.mfrh_column input[name="filename"].hidden {
|
84 |
display: none;
|
85 |
}
|
86 |
-
.mfrh_column input[name="filename"].hidden ~ input[name="recommended-filename"] {
|
87 |
display: inline-block;
|
88 |
}
|
89 |
-
.mfrh_column input[name="filename"].changed ~ .button.rename {
|
90 |
display: inline-block;
|
91 |
}
|
92 |
-
.mfrh_column input[name="filename"].changed ~ .button.auto-rename {
|
93 |
display: none;
|
94 |
}
|
75 |
height: 28px;
|
76 |
font-size: 11px;
|
77 |
}
|
78 |
+
.mfrh_column input[data-name="recommended-filename"] {
|
79 |
display: none;
|
80 |
background-color: white;
|
81 |
color: #0073aa;
|
82 |
}
|
83 |
+
.mfrh_column input[data-name="filename"].hidden {
|
84 |
display: none;
|
85 |
}
|
86 |
+
.mfrh_column input[data-name="filename"].hidden ~ input[data-name="recommended-filename"] {
|
87 |
display: inline-block;
|
88 |
}
|
89 |
+
.mfrh_column input[data-name="filename"].changed ~ .button.rename {
|
90 |
display: inline-block;
|
91 |
}
|
92 |
+
.mfrh_column input[data-name="filename"].changed ~ .button.auto-rename {
|
93 |
display: none;
|
94 |
}
|
views/column.php
CHANGED
@@ -12,14 +12,14 @@ $paged = isset( $_GET['paged'] ) ? ( '&paged=' . $_GET['paged'] ) : "";
|
|
12 |
$file = array (); // Various stats of the attachment
|
13 |
$needsRename = $core->check_attachment( get_post( $id, ARRAY_A ), $file );
|
14 |
?>
|
15 |
-
<input type="hidden" name="id" value="<?php echo $id; ?>">
|
16 |
|
17 |
<?php // Quick Renamer ?>
|
18 |
<?php $filename = mfrh_basename( get_attached_file( $id ) ); ?>
|
19 |
<?php $disabled = !( $admin->is_registered() && apply_filters( 'mfrh_manual', false ) ); ?>
|
20 |
-
<input type="text" name="filename" value="<?php esc_attr_e( $filename ); ?>" autocomplete="off" data-origin="<?php esc_attr_e( $filename ); ?>"<?php if ($disabled) echo ' readonly'; ?>>
|
21 |
<?php if ( isset( $file['desired_filename'] ) ): // i ?>
|
22 |
-
<input type="text" name="recommended-filename" value="<?php esc_attr_e( $file['desired_filename'] ); ?>" readonly>
|
23 |
<?php endif; // i ?>
|
24 |
<a href="#" class="button button-primary rename hidden">
|
25 |
<span class="label dashicons dashicons-edit"></span>
|
12 |
$file = array (); // Various stats of the attachment
|
13 |
$needsRename = $core->check_attachment( get_post( $id, ARRAY_A ), $file );
|
14 |
?>
|
15 |
+
<input type="hidden" data-name="id" value="<?php echo $id; ?>">
|
16 |
|
17 |
<?php // Quick Renamer ?>
|
18 |
<?php $filename = mfrh_basename( get_attached_file( $id ) ); ?>
|
19 |
<?php $disabled = !( $admin->is_registered() && apply_filters( 'mfrh_manual', false ) ); ?>
|
20 |
+
<input type="text" data-name="filename" value="<?php esc_attr_e( $filename ); ?>" autocomplete="off" data-origin="<?php esc_attr_e( $filename ); ?>"<?php if ($disabled) echo ' readonly'; ?>>
|
21 |
<?php if ( isset( $file['desired_filename'] ) ): // i ?>
|
22 |
+
<input type="text" data-name="recommended-filename" value="<?php esc_attr_e( $file['desired_filename'] ); ?>" readonly>
|
23 |
<?php endif; // i ?>
|
24 |
<a href="#" class="button button-primary rename hidden">
|
25 |
<span class="label dashicons dashicons-edit"></span>
|