Skip to content

WordPress.tv: Remove the Flash-era VideoPress footer script - #1230

Closed
obenland wants to merge 1 commit into
WordPress:trunkfrom
obenland:fix/wptv-flash-params
Closed

obenland wants to merge 1 commit into
WordPress:trunkfrom
obenland:fix/wptv-flash-params

Conversation

@obenland

@obenland obenland commented Nov 10, 2026 •

Copy link
Copy Markdown
Member

Fixes https://meta.trac.wordpress.org/ticket/7143

The wptv2 theme hooks videopress_flash_params() into wp_footer, which prints this on every page:

<script type="text/javascript">if(jQuery.VideoPress){jQuery.VideoPress.video.flash.params.wmode="opaque";}</script>

It set wmode on the VideoPress Flash player, which no longer exists. jQuery isn’t loaded on WordPress.tv anymore either (none of the scripts on the home page define it), so the script throws ReferenceError: jQuery is not defined on every page view. That’s the console error the ticket reports.

This removes the callback and its hook. The subtitle upload failure in the ticket’s title was a problem with the reporter’s TTML file (see comment:3), and the upload flow itself was reworked in https://meta.trac.wordpress.org/changeset/15316.

Testing

  1. Open https://wordpress.tv/ and https://wordpress.tv/subtitle/?video=119190 with the browser console open. Before: Uncaught ReferenceError: jQuery is not defined.
  2. With this change applied, reload both pages: the error is gone, and view-source: no longer contains jQuery.VideoPress.
  3. Play a video on a single video page to confirm the VideoPress player still works.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Changes
    • Removed a VideoPress Flash display setting.

The theme printed an inline script on every page that set the wmode
parameter on the VideoPress Flash player through jQuery.VideoPress.
The Flash player is long gone, and jQuery isn't loaded on WordPress.tv
anymore, so the script only threw "jQuery is not defined" in the
console on every page view.

Fixes #7143.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings November 10, 2026 22:37

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

@github-actions

github-actions Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs.

Core Committers: Use this line as a base for the props when committing in SVN:

Props obenland, harshgajipara.

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.


Props Bot commands

You can trigger Props Bot actions by commenting on this PR:

  • @propsbot add <username> to give props to a GitHub user. Requires write access.
  • @propsbot remove <username> to leave a user out of the props. Requires write access.
  • @propsbot refresh to refresh this list. Adding the props-bot label works too.

@coderabbitai

coderabbitai Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The theme no longer registers videopress_flash_params() on wp_footer. The method that output JavaScript to set VideoPress’s Flash player wmode to opaque was removed.

Changes: VideoPress Flash parameter injection

Layer / File(s) Summary
Remove the footer callback
wordpress.tv/public_html/wp-content/themes/wptv2/functions.php
The theme no longer registers the footer callback or defines the method that set the VideoPress Flash player wmode to opaque.

Estimated code review effort: 1 (Trivial) | ~3 minutes

Change: Bug fix

Merge Risk: Minimal · up to c09ba

This removes an obsolete footer script that caused a console error on WordPress.tv. No concrete merge risk was identified.

Pre-merge checks: Passed 5

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly describes the main change: removing the obsolete VideoPress Flash footer script.
Docstring Coverage Passed No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 0 files.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: c309d5e7-cc90-4744-9fdc-4e4ad8f94be4
Commits

Reviewing files that changed from the base of the PR and between b29d2b1 and c09bad5.

Files selected for processing: 1

  • wordpress.tv/public_html/wp-content/themes/wptv2/functions.php
Files with no reviewable changes: 1

  • wordpress.tv/public_html/wp-content/themes/wptv2/functions.php

Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 0 remain after this review.

@obenland

Copy link
Copy Markdown
Member Author

@propsbot add harshgajipara

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants