mirror of
git://develop.git.wordpress.org/
synced 2025-04-08 06:02:41 +02:00
Script Loader: Correct the number of arguments passed to the closure in enqueue_block_styles_assets()
.
This avoids an `Uncaught ArgumentCountError: Too few arguments to function {closure}(), 1 passed` PHP fatal error when registering a block style with the `should_load_separate_core_block_assets` filter enabled. Follow-up to [51471]. Props aristath, shimon246, jrf, gziolo, SergeyBiryukov. Merges [54323] to the 5.8 branch. Fixes #54323. git-svn-id: https://develop.svn.wordpress.org/branches/5.8@51981 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
55d6908dfb
commit
4f3ab0478b
@ -2444,7 +2444,7 @@ function enqueue_block_styles_assets() {
|
||||
if ( wp_should_load_separate_core_block_assets() ) {
|
||||
add_filter(
|
||||
'render_block',
|
||||
function( $html, $block ) use ( $style_properties ) {
|
||||
function( $html ) use ( $style_properties ) {
|
||||
wp_enqueue_style( $style_properties['style_handle'] );
|
||||
return $html;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user