Convert all SEO-related REST routes to delegate to extrachill-seo plugin abilities instead of containing business logic directly.
function extrachill_api_seo_audit_handler($request) {
$input = extrachill_api_rest_to_ability_input($request, [
'mode' => 'mode',
'blog_id' => 'blog_id',
'checks' => 'checks'
]);
$result = wp_execute_ability('extrachill/run-seo-audit', $input);
return extrachill_api_ability_to_rest_response($result);
}
Summary
Convert all SEO-related REST routes to delegate to extrachill-seo plugin abilities instead of containing business logic directly.
Current State
Routes to Convert
POST /wp-json/extrachill/v1/seo/audit→ delegate toextrachill/run-seo-auditabilityGET /wp-json/extrachill/v1/seo/status→ delegate toextrachill/get-seo-resultsabilityGET /wp-json/extrachill/v1/seo/config→ delegate toextrachill/get-seo-configabilityPUT /wp-json/extrachill/v1/seo/config→ delegate toextrachill/update-seo-configabilityPOST /wp-json/extrachill/v1/seo/continue→ delegate toextrachill/run-seo-audit(batch mode)POST /wp-json/extrachill/v1/seo/details→ delegate toextrachill/analyze-urlabilityImplementation Pattern
Success Criteria
Dependencies