Editor: Use defer loading strategy for block view scripts.

Props westonruter, joemcgill.
Fixes #59115.

Built from https://develop.svn.wordpress.org/trunk@56398


git-svn-id: http://core.svn.wordpress.org/trunk@55910 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Weston Ruter 2023-08-16 00:15:23 +00:00
parent 832b4660fd
commit 467c7de24d
2 changed files with 3 additions and 2 deletions

View File

@ -170,7 +170,8 @@ function register_block_script_handle( $metadata, $field_name, $index = 0 ) {
$script_handle,
$script_uri,
$script_dependencies,
isset( $script_asset['version'] ) ? $script_asset['version'] : false
isset( $script_asset['version'] ) ? $script_asset['version'] : false,
array( 'strategy' => 'defer' )
);
if ( ! $result ) {
return false;

View File

@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
$wp_version = '6.4-alpha-56397';
$wp_version = '6.4-alpha-56398';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.