is_active() ) { $this->show_import_message(); $this->show_deactivate_message(); } } /** * Handle deactivation & import of the data data * * @since 3.0 */ public function show_import_message() { if ( filter_input( INPUT_GET, 'tool' ) !== 'import-export' ) { add_action( 'admin_notices', array( $this, 'show_import_settings_notice' ) ); } } /** * Handle deactivation of the plugin * * @since 3.0 */ public function show_deactivate_message() { if ( filter_input( INPUT_GET, $this->deactivation_listener ) === '1' ) { // Deactivate AIO. deactivate_plugins( $this->plugin_file ); // Show notice that aioseo has been deactivated. add_action( 'admin_notices', array( $this, 'show_deactivate_notice' ) ); // Clean up the referrer url for later use. if ( isset( $_SERVER['REQUEST_URI'] ) ) { $_SERVER['REQUEST_URI'] = remove_query_arg( array( $this->deactivation_listener ), sanitize_text_field( $_SERVER['REQUEST_URI'] ) ); } } } /** * Check if the plugin is active. * * @return bool */ protected function is_active() { return is_plugin_active( $this->plugin_file ); } }