# HXSR — Smart Redirecter

Version: 0.1.13
Part of: HX Series (WAHX stack)
Author: Youhei Okubo (youheiokubo)

## What it does

Custom short-link manager for WordPress. Define slugs like `/go/summer-sale` → any destination. Supports scheduled redirect switching, QR code export, usage memos, access counting, and Markdown export.

## Key facts

- 302 redirects only (cache-safe, correct for scheduled use)
- redirect_type: 'url' (absolute) / 'post' (post ID → get_permalink) / 'media' (attachment ID → wp_get_attachment_url)
- post/media store IDs, resolved at runtime → staging/production domain differences are a non-issue
- No IP logging (integer count only); logged-in admins (manage_options) don't increment the count when visiting their own links; count is manually resettable
- Prefix configurable (default: `go`)
- Schedules applied lazily on access + hourly cron backstop
- QR: external API (api.qrserver.com), admin-only, disclosed in readme External services
- HX Bridge: fires `hxsr_after_save` action; HXMD v1.5.0+ subscribes (HXSR never calls HXMD directly)
- Two custom DB tables: `hxsr_links`, `hxsr_schedules` (timestamps set in PHP, dbDelta-safe)
- Bundled Alpine.js 3.15.12 only (handle hxsr-alpine, depends on hxsr-admin, both defer, no CDN). No htmx — admin uses fetch(), visitors get zero JS
- AI docs bundled: CLAUDE.md, ai-reference.md, llms.txt

## Changelog

### 0.1.13
- Restored Plugin URI now that the GitHub repo is public

### 0.1.12
- Removed dead Plugin URI header, fixed goQR.me privacy policy link (WordPress.org review round 1 fixes)

### 0.1.11
- Live slug-duplicate check (debounced) with inline warning + disabled Save button, instead of post-submit error

### 0.1.10
- Fixed WP_DEBUG_DISPLAY leaking raw DB error HTML into AJAX JSON on duplicate-slug save (broke error display entirely); modal error now auto-scrolls into view; more specific duplicate-slug message

### 0.1.9
- Access count: reset-to-zero action in list; admin's own visits (manage_options) no longer counted

### 0.1.8
- Removed all inline styles from admin template (21 spots), moved to CSS classes — layout now fully governed by stylesheet, not fighting inline overrides

### 0.1.7
- Layout fixes: list meta row (serial+memo icon), Delete button visibility, Add Schedule field alignment (flex-start not flex-end)

### 0.1.6
- Serial-number reverse lookup in list search (SN:000001 → link id); serial shown in list

### 0.1.5
- MD export: download replaced with copy-to-clipboard viewer (Content-Length-less downloads stalled as .crdownload); button icon alignment fix

### 0.1.4
- Fix invisible QR serial (GD color allocation), in-modal error display, list search (hxsr_s), schedule form layout

### 0.1.3
- Admin UI redesign: --hxsr-* design tokens (HXRV pattern), indigo brand, segmented type control

### 0.1.2
- Fix fatal on link list render (template variable rename leftover)

### 0.1.1
- Fix blank admin screen (Alpine load order), top-level menu, htmx removed

### 0.1.0
- Initial release
