Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/wp-includes/script-loader.php
Original file line number Diff line number Diff line change
Expand Up @@ -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' ),
Expand Down
17 changes: 17 additions & 0 deletions tests/phpunit/tests/dependencies/scripts.php
Original file line number Diff line number Diff line change
Expand Up @@ -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() {

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.

$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 );
Comment on lines +1789 to +1793
}

/**
* Tests that printing a script without enqueueing has the same output as when it is enqueued.
*
Expand Down
Loading