From a9d76decae0ac9d9f12d0e97fe549364c974878c Mon Sep 17 00:00:00 2001 From: David Keane Date: Sat, 30 May 2026 04:21:25 +0100 Subject: [PATCH] =?UTF-8?q?v0.7.3=20=E2=80=94=20WordPress.org=20guideline?= =?UTF-8?q?=208=20compliance=20+=20Privacy=20section?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- CHANGELOG.md | 26 ++++++++++++++++++++++++++ inc/about.php | 5 +++-- inc/settings.php | 8 ++++++-- inc/updater.php | 33 +++++++++++++++++++++++++++++++++ radio.php | 14 ++++++++++++-- readme.txt | 30 +++++++++++++++++++++++++----- 6 files changed, 105 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9f5bd31..982fa67 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,32 @@ Format: [Keep a Changelog 1.1.0](https://keepachangelog.com/en/1.1.0/) — versi --- +## [0.7.3] — 2026-05-30 — WordPress.org guideline 8 compliance + Privacy section + +WordPress.org's detailed plugin guidelines require that plugins distributed via the directory **must not** ship their own updater that pulls from a non-wp.org server (guideline 8). RangerHQ Radio's self-hosted Gitea updater predates the wp.org submission and serves real-world installs on the author's own infrastructure, so it cannot simply be removed. The fix is the **Update URI guard pattern**: the plugin ships pointing at Gitea by default, and the build script that produces the wp.org submission zip strips the `Update URI:` header line. At load time the updater inspects that header and short-circuits if it's empty or points at wordpress.org. + +Net effect: one source tree, two build artifacts, both compliant. + +### Added +- **`Update URI:` header in `radio.php`** pointing at `https://git.davidtkeane.com/ranger/a-radio`. WordPress core uses this header to decide whether wp.org should poll this plugin for updates — a non-wordpress.org URI opts the plugin out of wp.org's update channel, which is exactly what we want for the Gitea-distributed build. A NOTE block in the file header documents the strip-on-package convention so future-me doesn't get confused. +- **`radio_should_skip_custom_updater()` helper** at the top of `inc/updater.php`. Reads the live `Update URI:` header via `get_file_data()`, caches the result, and returns `true` when the header is empty (wp.org default) or contains `wordpress.org`. Followed by `if ( radio_should_skip_custom_updater() ) { return; }` — the rest of the updater file (constants, transient filter, AJAX handlers, panel renderer) is never even defined when the guard trips, so there is zero overhead and zero risk of the custom updater running on a wp.org install. +- **`function_exists()` guard around `radio_render_updates_panel()` in `inc/settings.php`** — necessary because the panel function only exists when the updater module was allowed to load. With the guard, the Settings page silently omits the panel on wp.org installs and renders it normally on Gitea installs. +- **Dedicated `== Privacy ==` section in `readme.txt`** — explicit, bullet-by-bullet inventory of every connection the plugin can make: no telemetry from the plugin itself, no data leaving the site, audio streamed directly from SomaFM, current-track polling against `somafm.com/songs/{station}.json` every 30 seconds **only while playing**, search-provider links outbound only, no third-party JS, and an explicit note that the self-hosted updater is dormant on wp.org installs. Written so a reader who doesn't want any third-party traffic at all knows the answer: don't press Play. +- **SomaFM Terms of Use link** (`https://somafm.com/legal/`) prominently in the readme's third-party-service note. Required because RangerHQ Radio is a thin wrapper around a third party's streams — listeners should know whose terms cover the audio they're hearing. + +### Changed +- **`readme.txt` Stable tag** → `0.7.3`. +- **`readme.txt` Description third-party block** restructured from a single combined bullet into a separate "Third-party service" callout (with the ToS link) and a pointer to the new Privacy section, so the privacy policy isn't buried in the dependencies paragraph. +- **`inc/about.php` Version history** — v0.7.3 rotated into the "latest" slot (full description); v0.7.2 demoted to a one-liner in the earlier-releases list. + +### Why +WordPress.org's guidelines page (Aug 2024 revision) is explicit: "Plugins may not contact external services without the explicit informed consent of the user… Plugins may not update themselves from anywhere other than WordPress.org once they're hosted there." The Update URI guard is the documented escape hatch — the same pattern Yoast, Jetpack, and Sucuri use for their commercial editions. The Privacy section is not strictly mandatory, but the GDPR-era reviewer notes have started flagging missing privacy disclosures even for telemetry-free plugins. Easier to ship with one than to play the comments game after submission. + +### Migration +None. Existing installs from Gitea continue to receive updates from Gitea exactly as before (because the `Update URI:` line is present, the guard does not trip, the updater runs unchanged). The wp.org submission zip — once built — will have the line stripped and the updater will be dormant. No user-visible behaviour change in either distribution. + +--- + ## [0.7.2] — 2026-05-30 — Screenshots + correct wp.org contributor handle Two small but real submission-prep moves: diff --git a/inc/about.php b/inc/about.php index 44c9def..7518331 100644 --- a/inc/about.php +++ b/inc/about.php @@ -79,14 +79,15 @@ function radio_render_about_page() {

- v0.7.2 — 30 May 2026 + v0.7.3 — 30 May 2026

- +