Skip to content

Commit

Permalink
Editor: Use static closures to avoid memory leaks.
Browse files Browse the repository at this point in the history
Backports Gutenberg changes from WordPress/gutenberg#50723.

Amends [55822].

Fixes #58323.
Props westonruter, spacedmonkey, flixos90. 

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


git-svn-id: https://core.svn.wordpress.org/trunk@55550 1a063a9b-81f0-0310-95a4-ce76da25c4cd
  • Loading branch information
westonruter committed Jun 26, 2023
1 parent a7d1f2d commit 366bf22
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion wp-includes/class-wp-theme-json.php
Original file line number Diff line number Diff line change
Expand Up @@ -2423,7 +2423,7 @@ static function( $split_feature_selector ) use ( $clean_style_variation_selector
$pseudo_matches = array_values(
array_filter(
$element_pseudo_allowed,
function( $pseudo_selector ) use ( $selector ) {
static function( $pseudo_selector ) use ( $selector ) {
return str_contains( $selector, $pseudo_selector );
}
)
Expand Down
2 changes: 1 addition & 1 deletion wp-includes/global-styles-and-settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ function wp_add_global_styles_for_blocks() {
$result = array_values(
array_filter(
$metadata['path'],
function ( $item ) {
static function ( $item ) {
if ( str_contains( $item, 'core/' ) ) {
return true;
}
Expand Down
2 changes: 1 addition & 1 deletion wp-includes/version.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
$wp_version = '6.3-alpha-56037';
$wp_version = '6.3-alpha-56038';

/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
Expand Down

0 comments on commit 366bf22

Please sign in to comment.