function _wp_get_iframed_editor_assets() { global $wp_styles,
$wp_scripts,
$pagenow;
// Keep track of the styles and scripts instance to restore later.
$current_wp_styles =
$wp_styles;
$current_wp_scripts =
$wp_scripts;
// Create new instances to collect the assets.
$wp_styles =
new WP_Styles();
$wp_scripts =
new WP_Scripts();
/*
* Register all currently registered styles and scripts. The actions that
* follow enqueue assets, but don't necessarily register them.
*/
$wp_styles->registered =
$current_wp_styles->registered;
$wp_scripts->registered =
$current_wp_scripts->registered;
/*
* We generally do not need reset styles for the iframed editor.
* However, if it's a classic theme, margins will be added to every block,
* which is reset specifically for list items, so classic themes rely on
* these reset styles.
*/