# IMPORTANT: One-Click vs Whitelabel Plugin

This repo contains the **one-click plugin** distributed via WordPress.org. It is NOT the same as the whitelabel plugin generator.

## Two Different Distribution Flows

### 1. One-Click Plugin (THIS REPO)
- **Distributed via**: WordPress.org SVN
- **Updates handled by**: WordPress.org automatically
- **Function prefix**: Always `adaptify_` (hardcoded)
- **Settings persist**: Yes, because prefix never changes
- **Auto-update code**: NOT NEEDED (WordPress.org handles it)
- **Update URI header**: NOT NEEDED (would block WordPress.org updates)

### 2. Whitelabel Plugin (Backend Generator)
- **Distributed via**: Custom download from api.ttsp4712.ai
- **Updates handled by**: Custom auto-update code in plugin
- **Function prefix**: Randomized on each generation (e.g., `sop5945_`)
- **Settings persist**: NO - prefix changes on update, orphaning old settings
- **Auto-update code**: REQUIRED (checks our server for updates)
- **Update URI: false**: REQUIRED (prevents WordPress.org lookup)

## What NOT To Do

1. **DO NOT** add custom auto-update code to this one-click plugin
   - WordPress.org already handles updates
   - Adding it would be redundant and potentially conflicting

2. **DO NOT** add `Update URI: false` to this plugin
   - This would block WordPress.org from notifying users of updates

3. **DO NOT** use randomized function prefixes in this plugin
   - Must stay as `adaptify_` so settings persist across updates

## Deployment

When you create a GitHub release (e.g., `v1.5.4`), the GitHub Action automatically:
1. Pushes to WordPress.org SVN
2. Creates a ZIP as a release asset

## Known Issue: Whitelabel Settings Reset

The whitelabel auto-update has a bug: each update generates a NEW random prefix, orphaning old settings. The setting `oldprefix_seo_enable_meta_sync` becomes inaccessible when plugin updates to `newprefix_`.

To fix this properly, the whitelabel flow would need to preserve the prefix across updates.
