| 1 |
<?php |
| 2 |
/** |
| 3 |
* Plugin Name: SweepPress: Website Cleanup and Optimization |
| 4 |
* Plugin URI: https://www.dev4press.com/plugins/sweeppress/ |
| 5 |
* Description: Remove unused, orphaned, duplicated data in your WordPress website using 50+ sweepers, manage and clean Options table, optimize database. |
| 6 |
* Author: Milan Petrovic |
| 7 |
* Author URI: https://www.dev4press.com/ |
| 8 |
* Text Domain: sweeppress |
| 9 |
* Version: 7.0 |
| 10 |
* Requires at least: 6.2 |
| 11 |
* Tested up to: 7.0 |
| 12 |
* Requires PHP: 8.0 |
| 13 |
* License: GPLv3 or later |
| 14 |
* License URI: https://www.gnu.org/licenses/gpl-3.0.html |
| 15 |
* |
| 16 |
* @package SweepPress |
| 17 |
* |
| 18 |
* == Copyright == |
| 19 |
* Copyright 2008 - 2026 Milan Petrovic (email: support@dev4press.com) |
| 20 |
* |
| 21 |
* This program is free software: you can redistribute it and/or modify |
| 22 |
* it under the terms of the GNU General Public License as published by |
| 23 |
* the Free Software Foundation, either version 3 of the License, or |
| 24 |
* (at your option) any later version. |
| 25 |
* |
| 26 |
* This program is distributed in the hope that it will be useful, |
| 27 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 28 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 29 |
* GNU General Public License for more details. |
| 30 |
* |
| 31 |
* You should have received a copy of the GNU General Public License |
| 32 |
* along with this program. If not, see <http://www.gnu.org/licenses/> |
| 33 |
* |
| 34 |
*/ |
| 35 |
|
| 36 |
use Dev4Press\Plugin\SweepPress\Meta\Monitor; |
| 37 |
use Dev4Press\v55\WordPress; |
| 38 |
|
| 39 |
if ( ! defined( 'ABSPATH' ) ) { |
| 40 |
exit; |
| 41 |
} |
| 42 |
|
| 43 |
if ( function_exists( 'sweeppress_fs' ) ) { |
| 44 |
sweeppress_fs()->set_basename( false, __FILE__ ); |
| 45 |
} else { |
| 46 |
$sweeppress_urlname_basic = plugins_url( '/', __FILE__ ); |
| 47 |
|
| 48 |
define( 'SWEEPPRESS_FILE', __FILE__ ); |
| 49 |
define( 'SWEEPPRESS_PATH', __DIR__ . '/' ); |
| 50 |
define( 'SWEEPPRESS_URL', $sweeppress_urlname_basic ); |
| 51 |
|
| 52 |
if ( ! defined( 'SWEEPPRESS_SIMULATION' ) ) { |
| 53 |
define( 'SWEEPPRESS_SIMULATION', false ); |
| 54 |
} |
| 55 |
|
| 56 |
if ( ! defined( 'SWEEPPRESS_SWEEPERS_ALLOW_DB' ) ) { |
| 57 |
define( 'SWEEPPRESS_SWEEPERS_ALLOW_DB', true ); |
| 58 |
} |
| 59 |
|
| 60 |
if ( ! defined( 'SWEEPPRESS_MULTISITE_LIMIT_COUNT' ) ) { |
| 61 |
define( 'SWEEPPRESS_MULTISITE_LIMIT_COUNT', 2048 ); |
| 62 |
} |
| 63 |
|
| 64 |
if ( ! defined( 'SWEEPPRESS_METADATA_MONITOR' ) ) { |
| 65 |
define( 'SWEEPPRESS_METADATA_MONITOR', 'off' ); |
| 66 |
} |
| 67 |
|
| 68 |
require_once SWEEPPRESS_PATH . 'vendor/autoload.php'; |
| 69 |
|
| 70 |
require_once SWEEPPRESS_PATH . 'vendor/dev4press/library/core.php'; |
| 71 |
|
| 72 |
require_once SWEEPPRESS_PATH . 'core/freemius.php'; |
| 73 |
require_once SWEEPPRESS_PATH . 'core/autoload.php'; |
| 74 |
require_once SWEEPPRESS_PATH . 'core/bridge.php'; |
| 75 |
require_once SWEEPPRESS_PATH . 'core/functions.php'; |
| 76 |
|
| 77 |
if ( SWEEPPRESS_METADATA_MONITOR !== 'off' ) { |
| 78 |
Monitor::i(); |
| 79 |
} |
| 80 |
|
| 81 |
sweeppress(); |
| 82 |
sweeppress_settings(); |
| 83 |
|
| 84 |
if ( WordPress::i()->is_admin() ) { |
| 85 |
sweeppress_ajax(); |
| 86 |
sweeppress_admin(); |
| 87 |
} |
| 88 |
} |
| 89 |
|