| 1 |
<?php |
| 2 |
/* |
| 3 |
Plugin Name: WordPress Database Reset |
| 4 |
Plugin URI: https://github.com/chrisberthe/wordpress-database-reset |
| 5 |
Description: A plugin that allows you to skip the 5 minute installation and reset WordPress's database back to its original state. |
| 6 |
Version: 3.0.1 |
| 7 |
Author: Chris Berthe |
| 8 |
Author URI: https://github.com/chrisberthe |
| 9 |
License: GNU General Public License |
| 10 |
Text-domain: wp-reset |
| 11 |
*/ |
| 12 |
|
| 13 |
define( 'DB_RESET_VERSION', '3.0.1' ); |
| 14 |
define( 'DB_RESET_PATH', dirname( __FILE__ ) ); |
| 15 |
define( 'DB_RESET_NAME', basename( DB_RESET_PATH ) ); |
| 16 |
define( 'AUTOLOADER', DB_RESET_PATH . '/lib/class-plugin-autoloader.php' ); |
| 17 |
|
| 18 |
require_once( DB_RESET_PATH . '/lib/helpers.php' ); |
| 19 |
|
| 20 |
register_activation_hook( __FILE__, 'db_reset_activate' ); |
| 21 |
|
| 22 |
load_plugin_textdomain( 'wordpress-database-reset', false, DB_RESET_NAME . '/languages/' ); |
| 23 |
|
| 24 |
if ( file_exists( AUTOLOADER ) ) { |
| 25 |
require_once( AUTOLOADER ); |
| 26 |
new Plugin_Autoloader( DB_RESET_PATH ); |
| 27 |
|
| 28 |
add_action( |
| 29 |
'wp_loaded', |
| 30 |
array ( new DB_Reset_Manager( DB_RESET_VERSION ), 'run' ) |
| 31 |
); |
| 32 |
} |
| 33 |
|
| 34 |
if ( is_command_line() ) { |
| 35 |
require_once( __DIR__ . '/class-db-reset-command.php' ); |
| 36 |
} |
| 37 |
|