Automattic\WooCommerce\Internal\Admin
WCAdminAssets::output_header_preload_tags
Output preload link tags for all enqueued stylesheets and scripts.
See: https://macarthur.me/posts/preloading-javascript-in-wordpress
Method of the class: WCAdminAssets{}
No Hooks.
Returns
null. Nothing (null).
Usage
// private - for code of main (parent) class only $result = $this->output_header_preload_tags();
WCAdminAssets::output_header_preload_tags() WCAdminAssets::output header preload tags code WC 11.0.1
private function output_header_preload_tags() {
$wc_admin_scripts = array(
WC_ADMIN_APP,
'wc-components',
);
$wc_admin_styles = array(
WC_ADMIN_APP,
'wc-components',
'wc-material-icons',
);
// Preload styles.
$this->output_header_preload_tags_for_type( 'style', $wc_admin_styles );
// Preload scripts.
$this->output_header_preload_tags_for_type( 'script', $wc_admin_scripts );
}