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' ), 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. *