224fccd6c4
Tiny footer line inside the Updates panel on Settings + matching line at the bottom of the Credits + thanks card on About. Pulled from a single RADIO_SUPPORT_URL constant so both stay in sync. Conditional render — if the constant is empty, the link is silently hidden, so forks can strip funding with one line. Design intent: muted (12px, admin-theme-coloured, subtle top divider). Reads as housekeeping not a sales pitch — no yellow BMC brand chrome. Dark-theme divider override so it stays subtle on the dark surface. Files: radio.php (version, RADIO_SUPPORT_URL constant default https://buymeacoffee.com/davidtkeane), inc/updater.php (link in Updates panel), inc/about.php (link in Credits + thanks card; rotate v0.6.3 → latest, v0.6.2 → earlier list), assets/css/radio.css (.radio-support-link + dark-theme override), CHANGELOG.md. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
112 lines
7.4 KiB
PHP
112 lines
7.4 KiB
PHP
<?php
|
|
/**
|
|
* Radio — About page (WP Admin → Radio → About).
|
|
*
|
|
* Top row: three short cards (What / Who / Credits) — equal-height,
|
|
* balanced layout. Below: a full-width Version history card with the
|
|
* latest release shown in full and earlier releases as a one-line
|
|
* summary list, capped by a link to the full CHANGELOG on Gitea.
|
|
*
|
|
* Pattern mirrors a-buddy/inc/about.php.
|
|
*/
|
|
|
|
if ( ! defined( 'ABSPATH' ) ) { exit; }
|
|
|
|
function radio_render_about_page() {
|
|
if ( ! current_user_can( 'read' ) ) {
|
|
wp_die( esc_html__( 'You do not have permission to view this page.', 'radio' ) );
|
|
}
|
|
|
|
$count = count( radio_get_stations_flat() );
|
|
?>
|
|
<div class="wrap radio-about-wrap">
|
|
<h1><?php esc_html_e( 'About Radio', 'radio' ); ?></h1>
|
|
|
|
<!-- ── Top row: three short cards (What / Who / Credits) ── -->
|
|
<div class="radio-about-grid">
|
|
|
|
<div class="radio-about-card">
|
|
<h2><?php esc_html_e( 'What Radio does', 'radio' ); ?></h2>
|
|
<p>
|
|
<?php
|
|
printf(
|
|
/* translators: %d = station count */
|
|
esc_html__( 'Adds a small, focused radio player to your WordPress dashboard. %d hand-curated SomaFM stations across 10 genres — ambient, electronic, lounge, rock, metal, jazz, world, reggae, holiday and specials. Plays in your admin pages while you work. Your chosen station + volume persist per user.', 'radio' ),
|
|
(int) $count
|
|
);
|
|
?>
|
|
</p>
|
|
<p>
|
|
<?php esc_html_e( 'Audio plays directly in your browser via HTML5 — no server-side proxy, no extra services to host, no third-party tracking. Just an <audio> element pointed at SomaFM\'s public streams.', 'radio' ); ?>
|
|
</p>
|
|
</div>
|
|
|
|
<div class="radio-about-card">
|
|
<h2><?php esc_html_e( 'Who Radio is for', 'radio' ); ?></h2>
|
|
<p>
|
|
<?php esc_html_e( 'Anyone who likes background music while working in the WordPress admin. Coders, writers, support agents, content editors. The 44 SomaFM stations cover a wide enough range that there\'s something for any mood — from coding-focus ambient (Groove Salad, Drone Zone) to drive-time electronic (DEF CON Radio, Beat Blender) to mellow lounge (Lush, Secret Agent) to specifically-quirky picks (SF 10-33 mixes ambient with San Francisco public-safety radio).', 'radio' ); ?>
|
|
</p>
|
|
</div>
|
|
|
|
<div class="radio-about-card">
|
|
<h2><?php esc_html_e( 'Credits + thanks', 'radio' ); ?></h2>
|
|
<p>
|
|
<?php
|
|
printf(
|
|
wp_kses(
|
|
/* translators: %s = link to somafm.com */
|
|
__( 'All stations and streams are provided by %s — an independent, listener-supported, commercial-free internet radio network broadcasting from San Francisco since 2000. Radio is just a small WordPress wrapper around their public streams. If you enjoy this plugin, please consider donating to SomaFM directly.', 'radio' ),
|
|
array( 'a' => array( 'href' => true, 'target' => true, 'rel' => true ) )
|
|
),
|
|
'<a href="https://somafm.com/support/" target="_blank" rel="noopener">SomaFM</a>'
|
|
);
|
|
?>
|
|
</p>
|
|
<p>
|
|
<?php esc_html_e( 'Plugin author: David Keane. Part of the RangerHQ plugin family. GPL v2 or later. Source on Gitea.', 'radio' ); ?>
|
|
</p>
|
|
<?php if ( defined( 'RADIO_SUPPORT_URL' ) && RADIO_SUPPORT_URL ) : ?>
|
|
<a class="radio-support-link" href="<?php echo esc_url( RADIO_SUPPORT_URL ); ?>" target="_blank" rel="noopener">
|
|
<?php esc_html_e( 'Like Radio? If You fancy to buy me a coffee →', 'radio' ); ?>
|
|
</a>
|
|
<?php endif; ?>
|
|
</div>
|
|
|
|
</div><!-- /.radio-about-grid -->
|
|
|
|
<!-- ── Version history: latest in full, earlier as one-liners ── -->
|
|
<div class="radio-about-versions">
|
|
<h2><?php esc_html_e( 'Version history', 'radio' ); ?></h2>
|
|
|
|
<div class="radio-about-versions__latest">
|
|
<span class="ver">v0.6.3</span> — 30 May 2026 <span class="latest"><?php esc_html_e( 'latest', 'radio' ); ?></span>
|
|
<p>
|
|
<?php esc_html_e( 'Discreet "buy me a coffee" support link. Tiny footer line inside the Updates panel on Settings, and a matching line in the Credits + thanks card on this About page. Muted styling, admin-theme-coloured link, sits below the existing content as housekeeping rather than a sales pitch. Pulled from a single RADIO_SUPPORT_URL constant so both spots stay in sync.', 'radio' ); ?>
|
|
</p>
|
|
</div>
|
|
|
|
<h3><?php esc_html_e( 'Earlier releases', 'radio' ); ?></h3>
|
|
<ul class="radio-about-versions__earlier">
|
|
<li><span class="ver">v0.6.2</span> <span class="ver-date">30 May 2026</span> — <?php esc_html_e( 'Current version badge on the Settings page', 'radio' ); ?></li>
|
|
<li><span class="ver">v0.6.1</span> <span class="ver-date">30 May 2026</span> — <?php esc_html_e( 'About page restructure — balanced 3-card top row + compact version history', 'radio' ); ?></li>
|
|
<li><span class="ver">v0.6.0</span> <span class="ver-date">30 May 2026</span> — <?php esc_html_e( 'Pop-out mini-player — continuous background play across admin navigation', 'radio' ); ?></li>
|
|
<li><span class="ver">v0.5.0</span> <span class="ver-date">29 May 2026</span> — <?php esc_html_e( 'Track history + favourites (Spotify / YouTube / Apple Music / Bandcamp search links)', 'radio' ); ?></li>
|
|
<li><span class="ver">v0.4.0</span> <span class="ver-date">29 May 2026</span> — <?php esc_html_e( 'Now-playing indicator — dancing bars + Web Audio frequency visualizer', 'radio' ); ?></li>
|
|
<li><span class="ver">v0.3.2</span> <span class="ver-date">29 May 2026</span> — <?php esc_html_e( 'Play-button glyph baseline fix (dashicon → Unicode ▶ / ‖)', 'radio' ); ?></li>
|
|
<li><span class="ver">v0.3.1</span> <span class="ver-date">29 May 2026</span> — <?php esc_html_e( 'My Radio layout polish + dropped dark-auto', 'radio' ); ?></li>
|
|
<li><span class="ver">v0.3.0</span> <span class="ver-date">29 May 2026</span> — <?php esc_html_e( 'Dark theme + mute + OS media keys + SomaFM current-track display', 'radio' ); ?></li>
|
|
<li><span class="ver">v0.2.0</span> <span class="ver-date">26 May 2026</span> — <?php esc_html_e( 'UI rebuilt to WordPress admin standards', 'radio' ); ?></li>
|
|
<li><span class="ver">v0.1.0</span> <span class="ver-date">26 May 2026</span> — <?php esc_html_e( 'First release — 44 SomaFM stations, dashboard widget + dedicated admin page, per-user state, self-hosted Gitea updater', 'radio' ); ?></li>
|
|
</ul>
|
|
|
|
<a class="radio-about-changelog-link"
|
|
href="<?php echo esc_url( RADIO_GITEA_URL . '/src/branch/main/CHANGELOG.md' ); ?>"
|
|
target="_blank" rel="noopener">
|
|
<?php esc_html_e( 'View the full CHANGELOG.md →', 'radio' ); ?>
|
|
</a>
|
|
</div>
|
|
|
|
</div>
|
|
<?php
|
|
}
|