340cbb2487
A third-party AI-driven naming check flagged `a-radio` as too generic for the wp.org Plugin Directory (single common functional word, no distinguishing prefix). The verdict was advisory but defensible — short generic slugs are increasingly rejected as the directory grows past 60K plugins. Fixing it preemptively is cheaper than facing a rejection at submission time. The new slug `rangerhq-radio` matches the public display name "RangerHQ Radio" (unchanged) and lines up with the rest of the RangerHQ plugin family: `rangerhq-spatial`, `rangerhq-glyph`, now `rangerhq-radio`. Changes (packaging only — no player behaviour change): * Text Domain `a-radio` → `rangerhq-radio` across all 125 i18n call sites via in-place sed (esc_html__, _e, __, esc_attr_e and their friends). PHP lint clean post-rename. * `Text Domain:` plugin header in radio.php line 15 → `rangerhq-radio`. * `RADIO_GITEA_URL` constant value → new Gitea repo URL. * README.md install link → new repo URL. * readme.txt FAQ Gitea link → new repo URL. * readme.txt Stable tag → 0.7.5. * inc/about.php — v0.7.5 in "latest" slot; v0.7.4 demoted. Unchanged deliberately (would have been pure churn): * Plugin Name header "RangerHQ Radio" — already correct. * Plugin URI. * Internal constants `RADIO_*` — don't have to match slug. * User-meta keys `radio_state` / `radio_history` / `radio_favourites` — renaming would orphan every existing user's settings on upgrade. * HTML `data-radio-*` attributes — JS controller's element selectors in radio.js, not slug-related. * CSS class names `radio-player`, `radio-about-*` — internal scoping. * Main plugin file name `radio.php`. Migration: existing Gitea-installed copies need their folder renamed on disk (a-radio → rangerhq-radio) + reactivation in WP admin. No data loss because all user-facing state lives in user_meta under unchanged keys. This commit is the file content for v0.7.5; the annotated tag and push will follow the Gitea repo rename (ranger/a-radio → ranger/rangerhq-radio) so the new tag lives in the new URL space from the start.
153 lines
13 KiB
Plaintext
153 lines
13 KiB
Plaintext
=== RangerHQ Radio ===
|
||
Contributors: ir240474
|
||
Donate link: https://buymeacoffee.com/davidtkeane
|
||
Tags: radio, music, audio, internet radio, background music
|
||
Requires at least: 5.3
|
||
Tested up to: 7.0
|
||
Stable tag: 0.7.5
|
||
Requires PHP: 7.4
|
||
License: GPLv2 or later
|
||
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
||
|
||
A small, focused internet radio player for your WordPress admin — 44 hand-curated stations, history, favourites, and a pop-out window.
|
||
|
||
== Description ==
|
||
|
||
**RangerHQ Radio** adds a tiny, focused internet radio player to your WordPress dashboard so you can have background music while you work in the admin — without leaving the page, opening Spotify, or installing a desktop client.
|
||
|
||
= What you get =
|
||
|
||
* **44 hand-curated stations from [SomaFM](https://somafm.com)** across 10 genres — ambient, electronic, lounge, rock, metal, jazz, world, reggae, holiday and specials. From coding-focus ambient (Groove Salad, Drone Zone) to drive-time electronic (DEF CON Radio, Beat Blender) to mellow lounge (Lush, Secret Agent).
|
||
* **Now-playing indicator** — small CSS dancing-bars equalizer that pulses while audio is playing. A Web Audio frequency visualizer kicks in automatically when the browser allows it (with a graceful fallback to the CSS bars).
|
||
* **Track history + favourites** — every track that scrolls past is logged to your personal History page (capped at 500); a star toggle promotes the good ones to a separate Favourites tab that doesn't age out. Each row has four search links (Spotify, YouTube, Apple Music, Bandcamp) so you can find that track on whichever service you use.
|
||
* **Pop-out mini-player** — a 380×560 standalone window that persists across the main tab's navigation, so background music doesn't cut when you move between Plugins, Posts, Users, etc.
|
||
* **OS media keys** — F8/headphone buttons/lock-screen widget play and pause the radio (via MediaSession API).
|
||
* **Mute toggle** — the speaker icon is clickable; remembers prior volume.
|
||
* **Dark theme** — explicit dark option for the player surface (`Settings → Theme`).
|
||
* **Per-user state** — your chosen station, volume, theme, history, and favourites all live in `user_meta`, so each WordPress user has their own setup.
|
||
|
||
= Third-party service =
|
||
|
||
This plugin streams audio from **[SomaFM](https://somafm.com)** — an independent, listener-supported, commercial-free internet radio network broadcasting from San Francisco since 2000. RangerHQ Radio is a small WordPress wrapper around their public streams; the service itself provides all the music. SomaFM's terms of use are at [somafm.com/legal/](https://somafm.com/legal/). If you enjoy the music, please consider [supporting SomaFM directly](https://somafm.com/support/).
|
||
|
||
See the dedicated Privacy section below for everything that does and does not leave your site.
|
||
|
||
== Privacy ==
|
||
|
||
RangerHQ Radio is privacy-respecting by design:
|
||
|
||
* **No telemetry from the plugin.** RangerHQ Radio does not phone home, report usage statistics, or contact the plugin author's servers in any way.
|
||
* **No data leaves your site.** All per-user state — station choice, volume, theme, listening history, favourites — is stored in your own WordPress database (`wp_usermeta`) and never transmitted anywhere.
|
||
* **Audio streams come from SomaFM directly.** When you press Play, your browser opens an HTTP stream to `https://somafm.com` — the plugin does not proxy, log, or analyse this connection. SomaFM's own privacy practices apply to the stream; see [SomaFM legal](https://somafm.com/legal/).
|
||
* **Current-track display** polls SomaFM's public songs endpoint (`https://somafm.com/songs/{station}.json`) every 30 seconds **while audio is playing**. The plugin sends no identifying information with this request. Polling stops the moment you pause.
|
||
* **Search-provider links** (Spotify / YouTube / Apple Music / Bandcamp) are outbound only. Clicking one opens a new tab with a search URL on that service — the plugin sends no data and stores no information about which links you click.
|
||
* **No third-party JavaScript** is loaded from outside your own server. All scripts ship inside the plugin.
|
||
* **Updates** come from WordPress.org through the normal WordPress core update process. The plugin does not contact any other update server.
|
||
|
||
If you do not want any third-party traffic at all, simply do not press Play.
|
||
|
||
== Installation ==
|
||
|
||
1. Upload the plugin folder to `/wp-content/plugins/` (or install from the WordPress plugin directory).
|
||
2. Activate the plugin through the **Plugins** menu in WordPress.
|
||
3. Open **Radio → My Radio** in the admin sidebar and press Play. Your station and volume choice are saved per user.
|
||
|
||
There is no separate configuration step — defaults are sensible (Groove Salad at 60% volume). Settings are at **Radio → Settings**.
|
||
|
||
== Frequently Asked Questions ==
|
||
|
||
= Does this work on the front-end of my site? =
|
||
|
||
No — RangerHQ Radio is admin-only. It adds a player to the WordPress dashboard for you (and your other authenticated admins) to use while working. It does not embed a radio player on the public-facing site.
|
||
|
||
= Can I add my own stations? =
|
||
|
||
Not via the admin yet. The station list is hard-coded in `inc/stations.php` (44 SomaFM stations). If you'd like to add custom stations or other internet radio sources, please open an issue on the [Gitea repo](https://git.davidtkeane.com/ranger/rangerhq-radio).
|
||
|
||
= The pop-out window doesn't open. =
|
||
|
||
Your browser may be blocking pop-ups. Click the address bar's pop-up icon to allow pop-ups for this site, then try again.
|
||
|
||
= Why does Touch ID / a passkey prompt appear when I press Play? =
|
||
|
||
It shouldn't. This plugin uses no biometrics or authentication of its own — that's a different plugin in the RangerHQ family.
|
||
|
||
= The current-track display says nothing / is hidden. =
|
||
|
||
SomaFM's track-info endpoint (`somafm.com/songs/{station}.json`) is fetched best-effort. If it's unreachable or the browser blocks the request, the track display silently hides. The player keeps working regardless.
|
||
|
||
== Screenshots ==
|
||
|
||
1. Dashboard widget — compact mini-player on the WordPress Dashboard, sits alongside your usual dashboard widgets.
|
||
2. Settings page — choose default station, default volume, theme; admin-only Updates panel below.
|
||
3. Track History page — every track that scrolled past, star-to-favourite, with Spotify / YouTube / Apple / Bandcamp deep-link search per row.
|
||
4. Pop-out mini-player window — 380×560 standalone window that keeps playing while you navigate the rest of the admin.
|
||
5. About page — what Radio does, who it's for, credits, full version history.
|
||
|
||
== Changelog ==
|
||
|
||
= 0.7.5 =
|
||
* WordPress.org slug rename: `a-radio` → `rangerhq-radio`. The previous slug was flagged as too generic for the wp.org Plugin Directory (single common functional word, no distinguishing prefix). The new slug matches the public display name "RangerHQ Radio" and lines up with the rest of the RangerHQ plugin family (`rangerhq-spatial`, `rangerhq-glyph`). Text Domain renamed to match — all 125 i18n call sites updated. Gitea repository moved to https://git.davidtkeane.com/ranger/rangerhq-radio. No user-visible behaviour change in the player; this is a packaging change only. Plugin Name stays "RangerHQ Radio"; internal constants (`RADIO_*`) and user-meta keys (`radio_state` / `radio_history` / `radio_favourites`) are unchanged so settings + history + favourites all survive intact.
|
||
|
||
= 0.7.4 =
|
||
* WordPress.org submission cleanup. Removed the self-hosted Gitea updater (`inc/updater.php`) and the `Update URI` header from `radio.php`. WordPress.org explicitly disallows both for hosted plugins (Plugin Check `plugin_updater_detected`), so updates now flow through WordPress.org as the canonical channel. Added a top-level `LICENSE` file with the full GPL v2 text and explicit GPL header blocks to `assets/css/radio.css` and `assets/js/radio.js` so the licensing of every shipped file is unambiguous. The small `Updates` panel that used to sit at the bottom of Radio → Settings is gone; player behaviour is unchanged.
|
||
|
||
= 0.7.3 =
|
||
* WordPress.org guideline 8 compliance + Privacy documentation. Added `Update URI: https://git.davidtkeane.com/ranger/a-radio` header so installs from the author's Gitea continue to receive updates from there, while wp.org-distributed copies (where the build script strips this 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 the readme covering every outbound connection (none from the plugin itself; SomaFM audio + 30-second songs.json poll while playing). Added explicit link to SomaFM's terms of use at https://somafm.com/legal/. No user-visible behaviour changes.
|
||
|
||
= 0.7.2 =
|
||
* Screenshots + correct wp.org contributor handle. Five `screenshot-N.png` files added at plugin root (Dashboard widget, Settings page, History page, Pop-out window, About page). `Contributors` header updated from placeholder to actual wp.org username `ir240474`.
|
||
|
||
= 0.7.1 =
|
||
* Plugin Check follow-up — `Tested up to` bumped from 6.7 to 7.0 (PCP `outdated_tested_upto_header`). Stray `.DS_Store` files re-deleted (macOS Finder regenerated them between PCP runs; they won't be in the submission zip).
|
||
|
||
= 0.7.0 =
|
||
* WordPress.org submission prep — full PCP-clean. Plugin name normalised to **RangerHQ Radio** (SomaFM stays in the description as the data source). Text Domain renamed `radio` → `a-radio` everywhere (134 i18n call sites updated). Six `printf` / `sprintf` calls now carry translator comments. All admin `$_POST` access now `wp_unslash()` + `sanitize_*` at the access point. `Requires at least` bumped to 5.3 (matches `wp_date()` usage). Pop-out window now uses `wp_enqueue_*` + `wp_print_styles()` / `wp_print_footer_scripts()` instead of raw `<link>` / `<script>` tags; popup-specific CSS moved into `radio.css` under `body.radio-popout` scope. `.DS_Store` files removed. Proper `readme.txt`.
|
||
|
||
= 0.6.3 =
|
||
* Discreet "buy me a coffee" support link in the Updates panel and the About-page Credits card. Single `RADIO_SUPPORT_URL` constant; conditional render — silently hidden if the constant is empty.
|
||
|
||
= 0.6.2 =
|
||
* Current version badge on the Settings page — small grey pill follows the H1 reading `v{RADIO_VERSION}`.
|
||
|
||
= 0.6.1 =
|
||
* About page restructure — 3-card top row (What / Who / Credits) + full-width Version history with the latest expanded and earlier releases as one-liners.
|
||
|
||
= 0.6.0 =
|
||
* Pop-out mini-player. `↗ Pop out` button beside Play opens a 380×560 standalone window that persists across the main tab's navigation, so background music keeps playing while you click around Plugins / Posts / Users.
|
||
|
||
= 0.5.0 =
|
||
* Track history + favourites. Every track that scrolls past is logged to a per-user `Radio → History` page (capped at 500). Star toggle promotes tracks to a separate Favourites tab. Four search-provider links per row (Spotify, YouTube, Apple Music, Bandcamp).
|
||
|
||
= 0.4.0 =
|
||
* Now-playing visual indicator. CSS dancing-bars equalizer that pulses while audio is playing. Web Audio frequency visualizer kicks in when the browser allows it (with graceful fallback).
|
||
|
||
= 0.3.0 =
|
||
* Dark theme, mute toggle on the speaker icon, MediaSession API (OS media keys), SomaFM current-track polling under the station description.
|
||
|
||
= 0.2.0 =
|
||
* UI rebuilt to WordPress admin standards — postbox container, native play/pause button with text label, picks up the user's admin colour scheme via `var(--wp-admin-theme-color)`.
|
||
|
||
= 0.1.0 =
|
||
* First release — 44 SomaFM stations across 10 genres, dashboard widget + dedicated admin page, per-user state, self-hosted Gitea updater.
|
||
|
||
== Upgrade Notice ==
|
||
|
||
= 0.7.5 =
|
||
WordPress.org slug renamed `a-radio` → `rangerhq-radio` (lines up with display name "RangerHQ Radio" and the family pattern). Text Domain matches. No player behaviour change. Existing user state (station / volume / history / favourites) survives intact.
|
||
|
||
= 0.7.4 =
|
||
WordPress.org submission cleanup — removes the disallowed self-hosted updater + `Update URI` header. Adds LICENSE file + per-asset GPL headers. The `Updates` panel in Settings is gone (WordPress.org handles updates now). No player behaviour changes.
|
||
|
||
= 0.7.3 =
|
||
WordPress.org submission compliance — adds `Update URI` header so the self-hosted updater stays dormant on wp.org installs (guideline 8). Adds Privacy section + SomaFM terms link. No user-visible changes.
|
||
|
||
= 0.7.2 =
|
||
Screenshots + correct wp.org contributor handle. No user-visible changes.
|
||
|
||
= 0.7.1 =
|
||
PCP follow-up — `Tested up to` bumped to 7.0. No user-visible changes.
|
||
|
||
= 0.7.0 =
|
||
WordPress.org submission prep. Plugin name now "RangerHQ Radio". Text Domain renamed `radio` → `a-radio`. No user-visible behaviour changes; settings, history, and favourites all survive the upgrade.
|