Skip to content

feat: register abilities with the Abilities API - #1382

Merged
selul merged 9 commits into
developmentfrom
feat/abilities-api
Sep 29, 2026
Merged

selul merged 9 commits into
developmentfrom
feat/abilities-api

Conversation

@selul

@selul selul commented Sep 18, 2026 •

Copy link
Copy Markdown
Contributor

Registers five Visualizer abilities with the WordPress Abilities API (no-op below WP 6.9).

  • visualizer/list-charts — edit_posts; users without edit_others_posts only see their own charts
  • visualizer/get-chart — edit_posts + Visualizer_Module::can_edit_chart()
  • visualizer/upsert-chart — edit_posts to create, can_edit_chart() to update; chart types gated by plan
  • visualizer/set-data-source — edit_posts + can_edit_chart(); db_query also needs administrator + super admin; sources and refresh intervals gated by plan
  • visualizer/refresh-chart-data — edit_posts + can_edit_chart()
  • Opts in to the SDK AI Connect module through the visualizer_ai_connect_metadata filter (no-op until the SDK release that ships it)
  • Pro-required errors include the upgrade link.

Testing: php -l, PHPCS and PHPStan pass; all abilities exercised through WP_Ability::execute() on a local WP 7.1 install (Free, and Pro plan simulated via the plan filters).

  • AI Connect collects the abilities by name prefix; the sensitive ones opt out with meta.ai_connect = false.

Related: Codeinwp/wp-plugin-easy-mcp#143

🤖 Generated with Claude Code

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@pirate-bot

pirate-bot commented Sep 18, 2026 •

Copy link
Copy Markdown
Contributor

Plugin build for c23d6c8 is ready 🛎️!

selul and others added 8 commits September 18, 2026 17:15
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018GJfggt4S4RuAfF24E93EK
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018GJfggt4S4RuAfF24E93EK
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018GJfggt4S4RuAfF24E93EK
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018GJfggt4S4RuAfF24E93EK
The first SDK release that carries the AI Connect module this PR opts into.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018GJfggt4S4RuAfF24E93EK
Picks up the AI Connect fixes since 3.3.64: the Enable button hides once
the connector is active, the notice matches core's height, and the
"enabled" event for products with their own notification UI.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018GJfggt4S4RuAfF24E93EK
@selul
selul merged commit a3d69b2 into development Sep 29, 2026
8 checks passed
@selul
selul deleted the feat/abilities-api branch September 29, 2026 10:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants