2 Commits

Author SHA1 Message Date
ranger 224fccd6c4 feat(0.6.3): discreet "buy me a coffee" support link
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>
2026-05-30 00:44:44 +01:00
ranger 32a3040e39 feat(0.6.2): current version badge on Settings page
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>
2026-05-30 00:30:14 +01:00
6 changed files with 87 additions and 10 deletions
+27
View File
@@ -9,6 +9,33 @@ Format: [Keep a Changelog 1.1.0](https://keepachangelog.com/en/1.1.0/) — versi
---
## [0.6.3] — 2026-05-30 — Discreet "buy me a coffee" support link
### Added
- New `RADIO_SUPPORT_URL` constant in `radio.php` (default `https://buymeacoffee.com/davidtkeane`). Wrapped in `if ( ! defined(...) )` so it's override-able from `wp-config.php`.
- Tiny footer line `☕ Like Radio? If You fancy to buy me a coffee →` inside the **Updates panel** on Settings, below the manual-update note.
- Matching footer line at the bottom of the **Credits + thanks** card on the About page.
- Both spots render from the same constant — change one place, both update.
- **Conditional render**: if `RADIO_SUPPORT_URL` is empty / undefined, the link is silently hidden. Forks can strip funding with one line.
### Design
- Muted styling deliberate: 12 px, admin-theme-coloured link, subtle top border. Reads as housekeeping ("here's where to send thanks") not a sales pitch. No yellow BMC brand chrome.
- Dark-theme variant for the divider (`#3c434a`) so it stays subtle on the dark surface.
**Files changed:** `radio.php` (version, `RADIO_SUPPORT_URL` constant), `inc/updater.php` (link inside the Updates panel after the manual-update paragraph), `inc/about.php` (link inside the Credits + thanks card; rotate v0.6.3 into latest expanded slot, v0.6.2 into earlier-releases list), `assets/css/radio.css` (`.radio-support-link` styling + dark-theme override).
---
## [0.6.2] — 2026-05-30 — Current version badge on Settings
### Added
- Small grey pill follows the **"Radio — Settings"** heading: `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 of the badge (`#2c3338` background, `#c3c4c7` text) so it stays readable when `theme=dark`.
**Files changed:** `radio.php` (version), `inc/settings.php` (`<span class="radio-version-badge">v…</span>` inside the H1), `assets/css/radio.css` (`.radio-version-badge` styling + dark-theme override).
---
## [0.6.1] — 2026-05-30 — About page restructure
By v0.6.0 the About page had eight version-history entries, each a full paragraph, dwarfing the other cards and pushing Credits + thanks off the visible area. v0.6.1 rebalances the layout.
+33
View File
@@ -297,6 +297,39 @@
font-size: 13px;
}
/* v0.6.3: Discreet "buy me a coffee" support line. Rendered in two
spots from the single RADIO_SUPPORT_URL constant — bottom of the
Updates panel in Settings, and bottom of the Credits + thanks card
on About. Muted styling deliberate: housekeeping not sales pitch. */
.radio-support-link {
display: block;
margin-top: 12px;
padding-top: 10px;
border-top: 1px solid #f0f0f1;
font-size: 12px;
color: var(--wp-admin-theme-color, #2271b1);
text-decoration: none;
}
.radio-support-link::before { content: '☕ '; opacity: 0.8; }
.radio-support-link:hover { text-decoration: underline; }
.radio-theme-dark .radio-support-link { border-top-color: #3c434a; }
/* Small grey pill that follows the Settings page H1 — at-a-glance
confirmation of the version you are running. */
.radio-version-badge {
display: inline-block;
margin-left: 8px;
padding: 2px 8px;
background: #e2e4e7;
color: #50575e;
border-radius: 10px;
font-size: 11px;
font-weight: 600;
vertical-align: middle;
letter-spacing: 0.02em;
}
.radio-theme-dark .radio-version-badge { background: #2c3338; color: #c3c4c7; }
/* ──────────────────────────────────────────────────────────────────
* Dashboard widget — no nested card; bare content inside .inside
* (WP renders the widget as a postbox already; don't double up)
+9 -2
View File
@@ -65,6 +65,11 @@ function radio_render_about_page() {
<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 -->
@@ -74,14 +79,16 @@ function radio_render_about_page() {
<h2><?php esc_html_e( 'Version history', 'radio' ); ?></h2>
<div class="radio-about-versions__latest">
<span class="ver">v0.6.1</span> &mdash; 30 May 2026 <span class="latest"><?php esc_html_e( 'latest', 'radio' ); ?></span>
<span class="ver">v0.6.3</span> &mdash; 30 May 2026 <span class="latest"><?php esc_html_e( 'latest', 'radio' ); ?></span>
<p>
<?php esc_html_e( 'About page restructure. Three short cards on top (What / Who / Credits) now balance the layout; Credits gets equal billing instead of being pushed off the bottom. Version history is its own full-width card below — only the latest release is shown in full; earlier releases collapse to one line each so the card stays compact however many versions ship. Full prose for older versions lives in the CHANGELOG on Gitea.', 'radio' ); ?>
<?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> &mdash; <?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> &mdash; <?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> &mdash; <?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> &mdash; <?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> &mdash; <?php esc_html_e( 'Now-playing indicator — dancing bars + Web Audio frequency visualizer', 'radio' ); ?></li>
+4 -1
View File
@@ -47,7 +47,10 @@ function radio_render_settings_page() {
$hide_widget = ! empty( $state['hide_dashboard_widget'] );
?>
<div class="wrap radio-settings-wrap">
<h1><?php esc_html_e( 'Radio — Settings', 'radio' ); ?></h1>
<h1>
<?php esc_html_e( 'Radio — Settings', 'radio' ); ?>
<span class="radio-version-badge">v<?php echo esc_html( RADIO_VERSION ); ?></span>
</h1>
<form method="post" action="">
<?php wp_nonce_field( 'radio_save_settings', 'radio_settings_nonce' ); ?>
+6
View File
@@ -195,6 +195,12 @@ function radio_render_updates_panel() {
<p style="margin:10px 0 0; color:#646970; font-size:12px;">
<?php esc_html_e( 'Manual update path: download the .zip, deactivate the plugin in WordPress, upload via Plugins → Add New → Upload, reactivate. Your settings survive the upgrade (state is stored in user_meta).', '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>
<script>
+3 -2
View File
@@ -5,7 +5,7 @@
* Plugin Name: Radio
* Plugin URI: https://icanhelp.ie/radio
* Description: A small, focused, free radio player for your WordPress admin. 44 SomaFM stations grouped by 10 genres — ambient, electronic, lounge, rock, metal, jazz, world, reggae, holiday, specials. Plays via HTML5 audio; volume + station choice persist per-user.
* Version: 0.6.1
* Version: 0.6.3
* Requires at least: 5.0
* Requires PHP: 7.4
* Author: David Keane
@@ -20,12 +20,13 @@
if ( ! defined( 'ABSPATH' ) ) { exit; }
// Plugin coordinates.
if ( ! defined( 'RADIO_VERSION' ) ) { define( 'RADIO_VERSION', '0.6.1' ); }
if ( ! defined( 'RADIO_VERSION' ) ) { define( 'RADIO_VERSION', '0.6.3' ); }
if ( ! defined( 'RADIO_FILE' ) ) { define( 'RADIO_FILE', __FILE__ ); }
if ( ! defined( 'RADIO_PATH' ) ) { define( 'RADIO_PATH', plugin_dir_path( __FILE__ ) ); }
if ( ! defined( 'RADIO_URL' ) ) { define( 'RADIO_URL', plugin_dir_url( __FILE__ ) ); }
if ( ! defined( 'RADIO_BASENAME' ) ) { define( 'RADIO_BASENAME', plugin_basename( __FILE__ ) ); }
if ( ! defined( 'RADIO_GITEA_URL' ) ) { define( 'RADIO_GITEA_URL', 'https://git.davidtkeane.com/ranger/a-radio' ); }
if ( ! defined( 'RADIO_SUPPORT_URL' ) ) { define( 'RADIO_SUPPORT_URL', 'https://buymeacoffee.com/davidtkeane' ); }
// Includes — each file owns one concern.
require_once RADIO_PATH . 'inc/stations.php'; // the 44-station array + genre helpers