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>
This commit is contained in:
@@ -9,6 +9,23 @@ 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
|
||||
|
||||
+18
-1
@@ -297,8 +297,25 @@
|
||||
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 (v0.6.2). */
|
||||
confirmation of the version you are running. */
|
||||
.radio-version-badge {
|
||||
display: inline-block;
|
||||
margin-left: 8px;
|
||||
|
||||
+8
-2
@@ -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,15 @@ 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.2</span> — 30 May 2026 <span class="latest"><?php esc_html_e( 'latest', 'radio' ); ?></span>
|
||||
<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( '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' ); ?>
|
||||
<?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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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.2
|
||||
* 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.2' ); }
|
||||
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_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
|
||||
|
||||
Reference in New Issue
Block a user