Skip to content

Media: Remove obsolete Flash fallback message from MediaElement l10n strings - #12727

Open
irozum wants to merge 2 commits into
WordPress:trunkfrom
irozum:fix/65737-remove-mejs-install-flash-message
Open

Media: Remove obsolete Flash fallback message from MediaElement l10n strings#12727
irozum wants to merge 2 commits into
WordPress:trunkfrom
irozum:fix/65737-remove-mejs-install-flash-message

Conversation

@irozum

@irozum irozum commented Jul 28, 2026

Copy link
Copy Markdown

Removes the obsolete mejs.install-flash localized string from the MediaElement.js mejsL10n object registered in wp_default_scripts(). This message told users to install/enable Adobe Flash Player, but Adobe ended support for Flash Player on December 31, 2020 and WordPress's MediaElement configuration never produces the SWF-based renderer that would trigger this message, so it can never actually be shown to a visitor. Removing it drops dead translated content from every page that enqueues mediaelement-core.

Added a PHPUnit test (Tests_Dependencies_Scripts::test_mediaelement_l10n_does_not_include_flash_message) asserting the inline mejsL10n script data registered for mediaelement-core no longer includes the mejs.install-flash key, while confirming sibling strings such as mejs.play are still present.

Trac ticket: https://core.trac.wordpress.org/ticket/65737

Use of AI Tools

AI assistance: Yes
Tool(s): Claude Code
Model(s): Claude Sonnet 5
Used for: Implementation, tests, and PR description. Reviewed by Igor Rozum.


This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.

Copilot AI review requested due to automatic review settings July 28, 2026 02:12
@github-actions

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. You can also manually ask me to refresh this list by adding the props-bot label.

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

Props irozum.

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

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.

Pull request overview

This PR removes an obsolete Flash fallback localization string from the MediaElement.js mejsL10n object registered in wp_default_scripts(), and adds a PHPUnit test to ensure the string is no longer present in the inline script data for mediaelement-core.

Changes:

  • Removed the mejs.install-flash localized string from the mejsL10n['strings'] array in wp_default_scripts().
  • Added a PHPUnit test asserting the mejs.install-flash key is absent while other MediaElement strings remain present.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/wp-includes/script-loader.php Removes the obsolete Flash-related MediaElement localization string from the inline mejsL10n data.
tests/phpunit/tests/dependencies/scripts.php Adds a regression test to ensure mejs.install-flash is not included in the localized inline script for mediaelement-core.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +1789 to +1793

$inline_script = implode( '', (array) $wp_scripts->get_data( 'mediaelement-core', 'before' ) );

$this->assertStringNotContainsString( 'mejs.install-flash', $inline_script );
$this->assertStringContainsString( 'mejs.play', $inline_script );
@github-actions

Copy link
Copy Markdown

Test using WordPress Playground

The changes in this pull request can previewed and tested using a WordPress Playground instance.

WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser.

Some things to be aware of

  • All changes will be lost when closing a tab with a Playground instance.
  • All changes will be lost when refreshing the page.
  • A fresh instance is created each time the link below is clicked.
  • Every time this pull request is updated, a new ZIP file containing all changes is created. If changes are not reflected in the Playground instance,
    it's possible that the most recent build failed, or has not completed. Check the list of workflow runs to be sure.

For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation.

Test this pull request with WordPress Playground.

*
* @covers ::wp_default_scripts
*/
public function test_mediaelement_l10n_does_not_include_flash_message() {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

IMO, we don't need to add a test for this.

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.

3 participants