mirror of
https://github.com/WordPress/WordPress.git
synced 2024-11-14 06:36:47 +01: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. Built from https://develop.svn.wordpress.org/branches/5.8@51981 git-svn-id: http://core.svn.wordpress.org/branches/5.8@51570 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
8488afbb66
commit
dd352f4d54
@ -2444,7 +2444,7 @@ function enqueue_block_styles_assets() {
|
|||||||
if ( wp_should_load_separate_core_block_assets() ) {
|
if ( wp_should_load_separate_core_block_assets() ) {
|
||||||
add_filter(
|
add_filter(
|
||||||
'render_block',
|
'render_block',
|
||||||
function( $html, $block ) use ( $style_properties ) {
|
function( $html ) use ( $style_properties ) {
|
||||||
wp_enqueue_style( $style_properties['style_handle'] );
|
wp_enqueue_style( $style_properties['style_handle'] );
|
||||||
return $html;
|
return $html;
|
||||||
}
|
}
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '5.8.2-alpha-51948';
|
$wp_version = '5.8.2-alpha-51981';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
Loading…
Reference in New Issue
Block a user