describeFolders( $active ), $this->describeVersions( $active ) ), 'active:' . $this->describeFolders( $active ), __( 'Deactivate the old plugin now', 'double-opt-in' ), HealthRepairController::repairUrl( HealthRepairController::ACTION_DEACTIVATE_LEGACY ) ); } return new HealthCheckResult( HealthCheckResult::STATUS_RECOMMENDED, __( 'An outdated Double Opt-In Pro plugin is still installed', 'double-opt-in' ), sprintf( /* translators: 1: plugin folder name, 2: version number. */ __( 'The folder "%1$s" still holds Double Opt-In Pro %2$s. It is deactivated, so nothing is broken right now, but activating it again would collide with the current modules. Remove the folder over FTP or SSH. Important: do not delete it through the WordPress plugin screen — that version\'s uninstall routine drops the opt-out database table, and the records in it are gone for good.', 'double-opt-in' ), $this->describeFolders( $installed ), $this->describeVersions( $installed ) ), 'inactive:' . $this->describeFolders( $installed ) ); } /** * @param array> $entries */ private function describeFolders( array $entries ): string { $folders = array(); foreach ( $entries as $entry ) { $folders[] = $entry['folder']; } return implode( ', ', $folders ); } /** * @param array> $entries */ private function describeVersions( array $entries ): string { $versions = array(); foreach ( $entries as $entry ) { $versions[] = $entry['version'] !== '' ? $entry['version'] : __( 'unknown version', 'double-opt-in' ); } return implode( ', ', $versions ); } }