# Setup Request: Add Adi to bw-plugins Development

**Requested by:** adi
**Date:** 2026-04-17
**Purpose:** Enable adi to develop the new `bw-page-title-override` plugin

---

## What Adi Needs

Adi wants to create a new plugin called **BW Page Title Override** that:
- Adds a meta box field to pages/posts called "Override Page Title"
- Displays the override title on the frontend instead of the original title
- Keeps the original title in the WordPress editor (for organization)
- Works with Kadence theme

---

## Actions Required (Run as rian)

### 1. Add adi to the bw-plugins-dev group

```bash
sudo usermod -aG bw-plugins-dev adi
```

This allows adi to read/write files in `/srv/apps/bw-plugins/wp-content/plugins/`.

### 2. Scaffold the new plugin

```bash
cd /srv/apps/bw-plugins
tools/new-plugin.sh bw-page-title-override "BW Page Title Override" "Override page titles on the frontend while keeping the original title in the editor. Works with Kadence theme."
```

This creates the full plugin structure at `wp-content/plugins/bw-page-title-override/` with:
- Main plugin file with update checker wiring
- README.md, CLAUDE.md, CHANGELOG.md, LICENSE
- docs/ folder with SPEC, ARCHITECTURE, TESTING, etc.
- Vendored plugin-update-checker library
- Activates the plugin on the dev site

### 3. Verify adi can access the files

After adding adi to the group, adi needs to log out and back in (or run `newgrp bw-plugins-dev`) for the group membership to take effect.

Test:
```bash
# As adi:
ls -la /srv/apps/bw-plugins/wp-content/plugins/bw-page-title-override/
touch /srv/apps/bw-plugins/wp-content/plugins/bw-page-title-override/test-write && rm /srv/apps/bw-plugins/wp-content/plugins/bw-page-title-override/test-write
```

---

## After Setup

Once complete, adi can:
1. Edit plugin files in `wp-content/plugins/bw-page-title-override/`
2. Run scans: `tools/cleanup-scan.sh bw-page-title-override`
3. Test on: https://bw-plugins.demoing.info

Adi will implement:
- Meta box registration for the override field
- Frontend title filter hooks for Kadence theme
- Proper escaping and nonce verification per CLAUDE-STANDARDS.md

---

## Plugin Spec Summary

| Field | Value |
|-------|-------|
| Slug | `bw-page-title-override` |
| Display Name | BW Page Title Override |
| Description | Override page titles on the frontend while keeping the original title in the editor. Works with Kadence theme. |
| Initial Version | 0.1.0 |
| Meta Key | `_bw_page_title_override_title` |
| Post Types | Pages (and optionally posts/CPTs) |

---

## Questions for Rian

1. Should the override field be available for **all post types** or just pages?
2. Any specific Kadence theme hooks you know of that handle the page title display?

---

*Delete this file after setup is complete.*
