v0.7.4 — wp.org submission cleanup: remove updater + add LICENSE

Walks back v0.7.3's Update URI guard pattern. Plugin Check raised
`plugin_updater_detected` on the v0.7.3 build:

    "Including An Update Checker / Changing Updates functionality.
     Plugin Updater detected. Use of the Update URI header is not
     allowed in plugins hosted on WordPress.org."

PCP scans the source as-shipped, not as-distributed, so the v0.7.3
build-time `sed` strip never had a chance to run before the scan.
The simpler correct answer is to delete the custom updater entirely
and rely on wp.org as the canonical update channel once accepted.

Removed:
* `inc/updater.php` — recoverable from git history at tag v0.7.3 if
  ever needed for a non-wp.org distribution.
* `Update URI:` header line in `radio.php` (plus the NOTE block).
* `require_once RADIO_PATH . 'inc/updater.php';` in `radio.php`.
* Updates panel render + `function_exists()` guard in `inc/settings.php`.
* "Self-hosted update checker" line in `README.md`.
* "Self-hosted updater" bullet in `readme.txt` Privacy section.

Added (GPL declaration loop closed):
* `LICENSE` — verbatim canonical GPL v2 text (338 lines from
  gnu.org/licenses/gpl-2.0.txt).
* GPL header block in `assets/css/radio.css`.
* GPL header block in `assets/js/radio.js` (original module overview
  preserved verbatim below the license header).
* GPL header block in `radio.php` docblock alongside the existing
  `License:` / `License URI:` fields.

Migration: existing Gitea-installed copies of v0.7.3 or earlier
become orphaned of auto-updates after this lands on them (the
updater code is gone, so nothing advertises newer versions back).
Recommended path is to uninstall + reinstall from wp.org once the
plugin is accepted. No data loss — station + volume + theme +
history + favourites all live in user_meta.

No user-visible behaviour changes for the player itself. Only the
small `Updates` panel that sat at the bottom of Radio → Settings
is gone.
This commit is contained in:
2026-05-30 04:43:16 +01:00
parent a9d76decae
commit de93aa50ca
10 changed files with 417 additions and 314 deletions
+8 -12
View File
@@ -5,7 +5,7 @@
* Plugin Name: RangerHQ Radio
* Plugin URI: https://icanhelp.ie/radio
* Description: A small, focused internet radio player for your WordPress admin. 44 hand-curated stations from SomaFM across 10 genres — ambient, electronic, lounge, rock, metal, jazz, world, reggae, holiday, specials. Plays via HTML5 audio; per-user station + volume + history + favourites; pop-out window for continuous background play.
* Version: 0.7.3
* Version: 0.7.4
* Requires at least: 5.3
* Requires PHP: 7.4
* Author: David Keane
@@ -13,24 +13,21 @@
* License: GPL v2 or later
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
* Text Domain: a-radio
* Update URI: https://git.davidtkeane.com/ranger/a-radio
*
* @package RangerHQ_Radio
*
* NOTE on `Update URI:` (wp.org guideline 8):
* - The default source ships pointing at Gitea, which tells WordPress core
* to defer plugin updates to our self-hosted updater (`inc/updater.php`).
* - When packaging the submission zip for WordPress.org, the build script
* STRIPS this `Update URI:` line. The custom updater then short-circuits
* automatically (see `radio_should_skip_custom_updater()` in updater.php)
* and WordPress.org takes over update delivery, as required by guideline 8.
* - Strip command: `sed -i '' '/^ \* Update URI:/d' radio.php` before zipping.
* Copyright (C) 2026 David Keane
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version. See LICENSE for the full text.
*/
if ( ! defined( 'ABSPATH' ) ) { exit; }
// Plugin coordinates.
if ( ! defined( 'RADIO_VERSION' ) ) { define( 'RADIO_VERSION', '0.7.3' ); }
if ( ! defined( 'RADIO_VERSION' ) ) { define( 'RADIO_VERSION', '0.7.4' ); }
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__ ) ); }
@@ -46,7 +43,6 @@ require_once RADIO_PATH . 'inc/admin-page.php'; // dedicated Radio admin p
require_once RADIO_PATH . 'inc/about.php'; // About page
require_once RADIO_PATH . 'inc/settings.php'; // Settings page
require_once RADIO_PATH . 'inc/history.php'; // Track history + favourites (v0.5.0)
require_once RADIO_PATH . 'inc/updater.php'; // self-hosted update checker against Gitea
/**
* Admin menu registration. Radio gets its own top-level menu — having