Created
August 31, 2011 21:27
-
-
Save mfields/1184759 to your computer and use it in GitHub Desktop.
Enqueue css for a custom post_type in edit.php
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
<?php | |
add_action( 'load-edit.php', 'myplugin_setup_edit_screen' ); | |
function myplugin_setup_edit_screen() { | |
$screen = get_current_screen(); | |
if ( 'my_post_type' != $screen->post_type ) { | |
return; | |
} | |
add_action( 'admin_print_styles', 'myplugin_edit_screen_css' ); | |
} | |
function myplugin_edit_screen_css() { | |
wp_enqueue_style( 'myplugin_edit_screen' ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Most excellent. Thanks!