a9d76decae
Adds the Update URI guard pattern so one source tree produces two compliant build artifacts: * Gitea install (default): `Update URI:` header points at git.davidtkeane.com → wp.org skips this plugin → self-hosted updater runs normally. * WordPress.org submission zip (build script strips that line): header is empty → `radio_should_skip_custom_updater()` returns true → entire updater file short-circuits at load time → wp.org takes over update delivery as guideline 8 requires. Settings page now guards the Updates panel render with `function_exists()` because the panel function only exists when the updater was allowed to load. Also adds a dedicated `== Privacy ==` section to readme.txt covering every outbound connection (none from the plugin itself; SomaFM audio + 30s songs.json poll while playing) and adds an explicit link to SomaFM's terms of use (somafm.com/legal/). No user-visible behaviour change in either distribution.
116 lines
8.7 KiB
PHP
116 lines
8.7 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.', 'a-radio' ) );
|
|
}
|
|
|
|
$count = count( radio_get_stations_flat() );
|
|
?>
|
|
<div class="wrap radio-about-wrap">
|
|
<h1><?php esc_html_e( 'About Radio', 'a-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', 'a-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.', 'a-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.', 'a-radio' ); ?>
|
|
</p>
|
|
</div>
|
|
|
|
<div class="radio-about-card">
|
|
<h2><?php esc_html_e( 'Who Radio is for', 'a-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).', 'a-radio' ); ?>
|
|
</p>
|
|
</div>
|
|
|
|
<div class="radio-about-card">
|
|
<h2><?php esc_html_e( 'Credits + thanks', 'a-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.', 'a-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.', 'a-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 →', 'a-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', 'a-radio' ); ?></h2>
|
|
|
|
<div class="radio-about-versions__latest">
|
|
<span class="ver">v0.7.3</span> — 30 May 2026 <span class="latest"><?php esc_html_e( 'latest', 'a-radio' ); ?></span>
|
|
<p>
|
|
<?php esc_html_e( 'WordPress.org guideline 8 compliance + Privacy documentation. Added Update URI header so installs from the author\'s Gitea keep receiving updates from there, while wp.org-distributed copies (where the build strips that header line) hand update delivery to WordPress.org — the self-hosted updater short-circuits at load time and the Updates panel hides automatically. Added a dedicated Privacy section to readme covering every outbound connection (none from the plugin itself; SomaFM audio + 30-second songs.json poll only while playing). Added explicit link to SomaFM terms of use. No user-visible behaviour changes.', 'a-radio' ); ?>
|
|
</p>
|
|
</div>
|
|
|
|
<h3><?php esc_html_e( 'Earlier releases', 'a-radio' ); ?></h3>
|
|
<ul class="radio-about-versions__earlier">
|
|
<li><span class="ver">v0.7.2</span> <span class="ver-date">30 May 2026</span> — <?php esc_html_e( 'Screenshots + correct wp.org contributor handle (ir240474)', 'a-radio' ); ?></li>
|
|
<li><span class="ver">v0.7.1</span> <span class="ver-date">30 May 2026</span> — <?php esc_html_e( 'Plugin Check follow-up — Tested-up-to bumped to 7.0, .DS_Store re-cleanup', 'a-radio' ); ?></li>
|
|
<li><span class="ver">v0.7.0</span> <span class="ver-date">30 May 2026</span> — <?php esc_html_e( 'WordPress.org submission prep — full Plugin Check clean (169 → 4 issues, branding, textdomain, security, popup refactor, readme.txt)', 'a-radio' ); ?></li>
|
|
<li><span class="ver">v0.6.3</span> <span class="ver-date">30 May 2026</span> — <?php esc_html_e( 'Discreet buy-me-a-coffee support link (Updates panel + Credits card)', 'a-radio' ); ?></li>
|
|
<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', 'a-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', 'a-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', 'a-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)', 'a-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', 'a-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 ▶ / ‖)', 'a-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', 'a-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', 'a-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', 'a-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', 'a-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 →', 'a-radio' ); ?>
|
|
</a>
|
|
</div>
|
|
|
|
</div>
|
|
<?php
|
|
}
|