Skip to content

feat: register abilities with the Abilities API - #1155

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

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

Conversation

@selul

@selul selul commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

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

  • optimole/get-delivery-settingsmanage_options
  • optimole/update-delivery-settingsmanage_options
  • optimole/offload-mediaupload_files, plus edit_post and delete_post on each image
  • optimole/restore-mediaupload_files, plus edit_post and delete_post on each image
  • optimole/get-offload-jobmanage_options
  • optimole/purge-image-cachemanage_options

offload-media, restore-media and purge-image-cache take up to 500 media_ids and work in time limited chunks: optional cursor and time_budget inputs, output has results (items of this call), done, cursor and progress.

  • Opts in to the SDK AI Connect module through the optimole_wp_ai_connect_metadata filter (no-op until the SDK ships it).

Testing: php -l, PHPCS and PHPStan pass on the changed files; PHPUnit not run locally (no WP test suite).

  • AI Connect collects the abilities by name prefix; the sensitive ones opt out with meta.ai_connect = false.
  • The dashboard renders the SDK's #tsdk_banner slot, so the AI Connect notice shows on the product page too.

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
Collaborator

Plugin build for e5d7f1a is ready 🛎️!

@pirate-bot

pirate-bot commented Sep 18, 2026

Copy link
Copy Markdown
Collaborator

🌍 i18n String Review Report

📊 Summary

Category Count
➕ Added 43
➖ Removed 0
🔄 Changed 0
Total 43
➕ Added Strings (43) - Click to expand
String Location Words Suggested Match
Image delivery, cloud offloading and cache oper... inc/abilities.php:122 10 Image optimization service by Optimole
Get Optimole delivery settings inc/abilities.php:140 4 Settings
Update Optimole delivery settings inc/abilities.php:171 4 Settings
Clear the cache for all optimized images. Igno... inc/abilities.php:318 12 Clear Cached Images
This site is not connected to Optimole. inc/abilities.php:960 7 NOT CONNECTED
make your images load faster inc/main.php:190 5 When enabled, Optimole will automatically reduce the image quality when it detects a slower network, making your images load faster on low-speed internet connections. %1$sLearn more%2$s
purge cached images inc/main.php:191 3 Clear Cached Images
offload media to the cloud inc/main.php:192 5 Offload to Optimole
Offload my media library to the Optimole cloud ... inc/main.php:196 13 Store Your Images in Optimole Cloud
I changed my logo. Purge the cached versions s... inc/main.php:197 14 Clear Cached Images
Returns the effective Optimole image delivery s... inc/abilities.php:141 21 No close match
Updates Optimole image delivery settings. Only... inc/abilities.php:172 18 No close match
Moves the selected media library images to Opti... inc/abilities.php:200 54 No close match
Restores the selected offloaded images from Opt... inc/abilities.php:225 45 No close match
Get Optimole offload status inc/abilities.php:249 4 No close match
Returns the progress of the current offload or ... inc/abilities.php:250 22 No close match
Invalidates the optimized variants of the selec... inc/abilities.php:300 47 No close match
Attachment IDs of the images. inc/abilities.php:309 5 No close match
Expected "enabled" or "disabled". inc/abilities.php:400 4 No close match
Expected one of: %s. inc/abilities.php:405 4 No close match
Expected an integer between %1$d and %2$d. inc/abilities.php:411 7 No close match
Expected a number. inc/abilities.php:416 3 No close match
Expected an integer. inc/abilities.php:421 3 No close match
Expected a string. inc/abilities.php:426 3 No close match
Unknown setting. inc/abilities.php:430 2 No close match
Exclusions must be a list of rules. inc/abilities.php:447 7 No close match
Provide media_ids, or all=true to clear the ca... inc/abilities.php:558 11 No close match
The cursor is not valid for these media IDs. U... inc/abilities.php:733 21 No close match
%1$d of %2$d images processed. inc/abilities.php:766 5 No close match
Each exclusion needs a valid scope, rule and va... inc/abilities.php:879 9 No close match
The exclusion value can not be empty. inc/abilities.php:884 7 No close match
At least one media ID is required. inc/abilities.php:908 7 No close match
A maximum of %d media IDs can be processed at o... inc/abilities.php:912 11 LLM Error: Invalid JSON response
Invalid value for "%1$s". %2$s inc/abilities.php:949 5 No close match
Legacy inverted flag: "disabled" means images a... inc/abilities.php:977 16 No close match
Used only when autoquality is disabled. inc/abilities.php:982 6 No close match
Watermark ID from the Optimole dashboard, -1 t... inc/abilities.php:1006 11 No close match
Validate and return the changes without saving ... inc/abilities.php:1048 8 No close match
Cursor returned by the previous call, to contin... inc/abilities.php:1105 12 No close match
Maximum number of seconds to work before return... inc/abilities.php:1109 8 No close match
Items handled in this call only. inc/abilities.php:1128 6 No close match
Empty when done. inc/abilities.php:1145 3 No close match
Make my images load faster: turn on lazy loadin... inc/main.php:195 15 No close match
Total 487

selul and others added 9 commits September 18, 2026 12:57
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
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
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