Skip to content

Instantly share code, notes, and snippets.

@tommcfarlin tommcfarlin/00-load-asset.php Secret
Created Nov 28, 2018

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
You can’t perform that action at this time.