From 3aa92a46adfaf052ffdeef1436cc648780d934b6 Mon Sep 17 00:00:00 2001 From: George Mamadashvili Date: Tue, 25 Oct 2022 13:50:46 +0400 Subject: [PATCH] Fix failing PHPUnit tests (#45265) Co-authored-by: Bernie Reiter --- lib/compat/wordpress-6.0/client-assets.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/compat/wordpress-6.0/client-assets.php b/lib/compat/wordpress-6.0/client-assets.php index 0c5697817a94a..f9affb31af4b5 100644 --- a/lib/compat/wordpress-6.0/client-assets.php +++ b/lib/compat/wordpress-6.0/client-assets.php @@ -105,6 +105,11 @@ function gutenberg_resolve_assets() { add_filter( 'block_editor_settings_all', function( $settings ) { + // The `__unstableResolvedAssets` are generated by `_wp_get_iframed_editor_assets` for WP >= 6.0. + if ( function_exists( '_wp_get_iframed_editor_assets' ) ) { + return $settings; + } + // In the future we can allow WP Dependency handles to be passed. $settings['__unstableResolvedAssets'] = gutenberg_resolve_assets(); return $settings;