Add Jetpack Posts to Podcast admin page and proxy endpoint (Phase A)#48523
Add Jetpack Posts to Podcast admin page and proxy endpoint (Phase A)#48523
Conversation
Wires up the Jetpack-side surface for the Posts to Podcast feature:
- New "Posts to Podcast" submenu under the Jetpack admin menu, gated by Jetpack_Posts_To_Podcast_Helper::is_enabled() (delegates to Jetpack_AI_Helper for now; real Jetpack AI entitlement + credit checks land in Phase C).
- Vanilla form with three controls (window / length / voice preset) and a Generate button. Inline JS uses wp.apiFetch to POST to the local proxy, polls the job (3s for the first 30s, then 10s) until terminal state, and writes the resulting markdown script as a draft post via /wp/v2/posts. No build step needed for Phase A; Phase B can move this to a built React app under _inc/client/.
- Local wpcom/v2 proxy endpoint at posts-to-podcast (and /jobs/{id}) that forwards via Connection\Client to the wpcom-side endpoint at public-api.wordpress.com, preserving the upstream HTTP status so async-job 202/4xx/5xx mappings flow through unchanged.
The local proxy + admin page are registered in class.jetpack-admin.php alongside Jetpack_AI_Page. Three voice presets and three length presets are defined in the helper as a single source of truth shared by the form and the proxy validator.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
Are you an Automattician? Please test your changes on all WordPress.com environments to help mitigate accidental explosions.
Interested in more tips and information?
|
|
Thank you for your PR! When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:
This comment will be updated as you work on your PR and make changes. If you think that some of those checks are not needed for your PR, please explain why you think so. Thanks for cooperation 🤖 Follow this PR Review Process:
If you have questions about anything, reach out in #jetpack-developers for guidance! |
Code Coverage SummaryCoverage changed in 1 file.
3 files are newly checked for coverage.
Full summary · PHP report · JS report If appropriate, add one of these labels to override the failing coverage check:
Covered by non-unit tests
|
Wires up the Jetpack-side surface for the Posts to Podcast feature:
The local proxy + admin page are registered in class.jetpack-admin.php alongside Jetpack_AI_Page. Three voice presets and three length presets are defined in the helper as a single source of truth shared by the form and the proxy validator.
Co-Authored-By: Claude Opus 4.7 noreply@anthropic.comFixes #
Proposed changes
Related product discussion/links
Does this pull request change what data or activity we track or use?
Testing instructions