PluginProbe
Advanced WordPress Reset – Debug, Recover & Reset WP / 2.0.6
Advanced WordPress Reset – Debug, Recover & Reset WP v2.0.6
trunk 1.0.0 1.0.1 1.1.0 1.1.1 1.5 1.6 1.7 2.0 2.0.1 2.0.2 2.0.3 2.0.4 2.0.5 2.0.6 2.0.7
advanced-wp-reset / advanced-wp-reset.php

advanced-wp-reset.php in Advanced WordPress Reset – Debug, Recover & Reset WP 2.0.6, at advanced-wp-reset.php

61 lines 1.9 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 /*
4 Plugin Name: Advanced WP Reset
5 Plugin URI: https://sigmaplugin.com/
6 Description: The ultimate solution for resetting your WordPress database or specific components to their default settings using the advanced reset features.
7 Version: 2.0.6
8 Requires at least: 4.0
9 Author: SigmaPlugin
10 Author URI: https://sigmaplugin.com/
11 Text Domain: advanced-wp-reset
12 Domain Path: /languages/
13 License: GPLv2 or later
14 License URI: http://www.gnu.org/licenses/gpl-2.0.html
15 */
16
17 if ( defined("AWR_IS_PRO_VERSION") and AWR_IS_PRO_VERSION === 1 ) {
18
19
20 // Ensure the needed functions are available
21 include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
22
23 // Show warning
24 add_action('admin_notices', 'awr_activation_warning' );
25
26 // For not showing "Plugin activated".
27 add_filter('wp_redirect', 'awr_custom_plugin_activation_redirect', 10, 2);
28
29 // Deactivate the plugin
30 deactivate_plugins(plugin_basename(__FILE__));
31
32
33 } else {
34
35 require_once 'advanced-wp-reset.class.php';
36 require_once 'free-config.inc.php';
37 require_once 'config.inc.php';
38
39 if ( class_exists ( 'AWR_Application' ) ){
40 $awr_object = new AWR_Application();
41
42 // Activation
43 register_activation_hook ( __FILE__, array ( $awr_object, 'activate' ) );
44
45 // Deactivation
46 register_deactivation_hook ( __FILE__, array ( $awr_object, 'deactivate' ) );
47 }
48
49 }
50
51 function awr_activation_warning() {
52 ?>
53 <div class="notice notice-warning is-dismissible">
54 <p><?php _e('You already have <b>Advanced WP Reset PRO</b>, which includes all the features of the free version. If you wish to activate the free version for any reason, please deactivate the PRO version first and then activate the free version.', 'advanced-wp-reset'); ?></p>
55 </div>
56 <?php
57 }
58
59 function awr_custom_plugin_activation_redirect($location, $status) {
60 return remove_query_arg('activate', $location);
61 }