WP-Sweep - Version 1.1.15

Version Description

Download this release

Release Info

Developer GamerZ
Plugin Icon WP-Sweep
Version 1.1.15
Comparing to
See all releases

Code changes from version 1.1.3 to 1.1.15

Files changed (2) hide show
  1. readme.txt +10 -4
  2. wp-sweep.php +6 -6
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: GamerZ
3
  Donate link: https://lesterchan.net/site/donation/
4
  Tags: sweep, clean, cleanup, clean up, optimize, orphan, unused, duplicated, posts, post meta, comments, comment meta, users, user meta, terms, term meta, term relationships, revisions, auto drafts, transient, database, tables, oembed
5
  Requires at least: 4.6
6
- Tested up to: 5.4
7
- Stable tag: 1.1.3
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -82,14 +82,14 @@ WP-Sweep Available Items:
82
 
83
  WP-Sweep is not compatible with the following plugins:
84
  * [Asgaros Forum](https://wordpress.org/plugins/asgaros-forum/)
 
85
  * [Elementor Popup Builder](https://elementor.com/features/popup-builder/)
86
  * [MailPress](https://wordpress.org/plugins/mailpress/)
87
  * [Meta Slider](https://wordpress.org/support/plugin/ml-slider/)
88
  * [Polylang](https://wordpress.org/plugins/polylang/)
89
  * [Slider Revolution](https://revolution.themepunch.com/)
90
  * [Viba Portfolio](https://codecanyon.net/item/viba-portfolio-wordpress-plugin/9561599)
91
-
92
-
93
 
94
  ### Build Status
95
  [![Build Status](https://travis-ci.org/lesterchan/wp-sweep.svg?branch=master)](https://travis-ci.org/lesterchan/wp-sweep) [![Code Climate](https://codeclimate.com/github/lesterchan/wp-sweep/badges/gpa.svg)](https://codeclimate.com/github/lesterchan/wp-sweep) [![Issue Count](https://codeclimate.com/github/lesterchan/wp-sweep/badges/issue_count.svg)](https://codeclimate.com/github/lesterchan/wp-sweep)
@@ -104,6 +104,12 @@ WP-Sweep is not compatible with the following plugins:
104
  I spent most of my free time creating, updating, maintaining and supporting these plugins, if you really love my plugins and could spare me a couple of bucks, I will really appreciate it. If not feel free to use it without any obligations.
105
 
106
  ## Changelog
 
 
 
 
 
 
107
  ### 1.1.3
108
  * FIXED: Changed permissions check to `activate_plugins` because `update_plugins` will return false when DISALLOW_FILE_MODS=true.
109
 
3
  Donate link: https://lesterchan.net/site/donation/
4
  Tags: sweep, clean, cleanup, clean up, optimize, orphan, unused, duplicated, posts, post meta, comments, comment meta, users, user meta, terms, term meta, term relationships, revisions, auto drafts, transient, database, tables, oembed
5
  Requires at least: 4.6
6
+ Tested up to: 5.8
7
+ Stable tag: 1.1.5
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
82
 
83
  WP-Sweep is not compatible with the following plugins:
84
  * [Asgaros Forum](https://wordpress.org/plugins/asgaros-forum/)
85
+ * [Custom Fonts](https://wordpress.org/plugins/custom-fonts/)
86
  * [Elementor Popup Builder](https://elementor.com/features/popup-builder/)
87
  * [MailPress](https://wordpress.org/plugins/mailpress/)
88
  * [Meta Slider](https://wordpress.org/support/plugin/ml-slider/)
89
  * [Polylang](https://wordpress.org/plugins/polylang/)
90
  * [Slider Revolution](https://revolution.themepunch.com/)
91
  * [Viba Portfolio](https://codecanyon.net/item/viba-portfolio-wordpress-plugin/9561599)
92
+ * [WPML](https://wpml.org/)
 
93
 
94
  ### Build Status
95
  [![Build Status](https://travis-ci.org/lesterchan/wp-sweep.svg?branch=master)](https://travis-ci.org/lesterchan/wp-sweep) [![Code Climate](https://codeclimate.com/github/lesterchan/wp-sweep/badges/gpa.svg)](https://codeclimate.com/github/lesterchan/wp-sweep) [![Issue Count](https://codeclimate.com/github/lesterchan/wp-sweep/badges/issue_count.svg)](https://codeclimate.com/github/lesterchan/wp-sweep)
104
  I spent most of my free time creating, updating, maintaining and supporting these plugins, if you really love my plugins and could spare me a couple of bucks, I will really appreciate it. If not feel free to use it without any obligations.
105
 
106
  ## Changelog
107
+ ### 1.1.15
108
+ * NEW: Bump to WordPress 5.8
109
+
110
+ ### 1.1.4
111
+ * FIXED: Replaced %\_transient\_% with %\\\_transient\\\_%. Escape _ in MySQL if not it is being used as a wildcard character. Props @janrenn.
112
+
113
  ### 1.1.3
114
  * FIXED: Changed permissions check to `activate_plugins` because `update_plugins` will return false when DISALLOW_FILE_MODS=true.
115
 
wp-sweep.php CHANGED
@@ -9,7 +9,7 @@
9
  Plugin Name: WP-Sweep
10
  Plugin URI: https://lesterchan.net/portfolio/programming/php/
11
  Description: WP-Sweep allows you to clean up unused, orphaned and duplicated data in your WordPress. It cleans up revisions, auto drafts, unapproved comments, spam comments, trashed comments, orphan post meta, orphan comment meta, orphan user meta, orphan term relationships, unused terms, duplicated post meta, duplicated comment meta, duplicated user meta and transient options. It also optimizes your database tables.
12
- Version: 1.1.3
13
  Author: Lester 'GaMerZ' Chan
14
  Author URI: https://lesterchan.net
15
  Text Domain: wp-sweep
@@ -17,7 +17,7 @@ License: GPL2
17
  */
18
 
19
  /*
20
- Copyright 2020 Lester Chan (email : lesterchan@gmail.com)
21
 
22
  This program is free software; you can redistribute it and/or modify
23
  it under the terms of the GNU General Public License, version 2, as
@@ -38,7 +38,7 @@ License: GPL2
38
  *
39
  * @since 1.0.0
40
  */
41
- define( 'WP_SWEEP_VERSION', '1.1.3' );
42
 
43
  /**
44
  * WP Rest API
@@ -378,7 +378,7 @@ class WPSweep {
378
  $count = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(comment_ID) FROM $wpdb->comments WHERE (comment_approved = %s OR comment_approved = %s)", 'trash', 'post-trashed' ) );
379
  break;
380
  case 'transient_options':
381
- $count = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(option_id) FROM $wpdb->options WHERE option_name LIKE(%s)", '%_transient_%' ) );
382
  break;
383
  case 'orphan_postmeta':
384
  $count = $wpdb->get_var( "SELECT COUNT(meta_id) FROM $wpdb->postmeta WHERE post_id NOT IN (SELECT ID FROM $wpdb->posts)" );
@@ -468,7 +468,7 @@ class WPSweep {
468
  $details = $wpdb->get_col( $wpdb->prepare( "SELECT comment_author FROM $wpdb->comments WHERE (comment_approved = %s OR comment_approved = %s) LIMIT %d", 'trash', 'post-trashed', $this->limit_details ) );
469
  break;
470
  case 'transient_options':
471
- $details = $wpdb->get_col( $wpdb->prepare( "SELECT option_name FROM $wpdb->options WHERE option_name LIKE(%s) LIMIT %d", '%_transient_%', $this->limit_details ) );
472
  break;
473
  case 'orphan_postmeta':
474
  $details = $wpdb->get_col( $wpdb->prepare( "SELECT meta_key FROM $wpdb->postmeta WHERE post_id NOT IN (SELECT ID FROM $wpdb->posts) LIMIT %d", $this->limit_details ) );
@@ -618,7 +618,7 @@ class WPSweep {
618
  }
619
  break;
620
  case 'transient_options':
621
- $query = $wpdb->get_col( $wpdb->prepare( "SELECT option_name FROM $wpdb->options WHERE option_name LIKE(%s)", '%_transient_%' ) );
622
  if ( $query ) {
623
  foreach ( $query as $option_name ) {
624
  if ( strpos( $option_name, '_site_transient_' ) !== false ) {
9
  Plugin Name: WP-Sweep
10
  Plugin URI: https://lesterchan.net/portfolio/programming/php/
11
  Description: WP-Sweep allows you to clean up unused, orphaned and duplicated data in your WordPress. It cleans up revisions, auto drafts, unapproved comments, spam comments, trashed comments, orphan post meta, orphan comment meta, orphan user meta, orphan term relationships, unused terms, duplicated post meta, duplicated comment meta, duplicated user meta and transient options. It also optimizes your database tables.
12
+ Version: 1.1.5
13
  Author: Lester 'GaMerZ' Chan
14
  Author URI: https://lesterchan.net
15
  Text Domain: wp-sweep
17
  */
18
 
19
  /*
20
+ Copyright 2021 Lester Chan (email : lesterchan@gmail.com)
21
 
22
  This program is free software; you can redistribute it and/or modify
23
  it under the terms of the GNU General Public License, version 2, as
38
  *
39
  * @since 1.0.0
40
  */
41
+ define( 'WP_SWEEP_VERSION', '1.1.5' );
42
 
43
  /**
44
  * WP Rest API
378
  $count = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(comment_ID) FROM $wpdb->comments WHERE (comment_approved = %s OR comment_approved = %s)", 'trash', 'post-trashed' ) );
379
  break;
380
  case 'transient_options':
381
+ $count = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(option_id) FROM $wpdb->options WHERE option_name LIKE(%s)", '%\_transient\_%' ) );
382
  break;
383
  case 'orphan_postmeta':
384
  $count = $wpdb->get_var( "SELECT COUNT(meta_id) FROM $wpdb->postmeta WHERE post_id NOT IN (SELECT ID FROM $wpdb->posts)" );
468
  $details = $wpdb->get_col( $wpdb->prepare( "SELECT comment_author FROM $wpdb->comments WHERE (comment_approved = %s OR comment_approved = %s) LIMIT %d", 'trash', 'post-trashed', $this->limit_details ) );
469
  break;
470
  case 'transient_options':
471
+ $details = $wpdb->get_col( $wpdb->prepare( "SELECT option_name FROM $wpdb->options WHERE option_name LIKE(%s) LIMIT %d", '%\_transient\_%', $this->limit_details ) );
472
  break;
473
  case 'orphan_postmeta':
474
  $details = $wpdb->get_col( $wpdb->prepare( "SELECT meta_key FROM $wpdb->postmeta WHERE post_id NOT IN (SELECT ID FROM $wpdb->posts) LIMIT %d", $this->limit_details ) );
618
  }
619
  break;
620
  case 'transient_options':
621
+ $query = $wpdb->get_col( $wpdb->prepare( "SELECT option_name FROM $wpdb->options WHERE option_name LIKE(%s)", '%\_transient\_%' ) );
622
  if ( $query ) {
623
  foreach ( $query as $option_name ) {
624
  if ( strpos( $option_name, '_site_transient_' ) !== false ) {