Admin Bar with custom icon
-
This was not easy to find, so I’m publishing for the records…
When adding an Admin Bar menu item, the way to add an icon is:
$wp_admin_bar->add_menu( array( 'id' => 'Visit', 'title' => __('<img src="'.get_bloginfo('wpurl').'/icon.png" style="vertical-align:middle;margin-right:5px" alt="Visit Site" title="Visit Site" />Visit Site' ), 'href' => get_bloginfo('wpurl') ));
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Admin Bar with custom icon’ is closed to new replies.