mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-07-01 15:50:09 +00:00
Editor: Use static closures to avoid memory leaks.
Backports Gutenberg changes from https://github.com/WordPress/gutenberg/pull/50723. Amends [55822]. Fixes #58323. Props westonruter, spacedmonkey, flixos90. git-svn-id: https://develop.svn.wordpress.org/trunk@56038 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -4217,7 +4217,7 @@ EOF;
|
||||
$result = null;
|
||||
add_filter(
|
||||
'the_content',
|
||||
function( $content ) use ( &$result, $context ) {
|
||||
static function( $content ) use ( &$result, $context ) {
|
||||
$result = wp_get_loading_attr_default( $context );
|
||||
return $content;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user