Skip to content

VideoPress: give every video its own page ( channel feature ) - #52666

Merged
heydemoura merged 2 commits into
trunkfrom
add/videopress-channel-taxonomy-blocks
Sep 30, 2026
Merged

heydemoura merged 2 commits into
trunkfrom
add/videopress-channel-taxonomy-blocks

Conversation

@heydemoura

@heydemoura heydemoura commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

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 Channel class ( src/class-channel.php ), enabled by add_theme_support( 'videopress-channel' ) or the videopress_channel_enabled filter; nothing is hooked otherwise. A video is a VideoPress attachment in the media library, and nothing has to be written around it:

  • A page for every video. /videopress/?v=<guid> resolves the GUID to its attachment ( the package's cached videopress_get_post_id_by_guid() ), makes it the main query's post and routes the request to the theme's videopress-video block template through the attachment_template_hierarchy filter. Unknown GUIDs 404. Attachment permalinks and player-less playlist entries ( new videopress_playlist_entry_url filter in the playlist renderer ) point to that page.
  • WordPress.com Simple. An upload there keeps its video/mp4 attachment and the GUID lives in the platform's videos table, so Channel::guid() and Channel::attachment_id() fall back to video_get_info_by_blogpostid() / video_get_info_by_guid(); any video/* 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.
  • useQueriedVideo on 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

  • Theme PR: wpcom-themes #157509 ( videopress-video template with the queried-video block; Latest Videos Playlist and All Playlists blocks for the listings ).
  • Linear: VIDP-407.

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.
  • On a site with VideoPress and a few uploads, add add_theme_support( 'videopress-channel' ) to the active block theme ( or add_filter( 'videopress_channel_enabled', '__return_true' ) ) and a templates/videopress-video.html containing a video block with the "Show the video being viewed" toggle on:
    • Open /videopress?v=<guid> of one of the uploads: the template renders with that video playing, its title from VideoPress; an unknown GUID 404s.
    • A Video Playlist or Latest Videos Playlist block with Show player off links its entries to the site's video pages instead of videopress.com.
  • With the feature off, none of the above is hooked and the video block ignores the new attribute.

🤖 Generated with Claude Code

@heydemoura heydemoura added [Feature] VideoPress A feature to help you upload and insert videos on your site. [Status] In Progress labels Sep 22, 2026
@heydemoura heydemoura self-assigned this Sep 22, 2026
@github-actions

github-actions Bot commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

Are you an Automattician? Please test your changes on all WordPress.com environments to help mitigate accidental explosions.

  • To test on WoA, go to the Plugins menu on a WoA dev site. Click on the "Upload" button and follow the upgrade flow to be able to upload, install, and activate the Jetpack Beta plugin. Once the plugin is active, go to Jetpack > Jetpack Beta, select your plugin (Jetpack), and enable the add/videopress-channel-taxonomy-blocks branch.
  • To test on Simple, run the following command on your sandbox:
bin/jetpack-downloader test jetpack add/videopress-channel-taxonomy-blocks

Interested in more tips and information?

  • In your local development environment, use the jetpack rsync command to sync your changes to a WoA dev blog.
  • Read more about our development workflow here: PCYsg-eg0-p2
  • Figure out when your changes will be shipped to customers here: PCYsg-eg5-p2
@github-actions github-actions Bot added [Package] VideoPress [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ [Plugin] VideoPress A standalone plugin to add high-quality VideoPress videos to your site. [Tests] Includes Tests labels Sep 22, 2026
@github-actions

github-actions Bot commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

Thank you for your PR!

When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:

  • ✅ Include a description of your PR changes.
  • ✅ Add a "[Status]" label (In Progress, Needs Review, ...).
  • ✅ Add testing instructions.
  • ✅ Specify whether this PR includes any changes to data or privacy.
  • ✅ Add changelog entries to affected projects

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:

  1. Ensure all required checks appearing at the bottom of this PR are passing.
  2. Make sure to test your changes on all platforms that it applies to. You're responsible for the quality of the code you ship.
  3. You can use GitHub's Reviewers functionality to request a review.
  4. When it's reviewed and merged, you will be pinged in Slack to deploy the changes to WordPress.com simple once the build is done.

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:

  • WordPress.com Simple releases happen as soon as you deploy your changes after merging this PR (PCYsg-Jjm-p2).
  • WoA releases happen weekly.
  • Releases to self-hosted sites happen monthly:
    • Scheduled release: October 6, 2026

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.

@jp-launch-control

jp-launch-control Bot commented Sep 22, 2026 •

Copy link
Copy Markdown

Code Coverage Summary

Coverage changed in 3 files.

File Coverage Δ% Δ Uncovered
projects/packages/videopress/src/client/block-editor/blocks/video/edit.tsx 0/151 (0.00%) 0.00% 4 💔
projects/plugins/jetpack/extensions/extended-blocks/videopress-video/videopress-video.php 12/28 (42.86%) -3.30% 2 ❤️‍🩹
projects/packages/videopress/src/class-initializer.php 493/550 (89.64%) 0.02% 0 💚

1 file is newly checked for coverage.

File Coverage
projects/packages/videopress/src/class-channel.php 81/84 (96.43%) 💚

Full summary · PHP report · JS report

Coverage check overridden by I don't care about code coverage for this PR Use this label to ignore the check for insufficient code coveage. .

@heydemoura heydemoura changed the title VideoPress: add the channel feature, post-sourced playlists and a Playlists block Sep 30, 2026
@heydemoura
heydemoura force-pushed the add/videopress-channel-taxonomy-blocks branch 2 times, most recently from 8dd5fb7 to b081dbd Compare September 30, 2026 16:21
@heydemoura heydemoura changed the title VideoPress: add the channel feature ( durations, views, Query Loop filters, block bindings ) Sep 30, 2026
@github-actions github-actions Bot added [Feature] Google Fonts [Package] Premium Analytics [Plugin] Boost A feature to speed up the site and improve performance. Docs labels Sep 30, 2026
@heydemoura
heydemoura force-pushed the add/videopress-channel-taxonomy-blocks branch from b081dbd to e9efc24 Compare September 30, 2026 16:36
@heydemoura heydemoura changed the title VideoPress: add the channel feature ( video pages, Query Loop listings, block bindings ) Sep 30, 2026
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>
@heydemoura
heydemoura force-pushed the add/videopress-channel-taxonomy-blocks branch from e9efc24 to 67f33bd Compare September 30, 2026 16:43
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>
@heydemoura
heydemoura marked this pull request as ready for review September 30, 2026 19:33
@heydemoura
heydemoura requested a review from a team as a code owner September 30, 2026 19:33
@heydemoura heydemoura added the I don't care about code coverage for this PR Use this label to ignore the check for insufficient code coveage. label Sep 30, 2026
@heydemoura
heydemoura merged commit 967c123 into trunk Sep 30, 2026
86 checks passed
@heydemoura
heydemoura deleted the add/videopress-channel-taxonomy-blocks branch September 30, 2026 19:35
@github-actions github-actions Bot added [Status] UI Changes Add this to PRs that change the UI so documentation can be updated. and removed [Status] In Progress labels Sep 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Docs [Feature] Google Fonts [Feature] VideoPress A feature to help you upload and insert videos on your site. I don't care about code coverage for this PR Use this label to ignore the check for insufficient code coveage. [Package] Premium Analytics [Package] VideoPress [Plugin] Boost A feature to speed up the site and improve performance. [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ [Plugin] VideoPress A standalone plugin to add high-quality VideoPress videos to your site. [Status] UI Changes Add this to PRs that change the UI so documentation can be updated. [Tests] Includes Tests

1 participant