mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-10 15:44:29 +00:00
Script Loader: Improve test coverage for wp_print_scripts().
This is a follow-up to [56092], which further improves PHPUnit test coverage and inline docs for ensuring `async` and `defer` attributes are being properly handled for scripts that are printed without being enqueued. Props peterwilsoncc, azaozz, westonruter, joemcgill. See #58648. git-svn-id: https://develop.svn.wordpress.org/trunk@56246 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -914,7 +914,10 @@ JS;
|
||||
return '';
|
||||
}
|
||||
|
||||
// If the intended strategy is 'defer', limit the initial list of eligibles.
|
||||
/*
|
||||
* If the intended strategy is 'defer', limit the initial list of eligible
|
||||
* strategies, since 'async' can fallback to 'defer', but not vice-versa.
|
||||
*/
|
||||
$initial = ( 'defer' === $intended ) ? array( 'defer' ) : null;
|
||||
|
||||
$eligible = $this->filter_eligible_strategies( $handle, $initial );
|
||||
|
||||
Reference in New Issue
Block a user