Repository navigation
VideoPress: give every video its own page ( channel feature ) - #52666
Conversation
|
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: The Jetpack plugin has different release cadences depending on the platform:
If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack. Boost 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. Videopress 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 3 files.
1 file is newly checked for coverage.
Full summary · PHP report · JS report Coverage check overridden by
I don't care about code coverage for this PR
|
8dd5fb7 to
b081dbd
Compare
b081dbd to
e9efc24
Compare
Themes that declare `add_theme_support( 'videopress-channel' )` ( or return true from `videopress_channel_enabled` ) get a page for every VideoPress video in the media library, so nothing has to be written around an upload: - /videopress?v=<guid> resolves the GUID to its attachment, makes it the request's post and renders the theme's `videopress-video` block template; unknown GUIDs 404. Attachment links and player-less playlist entries ( new `videopress_playlist_entry_url` filter ) point to that page; - a `useQueriedVideo` option on the video block plays the video of the page ( or of the list entry it sits in ); its title and poster are read from VideoPress at render time and never stored on the blog. Channel::init() runs from the package initializer and from the plugin's VideoPress block loader, since WordPress.com only loads the latter. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
e9efc24 to
67f33bd
Compare
Themes that declare `add_theme_support( 'videopress-channel' )` ( or return true from `videopress_channel_enabled` ) get a page for every VideoPress video in the media library, so nothing has to be written around an upload: - /videopress/?v=<guid> resolves the GUID to its attachment, makes it the request's post and renders the theme's `videopress-video` block template; unknown GUIDs 404. Attachment links and player-less playlist entries ( new `videopress_playlist_entry_url` filter ) point to that page; - a `useQueriedVideo` option on the video block plays the video of the page ( or of the list entry it sits in ); its title and poster are read from VideoPress at render time and never stored on the blog; - on WordPress.com Simple the uploaded attachment keeps its `video/mp4` mime and the GUID lives in the platform's videos table, so the lookups fall back to `video_get_info_by_guid()` / `video_get_info_by_blogpostid()`. Channel::init() runs from the package initializer and from the plugin's VideoPress block loader, since WordPress.com only loads the latter. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Part of the VideoPress channels project ( Linear VIDP-407 ). Trimmed on 2026-09-30 to the one thing the merged playlist work ( #52665, #52729, #52724, #52808, #52825 ) does not give a channel theme: a page for every upload.
Proposed changes
A
Channelclass (src/class-channel.php), enabled byadd_theme_support( 'videopress-channel' )or thevideopress_channel_enabledfilter; nothing is hooked otherwise. A video is a VideoPress attachment in the media library, and nothing has to be written around it:/videopress/?v=<guid>resolves the GUID to its attachment ( the package's cachedvideopress_get_post_id_by_guid()), makes it the main query's post and routes the request to the theme'svideopress-videoblock template through theattachment_template_hierarchyfilter. Unknown GUIDs 404. Attachment permalinks and player-less playlist entries ( newvideopress_playlist_entry_urlfilter in the playlist renderer ) point to that page.video/mp4attachment and the GUID lives in the platform's videos table, soChannel::guid()andChannel::attachment_id()fall back tovideo_get_info_by_blogpostid()/video_get_info_by_guid(); anyvideo/*attachment that resolves to a GUID counts as a video. Verified on a sandboxed channel site:/videopress/?v=<guid>renders the uploaded video with its VideoPress title and poster.useQueriedVideoon the video block. A "Show the video being viewed" toggle ( Channel panel ) makes the block play the video of the page or of the Query Loop entry it sits in, so a template holds one video block and no per-video content. The editor shows a placeholder for it. The title and poster are read from VideoPress at render time (videopress_get_video_details()) and are never stored on the blog.Nothing is cached in post meta, no taxonomy, no cron, no Query Loop extension and no block bindings: the theme lists videos with the Latest Videos Playlist block and shows the channel name with the Site Title block.
Related product discussion/links
videopress-videotemplate with the queried-video block; Latest Videos Playlist and All Playlists blocks for the listings ).Does this pull request change what data or activity we track or use?
No.
Testing instructions
jp test php packages/videopress(Channel_Test),jp test js packages/videopress,jp phan packages/videopress.add_theme_support( 'videopress-channel' )to the active block theme ( oradd_filter( 'videopress_channel_enabled', '__return_true' )) and atemplates/videopress-video.htmlcontaining a video block with the "Show the video being viewed" toggle on:/videopress?v=<guid>of one of the uploads: the template renders with that video playing, its title from VideoPress; an unknown GUID 404s.🤖 Generated with Claude Code