Skip to content

Instantly share code, notes, and snippets.

@Mamaduka
Created March 23, 2011 11:21
Show Gist options
  • Save Mamaduka/882960 to your computer and use it in GitHub Desktop.
Save Mamaduka/882960 to your computer and use it in GitHub Desktop.
I just rewrote John O'Nolan's UI Labs plugin. I think it would be more WordPress way to add CSS file admin head
<?php
/*
Plugin Name: UI Labs
Plugin URI:
Description: Experimental WordPress admin UI features, ooo shiny!
Author: John O'Nolan
Version: 1.0
Author URI: http://john.onolan.org
*/
function ui_labs_css() {
$url = plugins_url('/ui-labs.css', __FILE__);
wp_register_style( 'ui_lab_css', $url, false, '1.0' );
wp_enqueue_style( 'ui_lab_css' );
}
/**
* To add CSS files on specific page in wp-admin, instead
* admin_enqueue_scripts use admin_print_styles-$page hook
*/
add_action( 'admin_enqueue_scripts', 'ui_labs_css', 1000 );
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment