Created
August 12, 2014 19:35
-
-
Save joshcanhelp/fcf71710d2ee8a7274d4 to your computer and use it in GitHub Desktop.
This file contains 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
/** | |
* CSS and JavaScript for admin pages | |
*/ | |
function proper_admin_css_js() { | |
global $pagenow; | |
// CSS | |
wp_enqueue_style( | |
'proper-admin', | |
get_template_directory_uri() . '/assets/css/admin.css' | |
); | |
// JS | |
wp_enqueue_script( | |
'proper-admin', | |
get_template_directory_uri() . '/assets/js/admin.js', | |
array( 'wp-color-picker', 'jquery' ), | |
FALSE, | |
TRUE | |
); | |
if ( $pagenow == 'themes.php' && isset( $_GET['page'] ) && $_GET['page'] == 'theme-settings.php' ) { | |
wp_enqueue_style( 'wp-color-picker' ); | |
} | |
} | |
add_action( 'admin_enqueue_scripts', 'proper_admin_css_js' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment