Remove legacy logic for __unstableResolvedAssets#51100
Conversation
__unstableResolvedAssets
Because _gutenberg_get_iframed_editor_assets is the only callback for setting __unstableResolvedAssets we no longer need to increase the priority.
| // We must override what core is passing now. | ||
| $settings['__unstableResolvedAssets'] = _gutenberg_get_iframed_editor_assets(); | ||
| return $settings; | ||
| }, |
There was a problem hiding this comment.
Because gutenberg_resolve_assets_override is removed, _gutenberg_get_iframed_editor_assets no longer needs to increase the priority for it to run later. It will be now the only callback for setting __unstableResolvedAssets. I see it was introduced https://github.com/WordPress/gutenberg/pull/49655/files#diff-d66c57d67603bf45e2664289929b228b0eb69b037553b5c35a3497182a7e17d5R84
| $style_handles[] = 'wp-block-library-theme'; | ||
| } | ||
|
|
||
| if ( 'widgets.php' === $pagenow || 'customize.php' === $pagenow ) { |
There was a problem hiding this comment.
@ellatrix Is there any part of this that we should have at _gutenberg_get_iframed_editor_assets? This bit for the widgets screen caught my eye.
There was a problem hiding this comment.
We should check that in #50091, but as far as I could tell, these editors were not iframed.
|
Flaky tests detected in 78af900. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/5123318458
|
What?
This removes the
_gutenberg_resolve_assets_overridefunction that lives atlib/compat/wordpress-6.2/script-loader.php.Why?
The purpose of that function is to prepare the data for the
__unstableResolvedAssetssetting. However, we already do that in the _gutenberg_get_iframed_editor_assets function that lives atlib/compat/wordpress-6.2/script-loader.php, so it loads later. We don't want to run the same logic twice.How?
Remove the older code.
Testing Instructions
Verify that iframe tests pass.