Make WordPress Core


Ignore:
Timestamp:
06/26/2023 04:58:38 PM (18 months ago)
Author:
westonruter
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/media.php

    r56037 r56038  
    42184218        add_filter(
    42194219            'the_content',
    4220             function( $content ) use ( &$result, $context ) {
     4220            static function( $content ) use ( &$result, $context ) {
    42214221                $result = wp_get_loading_attr_default( $context );
    42224222                return $content;
Note: See TracChangeset for help on using the changeset viewer.