mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 20:30:23 +00:00
Script Loader: Fix unintended adding of async to scripts that are printed directly with wp_print_scripts() without enqueueing them beforehand.
Props: joemcgill, westonruter, felixarntz, peterwilsoncc. See: #58648. git-svn-id: https://develop.svn.wordpress.org/trunk@56092 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -2931,6 +2931,21 @@ HTML
|
||||
$this->assertSame( $expected, $print_scripts );
|
||||
}
|
||||
|
||||
/**
|
||||
* Ensure tinymce scripts aren't loading async.
|
||||
*
|
||||
* @ticket 58648
|
||||
*/
|
||||
public function test_printing_tinymce_scripts() {
|
||||
global $wp_scripts;
|
||||
|
||||
wp_register_tinymce_scripts( $wp_scripts, true );
|
||||
|
||||
$actual = get_echo( 'wp_print_scripts', array( array( 'wp-tinymce' ) ) );
|
||||
|
||||
$this->assertStringNotContainsString( 'async', $actual );
|
||||
}
|
||||
|
||||
/**
|
||||
* Parse an HTML markup fragment.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user