Skip to content

Instantly share code, notes, and snippets.

@tommcfarlin
Created November 28, 2018 17:10
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
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