Skip to content

Releases: BattloXX/WP-Claude-Optimizer

v4.2.3

Choose a tag to compare

@BattloXX BattloXX released this 07 Aug 14:09

Fix: meta box still landing in the sidebar after v4.2.2

The last two placement fixes (context 'side' → 'normal' → 'advanced') had zero visible effect in production. Root cause: WordPress persists a per-user saved column position keyed by meta box ID in wp_usermeta (meta-box-order_post/_page). The box has used the same ID claude_optimizer_box since v4.0/4.1, back when it really was context='side' — that stale saved position was silently overriding the code's context on every page load for any admin who had loaded the screen before, which is why changing the context value alone never changed anything visible.

Fix: renamed the meta box ID to claude_opt_panel, which has no stored position history and is forced to render according to the current code's context. Also added a one-time cleanup that strips the old ID from every user's saved meta-box order.

Upgrading

Use the claude-optimizer-4.2.3.zip asset below (not GitHub's "Download ZIP" button).

v4.2.2

Choose a tag to compare

@BattloXX BattloXX released this 07 Aug 14:00

Fix: meta box was rendering in the sidebar instead of below the editor

The "KI Content-Optimierung" box was landing in the Document sidebar in production instead of below the post content as intended in v4.2. Changed the meta box context from 'normal' to 'advanced', so it now groups into the same collapsed "Meta-Boxen" area as other classic meta boxes (e.g. Yoast SEO), and removed the resulting duplicate title bar.

Upgrading

Use the claude-optimizer-4.2.2.zip asset below (not GitHub's "Download ZIP" button) so WordPress recognizes it as an update to your existing installation.

v4.2.1

Choose a tag to compare

@BattloXX BattloXX released this 07 Aug 13:24

Fix: critical data-loss bug

Deleting a plugin via wp-admin always runs its uninstall.php against the shared WordPress database — even when deleting a stray duplicate copy of the plugin (e.g. one accidentally installed under a different folder name via GitHub's "Download ZIP"). Because uninstall.php deleted all plugin options unconditionally, this wiped the live API key, model choice, and saved prompts of the active installation.

Fix: settings deletion now requires an explicit opt-in checkbox ("Bei Deinstallation" on the Settings page, default off). uninstall.php returns immediately unless this is enabled, so deleting any copy of the plugin — intentional or accidental — no longer destroys your configuration by default.

Upgrading

Use the claude-optimizer-4.2.1.zip asset below (not GitHub's "Download ZIP" button) so the folder name matches your existing installation and WordPress recognizes it as an update rather than a new plugin.

Recovery note: if you were affected by the data-loss bug in a prior install, you'll need to re-enter your API key, re-select your model, and re-save your prompts (Prompt-Bericht.txt / Prompt-Seite.txt in this repo contain the original prompt templates as a starting point).

v4.2

Choose a tag to compare

@BattloXX BattloXX released this 07 Aug 12:37

Highlights

Security & reliability

  • API key now encrypted with a fresh random IV per save (AES-256-CBC), with backward-compatible reads of legacy values.
  • Removed a dead anthropic-beta header with no effect on Claude 4+ models.
  • Added stop_reason handling (refusal/truncation) and a single retry with backoff on 429/5xx from the Anthropic API.
  • Added per-user rate limiting on the generation endpoint.

Model & cost controls

  • Curated model dropdown (Haiku 4.5 / Sonnet 5 / Opus 5), now defaulting to Sonnet 5 for better output quality.
  • Prompt caching on the system prompt to reduce token usage on repeated generations.
  • Configurable max-tokens setting and a "Verbindung testen" button to validate the API key without a full generation.

Usability

  • Nothing is written to a post until you explicitly confirm: generation now shows a preview with per-field checkboxes before anything is saved.
  • The "KI Content-Optimierung" box moved from the sidebar to a full-width area below the editor, redesigned as a responsive card grid (two-column desktop, single-column mobile with a sticky action bar).
  • Accessible status updates (aria-live/aria-busy), an indeterminate progress indicator, and in-place Gutenberg updates instead of a full page reload.
  • Social Media, WhatsApp, and Custom CSS fields remain directly editable by hand at any time.

Code organization & docs

  • Split the meta-box code into meta-box.php, meta-box-view.php, and rest-generate.php.
  • Added a WordPress.org-style readme.txt, resolved a CSS-class-prefix documentation inconsistency, and removed a stale build artifact from the repo.

Full changelog: 6 commits since the previous v4.1 code state — see commit history for details.