Version Description
- Add: Support for Uber, Easy Real Estate.
- Update: Admin CSS and texts.
- Fix: A rare but wrong call to the log() function was causing the plugin to fail.
- Update: Clean the options. Now, the Content option replaces Posts/Meta/Widgets (they were useless in a way).
- Add: Support for WP-CLI (have a look at the how-it-works.txt) in the Pro. Now, scanning can be 100x times faster.
- Add: Option Live Site in the Pro.
Download this release
Release Info
Developer | TigrouMeow |
Plugin | Media Cleaner |
Version | 5.4.0 |
Comparing to | |
See all releases |
Code changes from version 5.2.4 to 5.4.0
- admin.php +59 -34
- api.php +2 -2
- common/admin.css +4 -1
- common/admin.php +36 -12
- core.php +21 -3
- engine.php +5 -4
- media-cleaner.php +2 -2
- parsers/woocommerce.php +5 -1
- readme.txt +23 -6
- ui.php +1 -0
- views/menu-screen.php +20 -1
admin.php
CHANGED
@@ -80,18 +80,24 @@ class Meow_WPMC_Admin extends MeowApps_Admin {
|
|
80 |
add_settings_field( 'wpmc_method', "Method",
|
81 |
array( $this, 'admin_method_callback' ),
|
82 |
'wpmc_settings-menu', 'wpmc_settings' );
|
83 |
-
|
84 |
-
|
85 |
-
'wpmc_settings-menu', 'wpmc_settings' );
|
86 |
-
add_settings_field( 'wpmc_posts', "Posts",
|
87 |
-
array( $this, 'admin_posts_callback' ),
|
88 |
'wpmc_settings-menu', 'wpmc_settings' );
|
89 |
-
add_settings_field( '
|
90 |
-
array( $this, '
|
91 |
'wpmc_settings-menu', 'wpmc_settings' );
|
92 |
-
add_settings_field( '
|
93 |
-
array( $this, '
|
94 |
'wpmc_settings-menu', 'wpmc_settings' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
95 |
// add_settings_field( 'wpmc_shortcode', "Shortcodes<br />(Pro)",
|
96 |
// array( $this, 'admin_shortcode_callback' ),
|
97 |
// 'wpmc_settings-menu', 'wpmc_settings' );
|
@@ -153,12 +159,14 @@ class Meow_WPMC_Admin extends MeowApps_Admin {
|
|
153 |
|
154 |
// SETTINGS
|
155 |
register_setting( 'wpmc_settings', 'wpmc_method' );
|
156 |
-
register_setting( 'wpmc_settings', '
|
|
|
|
|
157 |
// register_setting( 'wpmc_settings', 'wpmc_shortcode' );
|
158 |
// register_setting( 'wpmc_settings', 'wpmc_background' );
|
159 |
-
register_setting( 'wpmc_settings', 'wpmc_widgets' );
|
160 |
register_setting( 'wpmc_settings', 'wpmc_media_library' );
|
161 |
-
register_setting( 'wpmc_settings', 'wpmc_postmeta' );
|
162 |
register_setting( 'wpmc_settings', 'wpmc_debuglogs' );
|
163 |
|
164 |
register_setting( 'wpmc_filters_settings', 'wpmc_thumbnails_only' );
|
@@ -213,7 +221,7 @@ class Meow_WPMC_Admin extends MeowApps_Admin {
|
|
213 |
<div class="meow-box meow-col meow-span_2_of_2">
|
214 |
<h3>How to use</h3>
|
215 |
<div class="inside">
|
216 |
-
<?php echo _e( "You can choose two kind of methods,
|
217 |
<p class="submit">
|
218 |
<a class="button button-primary" href="upload.php?page=media-cleaner"><?php echo _e( "Access Media Cleaner Dashboard", 'media-cleaner' ); ?></a>
|
219 |
</p>
|
@@ -322,10 +330,10 @@ class Meow_WPMC_Admin extends MeowApps_Admin {
|
|
322 |
$html = '<select id="wpmc_method" name="wpmc_method">
|
323 |
<option ' . selected( 'media', $value, false ) . 'value="media">Media Library</option>
|
324 |
<option ' . disabled( $this->is_registered(), false, false ) . ' ' . selected( 'files', $value, false ) . 'value="files">Filesystem (Pro)</option>
|
325 |
-
</select><small><br />' . __( 'Check the <a target="_blank" href="
|
326 |
|
327 |
// TODO: This is temporary
|
328 |
-
$html .= '<br /><br /><small><b style="color: red;">Notice: </b><b> Those settings will be simplified soon. Have a look <a href="https://trello.com/c/qrCuITg8/55-cleaner-simplification-of-the-settings" target="_blank">here</a> and let me know in the comments if you like the idea or not.</b></small>';
|
329 |
|
330 |
echo $html;
|
331 |
}
|
@@ -374,34 +382,51 @@ class Meow_WPMC_Admin extends MeowApps_Admin {
|
|
374 |
$value = get_option( 'wpmc_media_library', true );
|
375 |
$html = '<input type="checkbox" id="wpmc_media_library" name="wpmc_media_library" value="1" ' .
|
376 |
disabled( get_option( 'wpmc_method', 'media' ) == 'files', false, false ) . ' ' .
|
377 |
-
checked( 1,
|
378 |
-
$html .= '<label>Check</label><br /><small>Checks if the file is linked to a media. Only
|
379 |
echo $html;
|
380 |
}
|
381 |
|
382 |
-
function
|
383 |
-
$value = get_option( '
|
384 |
-
$html = '<input type="checkbox" id="
|
385 |
-
checked( 1,
|
386 |
-
$html .= '<label>
|
387 |
echo $html;
|
388 |
}
|
389 |
|
390 |
-
function
|
391 |
-
$value = get_option( '
|
392 |
-
$html = '<input
|
393 |
-
|
394 |
-
|
|
|
395 |
echo $html;
|
396 |
}
|
397 |
|
398 |
-
function
|
399 |
-
|
400 |
-
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
405 |
|
406 |
function admin_hide_thumbnails_callback( $args ) {
|
407 |
$value = get_option( 'wpmc_hide_thumbnails', null );
|
80 |
add_settings_field( 'wpmc_method', "Method",
|
81 |
array( $this, 'admin_method_callback' ),
|
82 |
'wpmc_settings-menu', 'wpmc_settings' );
|
83 |
+
add_settings_field( 'wpmc_content', "Content",
|
84 |
+
array( $this, 'admin_content_callback' ),
|
|
|
|
|
|
|
85 |
'wpmc_settings-menu', 'wpmc_settings' );
|
86 |
+
add_settings_field( 'wpmc_media_library', "Media Library",
|
87 |
+
array( $this, 'admin_media_library_callback' ),
|
88 |
'wpmc_settings-menu', 'wpmc_settings' );
|
89 |
+
add_settings_field( 'wpmc_live_content', "Live Content<br />(Pro)",
|
90 |
+
array( $this, 'admin_live_content_callback' ),
|
91 |
'wpmc_settings-menu', 'wpmc_settings' );
|
92 |
+
// add_settings_field( 'wpmc_posts', "Posts",
|
93 |
+
// array( $this, 'admin_posts_callback' ),
|
94 |
+
// 'wpmc_settings-menu', 'wpmc_settings' );
|
95 |
+
// add_settings_field( 'wpmc_postmeta', "Post Meta",
|
96 |
+
// array( $this, 'admin_postmeta_callback' ),
|
97 |
+
// 'wpmc_settings-menu', 'wpmc_settings' );
|
98 |
+
// add_settings_field( 'wpmc_widgets', "Widgets",
|
99 |
+
// array( $this, 'admin_widgets_callback' ),
|
100 |
+
// 'wpmc_settings-menu', 'wpmc_settings' );
|
101 |
// add_settings_field( 'wpmc_shortcode', "Shortcodes<br />(Pro)",
|
102 |
// array( $this, 'admin_shortcode_callback' ),
|
103 |
// 'wpmc_settings-menu', 'wpmc_settings' );
|
159 |
|
160 |
// SETTINGS
|
161 |
register_setting( 'wpmc_settings', 'wpmc_method' );
|
162 |
+
register_setting( 'wpmc_settings', 'wpmc_content' );
|
163 |
+
register_setting( 'wpmc_settings', 'wpmc_live_content' );
|
164 |
+
// register_setting( 'wpmc_settings', 'wpmc_posts' );
|
165 |
// register_setting( 'wpmc_settings', 'wpmc_shortcode' );
|
166 |
// register_setting( 'wpmc_settings', 'wpmc_background' );
|
167 |
+
// register_setting( 'wpmc_settings', 'wpmc_widgets' );
|
168 |
register_setting( 'wpmc_settings', 'wpmc_media_library' );
|
169 |
+
// register_setting( 'wpmc_settings', 'wpmc_postmeta' );
|
170 |
register_setting( 'wpmc_settings', 'wpmc_debuglogs' );
|
171 |
|
172 |
register_setting( 'wpmc_filters_settings', 'wpmc_thumbnails_only' );
|
221 |
<div class="meow-box meow-col meow-span_2_of_2">
|
222 |
<h3>How to use</h3>
|
223 |
<div class="inside">
|
224 |
+
<?php echo _e( "You can choose two kind of methods. Usually, users like to analyze their Media Library for images which are not in used (Media Library Method + Content Check), and then, their Filesystem for images which aren't registered in the Media Library (Filesystem Method + Media Library Check). Check the <a target=\"_blank\" href=\"https://meowapps.com/media-cleaner-tutorial/\">tutorial</a> for more information.", 'media-cleaner' ); ?>
|
225 |
<p class="submit">
|
226 |
<a class="button button-primary" href="upload.php?page=media-cleaner"><?php echo _e( "Access Media Cleaner Dashboard", 'media-cleaner' ); ?></a>
|
227 |
</p>
|
330 |
$html = '<select id="wpmc_method" name="wpmc_method">
|
331 |
<option ' . selected( 'media', $value, false ) . 'value="media">Media Library</option>
|
332 |
<option ' . disabled( $this->is_registered(), false, false ) . ' ' . selected( 'files', $value, false ) . 'value="files">Filesystem (Pro)</option>
|
333 |
+
</select><small><br />' . __( 'Check the <a target="_blank" href="https://meowapps.com/media-cleaner-tutorial/">tutorial</a> for more information.', 'media-cleaner' ) . '</small>';
|
334 |
|
335 |
// TODO: This is temporary
|
336 |
+
// $html .= '<br /><br /><small><b style="color: red;">Notice: </b><b> Those settings will be simplified soon. Have a look <a href="https://trello.com/c/qrCuITg8/55-cleaner-simplification-of-the-settings" target="_blank">here</a> and let me know in the comments if you like the idea or not.</b></small>';
|
337 |
|
338 |
echo $html;
|
339 |
}
|
382 |
$value = get_option( 'wpmc_media_library', true );
|
383 |
$html = '<input type="checkbox" id="wpmc_media_library" name="wpmc_media_library" value="1" ' .
|
384 |
disabled( get_option( 'wpmc_method', 'media' ) == 'files', false, false ) . ' ' .
|
385 |
+
checked( 1, $value, false ) . '/>';
|
386 |
+
$html .= '<label>Check</label><br /><small>Checks if the file is linked to a media. <i>Only matters to the Filesystem Method.</i></small>';
|
387 |
echo $html;
|
388 |
}
|
389 |
|
390 |
+
function admin_content_callback( $args ) {
|
391 |
+
$value = get_option( 'wpmc_content', true );
|
392 |
+
$html = '<input type="checkbox" id="wpmc_content" name="wpmc_content" value="1" ' .
|
393 |
+
checked( 1, $value, false ) . '/>';
|
394 |
+
$html .= '<label>Check</label><br /><small>Check if the media/file is used in the content, such as Posts, Pages (and other Post Types), Metadata, Widgets, etc.</small>';
|
395 |
echo $html;
|
396 |
}
|
397 |
|
398 |
+
function admin_live_content_callback( $args ) {
|
399 |
+
$value = get_option( 'wpmc_live_content', false );
|
400 |
+
$html = '<input ' . disabled( $this->is_registered(), false, false ) .
|
401 |
+
' type="checkbox" id="wpmc_content" name="wpmc_live_content" value="1" ' .
|
402 |
+
checked( 1, $value, false ) . '/>';
|
403 |
+
$html .= '<label>Check</label><br /><small>The live version of the website will be also analyzed (as if a visitor was loading it). <i>This will increase the accuracy of the results.</i></small>';
|
404 |
echo $html;
|
405 |
}
|
406 |
|
407 |
+
// function admin_posts_callback( $args ) {
|
408 |
+
// $value = get_option( 'wpmc_posts', true );
|
409 |
+
// $html = '<input type="checkbox" id="wpmc_posts" name="wpmc_posts" value="1" ' .
|
410 |
+
// checked( 1, get_option( 'wpmc_posts' ), false ) . '/>';
|
411 |
+
// $html .= '<label>Analyze</label><br /><small>Check if the media/file is used by any post types.</small>';
|
412 |
+
// echo $html;
|
413 |
+
// }
|
414 |
+
|
415 |
+
// function admin_postmeta_callback( $args ) {
|
416 |
+
// $value = get_option( 'wpmc_postmeta', true );
|
417 |
+
// $html = '<input type="checkbox" id="wpmc_postmeta" name="wpmc_postmeta" value="1" ' .
|
418 |
+
// checked( 1, get_option( 'wpmc_postmeta' ), false ) . '/>';
|
419 |
+
// $html .= '<label>Analyze</label><br /><small>Checks if the media/file is used in the meta.</small>';
|
420 |
+
// echo $html;
|
421 |
+
// }
|
422 |
+
|
423 |
+
// function admin_widgets_callback( $args ) {
|
424 |
+
// $value = get_option( 'wpmc_widgets', false );
|
425 |
+
// $html = '<input type="checkbox" id="wpmc_widgets" name="wpmc_widgets" value="1" ' .
|
426 |
+
// checked( 1, get_option( 'wpmc_widgets' ), false ) . '/>';
|
427 |
+
// $html .= '<label>Analyze</label><br /><small>Checks if the media/file is used by any widget.</small>';
|
428 |
+
// echo $html;
|
429 |
+
// }
|
430 |
|
431 |
function admin_hide_thumbnails_callback( $args ) {
|
432 |
$value = get_option( 'wpmc_hide_thumbnails', null );
|
api.php
CHANGED
@@ -50,8 +50,8 @@ class Meow_WPMC_API {
|
|
50 |
if ( $files === null ) {
|
51 |
$output = array(
|
52 |
'results' => array(),
|
53 |
-
'success' =>
|
54 |
-
'message' => __( "
|
55 |
);
|
56 |
}
|
57 |
else {
|
50 |
if ( $files === null ) {
|
51 |
$output = array(
|
52 |
'results' => array(),
|
53 |
+
'success' => true,
|
54 |
+
'message' => __( "No files for this path ($path).", 'media-cleaner' )
|
55 |
);
|
56 |
}
|
57 |
else {
|
common/admin.css
CHANGED
@@ -308,11 +308,14 @@
|
|
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 |
|
308 |
margin: 0px;
|
309 |
}
|
310 |
|
311 |
+
.meow-featured-plugins .meow-box li {
|
312 |
+
min-height: 80px;
|
313 |
+
}
|
314 |
+
|
315 |
.meow-dashboard .meow-box li {
|
316 |
border-bottom: 1px solid #eee;
|
317 |
margin: 0px;
|
318 |
padding: 10px;
|
|
|
319 |
box-sizing: border-box;
|
320 |
}
|
321 |
|
common/admin.php
CHANGED
@@ -7,7 +7,7 @@ if ( !class_exists( 'MeowApps_Admin' ) ) {
|
|
7 |
public static $logo = 'data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxIiB2aWV3Qm94PSIwIDAgMTY1IDE2NSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICA8c3R5bGU+CiAgICAuc3Qye2ZpbGw6IzgwNDYyNX0uc3Qze2ZpbGw6I2ZkYTk2MH0KICA8L3N0eWxlPgogIDxwYXRoIGQ9Ik03MiA3YTc2IDc2IDAgMCAxIDg0IDkxQTc1IDc1IDAgMSAxIDcyIDd6IiBmaWxsPSIjNGE2YjhjIi8+CiAgPHBhdGggZD0iTTQ4IDQ4YzIgNSAyIDEwIDUgMTQgNSA4IDEzIDE3IDIyIDIwbDEtMTBjMS0yIDMtMyA1LTNoMTNjMiAwIDQgMSA1IDNsMyA5IDQtMTBjMi0zIDYtMiA5LTJoMTFjMyAyIDMgNSAzIDhsMiAzN2MwIDMtMSA3LTQgOGgtMTJjLTIgMC0zLTItNS00LTEgMS0yIDMtNCAzLTUgMS05IDEtMTMtMS0zIDItNSAyLTkgMnMtOSAxLTEwLTNjLTItNC0xLTggMC0xMi04LTMtMTUtNy0yMi0xMi03LTctMTUtMTQtMjAtMjMtMy00LTUtOC01LTEzIDEtNCAzLTEwIDYtMTMgNC0zIDEyLTIgMTUgMnoiIGZpbGw9IiMxMDEwMTAiLz4KICA8cGF0aCBjbGFzcz0ic3QyIiBkPSJNNDMgNTFsNCAxMS02IDVoLTZjLTMtNS0zLTExIDAtMTYgMi0yIDYtMyA4IDB6Ii8+CiAgPHBhdGggY2xhc3M9InN0MyIgZD0iTTQ3IDYybDMgNmMwIDMgMCA0LTIgNnMtNCAyLTcgMmwtNi05aDZsNi01eiIvPgogIDxwYXRoIGNsYXNzPSJzdDIiIGQ9Ik01MCA2OGw4IDljLTMgMy01IDYtOSA4bC04LTljMyAwIDUgMCA3LTJzMy0zIDItNnoiLz4KICA8cGF0aCBkPSJNODIgNzRoMTJsNSAxOCAzIDExIDgtMjloMTNsMiA0MmgtOGwtMS0yLTEtMzEtMTAgMzItNyAxLTktMzMtMSAyOS0xIDRoLThsMy00MnoiIGZpbGw9IiNmZmYiLz4KICA8cGF0aCBjbGFzcz0ic3QzIiBkPSJNNTggNzdsNSA1Yy0xIDQtMiA4LTcgOGwtNy01YzQtMiA2LTUgOS04eiIvPgogIDxwYXRoIGNsYXNzPSJzdDIiIGQ9Ik02MyA4Mmw5IDUtNiA5LTEwLTZjNSAwIDYtNCA3LTh6Ii8+CiAgPHBhdGggY2xhc3M9InN0MyIgZD0iTTcyIDg3bDMgMS0xIDExLTgtMyA2LTEweiIvPgo8L3N2Zz4K';
|
8 |
|
9 |
public static $loaded = false;
|
10 |
-
public static $admin_version = "
|
11 |
|
12 |
public $prefix; // prefix used for actions, filters (mfrh)
|
13 |
public $mainfile; // plugin main file (media-file-renamer.php)
|
@@ -44,6 +44,12 @@ if ( !class_exists( 'MeowApps_Admin' ) ) {
|
|
44 |
}
|
45 |
}
|
46 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
47 |
}
|
48 |
|
49 |
function show_meowapps_create_rating_date() {
|
@@ -147,7 +153,7 @@ if ( !class_exists( 'MeowApps_Admin' ) ) {
|
|
147 |
|
148 |
function display_title( $title = "Meow Apps",
|
149 |
$author = "By <a style='text-decoration: none;' href='https://meowapps.com' target='_blank'>Jordy Meow</a>" ) {
|
150 |
-
if ( !empty( $this->prefix ) )
|
151 |
$title = apply_filters( $this->prefix . '_plugin_title', $title );
|
152 |
if ( $this->display_ads() ) {
|
153 |
}
|
@@ -190,9 +196,9 @@ if ( !class_exists( 'MeowApps_Admin' ) ) {
|
|
190 |
add_settings_field( 'meowapps_force_sslverify', "SSL Verify",
|
191 |
array( $this, 'meowapps_force_sslverify_callback' ),
|
192 |
'meowapps_common_settings-menu', 'meowapps_common_settings' );
|
193 |
-
add_settings_field( 'meowapps_hide_ads', "Ads",
|
194 |
-
|
195 |
-
|
196 |
register_setting( 'meowapps_common_settings', 'force_sslverify' );
|
197 |
register_setting( 'meowapps_common_settings', 'meowapps_hide_meowapps' );
|
198 |
register_setting( 'meowapps_common_settings', 'meowapps_hide_ads' );
|
@@ -334,14 +340,15 @@ if ( !class_exists( 'MeowApps_Admin' ) ) {
|
|
334 |
else {
|
335 |
|
336 |
?>
|
337 |
-
<?php $this->display_title(); ?>
|
338 |
<p>
|
339 |
<?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' )
|
340 |
?>
|
341 |
</p>
|
342 |
-
|
|
|
|
|
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 />
|
@@ -355,7 +362,6 @@ if ( !class_exists( 'MeowApps_Admin' ) ) {
|
|
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 />
|
@@ -370,6 +376,27 @@ if ( !class_exists( 'MeowApps_Admin' ) ) {
|
|
370 |
</div>
|
371 |
</div>
|
372 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
373 |
<div class="meow-row">
|
374 |
<div class="meow-box meow-col meow-span_2_of_3">
|
375 |
<h3><span class="dashicons dashicons-admin-tools"></span> Common</h3>
|
@@ -409,11 +436,8 @@ if ( !class_exists( 'MeowApps_Admin' ) ) {
|
|
409 |
</div>
|
410 |
</div>
|
411 |
|
412 |
-
|
413 |
<?php
|
414 |
-
|
415 |
}
|
416 |
-
|
417 |
echo "<br /><small style='color: lightgray;'>Meow Admin " . MeowApps_Admin::$admin_version . "</small></div>";
|
418 |
}
|
419 |
|
7 |
public static $logo = 'data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxIiB2aWV3Qm94PSIwIDAgMTY1IDE2NSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICA8c3R5bGU+CiAgICAuc3Qye2ZpbGw6IzgwNDYyNX0uc3Qze2ZpbGw6I2ZkYTk2MH0KICA8L3N0eWxlPgogIDxwYXRoIGQ9Ik03MiA3YTc2IDc2IDAgMCAxIDg0IDkxQTc1IDc1IDAgMSAxIDcyIDd6IiBmaWxsPSIjNGE2YjhjIi8+CiAgPHBhdGggZD0iTTQ4IDQ4YzIgNSAyIDEwIDUgMTQgNSA4IDEzIDE3IDIyIDIwbDEtMTBjMS0yIDMtMyA1LTNoMTNjMiAwIDQgMSA1IDNsMyA5IDQtMTBjMi0zIDYtMiA5LTJoMTFjMyAyIDMgNSAzIDhsMiAzN2MwIDMtMSA3LTQgOGgtMTJjLTIgMC0zLTItNS00LTEgMS0yIDMtNCAzLTUgMS05IDEtMTMtMS0zIDItNSAyLTkgMnMtOSAxLTEwLTNjLTItNC0xLTggMC0xMi04LTMtMTUtNy0yMi0xMi03LTctMTUtMTQtMjAtMjMtMy00LTUtOC01LTEzIDEtNCAzLTEwIDYtMTMgNC0zIDEyLTIgMTUgMnoiIGZpbGw9IiMxMDEwMTAiLz4KICA8cGF0aCBjbGFzcz0ic3QyIiBkPSJNNDMgNTFsNCAxMS02IDVoLTZjLTMtNS0zLTExIDAtMTYgMi0yIDYtMyA4IDB6Ii8+CiAgPHBhdGggY2xhc3M9InN0MyIgZD0iTTQ3IDYybDMgNmMwIDMgMCA0LTIgNnMtNCAyLTcgMmwtNi05aDZsNi01eiIvPgogIDxwYXRoIGNsYXNzPSJzdDIiIGQ9Ik01MCA2OGw4IDljLTMgMy01IDYtOSA4bC04LTljMyAwIDUgMCA3LTJzMy0zIDItNnoiLz4KICA8cGF0aCBkPSJNODIgNzRoMTJsNSAxOCAzIDExIDgtMjloMTNsMiA0MmgtOGwtMS0yLTEtMzEtMTAgMzItNyAxLTktMzMtMSAyOS0xIDRoLThsMy00MnoiIGZpbGw9IiNmZmYiLz4KICA8cGF0aCBjbGFzcz0ic3QzIiBkPSJNNTggNzdsNSA1Yy0xIDQtMiA4LTcgOGwtNy01YzQtMiA2LTUgOS04eiIvPgogIDxwYXRoIGNsYXNzPSJzdDIiIGQ9Ik02MyA4Mmw5IDUtNiA5LTEwLTZjNSAwIDYtNCA3LTh6Ii8+CiAgPHBhdGggY2xhc3M9InN0MyIgZD0iTTcyIDg3bDMgMS0xIDExLTgtMyA2LTEweiIvPgo8L3N2Zz4K';
|
8 |
|
9 |
public static $loaded = false;
|
10 |
+
public static $admin_version = "2.0";
|
11 |
|
12 |
public $prefix; // prefix used for actions, filters (mfrh)
|
13 |
public $mainfile; // plugin main file (media-file-renamer.php)
|
44 |
}
|
45 |
}
|
46 |
}
|
47 |
+
|
48 |
+
add_filter( 'edd_sl_api_request_verify_ssl', array( $this, 'request_verify_ssl' ), 10, 0 );
|
49 |
+
}
|
50 |
+
|
51 |
+
function request_verify_ssl() {
|
52 |
+
return get_option( 'force_sslverify', false );
|
53 |
}
|
54 |
|
55 |
function show_meowapps_create_rating_date() {
|
153 |
|
154 |
function display_title( $title = "Meow Apps",
|
155 |
$author = "By <a style='text-decoration: none;' href='https://meowapps.com' target='_blank'>Jordy Meow</a>" ) {
|
156 |
+
if ( !empty( $this->prefix ) && $title !== "Meow Apps" )
|
157 |
$title = apply_filters( $this->prefix . '_plugin_title', $title );
|
158 |
if ( $this->display_ads() ) {
|
159 |
}
|
196 |
add_settings_field( 'meowapps_force_sslverify', "SSL Verify",
|
197 |
array( $this, 'meowapps_force_sslverify_callback' ),
|
198 |
'meowapps_common_settings-menu', 'meowapps_common_settings' );
|
199 |
+
// add_settings_field( 'meowapps_hide_ads', "Ads",
|
200 |
+
// array( $this, 'meowapps_hide_ads_callback' ),
|
201 |
+
// 'meowapps_common_settings-menu', 'meowapps_common_settings' );
|
202 |
register_setting( 'meowapps_common_settings', 'force_sslverify' );
|
203 |
register_setting( 'meowapps_common_settings', 'meowapps_hide_meowapps' );
|
204 |
register_setting( 'meowapps_common_settings', 'meowapps_hide_ads' );
|
340 |
else {
|
341 |
|
342 |
?>
|
343 |
+
<?php $this->display_title( 'Meow Apps' ); ?>
|
344 |
<p>
|
345 |
<?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' )
|
346 |
?>
|
347 |
</p>
|
348 |
+
|
349 |
+
<h2 style="margin-bottom: 0px; margin-top: 25px;">Featured Plugins</h2>
|
350 |
+
<div class="meow-row meow-featured-plugins">
|
351 |
<div class="meow-box meow-col meow-span_1_of_2 ">
|
|
|
352 |
<ul class="">
|
353 |
<li><img src='<?= $this->common_url( 'img/wplr-sync.jpg' ) ?>' /><b>WP/LR Sync</b>
|
354 |
<?php echo $this->check_install( 'wplr-sync' ) ?><br />
|
362 |
</ul>
|
363 |
</div>
|
364 |
<div class="meow-box meow-col meow-span_1_of_2">
|
|
|
365 |
<ul class="">
|
366 |
<li><img src='<?= $this->common_url( 'img/media-file-renamer.jpg' ) ?>' /><b>Media File Renamer</b>
|
367 |
<?php echo $this->check_install( 'media-file-renamer' ) ?><br />
|
376 |
</div>
|
377 |
</div>
|
378 |
|
379 |
+
<h2>Recommendations</h2>
|
380 |
+
<div style="background: white; padding: 5px 15px 5px 15px; box-shadow: 2px 2px 1px rgba(0,0,0,.02);">
|
381 |
+
<p>
|
382 |
+
<?php _e( 'Too many WordPress installs are blown-up with useless and/or huge plugins, and bad practices. But that is because most users are overwhelmed by the diversity and immensity of the WordPress jungle. One rule of thumb is to keep your install the simplest as possible, with the least amount of plugins, in number and weight.', 'meowapps' )?>
|
383 |
+
</p>
|
384 |
+
<p>
|
385 |
+
<?php _e( 'Articles are kept being updated on the Meow Apps website, with all the latest recommendations. Please have a look and make your WordPress simpler, faster, better: ', 'meowapps' )?>
|
386 |
+
<a href='https://meowapps.com/debugging-wordpress/' target='_blank'>
|
387 |
+
How To Debug</a>,
|
388 |
+
<a href='https://meowapps.com/seo-optimization/' target='_blank'>
|
389 |
+
SEO Checklist & Optimization</a>,
|
390 |
+
<a href='https://meowapps.com/clean-optimize-wordpress/' target='_blank'>
|
391 |
+
Clean Up and Optimize</a>,
|
392 |
+
<a href='https://meowapps.com/optimize-images-cdn/' target='_blank'>
|
393 |
+
Optimize Images</a>,
|
394 |
+
<a href='https://meowapps.com/best-hosting-services-wordpress/' target='_blank'>
|
395 |
+
Best Hosting Services</a>.
|
396 |
+
</p>
|
397 |
+
</div>
|
398 |
+
|
399 |
+
<h2 style="margin-bottom: 0px; margin-top: 25px;">Common Options & Tools</h2>
|
400 |
<div class="meow-row">
|
401 |
<div class="meow-box meow-col meow-span_2_of_3">
|
402 |
<h3><span class="dashicons dashicons-admin-tools"></span> Common</h3>
|
436 |
</div>
|
437 |
</div>
|
438 |
|
|
|
439 |
<?php
|
|
|
440 |
}
|
|
|
441 |
echo "<br /><small style='color: lightgray;'>Meow Admin " . MeowApps_Admin::$admin_version . "</small></div>";
|
442 |
}
|
443 |
|
core.php
CHANGED
@@ -11,6 +11,7 @@ class Meow_WPMC_Core {
|
|
11 |
public $servername = null;
|
12 |
public $upload_folder = null;
|
13 |
public $contentDir = null; // becomes 'wp-content/uploads'
|
|
|
14 |
private $check_postmeta = null;
|
15 |
private $check_posts = null;
|
16 |
private $check_widgets = null;
|
@@ -26,9 +27,18 @@ class Meow_WPMC_Core {
|
|
26 |
$this->servername = str_replace( 'http://', '', str_replace( 'https://', '', $this->site_url ) );
|
27 |
$this->upload_folder = wp_upload_dir();
|
28 |
$this->contentDir = substr( $this->upload_folder['baseurl'], 1 + strlen( $this->site_url ) );
|
|
|
|
|
29 |
$this->check_postmeta = get_option( 'wpmc_postmeta', false );
|
30 |
$this->check_posts = get_option( 'wpmc_posts', false );
|
31 |
$this->check_widgets = get_option( 'wpmc_widgets', false );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
32 |
$this->debug_logs = get_option( 'wpmc_debuglogs', false );
|
33 |
add_action( 'wpmc_initialize_parsers', array( $this, 'initialize_parsers' ), 10, 0 );
|
34 |
|
@@ -164,7 +174,7 @@ class Meow_WPMC_Core {
|
|
164 |
|
165 |
// IFrames (by Mike Meinz)
|
166 |
$iframes = $dom->getElementsByTagName( 'iframe' );
|
167 |
-
foreach($iframes as $iframe) {
|
168 |
$iframe_src = $iframe->getAttribute( 'src' );
|
169 |
// Ignore if the iframe src is not on this server
|
170 |
if ( ( strpos( $iframe_src, $this->servername ) !== false) || ( substr( $iframe_src, 0, 1 ) == "/" ) ) {
|
@@ -189,7 +199,7 @@ class Meow_WPMC_Core {
|
|
189 |
else {
|
190 |
$err = 'ERROR: Failed to load iframe: ' . $iframe_src;
|
191 |
error_log( $err );
|
192 |
-
$this->
|
193 |
}
|
194 |
}
|
195 |
}
|
@@ -289,6 +299,14 @@ class Meow_WPMC_Core {
|
|
289 |
if ( $this->is_url( $cl ) ) {
|
290 |
$urls = array_merge( $this->get_urls_from_html( $cl ), $urls );
|
291 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
292 |
$cd = get_background_image();
|
293 |
if ( $this->is_url( $cd ) ) {
|
294 |
array_push( $urls, $this->clean_url( $cd ) );
|
@@ -813,7 +831,7 @@ class Meow_WPMC_Core {
|
|
813 |
if ( file_exists( $fullpath ) ) {
|
814 |
|
815 |
// Special scan: Broken only!
|
816 |
-
if ( !$this->check_postmeta && !$this->check_posts && !$this->check_widgets )
|
817 |
return true;
|
818 |
|
819 |
$size = filesize( $fullpath );
|
11 |
public $servername = null;
|
12 |
public $upload_folder = null;
|
13 |
public $contentDir = null; // becomes 'wp-content/uploads'
|
14 |
+
private $check_content = null;
|
15 |
private $check_postmeta = null;
|
16 |
private $check_posts = null;
|
17 |
private $check_widgets = null;
|
27 |
$this->servername = str_replace( 'http://', '', str_replace( 'https://', '', $this->site_url ) );
|
28 |
$this->upload_folder = wp_upload_dir();
|
29 |
$this->contentDir = substr( $this->upload_folder['baseurl'], 1 + strlen( $this->site_url ) );
|
30 |
+
|
31 |
+
$this->check_content = get_option( 'wpmc_content', true );
|
32 |
$this->check_postmeta = get_option( 'wpmc_postmeta', false );
|
33 |
$this->check_posts = get_option( 'wpmc_posts', false );
|
34 |
$this->check_widgets = get_option( 'wpmc_widgets', false );
|
35 |
+
|
36 |
+
if ( $this->check_postmeta || $this->check_posts || $this->check_widgets ) {
|
37 |
+
delete_option( 'wpmc_postmeta' );
|
38 |
+
delete_option( 'wpmc_posts' );
|
39 |
+
delete_option( 'wpmc_widgets' );
|
40 |
+
}
|
41 |
+
|
42 |
$this->debug_logs = get_option( 'wpmc_debuglogs', false );
|
43 |
add_action( 'wpmc_initialize_parsers', array( $this, 'initialize_parsers' ), 10, 0 );
|
44 |
|
174 |
|
175 |
// IFrames (by Mike Meinz)
|
176 |
$iframes = $dom->getElementsByTagName( 'iframe' );
|
177 |
+
foreach( $iframes as $iframe ) {
|
178 |
$iframe_src = $iframe->getAttribute( 'src' );
|
179 |
// Ignore if the iframe src is not on this server
|
180 |
if ( ( strpos( $iframe_src, $this->servername ) !== false) || ( substr( $iframe_src, 0, 1 ) == "/" ) ) {
|
199 |
else {
|
200 |
$err = 'ERROR: Failed to load iframe: ' . $iframe_src;
|
201 |
error_log( $err );
|
202 |
+
$this->log( $err );
|
203 |
}
|
204 |
}
|
205 |
}
|
299 |
if ( $this->is_url( $cl ) ) {
|
300 |
$urls = array_merge( $this->get_urls_from_html( $cl ), $urls );
|
301 |
}
|
302 |
+
$si = get_site_icon_url();
|
303 |
+
if ( $this->is_url( $si ) ) {
|
304 |
+
array_push( $urls, $this->clean_url( $si ) );
|
305 |
+
}
|
306 |
+
$si_id = get_option( 'site_icon' );
|
307 |
+
if ( !empty( $si_id ) && is_numeric( $si_id ) ) {
|
308 |
+
array_push( $ids, (int)$si_id );
|
309 |
+
}
|
310 |
$cd = get_background_image();
|
311 |
if ( $this->is_url( $cd ) ) {
|
312 |
array_push( $urls, $this->clean_url( $cd ) );
|
831 |
if ( file_exists( $fullpath ) ) {
|
832 |
|
833 |
// Special scan: Broken only!
|
834 |
+
if ( !$this->check_content && !$this->check_postmeta && !$this->check_posts && !$this->check_widgets )
|
835 |
return true;
|
836 |
|
837 |
$size = filesize( $fullpath );
|
engine.php
CHANGED
@@ -18,15 +18,16 @@ class Meow_WPMC_Engine {
|
|
18 |
|
19 |
$method = get_option( 'wpmc_method', 'media' );
|
20 |
$check_library = get_option(' wpmc_media_library', true );
|
|
|
21 |
$check_postmeta = get_option( 'wpmc_postmeta', false );
|
22 |
$check_posts = get_option( 'wpmc_posts', false );
|
23 |
$check_widgets = get_option( 'wpmc_widgets', false );
|
24 |
|
25 |
-
if ( $method == 'media' &&
|
26 |
$message = __( "Posts, Meta and Widgets analysis are all off. Done.", 'media-cleaner' );
|
27 |
return true;
|
28 |
}
|
29 |
-
if ( $method == 'files' && $check_library && !$check_posts && !$check_postmeta && !$check_widgets ) {
|
30 |
$message = __( "Posts, Meta and Widgets analysis are all off. Done.", 'media-cleaner' );
|
31 |
return true;
|
32 |
}
|
@@ -84,11 +85,11 @@ class Meow_WPMC_Engine {
|
|
84 |
$this->core->timeout_check();
|
85 |
|
86 |
// Check Meta
|
87 |
-
if ( $check_postmeta )
|
88 |
do_action( 'wpmc_scan_postmeta', $post );
|
89 |
|
90 |
// Check Posts
|
91 |
-
if ( $check_posts ) {
|
92 |
// Get HTML for this post
|
93 |
$html = get_post_field( 'post_content', $post );
|
94 |
do_action( 'wpmc_scan_post', $html, $post );
|
18 |
|
19 |
$method = get_option( 'wpmc_method', 'media' );
|
20 |
$check_library = get_option(' wpmc_media_library', true );
|
21 |
+
$check_content = get_option( 'wpmc_content', true );
|
22 |
$check_postmeta = get_option( 'wpmc_postmeta', false );
|
23 |
$check_posts = get_option( 'wpmc_posts', false );
|
24 |
$check_widgets = get_option( 'wpmc_widgets', false );
|
25 |
|
26 |
+
if ( $method == 'media' && $check_posts && !$check_content && !$check_postmeta && !$check_widgets ) {
|
27 |
$message = __( "Posts, Meta and Widgets analysis are all off. Done.", 'media-cleaner' );
|
28 |
return true;
|
29 |
}
|
30 |
+
if ( $method == 'files' && $check_library && !$check_content && !$check_posts && !$check_postmeta && !$check_widgets ) {
|
31 |
$message = __( "Posts, Meta and Widgets analysis are all off. Done.", 'media-cleaner' );
|
32 |
return true;
|
33 |
}
|
85 |
$this->core->timeout_check();
|
86 |
|
87 |
// Check Meta
|
88 |
+
if ( $check_content || $check_postmeta )
|
89 |
do_action( 'wpmc_scan_postmeta', $post );
|
90 |
|
91 |
// Check Posts
|
92 |
+
if ( $check_content || $check_posts ) {
|
93 |
// Get HTML for this post
|
94 |
$html = get_post_field( 'post_content', $post );
|
95 |
do_action( 'wpmc_scan_post', $html, $post );
|
media-cleaner.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Media Cleaner
|
4 |
Plugin URI: https://meowapps.com
|
5 |
Description: Clean your Media Library, many options, trash system.
|
6 |
-
Version: 5.
|
7 |
Author: Jordy Meow
|
8 |
Author URI: https://meowapps.com
|
9 |
Text Domain: media-cleaner
|
@@ -25,7 +25,7 @@ if ( is_admin() ) {
|
|
25 |
|
26 |
global $wpmc_version;
|
27 |
global $wpmc;
|
28 |
-
$wpmc_version = '5.
|
29 |
|
30 |
require __DIR__ . '/admin.php';
|
31 |
require __DIR__ . '/core.php';
|
3 |
Plugin Name: Media Cleaner
|
4 |
Plugin URI: https://meowapps.com
|
5 |
Description: Clean your Media Library, many options, trash system.
|
6 |
+
Version: 5.4.0
|
7 |
Author: Jordy Meow
|
8 |
Author URI: https://meowapps.com
|
9 |
Text Domain: media-cleaner
|
25 |
|
26 |
global $wpmc_version;
|
27 |
global $wpmc;
|
28 |
+
$wpmc_version = '5.4.0';
|
29 |
|
30 |
require __DIR__ . '/admin.php';
|
31 |
require __DIR__ . '/core.php';
|
parsers/woocommerce.php
CHANGED
@@ -15,8 +15,12 @@ function wpmc_scan_once_woocommerce() {
|
|
15 |
foreach ( $metas as $meta )
|
16 |
if ( is_numeric( $meta ) && $meta > 0 )
|
17 |
array_push( $postmeta_images_ids, $meta );
|
18 |
-
$wpmc->add_reference_id( $postmeta_images_ids, '
|
19 |
}
|
|
|
|
|
|
|
|
|
20 |
}
|
21 |
|
22 |
function wpmc_scan_postmeta_woocommerce( $id ) {
|
15 |
foreach ( $metas as $meta )
|
16 |
if ( is_numeric( $meta ) && $meta > 0 )
|
17 |
array_push( $postmeta_images_ids, $meta );
|
18 |
+
$wpmc->add_reference_id( $postmeta_images_ids, 'WOOCOOMMERCE (ID)' );
|
19 |
}
|
20 |
+
|
21 |
+
$placeholder_id = get_option( 'woocommerce_placeholder_image', null, true );
|
22 |
+
if ( !empty( $placeholder_id ) )
|
23 |
+
$wpmc->add_reference_id( (int)$placeholder_id, 'WOOCOOMMERCE (ID)' );
|
24 |
}
|
25 |
|
26 |
function wpmc_scan_postmeta_woocommerce( $id ) {
|
readme.txt
CHANGED
@@ -1,20 +1,21 @@
|
|
1 |
=== Media Cleaner ===
|
2 |
Contributors: TigrouMeow
|
3 |
Tags: clean, delete, file, files, images, image, media, library, upload, acf
|
|
|
4 |
Requires at least: 4.8
|
5 |
Tested up to: 5.2
|
6 |
Requires PHP: 7.0
|
7 |
-
Stable tag: 5.
|
8 |
|
9 |
-
Clean your WordPress
|
10 |
|
11 |
== Description ==
|
12 |
|
13 |
-
|
14 |
|
15 |
**Before using this plugin, make sure you have a proper backup of your install. This step is not optional; it is required. You cannot trust any tools modifying or deleting your files. I recommend using the excellent service called [BlogVault](https://meow.click/blogvault).**
|
16 |
|
17 |
-
For compatibility, Pro version and important information, please read this until the end. Last but not least, it is
|
18 |
|
19 |
=== IMPORTANT ===
|
20 |
|
@@ -28,9 +29,13 @@ The files detected as not used will be listed in a specific dashboard. At this p
|
|
28 |
|
29 |
It works with any kind of media entries, including their retina and/or WebP versions. It is tested on modern WordPress installs (with Gutenberg) as well as older ones, with various themes and by a community of thousands of users. It does support **WooCommerce**. Support for specific plugins is being added little by little. As it requires meticulous a lot of work and testing, **the Pro version might be required if you are using complex plugins to handle the content of your website**.
|
30 |
|
31 |
-
=== PRO
|
32 |
|
33 |
-
|
|
|
|
|
|
|
|
|
34 |
|
35 |
- ACF (+ ACF Widgets)
|
36 |
- Divi Builder
|
@@ -40,6 +45,10 @@ It works with any kind of media entries, including their retina and/or WebP vers
|
|
40 |
- Beaver Builder
|
41 |
- And others (Theme X, ZipList Recipe, ...)
|
42 |
|
|
|
|
|
|
|
|
|
43 |
=== AGAIN, BE CAREFUL ===
|
44 |
|
45 |
Last but not least, and... again: this plugin deletes files. Be careful! Backup is not only important, it is **necessary**. Don't use this plugin if you don't understand what it does and how WordPress works.
|
@@ -62,6 +71,14 @@ Last but not least, and... again: this plugin deletes files. Be careful! Backup
|
|
62 |
|
63 |
== Changelog ==
|
64 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
65 |
= 5.2.4 =
|
66 |
* Add: Lot of refactoring and optimizations.
|
67 |
* Add: Support for Theme X, ZipList, and better support for standard websites as well.
|
1 |
=== Media Cleaner ===
|
2 |
Contributors: TigrouMeow
|
3 |
Tags: clean, delete, file, files, images, image, media, library, upload, acf
|
4 |
+
Donate link: https://commerce.coinbase.com/checkout/d047546a-77a8-41c8-9ea9-4a950f61832f
|
5 |
Requires at least: 4.8
|
6 |
Tested up to: 5.2
|
7 |
Requires PHP: 7.0
|
8 |
+
Stable tag: 5.4.0
|
9 |
|
10 |
+
Clean your WordPress from unused or broken media and files. It has its own trash system and recovery features. Please read the description.
|
11 |
|
12 |
== Description ==
|
13 |
|
14 |
+
Media Cleaner cleans your Media Library from the media entries (and files) which aren't used in your website, as well as broken entries. An internal trash allows you to make sure everything works properly before deleting the media entries (and files) permanently. It uses a smart analysis powered by many implementations for specific plugins and themes.
|
15 |
|
16 |
**Before using this plugin, make sure you have a proper backup of your install. This step is not optional; it is required. You cannot trust any tools modifying or deleting your files. I recommend using the excellent service called [BlogVault](https://meow.click/blogvault).**
|
17 |
|
18 |
+
For compatibility, Pro version and important information, please read this until the end. Last but not least, it is necessary to read the [tutorial](https://meowapps.com/media-cleaner-tutorial/). It is available on the official website, here: [Media Cleaner](https://meowapps.com/media-cleaner).
|
19 |
|
20 |
=== IMPORTANT ===
|
21 |
|
29 |
|
30 |
It works with any kind of media entries, including their retina and/or WebP versions. It is tested on modern WordPress installs (with Gutenberg) as well as older ones, with various themes and by a community of thousands of users. It does support **WooCommerce**. Support for specific plugins is being added little by little. As it requires meticulous a lot of work and testing, **the Pro version might be required if you are using complex plugins to handle the content of your website**.
|
31 |
|
32 |
+
=== PRO VERSION ===
|
33 |
|
34 |
+
The Pro version adds Filesystem Analysis, extra support for complex plugins, Live Site option and WP-CLI support.
|
35 |
+
|
36 |
+
[Media Cleaner Pro](https://meowapps.com/media-cleaner) can scan your physical /uploads directory, and match it against the Media Library.
|
37 |
+
|
38 |
+
It has extra support for complex plugins, such as:
|
39 |
|
40 |
- ACF (+ ACF Widgets)
|
41 |
- Divi Builder
|
45 |
- Beaver Builder
|
46 |
- And others (Theme X, ZipList Recipe, ...)
|
47 |
|
48 |
+
The Live Site option will analyze the online version of your website, which might enhance the accuracy of the Cleaner in edge-cases.
|
49 |
+
|
50 |
+
Last but not least, [Media Cleaner Pro](https://meowapps.com/media-cleaner) has support for WP-CLI. If you have direct access (SSH) to your server, you will be able to run the plugin at a much higher speed, have it ran automatically, etc.
|
51 |
+
|
52 |
=== AGAIN, BE CAREFUL ===
|
53 |
|
54 |
Last but not least, and... again: this plugin deletes files. Be careful! Backup is not only important, it is **necessary**. Don't use this plugin if you don't understand what it does and how WordPress works.
|
71 |
|
72 |
== Changelog ==
|
73 |
|
74 |
+
= 5.4.0 =
|
75 |
+
* Add: Support for Uber, Easy Real Estate.
|
76 |
+
* Update: Admin CSS and texts.
|
77 |
+
* Fix: A rare but wrong call to the log() function was causing the plugin to fail.
|
78 |
+
* Update: Clean the options. Now, the Content option replaces Posts/Meta/Widgets (they were useless in a way).
|
79 |
+
* Add: Support for WP-CLI (have a look at the how-it-works.txt) in the Pro. Now, scanning can be 100x times faster.
|
80 |
+
* Add: Option Live Site in the Pro.
|
81 |
+
|
82 |
= 5.2.4 =
|
83 |
* Add: Lot of refactoring and optimizations.
|
84 |
* Add: Support for Theme X, ZipList, and better support for standard websites as well.
|
ui.php
CHANGED
@@ -22,6 +22,7 @@ class Meow_WPMC_UI {
|
|
22 |
"ATTACHMENT (ID)" => "Found in Attachment (as an ID).",
|
23 |
"METASLIDER (ID)" => "Found in MetaSlider (as an ID).",
|
24 |
"MY CALENDAR (URL)" => "Found in My Calendar (as an URL).",
|
|
|
25 |
"MAX MEGA MENU (URL)" => "Found in Max Mega Menu (as an URL).",
|
26 |
"SITE ICON" => "Found in Site Icon."
|
27 |
);
|
22 |
"ATTACHMENT (ID)" => "Found in Attachment (as an ID).",
|
23 |
"METASLIDER (ID)" => "Found in MetaSlider (as an ID).",
|
24 |
"MY CALENDAR (URL)" => "Found in My Calendar (as an URL).",
|
25 |
+
"UBERMENU (URL)" => "Found in UberMenu (as an URL).",
|
26 |
"MAX MEGA MENU (URL)" => "Found in Max Mega Menu (as an URL).",
|
27 |
"SITE ICON" => "Found in Site Icon."
|
28 |
);
|
views/menu-screen.php
CHANGED
@@ -190,6 +190,24 @@
|
|
190 |
echo "</p></div>";
|
191 |
}
|
192 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
193 |
if ( class_exists( 'SiteOrigin_Panels' ) ) {
|
194 |
echo "<div class='notice notice-warning'><p>";
|
195 |
_e( "<b>SiteOrigin Page Builder has been detected</b>. The free version might detect the files used by SiteOrigin Page Builder correctly, but its full support is only available in <a target='_blank' href='//meowapps.com/media-cleaner'>Media Cleaner Pro</a>.", 'media-cleaner' );
|
@@ -198,7 +216,8 @@
|
|
198 |
|
199 |
}
|
200 |
|
201 |
-
$anychecks = get_option( '
|
|
|
202 |
$check_library = get_option(' wpmc_media_library', true );
|
203 |
|
204 |
if ( $method == 'media' ) {
|
190 |
echo "</p></div>";
|
191 |
}
|
192 |
|
193 |
+
if ( function_exists( 'amd_zlrecipe_convert_to_recipe' ) ) {
|
194 |
+
echo "<div class='notice notice-warning'><p>";
|
195 |
+
_e( "<b>ZipList Recipe has been detected</b>. The free version might detect the files used by ZipList Recipe correctly, but its full support is only available in <a target='_blank' href='//meowapps.com/media-cleaner'>Media Cleaner Pro</a>.", 'media-cleaner' );
|
196 |
+
echo "</p></div>";
|
197 |
+
}
|
198 |
+
|
199 |
+
if ( class_exists( 'UberMenu' ) ) {
|
200 |
+
echo "<div class='notice notice-warning'><p>";
|
201 |
+
_e( "<b>UberMenu has been detected</b>. The free version might detect the files used by UberMenu correctly, but its full support is only available in <a target='_blank' href='//meowapps.com/media-cleaner'>Media Cleaner Pro</a>.", 'media-cleaner' );
|
202 |
+
echo "</p></div>";
|
203 |
+
}
|
204 |
+
|
205 |
+
if ( class_exists( 'X_Bootstrap' ) ) {
|
206 |
+
echo "<div class='notice notice-warning'><p>";
|
207 |
+
_e( "<b>Theme X has been detected</b>. The free version might detect the files used by Theme X correctly, but its full support is only available in <a target='_blank' href='//meowapps.com/media-cleaner'>Media Cleaner Pro</a>.", 'media-cleaner' );
|
208 |
+
echo "</p></div>";
|
209 |
+
}
|
210 |
+
|
211 |
if ( class_exists( 'SiteOrigin_Panels' ) ) {
|
212 |
echo "<div class='notice notice-warning'><p>";
|
213 |
_e( "<b>SiteOrigin Page Builder has been detected</b>. The free version might detect the files used by SiteOrigin Page Builder correctly, but its full support is only available in <a target='_blank' href='//meowapps.com/media-cleaner'>Media Cleaner Pro</a>.", 'media-cleaner' );
|
216 |
|
217 |
}
|
218 |
|
219 |
+
$anychecks = get_option( 'wpmc_content', true ) || get_option( 'wpmc_posts', false )
|
220 |
+
|| get_option( 'wpmc_postmeta', false ) || get_option( 'wpmc_widgets', false );
|
221 |
$check_library = get_option(' wpmc_media_library', true );
|
222 |
|
223 |
if ( $method == 'media' ) {
|