Last active
August 29, 2015 14:11
-
-
Save hattmarris/728aac5dcb0f2f7f4db8 to your computer and use it in GitHub Desktop.
Create WP dashicon for Custom Post Type within a class
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 | |
class CLASSNAME { | |
public function __construct() { | |
add_action( 'admin_head', array($this, 'classname_add_menu_icons_styles') ); | |
} | |
public static function classname_add_menu_icons_styles() { | |
?> | |
<style> | |
#adminmenu .menu-icon-post_type div.wp-menu-image:before { | |
content: "\f323"; | |
} | |
</style> | |
<?php | |
} | |
} | |
$classname = new CLASSNAME(); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment