Repository navigation
VideoPress: list playlists in the All Playlists block on WordPress.com - #54065
Conversation
… lists playlists The All Playlists block reads the playlist index, which only the package initializer hooks into post saves. WordPress.com does not run that initializer, so the index was never written there and the block always showed its empty state. Start the index from the extended-block registration once the Video Playlist block is registered. Co-Authored-By: Claude Opus 5.5 <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! Jetpack plugin: No scheduled milestone found for this plugin. If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack. |
Code Coverage SummaryCoverage changed in 1 file.
|
Proposed changes
videopress_playlist_indexoption, whichPlaylist_Indexkeeps current fromwp_after_insert_post/deleted_post, plus a one-off full scan scheduled onadmin_init. Those hooks are only added by the package'sInitializer::active_initialization(). WordPress.com does not run the package initializer, so nothing ever writes the index there and the block reads an empty option. The extended-block file already startsChannel::init()for the same reason, but not the index.register_videopress_blocks()now also startsPlaylist_Index::init()once the Video Playlist block is registered, so the index is kept wherever the block exists. Where the package initializer already ran (self-hosted and Atomic sites with the VideoPress module active), hooking it again is a no-op: the callbacks are identical, so WordPress keeps one.admin_init(the index version option is missing), and any post save re-indexes that post.Related product discussion/links
Does this pull request change what data or activity we track or use?
No.
Testing instructions
jetpack docker phpunit jetpack -- --filter=VideoPress_Video_Extension_Test: the playlist index follows saved posts when the playlist block is registered, and is not hooked when it is not.🤖 Generated with Claude Code