htaccess = $htaccess; $this->robots = $robots; } /** * Registers hooks. * * @return void */ public function register(): void { add_action( 'aiblackout_version_changed', array( $this, 'purge_legacy_record' ) ); } /** * Drops the 1.0.x deactivation record. * * @return void */ public function purge_legacy_record(): void { delete_option( self::LEGACY_OPTION ); } /** * Reverts every file this plugin has written to. * * @return void */ public function suspend(): void { if ( $this->htaccess->is_applied() ) { $this->htaccess->revert(); } if ( $this->robots->physical_file_has_block() ) { $this->robots->revert_physical_file(); } } }