diff --git a/lib/block-directory.php b/lib/block-directory.php index 167bb0b9e44e99..f1956f8bfbe838 100644 --- a/lib/block-directory.php +++ b/lib/block-directory.php @@ -22,18 +22,24 @@ function gutenberg_enqueue_block_editor_assets_block_directory() { /** * Add data attribute of handle to all script tags output in the wp-admin. * - * @param string $tag The `", $esc_src ), + sprintf( "", esc_attr( $handle ), $esc_src ), + $tag + ); return $tag; } - add_filter( 'script_loader_tag', 'gutenberg_change_script_tag', 10, 2 ); + add_filter( 'script_loader_tag', 'gutenberg_change_script_tag', 1, 3 ); }