32a3040e39
Small grey pill follows the "Radio — Settings" H1 — v{RADIO_VERSION}.
Visible at a glance so you don't have to hover the plugin row in
Plugins → Installed or open About just to check what version you're on.
Dark-theme variant so it stays readable when theme=dark.
Files: radio.php (version), inc/settings.php (<span> inside H1),
assets/css/radio.css (.radio-version-badge + dark override),
inc/about.php (rotate v0.6.2 into latest expanded slot, v0.6.1 into
earlier-releases list), CHANGELOG.md.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
106 lines
6.8 KiB
PHP
106 lines
6.8 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>
|
|
</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.2</span> — 30 May 2026 <span class="latest"><?php esc_html_e( 'latest', 'radio' ); ?></span>
|
|
<p>
|
|
<?php esc_html_e( 'Current version badge on the Settings page. A small grey pill follows the "Radio — Settings" heading so the version you are running is visible at a glance — no need to hover the plugin in Plugins → Installed or open the About page to check.', 'radio' ); ?>
|
|
</p>
|
|
</div>
|
|
|
|
<h3><?php esc_html_e( 'Earlier releases', 'radio' ); ?></h3>
|
|
<ul class="radio-about-versions__earlier">
|
|
<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
|
|
}
|