Skip to content

Instantly share code, notes, and snippets.

@ajithrn
Last active August 29, 2015 14:18
Show Gist options
  • Save ajithrn/b79da4e2d4dd7cc7c2ac to your computer and use it in GitHub Desktop.
Save ajithrn/b79da4e2d4dd7cc7c2ac to your computer and use it in GitHub Desktop.
Wordpress: admin css
/**
* custom admin css
* code for sage theme: https://roots.io/sage/
* include this snippet in lib/assets.php
*/
function load_custom_wp_admin_style() {
wp_register_style( 'custom_wp_admin_css', asset_path('styles/admin-style.css'), false, '1.0.0' );
wp_enqueue_style( 'custom_wp_admin_css' );
}
add_action( 'admin_enqueue_scripts', __NAMESPACE__ . '\\load_custom_wp_admin_style' );
/**
* supporting file to compile the admin css into dist
* add this code in dependencies arrat @ assets/manifest.json
*/
"admin-style.css": {
"files": [
"styles/admin-style.less"
]
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment