| 1 |
<?php |
| 2 |
/* |
| 3 |
Plugin Name: WP Database Reset |
| 4 |
Plugin URI: https://wordpress.org/plugins/wordpress-database-reset/ |
| 5 |
Description: Reset all or some WP database tables back to their original state. |
| 6 |
Version: 3.25 |
| 7 |
Tested up to: 7.1 |
| 8 |
Author: WebFactory Ltd |
| 9 |
Author URI: https://www.webfactoryltd.com/ |
| 10 |
License: GPLv2 or later |
| 11 |
Text-domain: wordpress-database-reset |
| 12 |
|
| 13 |
Copyright 2011 - 2026 WebFactory Ltd (email: support@webfactoryltd.com) |
| 14 |
|
| 15 |
This program is free software; you can redistribute it and/or modify |
| 16 |
it under the terms of the GNU General Public License, version 2, as |
| 17 |
published by the Free Software Foundation. |
| 18 |
|
| 19 |
This program is distributed in the hope that it will be useful, |
| 20 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 21 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 22 |
GNU General Public License for more details. |
| 23 |
|
| 24 |
You should have received a copy of the GNU General Public License |
| 25 |
along with this program; if not, write to the Free Software |
| 26 |
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
| 27 |
*/ |
| 28 |
|
| 29 |
define( 'DB_RESET_VERSION', '3.25' ); |
| 30 |
define( 'DB_RESET_PATH', dirname( __FILE__ ) ); |
| 31 |
define( 'DB_RESET_NAME', basename( DB_RESET_PATH ) ); |
| 32 |
define( 'DB_RESET_FILE', __FILE__ ); |
| 33 |
define( 'AUTOLOADER', DB_RESET_PATH . '/lib/class-plugin-autoloader.php' ); |
| 34 |
|
| 35 |
require_once( DB_RESET_PATH . '/lib/helpers.php' ); |
| 36 |
|
| 37 |
require_once dirname(__FILE__) . '/wf-flyout/wf-flyout.php'; |
| 38 |
new wf_flyout(__FILE__); |
| 39 |
|
| 40 |
register_activation_hook( __FILE__, 'db_reset_activate' ); |
| 41 |
|
| 42 |
load_plugin_textdomain( 'wordpress-database-reset' ); |
| 43 |
|
| 44 |
if ( file_exists( AUTOLOADER ) ) { |
| 45 |
require_once( AUTOLOADER ); |
| 46 |
new Plugin_Autoloader( DB_RESET_PATH ); |
| 47 |
|
| 48 |
add_action( |
| 49 |
'wp_loaded', |
| 50 |
array ( new DB_Reset_Manager( DB_RESET_VERSION ), 'run' ) |
| 51 |
); |
| 52 |
} |
| 53 |
|
| 54 |
if ( is_command_line() ) { |
| 55 |
require_once( __DIR__ . '/class-db-reset-command.php' ); |
| 56 |
} |
| 57 |
|