From 517f1757743737b2d0890cc0122be265c9fb459b Mon Sep 17 00:00:00 2001 From: Igor Rozum Date: Mon, 27 Jul 2026 22:09:49 -0400 Subject: [PATCH 1/2] Media: Add test asserting MediaElement l10n omits the Flash message --- tests/phpunit/tests/dependencies/scripts.php | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/tests/phpunit/tests/dependencies/scripts.php b/tests/phpunit/tests/dependencies/scripts.php index bbf301fe424cd..3233bc2e61471 100644 --- a/tests/phpunit/tests/dependencies/scripts.php +++ b/tests/phpunit/tests/dependencies/scripts.php @@ -1776,6 +1776,23 @@ public function test_priority_of_dependency_for_non_enqueued_dependent() { ); } + /** + * Tests that the obsolete Flash-related MediaElement.js string is no longer localized. + * + * @ticket 65737 + * + * @covers ::wp_default_scripts + */ + public function test_mediaelement_l10n_does_not_include_flash_message() { + $wp_scripts = wp_scripts(); + wp_default_scripts( $wp_scripts ); + + $inline_script = implode( '', (array) $wp_scripts->get_data( 'mediaelement-core', 'before' ) ); + + $this->assertStringNotContainsString( 'mejs.install-flash', $inline_script ); + $this->assertStringContainsString( 'mejs.play', $inline_script ); + } + /** * Tests that printing a script without enqueueing has the same output as when it is enqueued. * From eb70edf5aa739db2d98e9968af54027833c5b4d1 Mon Sep 17 00:00:00 2001 From: Igor Rozum Date: Mon, 27 Jul 2026 22:09:56 -0400 Subject: [PATCH 2/2] Media: Remove obsolete Flash fallback message from MediaElement l10n strings --- src/wp-includes/script-loader.php | 1 - 1 file changed, 1 deletion(-) diff --git a/src/wp-includes/script-loader.php b/src/wp-includes/script-loader.php index fd1f24a08968d..ac8063e7d256c 100644 --- a/src/wp-includes/script-loader.php +++ b/src/wp-includes/script-loader.php @@ -1099,7 +1099,6 @@ function wp_default_scripts( $scripts ) { 'language' => strtolower( strtok( determine_locale(), '_-' ) ), 'strings' => array( 'mejs.download-file' => __( 'Download File' ), - 'mejs.install-flash' => __( 'You are using a browser that does not have Flash player enabled or installed. Please turn on your Flash player plugin or download the latest version from https://get.adobe.com/flashplayer/' ), 'mejs.fullscreen' => __( 'Fullscreen' ), 'mejs.play' => __( 'Play' ), 'mejs.pause' => __( 'Pause' ),