Skip to content

feat: register abilities with the Abilities API - #1382

Open
selul wants to merge 4 commits into
developmentfrom
feat/abilities-api
Open

selul wants to merge 4 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-chartsedit_posts; users without edit_others_posts only see their own charts
  • visualizer/get-chartedit_posts + Visualizer_Module::can_edit_chart()
  • visualizer/upsert-chartedit_posts to create, can_edit_chart() to update; chart types gated by plan
  • visualizer/set-data-sourceedit_posts + can_edit_chart(); db_query also needs administrator + super admin; sources and refresh intervals gated by plan
  • visualizer/refresh-chart-dataedit_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).

🤖 Generated with Claude Code

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

Copy link
Copy Markdown
Contributor

💂‍♂️ PR Error! No Linked Issue found. Please link an issue or mention it in the body using #<issue_id>

@pirate-bot

pirate-bot commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

Plugin build for 4d996ef is ready 🛎️!

selul and others added 3 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
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