Add admin UI: setup wizard, goals, rules editor, donations, moderation, overlays, settings
Test and Release / test (push) Successful in 2m34s
Test and Release / release (push) Successful in 9s

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
shadowdaoandClaude Sonnet 5.5 committed 2026-11-15 10:26:03 -08:00
1 parent 0b9e6e7cbb
commit 4efdef72f6
18 files changed
+2169

No files matched your search

+30
View File
@@ -0,0 +1,30 @@
<?php
declare( strict_types=1 );
namespace StreamGoals\Admin;
/** CSV helpers. Guards against spreadsheet formula injection (=, +, -, @, tab, CR prefixes). */
final class Csv {
public static function cell( mixed $v ): string {
$s = is_scalar( $v ) || null === $v ? (string) $v : '';
if ( '' !== $s && str_contains( "=+-@\t\r", $s[0] ) ) {
return "'" . $s;
}
return $s;
}
/** @return string[] */
public static function row( array $cells ): array {
return array_map( array( self::class, 'cell' ), array_values( $cells ) );
}
/** Render one RFC-4180 line (no WordPress needed; used for tests and streaming). */
public static function line( array $cells ): string {
$out = array();
foreach ( self::row( $cells ) as $c ) {
$out[] = '"' . str_replace( '"', '""', $c ) . '"';
}
return implode( ',', $out ) . "\r\n";
}
}