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;