Created
March 23, 2011 11:21
-
-
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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