Instantly share code, notes, and snippets.

Embed
What would you like to do?
[WordPress] Optimizing Loading Assets in WordPress
<?php
public function load()
{
if ('dashboard' !== get_current_screen()->id) {
return;
}
wp_enqueue_style(
'acme-dashboard-style',
plugin_dir_url(\dirname(__DIR__)).'assets/css/acme-dashboard.css'
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment