3 Commits

Author SHA1 Message Date
ranger 35dd8d322d docs(readme): add shields.io badge row (v0.1.5 + WP + PHP + wp.org-review-r2 + last-commit + Dublin) 2026-06-09 02:36:30 +01:00
ranger 06991b3760 docs: backfill CHANGELOG.md with v0.1.4 + v0.1.5 entries
v0.1.4 — wp.org submission prep (RangerHQ family rename + PCP cleanup).
v0.1.5 — wp.org reviewer-feedback fix (inline <style> + style="..." → enqueued CSS classes).

Keeps the CHANGELOG.md in step with the readme.txt Changelog section
and the davidtkeane.com landing page Recent Changes list.
2026-06-08 17:33:40 +01:00
ranger 117eaddaa0 chore: v0.1.5 — wp.org reviewer-feedback fix
Reviewer flagged inc/about.php line 19 — an inline <style> block —
asking us to use wp_enqueue_style instead. Per their hint that the
team may not list every instance of an issue, fixed the entire CSS
inline-styling pattern across the plugin:

- inc/about.php: <style> block (lines 19-59) → moved to buddy.css
- inc/about.php: <span style="color:#646970; font-weight:400;">
  → .buddy-about-intro__version class
- inc/about.php: <p style="margin-bottom:0;"> → .buddy-about-intro__cta
- inc/settings.php: <form style="..."> → .buddy-settings-form class
- inc/settings.php: <h2 style="margin-top:0;"> → scoped under form class
- inc/admin-page.php: <p style="max-width:720px;">
  → .buddy-admin-description utility class

The only remaining inline style is in inc/dashboard-widget.php at the
stat-bar width — that is a runtime-computed %d value, legitimately
inline.

