| @@ -7,9 +7,9 @@ | ||
| 7 | 7 | * Author: MainWP |
| 8 | 8 | * Author URI: https://mainwp.com |
| 9 | 9 | * Plugin URI: https://mainwp.com/ |
| 10 | 10 | * Text Domain: mainwp |
| 11 | - * Version: 6.0.12 | |
| 11 | + * Version: 6.2.2 | |
| 12 | 12 | * License: GPLv3 or later |
| 13 | 13 | * License URI: https://www.gnu.org/licenses/gpl-3.0.html |
| 14 | 14 | * |
| 15 | 15 | * @package MainWP/Dashboard |
| @@ -153,8 +153,21 @@ | ||
| 153 | 153 | if ( class_exists( '\MainWP\Dashboard\MainWP_Abilities' ) ) { |
| 154 | 154 | \MainWP\Dashboard\MainWP_Abilities::init(); |
| 155 | 155 | } |
| 156 | 156 | |
| 157 | +if ( file_exists( MAINWP_PLUGIN_DIR . 'modules/system-monitor/bootstrap.php' ) ) { | |
| 158 | + define( 'MAINWP_SYSTEM_MONITOR_FILE', __FILE__ ); | |
| 159 | + require_once MAINWP_PLUGIN_DIR . 'modules/system-monitor/bootstrap.php'; // NOSONAR - WP compatible. | |
| 160 | + register_activation_hook( | |
| 161 | + MAINWP_SYSTEM_MONITOR_FILE, | |
| 162 | + array( MainWP\Dashboard\SystemMonitor\MainWP_System_Monitor::class, 'activate' ) | |
| 163 | + ); | |
| 164 | + register_deactivation_hook( | |
| 165 | + MAINWP_SYSTEM_MONITOR_FILE, | |
| 166 | + array( MainWP\Dashboard\SystemMonitor\MainWP_System_Monitor::class, 'deactivate' ) | |
| 167 | + ); | |
| 168 | +} | |
| 169 | + | |
| 157 | 170 | // Detect if secupress_scanner is running. |
| 158 | 171 | $mainwp_is_secupress_scanning = false; |
| 159 | 172 | if ( ! empty( $_GET ) && isset( $_GET['test'] ) && isset( $_GET['action'] ) && 'secupress_scanner' === $_GET['action'] ) { // phpcs:ignore WordPress.Security.NonceVerification,WordPress.Security.ValidatedSanitizedInput.InputNotSanitized.Recommended |
| 160 | 173 | $mainwp_is_secupress_scanning = true; |
| @@ -165,5 +178,9 @@ | ||
| 165 | 178 | $mainWP = new MainWP\Dashboard\MainWP_System( WP_PLUGIN_DIR . DIRECTORY_SEPARATOR . plugin_basename( __FILE__ ) ); |
| 166 | 179 | register_activation_hook( __FILE__, array( $mainWP, 'activation' ) ); |
| 167 | 180 | register_deactivation_hook( __FILE__, array( $mainWP, 'deactivation' ) ); |
| 168 | 181 | add_action( 'plugins_loaded', array( $mainWP, 'update_install' ) ); |
| 182 | + // Register the post-upgrade hook for MWP-1557/1558 pk/ filename migration. | |
| 183 | + // Must be registered before plugins_loaded fires so MainWP_Install::install() | |
| 184 | + // sees a subscriber when it does_action('mainwp_db_after_update'). | |
| 185 | + add_action( 'plugins_loaded', array( 'MainWP\\Dashboard\\MainWP_Keys_Manager', 'register_migration_hooks' ), 5 ); | |
| 169 | 186 | } |