v0.7.5 — WordPress.org slug rename: a-radio → rangerhq-radio

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.
This commit is contained in:
2026-05-30 04:55:39 +01:00
parent de93aa50ca
commit 340cbb2487
9 changed files with 182 additions and 131 deletions
+14 -14
View File
@@ -10,7 +10,7 @@ if ( ! defined( 'ABSPATH' ) ) { exit; }
function radio_render_settings_page() {
if ( ! current_user_can( 'read' ) ) {
wp_die( esc_html__( 'You do not have permission to view this page.', 'a-radio' ) );
wp_die( esc_html__( 'You do not have permission to view this page.', 'rangerhq-radio' ) );
}
// Handle form submission.
@@ -38,7 +38,7 @@ function radio_render_settings_page() {
$state['hide_dashboard_widget'] = $hide_widget ? 1 : 0;
update_user_meta( $user_id, RADIO_META_KEY, $state );
echo '<div class="notice notice-success is-dismissible"><p>' . esc_html__( 'Settings saved.', 'a-radio' ) . '</p></div>';
echo '<div class="notice notice-success is-dismissible"><p>' . esc_html__( 'Settings saved.', 'rangerhq-radio' ) . '</p></div>';
}
$state = radio_get_state();
@@ -47,7 +47,7 @@ function radio_render_settings_page() {
?>
<div class="wrap radio-settings-wrap">
<h1>
<?php esc_html_e( 'Radio — Settings', 'a-radio' ); ?>
<?php esc_html_e( 'Radio — Settings', 'rangerhq-radio' ); ?>
<span class="radio-version-badge">v<?php echo esc_html( RADIO_VERSION ); ?></span>
</h1>
@@ -57,7 +57,7 @@ function radio_render_settings_page() {
<table class="form-table" role="presentation">
<tr>
<th scope="row">
<label for="default_station"><?php esc_html_e( 'Default station', 'a-radio' ); ?></label>
<label for="default_station"><?php esc_html_e( 'Default station', 'rangerhq-radio' ); ?></label>
</th>
<td>
<select id="default_station" name="default_station">
@@ -74,14 +74,14 @@ function radio_render_settings_page() {
<?php endforeach; ?>
</select>
<p class="description">
<?php esc_html_e( 'The station that loads when you open Radio in a fresh tab.', 'a-radio' ); ?>
<?php esc_html_e( 'The station that loads when you open Radio in a fresh tab.', 'rangerhq-radio' ); ?>
</p>
</td>
</tr>
<tr>
<th scope="row">
<label for="default_volume"><?php esc_html_e( 'Default volume', 'a-radio' ); ?></label>
<label for="default_volume"><?php esc_html_e( 'Default volume', 'rangerhq-radio' ); ?></label>
</th>
<td>
<input type="range" id="default_volume" name="default_volume" min="0" max="100" value="<?php echo esc_attr( (int) round( $state['volume'] * 100 ) ); ?>" aria-describedby="default_volume_label">
@@ -91,34 +91,34 @@ function radio_render_settings_page() {
<tr>
<th scope="row">
<label for="theme"><?php esc_html_e( 'Theme', 'a-radio' ); ?></label>
<label for="theme"><?php esc_html_e( 'Theme', 'rangerhq-radio' ); ?></label>
</th>
<td>
<select id="theme" name="theme">
<option value="auto" <?php selected( $state['theme'], 'auto' ); ?>><?php esc_html_e( 'Auto (match WP admin colour scheme)', 'a-radio' ); ?></option>
<option value="light" <?php selected( $state['theme'], 'light' ); ?>><?php esc_html_e( 'Light', 'a-radio' ); ?></option>
<option value="dark" <?php selected( $state['theme'], 'dark' ); ?>><?php esc_html_e( 'Dark', 'a-radio' ); ?></option>
<option value="auto" <?php selected( $state['theme'], 'auto' ); ?>><?php esc_html_e( 'Auto (match WP admin colour scheme)', 'rangerhq-radio' ); ?></option>
<option value="light" <?php selected( $state['theme'], 'light' ); ?>><?php esc_html_e( 'Light', 'rangerhq-radio' ); ?></option>
<option value="dark" <?php selected( $state['theme'], 'dark' ); ?>><?php esc_html_e( 'Dark', 'rangerhq-radio' ); ?></option>
</select>
</td>
</tr>
<tr>
<th scope="row">
<?php esc_html_e( 'Dashboard widget', 'a-radio' ); ?>
<?php esc_html_e( 'Dashboard widget', 'rangerhq-radio' ); ?>
</th>
<td>
<label>
<input type="checkbox" name="hide_dashboard_widget" value="1" <?php checked( $hide_widget ); ?>>
<?php esc_html_e( 'Hide the Radio widget from the WordPress Dashboard', 'a-radio' ); ?>
<?php esc_html_e( 'Hide the Radio widget from the WordPress Dashboard', 'rangerhq-radio' ); ?>
</label>
<p class="description">
<?php esc_html_e( 'When checked, Radio is only accessible from the dedicated admin page (WP Admin → Radio → My Radio).', 'a-radio' ); ?>
<?php esc_html_e( 'When checked, Radio is only accessible from the dedicated admin page (WP Admin → Radio → My Radio).', 'rangerhq-radio' ); ?>
</p>
</td>
</tr>
</table>
<?php submit_button( __( 'Save Changes', 'a-radio' ), 'primary', 'radio_settings_submit' ); ?>
<?php submit_button( __( 'Save Changes', 'rangerhq-radio' ), 'primary', 'radio_settings_submit' ); ?>
</form>
</div>
<?php