The buddy.css file was already enqueued on the About / Settings /
Admin / Dashboard pages via the existing buddy_enqueue_admin_assets
function, so no new enqueue logic was needed.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-08 14:55:04 +01:00
8 changed files with 147 additions and 51 deletions
+41
View File
@@ -9,6 +9,47 @@ Format: [Keep a Changelog 1.1.0](https://keepachangelog.com/en/1.1.0/) — versi
--- ---
## [0.1.5] — 2026-06-08
### Fixed — WordPress.org reviewer feedback (inline asset cleanup)
First-round review from the WordPress.org Plugin Directory team flagged the About page for using an inline `<style>` block. The fix-pass went broader than the single flagged file — a full audit caught three more inline `style="…"` attributes elsewhere in the admin UI, all of which moved to proper CSS classes in the enqueued stylesheet.
The only inline style that intentionally remains is the dynamic stat-bar `width:%d%%` value in the Dashboard widget, which is runtime data computed from per-user state — that one is allowed under wp.org rules because the value cannot be precomputed in a static stylesheet.
- **`inc/about.php`**: removed the 40-line `<style>` block at the top of the file. Replaced `<span style="color:#646970; font-weight:400;">` with `class="buddy-about-intro__version"`. Replaced `<p style="margin-bottom:0;">` with `class="buddy-about-intro__cta"`.
- **`inc/settings.php`**: replaced the long inline `style="max-width: 720px; background:#fff; padding:18px 22px; …"` form-wrapper attribute with `class="buddy-settings-form"`. Removed inline `<h2 style="margin-top:0;">` on the Name heading.
- **`inc/admin-page.php`**: replaced `<p class="description" style="max-width: 720px;">` with `class="description buddy-admin-description"`.
- **`assets/css/buddy.css`**: appended ~40 lines covering the About page intro classes, the Settings form wrapper, and the admin-page description max-width rule. All visual styling now lives in one enqueued stylesheet.
No user-visible behaviour changes. Functionality and layout identical to v0.1.4.
---
## [0.1.4] — 2026-06-07
### Changed — WordPress.org submission prep (plugin family renaming + PCP cleanup)
This release prepares Buddy for the WordPress.org Plugin Directory and aligns it with the RangerHQ plugin family naming convention. No user-visible behaviour changes; existing Buddy state is preserved across the rename.
- **Plugin renamed** from "Buddy" to "RangerHQ Buddy". Plugin header `Plugin Name` updated. The text domain moved from `buddy` to `rangerhq-buddy` and every `__()`, `_e()`, `esc_html__()` etc. call across the codebase was updated to match.
- **Plugin URI** and **Author URI** updated to `davidtkeane.com` (RangerHQ family standard, locked 2026-05-30).
- **Slug stays as `buddy`** internally — directory name, admin-menu slug, `BUDDY_*` constants and `buddy_*` function prefixes all unchanged. Only the user-facing brand and text domain moved.
- **Self-hosted Gitea updater removed.** WordPress.org-hosted plugins use the core update system; a custom updater is forbidden under wp.org rules. The `require_once BUDDY_PATH . 'inc/updater.php';` line was removed from `buddy.php`. The `inc/updater.php` file itself stays in the Gitea repo (defensive `function_exists()` checks keep it inert if not loaded) so the self-hosted build path is recoverable.
- **`LICENSE` file added** containing the full GPL v2 text from gnu.org (required by wp.org).
- **`readme.txt` added** in WordPress.org format — header, Description, Installation, FAQ, Screenshots, Changelog, Upgrade Notice sections. Stable tag pinned to 0.1.4.
### Fixed — Plugin Check (PCP) cleanup pass
Resolved every PCP warning ahead of submission (from 15 errors down to zero):
- Text domain alignment across all translation calls (`buddy``rangerhq-buddy`).
- Output escaping tightened — `esc_html__()`, `esc_attr__()`, `esc_html_e()` applied wherever user-facing strings reach the page.
- Translator comments added next to every `printf`/`sprintf`-style string with placeholders.
- Replaced `mt_rand()` with `wp_rand()` for better randomness (wp.org best-practice).
---
## [0.1.3] — 2026-05-27 ## [0.1.3] — 2026-05-27
### Fixed — Wink no longer gets stuck ### Fixed — Wink no longer gets stuck
+10 -1
View File
@@ -1,4 +1,13 @@
# 🐾 Buddy # 🐾 RangerHQ Buddy
[![version](https://img.shields.io/badge/version-v0.1.5-6dbf7a?style=flat-square)](https://git.davidtkeane.com/ranger/rangerhq-buddy/src/tag/v0.1.5)
[![license](https://img.shields.io/badge/license-GPL%20v2%2B-2a7d3e?style=flat-square)](LICENSE)
[![WordPress](https://img.shields.io/badge/WordPress-5.0%2B-21759b?style=flat-square&logo=wordpress&logoColor=white)](readme.txt)
[![PHP](https://img.shields.io/badge/PHP-7.4%2B-777BB4?style=flat-square&logo=php&logoColor=white)](readme.txt)
[![wp.org](https://img.shields.io/badge/wp.org-review%20round%202-f4e9b7?style=flat-square&logo=wordpress&logoColor=2a7d3e)](https://wordpress.org/plugins/rangerhq-buddy/)
[![last commit](https://img.shields.io/gitea/last-commit/ranger/rangerhq-buddy?gitea_url=https%3A%2F%2Fgit.davidtkeane.com&style=flat-square&color=6dbf7a)](https://git.davidtkeane.com/ranger/rangerhq-buddy/commits/branch/main)
[![no telemetry](https://img.shields.io/badge/telemetry-none-6dbf7a?style=flat-square)](#privacy)
[![made in Dublin](https://img.shields.io/badge/made%20in-Dublin%2C%20Ireland-2a7d3e?style=flat-square)](https://davidtkeane.com)
> A friendly little companion that lives in your WordPress dashboard. > A friendly little companion that lives in your WordPress dashboard.
+81
View File
@@ -168,3 +168,84 @@
font-size: 13px; font-size: 13px;
border-radius: 0 4px 4px 0; border-radius: 0 4px 4px 0;
} }
/* ── About page ──────────────────────────────────────────────────── */
.buddy-about-intro {
display: flex;
gap: 24px;
align-items: center;
flex-wrap: wrap;
margin: 16px 0 28px;
padding: 18px;
background: #fff;
border: 1px solid #ccd0d4;
border-radius: 4px;
}
.buddy-about-intro__sprite {
flex: 0 0 160px;
display: flex;
justify-content: center;
}
.buddy-about-intro__body {
flex: 1 1 320px;
min-width: 0;
}
.buddy-about-intro__body h2 { margin-top: 0; }
.buddy-about-intro__version {
color: #646970;
font-weight: 400;
}
.buddy-about-intro__cta {
margin-bottom: 0;
}
.buddy-about-card {
background: #fff;
border: 1px solid #ccd0d4;
border-radius: 4px;
padding: 20px 24px;
margin: 0 0 22px;
max-width: 720px;
}
.buddy-about-card h2 { margin: 0 0 10px; font-size: 16px; }
.buddy-about-card p:last-child { margin-bottom: 0; }
.buddy-about-card ul { margin: 8px 0 0 18px; list-style: disc; }
.buddy-about-card ul li { margin-bottom: 4px; }
.buddy-about-card--versions ul { list-style: none; margin-left: 0; }
.buddy-about-card--versions li { margin-bottom: 12px; }
.buddy-about-card--versions .ver { font-weight: 600; color: #2271b1; }
.buddy-about-card--versions .latest {
display: inline-block;
margin-left: 6px;
padding: 1px 7px;
background: #00a32a;
color: #fff;
border-radius: 9px;
font-size: 11px;
font-weight: 600;
}
.buddy-about-changelog-link {
display: inline-block;
margin-top: 6px;
font-size: 13px;
color: #646970;
}
/* ── Settings page form + admin-page description ─────────────────── */
.buddy-admin-description {
max-width: 720px;
}
.buddy-settings-form {
max-width: 720px;
background: #fff;
padding: 18px 22px;
border: 1px solid #ccd0d4;
border-radius: 4px;
margin-top: 16px;
}
.buddy-settings-form h2 {
margin-top: 0;
}
+2 -2
View File
@@ -5,7 +5,7 @@
* Plugin Name: RangerHQ Buddy * Plugin Name: RangerHQ Buddy
* Plugin URI: https://davidtkeane.com/rangerhq-buddy * Plugin URI: https://davidtkeane.com/rangerhq-buddy
* Description: Adopt a small companion that lives in your WordPress dashboard. Its mood reflects your site's health — published posts feed it, outdated plugins make it sick, clearing spam makes it happy. Gamifies WordPress maintenance with a bit of charm. * Description: Adopt a small companion that lives in your WordPress dashboard. Its mood reflects your site's health — published posts feed it, outdated plugins make it sick, clearing spam makes it happy. Gamifies WordPress maintenance with a bit of charm.
* Version: 0.1.4 * Version: 0.1.5
* Requires at least: 5.0 * Requires at least: 5.0
* Requires PHP: 7.4 * Requires PHP: 7.4
* Author: David Keane * Author: David Keane
@@ -20,7 +20,7 @@
if ( ! defined( 'ABSPATH' ) ) { exit; } if ( ! defined( 'ABSPATH' ) ) { exit; }
// Plugin coordinates. // Plugin coordinates.
if ( ! defined( 'BUDDY_VERSION' ) ) { define( 'BUDDY_VERSION', '0.1.4' ); } if ( ! defined( 'BUDDY_VERSION' ) ) { define( 'BUDDY_VERSION', '0.1.5' ); }
if ( ! defined( 'BUDDY_FILE' ) ) { define( 'BUDDY_FILE', __FILE__ ); } if ( ! defined( 'BUDDY_FILE' ) ) { define( 'BUDDY_FILE', __FILE__ ); }
if ( ! defined( 'BUDDY_PATH' ) ) { define( 'BUDDY_PATH', plugin_dir_path( __FILE__ ) ); } if ( ! defined( 'BUDDY_PATH' ) ) { define( 'BUDDY_PATH', plugin_dir_path( __FILE__ ) ); }
if ( ! defined( 'BUDDY_URL' ) ) { define( 'BUDDY_URL', plugin_dir_url( __FILE__ ) ); } if ( ! defined( 'BUDDY_URL' ) ) { define( 'BUDDY_URL', plugin_dir_url( __FILE__ ) ); }
+2 -44
View File
@@ -16,48 +16,6 @@ function buddy_render_about_page() {
wp_die( esc_html__( 'You do not have permission to view this page.', 'rangerhq-buddy' ) ); wp_die( esc_html__( 'You do not have permission to view this page.', 'rangerhq-buddy' ) );
} }
?> ?>
<style>
.buddy-about-intro {
display: flex;
gap: 24px;
align-items: center;
flex-wrap: wrap;
margin: 16px 0 28px;
padding: 18px;
background: #fff;
border: 1px solid #ccd0d4;
border-radius: 4px;
}
.buddy-about-intro__sprite {
flex: 0 0 160px;
display: flex;
justify-content: center;
}
.buddy-about-intro__body {
flex: 1 1 320px;
min-width: 0;
}
.buddy-about-intro__body h2 { margin-top: 0; }
.buddy-about-card {
background: #fff;
border: 1px solid #ccd0d4;
border-radius: 4px;
padding: 20px 24px;
margin: 0 0 22px;
max-width: 720px;
}
.buddy-about-card h2 { margin: 0 0 10px; font-size: 16px; }
.buddy-about-card p:last-child { margin-bottom: 0; }
.buddy-about-card ul { margin: 8px 0 0 18px; list-style: disc; }
.buddy-about-card ul li { margin-bottom: 4px; }
.buddy-about-card--versions ul { list-style: none; margin-left: 0; }
.buddy-about-card--versions li { margin-bottom: 12px; }
.buddy-about-card--versions .ver { font-weight: 600; color: #2271b1; }
.buddy-about-card--versions .latest { display:inline-block; margin-left:6px; padding:1px 7px; background:#00a32a; color:#fff; border-radius:9px; font-size:11px; font-weight:600; }
.buddy-about-changelog-link { display: inline-block; margin-top: 6px; font-size: 13px; color: #646970; }
</style>
<div class="wrap"> <div class="wrap">
<h1 class="wp-heading-inline"><?php esc_html_e( 'About', 'rangerhq-buddy' ); ?></h1> <h1 class="wp-heading-inline"><?php esc_html_e( 'About', 'rangerhq-buddy' ); ?></h1>
<span class="page-title-action">v<?php echo esc_html( BUDDY_VERSION ); ?></span> <span class="page-title-action">v<?php echo esc_html( BUDDY_VERSION ); ?></span>
@@ -70,9 +28,9 @@ function buddy_render_about_page() {
<?php buddy_render_sprite( 'default', 'happy', 'lg' ); ?> <?php buddy_render_sprite( 'default', 'happy', 'lg' ); ?>
</div> </div>
<div class="buddy-about-intro__body"> <div class="buddy-about-intro__body">
<h2>Buddy <span style="color:#646970; font-weight:400;">v<?php echo esc_html( BUDDY_VERSION ); ?></span></h2> <h2>Buddy <span class="buddy-about-intro__version">v<?php echo esc_html( BUDDY_VERSION ); ?></span></h2>
<p>A friendly little companion that lives in your WordPress dashboard. The idea: keep Buddy's stats up, eventually Buddy's mood will reflect how well you're taking care of your site itself. Gamifies WordPress maintenance with a bit of charm.</p> <p>A friendly little companion that lives in your WordPress dashboard. The idea: keep Buddy's stats up, eventually Buddy's mood will reflect how well you're taking care of your site itself. Gamifies WordPress maintenance with a bit of charm.</p>
<p style="margin-bottom:0;"> <p class="buddy-about-intro__cta">
<a href="<?php echo esc_url( admin_url( 'admin.php?page=buddy' ) ); ?>" class="button button-primary"><?php esc_html_e( 'Go to My Buddy →', 'rangerhq-buddy' ); ?></a> <a href="<?php echo esc_url( admin_url( 'admin.php?page=buddy' ) ); ?>" class="button button-primary"><?php esc_html_e( 'Go to My Buddy →', 'rangerhq-buddy' ); ?></a>
</p> </p>
</div> </div>
+1 -1
View File
@@ -29,7 +29,7 @@ function buddy_render_main_page() {
<span class="page-title-action">v<?php echo esc_html( BUDDY_VERSION ); ?></span> <span class="page-title-action">v<?php echo esc_html( BUDDY_VERSION ); ?></span>
<hr class="wp-header-end"> <hr class="wp-header-end">
<p class="description" style="max-width: 720px;"> <p class="description buddy-admin-description">
<?php esc_html_e( 'Your dashboard pet. Keep its stats up — eventually they will reflect how well you take care of your WordPress site.', 'rangerhq-buddy' ); ?> <?php esc_html_e( 'Your dashboard pet. Keep its stats up — eventually they will reflect how well you take care of your WordPress site.', 'rangerhq-buddy' ); ?>
<a href="<?php echo esc_url( admin_url( 'admin.php?page=buddy-about' ) ); ?>"><?php esc_html_e( 'Read more on the About page →', 'rangerhq-buddy' ); ?></a> <a href="<?php echo esc_url( admin_url( 'admin.php?page=buddy-about' ) ); ?>"><?php esc_html_e( 'Read more on the About page →', 'rangerhq-buddy' ); ?></a>
</p> </p>
+2 -2
View File
@@ -47,9 +47,9 @@ function buddy_render_settings_page() {
<div class="wrap"> <div class="wrap">
<h1><?php esc_html_e( 'Buddy Settings', 'rangerhq-buddy' ); ?></h1> <h1><?php esc_html_e( 'Buddy Settings', 'rangerhq-buddy' ); ?></h1>
<form method="post" style="max-width: 720px; background:#fff; padding:18px 22px; border:1px solid #ccd0d4; border-radius:4px; margin-top: 16px;"> <form method="post" class="buddy-settings-form">
<?php wp_nonce_field( 'buddy_rename', 'buddy_rename_nonce' ); ?> <?php wp_nonce_field( 'buddy_rename', 'buddy_rename_nonce' ); ?>
<h2 style="margin-top:0;"><?php esc_html_e( 'Name', 'rangerhq-buddy' ); ?></h2> <h2><?php esc_html_e( 'Name', 'rangerhq-buddy' ); ?></h2>
<p> <p>
<label for="buddy_name"><?php esc_html_e( 'What is your Buddy called?', 'rangerhq-buddy' ); ?></label><br> <label for="buddy_name"><?php esc_html_e( 'What is your Buddy called?', 'rangerhq-buddy' ); ?></label><br>
<input type="text" <input type="text"
+8 -1
View File
@@ -4,7 +4,7 @@ Tags: dashboard, pet, gamification, virtual-pet, fun
Requires at least: 5.0 Requires at least: 5.0
Tested up to: 7.0 Tested up to: 7.0
Requires PHP: 7.4 Requires PHP: 7.4
Stable tag: 0.1.4 Stable tag: 0.1.5
License: GPLv2 or later License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html License URI: https://www.gnu.org/licenses/gpl-2.0.html
@@ -83,6 +83,10 @@ Yes. The plugin is GPL v2 or later and the full source is published on Gitea at
== Changelog == == Changelog ==
= 0.1.5 =
* Moved the About page inline `<style>` block into the enqueued `buddy.css` stylesheet per WordPress.org reviewer feedback.
* Replaced inline `style="..."` attributes on the Settings form, Settings name heading, and main admin page description with proper CSS classes. The only remaining inline style is the dynamic stat-bar `width:%d%%` value in the Dashboard widget, which is runtime data.
= 0.1.4 = = 0.1.4 =
* Renamed to RangerHQ Buddy as part of the RangerHQ plugin family naming convention. * Renamed to RangerHQ Buddy as part of the RangerHQ plugin family naming convention.
* Updated Plugin URI and Author URI to davidtkeane.com. * Updated Plugin URI and Author URI to davidtkeane.com.
@@ -105,5 +109,8 @@ Yes. The plugin is GPL v2 or later and the full source is published on Gitea at
== Upgrade Notice == == Upgrade Notice ==
= 0.1.5 =
WordPress.org reviewer-feedback fix — all CSS now properly enqueued via wp_enqueue_style instead of inline. No user-visible behaviour changes.
= 0.1.4 = = 0.1.4 =
Plugin renamed to RangerHQ Buddy and prepared for the WordPress.org Plugin Directory. No user-visible behaviour changes; existing Buddy state preserved. Plugin renamed to RangerHQ Buddy and prepared for the WordPress.org Plugin Directory. No user-visible behaviour changes; existing Buddy state preserved.