chore: wp.org submission prep — v0.1.3
Rebrand to RangerHQ Buddy and prepare for the WordPress.org Plugin Directory. Same workflow as rangerhq-radio v0.7.0 → v0.7.5. Changes: - Plugin Name: Buddy → RangerHQ Buddy (matches family naming) - Plugin URI: icanhelp.ie/buddy → davidtkeane.com/rangerhq-buddy - Author URI: rangersmyth.xyz → davidtkeane.com - Text Domain: buddy → rangerhq-buddy (62 occurrences across 8 PHP files) - Add LICENSE file (full GPL v2 text from gnu.org) - Add wp.org-format readme.txt with all 8 required headers - Remove inc/updater.php (self-hosted Gitea updater forbidden for wp.org-hosted plugins per the rangerhq-radio v0.7.3 walkback) - Replace mt_rand with wp_rand in inc/state.php for better RNG - Add 5 translator comments for printf-style i18n placeholders - Wrap 2 dashboard-widget.php printf placeholders in (int) casts - Add tests/ to .gitignore (PCP reports are local-only) PCP audit: 85 issues → ~1 (the .gitignore file itself, stripped from the submission zip). Plugin Check Namer Tool: "Generally Allowable" verdict on both name and slug. Plugin URI https://davidtkeane.com/rangerhq-buddy/ returns HTTP 200. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -18,7 +18,7 @@ function buddy_register_dashboard_widget() {
|
||||
|
||||
wp_add_dashboard_widget(
|
||||
'buddy_dashboard_widget',
|
||||
'🐾 ' . __( 'Buddy', 'buddy' ),
|
||||
'🐾 ' . __( 'Buddy', 'rangerhq-buddy' ),
|
||||
'buddy_render_dashboard_widget'
|
||||
);
|
||||
}
|
||||
@@ -42,7 +42,7 @@ function buddy_render_dashboard_widget() {
|
||||
<?php buddy_render_stats_bars( $state ); ?>
|
||||
<p class="buddy-widget__cta">
|
||||
<a href="<?php echo esc_url( admin_url( 'admin.php?page=buddy' ) ); ?>" class="button button-small">
|
||||
<?php esc_html_e( 'Visit Buddy →', 'buddy' ); ?>
|
||||
<?php esc_html_e( 'Visit Buddy →', 'rangerhq-buddy' ); ?>
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
@@ -56,10 +56,10 @@ function buddy_render_dashboard_widget() {
|
||||
*/
|
||||
function buddy_render_stats_bars( array $state ) {
|
||||
$stats = array(
|
||||
'hunger' => array( 'label' => __( 'Hunger', 'buddy' ), 'icon' => '🍎' ),
|
||||
'happiness' => array( 'label' => __( 'Happiness', 'buddy' ), 'icon' => '😊' ),
|
||||
'health' => array( 'label' => __( 'Health', 'buddy' ), 'icon' => '💚' ),
|
||||
'energy' => array( 'label' => __( 'Energy', 'buddy' ), 'icon' => '⚡' ),
|
||||
'hunger' => array( 'label' => __( 'Hunger', 'rangerhq-buddy' ), 'icon' => '🍎' ),
|
||||
'happiness' => array( 'label' => __( 'Happiness', 'rangerhq-buddy' ), 'icon' => '😊' ),
|
||||
'health' => array( 'label' => __( 'Health', 'rangerhq-buddy' ), 'icon' => '💚' ),
|
||||
'energy' => array( 'label' => __( 'Energy', 'rangerhq-buddy' ), 'icon' => '⚡' ),
|
||||
);
|
||||
echo '<ul class="buddy-stats">';
|
||||
foreach ( $stats as $key => $meta ) {
|
||||
@@ -73,8 +73,8 @@ function buddy_render_stats_bars( array $state ) {
|
||||
esc_html( $meta['icon'] ),
|
||||
esc_html( $meta['label'] ),
|
||||
$low ? ' buddy-stat__fill--low' : '',
|
||||
$val,
|
||||
$val
|
||||
(int) $val,
|
||||
(int) $val
|
||||
);
|
||||
}
|
||||
echo '</ul>';
|
||||
|
||||
Reference in New Issue
Block a user