Skip to content

Commit

Permalink
Editor: Use defer loading strategy for block view scripts.
Browse files Browse the repository at this point in the history
Props westonruter, joemcgill.
Fixes #59115.


git-svn-id: https://develop.svn.wordpress.org/trunk@56398 602fd350-edb4-49c9-b593-d223f7449a82
  • Loading branch information
westonruter committed Aug 16, 2023
1 parent f6dde69 commit 5fab140
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/wp-includes/blocks.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 5fab140

Please sign in to comment.