Version Description
(2021/04/16) = * Add: Support for Siteground cache. * Add: Support for Audio block. * Add: Support for WebDirectory. * Add: Avoid WordPress to automatically empty its trash. * Fix: Alternative for those who don't have the MB module.
Download this release
Release Info
Developer | TigrouMeow |
Plugin | Media Cleaner |
Version | 6.1.7 |
Comparing to | |
See all releases |
Code changes from version 6.1.6 to 6.1.7
- classes/core.php +22 -3
- classes/support.php +4 -0
- media-cleaner.php +2 -2
- readme.txt +8 -1
classes/core.php
CHANGED
@@ -24,10 +24,11 @@ class Meow_WPMC_Core {
|
|
24 |
private $allow_setup = null;
|
25 |
|
26 |
public function __construct() {
|
27 |
-
add_action( 'plugins_loaded', array( $this, '
|
|
|
28 |
}
|
29 |
|
30 |
-
function
|
31 |
|
32 |
// Variables
|
33 |
$this->site_url = get_site_url();
|
@@ -81,6 +82,10 @@ class Meow_WPMC_Core {
|
|
81 |
}
|
82 |
}
|
83 |
|
|
|
|
|
|
|
|
|
84 |
function initialize_parsers() {
|
85 |
include_once( 'parsers.php' );
|
86 |
new Meow_WPMC_Parsers();
|
@@ -204,7 +209,13 @@ class Meow_WPMC_Core {
|
|
204 |
|
205 |
// Proposal/fix by @copytrans
|
206 |
// Discussion: https://wordpress.org/support/topic/bug-in-core-php/#post-11647775
|
207 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
208 |
|
209 |
// Resolve src-set and shortcodes
|
210 |
if ( !get_option( 'wpmc_shortcodes_disabled', false ) )
|
@@ -297,6 +308,14 @@ class Meow_WPMC_Core {
|
|
297 |
array_push( $results, $src );
|
298 |
}
|
299 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
300 |
// Links, href
|
301 |
$urls = $dom->getElementsByTagName( 'a' );
|
302 |
foreach ( $urls as $url ) {
|
24 |
private $allow_setup = null;
|
25 |
|
26 |
public function __construct() {
|
27 |
+
add_action( 'plugins_loaded', array( $this, 'plugins_loaded' ) );
|
28 |
+
add_action( 'init', array( $this, 'init' ) );
|
29 |
}
|
30 |
|
31 |
+
function plugins_loaded() {
|
32 |
|
33 |
// Variables
|
34 |
$this->site_url = get_site_url();
|
82 |
}
|
83 |
}
|
84 |
|
85 |
+
function init() {
|
86 |
+
remove_action( 'wp_scheduled_delete', 'wp_scheduled_delete' );
|
87 |
+
}
|
88 |
+
|
89 |
function initialize_parsers() {
|
90 |
include_once( 'parsers.php' );
|
91 |
new Meow_WPMC_Parsers();
|
209 |
|
210 |
// Proposal/fix by @copytrans
|
211 |
// Discussion: https://wordpress.org/support/topic/bug-in-core-php/#post-11647775
|
212 |
+
// Modified by Jordy again in 2021 for those who don't have MB enabled
|
213 |
+
if ( function_exists( 'mb_convert_encoding' ) ) {
|
214 |
+
$html = mb_convert_encoding( $html, 'HTML-ENTITIES', 'UTF-8' );
|
215 |
+
}
|
216 |
+
else {
|
217 |
+
$html = htmlspecialchars_decode( utf8_decode( htmlentities( $html, ENT_COMPAT, 'utf-8', false ) ) );
|
218 |
+
}
|
219 |
|
220 |
// Resolve src-set and shortcodes
|
221 |
if ( !get_option( 'wpmc_shortcodes_disabled', false ) )
|
308 |
array_push( $results, $src );
|
309 |
}
|
310 |
|
311 |
+
// Audios: src
|
312 |
+
$audios = $dom->getElementsByTagName( 'audio' );
|
313 |
+
foreach ( $audios as $audio ) {
|
314 |
+
//error_log($audio->getAttribute('src'));
|
315 |
+
$src = $this->clean_url( $audio->getAttribute('src') );
|
316 |
+
array_push( $results, $src );
|
317 |
+
}
|
318 |
+
|
319 |
// Links, href
|
320 |
$urls = $dom->getElementsByTagName( 'a' );
|
321 |
foreach ( $urls as $url ) {
|
classes/support.php
CHANGED
@@ -88,6 +88,10 @@ class Meow_WPMC_Support {
|
|
88 |
array_push( $unsupported, 'Smart Slider' );
|
89 |
}
|
90 |
|
|
|
|
|
|
|
|
|
91 |
return $unsupported;
|
92 |
}
|
93 |
}
|
88 |
array_push( $unsupported, 'Smart Slider' );
|
89 |
}
|
90 |
|
91 |
+
if ( class_exists( 'w2dc_plugin' ) ) {
|
92 |
+
array_push( $unsupported, 'WebDirectory' );
|
93 |
+
}
|
94 |
+
|
95 |
return $unsupported;
|
96 |
}
|
97 |
}
|
media-cleaner.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Media Cleaner
|
4 |
Plugin URI: https://meowapps.com
|
5 |
Description: Clean your WordPress from unused or broken media entries and files.
|
6 |
-
Version: 6.1.
|
7 |
Author: Jordy Meow
|
8 |
Author URI: https://meowapps.com
|
9 |
Text Domain: media-cleaner
|
@@ -13,7 +13,7 @@ Originally developed for two of my websites:
|
|
13 |
- Haikyo (https://haikyo.org)
|
14 |
*/
|
15 |
|
16 |
-
define( 'WPMC_VERSION', '6.1.
|
17 |
define( 'WPMC_PREFIX', 'wpmc' );
|
18 |
define( 'WPMC_DOMAIN', 'media-cleaner' );
|
19 |
define( 'WPMC_ENTRY', __FILE__ );
|
3 |
Plugin Name: Media Cleaner
|
4 |
Plugin URI: https://meowapps.com
|
5 |
Description: Clean your WordPress from unused or broken media entries and files.
|
6 |
+
Version: 6.1.7
|
7 |
Author: Jordy Meow
|
8 |
Author URI: https://meowapps.com
|
9 |
Text Domain: media-cleaner
|
13 |
- Haikyo (https://haikyo.org)
|
14 |
*/
|
15 |
|
16 |
+
define( 'WPMC_VERSION', '6.1.7' );
|
17 |
define( 'WPMC_PREFIX', 'wpmc' );
|
18 |
define( 'WPMC_DOMAIN', 'media-cleaner' );
|
19 |
define( 'WPMC_ENTRY', __FILE__ );
|
readme.txt
CHANGED
@@ -5,7 +5,7 @@ Donate link: https://commerce.coinbase.com/checkout/d047546a-77a8-41c8-9ea9-4a95
|
|
5 |
Requires at least: 5.0
|
6 |
Tested up to: 5.6
|
7 |
Requires PHP: 5.6
|
8 |
-
Stable tag: 6.1.
|
9 |
|
10 |
Clean your WordPress Website from unused or broken media entries and files.
|
11 |
|
@@ -75,6 +75,13 @@ Better to be safe than sorry. This plugin deletes files! Therefore, backup is no
|
|
75 |
|
76 |
== Changelog ==
|
77 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
78 |
= 6.1.6 (2021/02/23) =
|
79 |
* Add: Support for Smart Slider.
|
80 |
|
5 |
Requires at least: 5.0
|
6 |
Tested up to: 5.6
|
7 |
Requires PHP: 5.6
|
8 |
+
Stable tag: 6.1.7
|
9 |
|
10 |
Clean your WordPress Website from unused or broken media entries and files.
|
11 |
|
75 |
|
76 |
== Changelog ==
|
77 |
|
78 |
+
= 6.1.7 (2021/04/16) =
|
79 |
+
* Add: Support for Siteground cache.
|
80 |
+
* Add: Support for Audio block.
|
81 |
+
* Add: Support for WebDirectory.
|
82 |
+
* Add: Avoid WordPress to automatically empty its trash.
|
83 |
+
* Fix: Alternative for those who don't have the MB module.
|
84 |
+
|
85 |
= 6.1.6 (2021/02/23) =
|
86 |
* Add: Support for Smart Slider.
|
87 |
|