Created
September 16, 2013 17:49
-
-
Save danielbachhuber/6584069 to your computer and use it in GitHub Desktop.
Include your logo into the WordPress toolbar You'll likely want to update the path to your logo.
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( 'admin_bar_menu', function( $wp_admin_bar ){ | |
$args = array( | |
'id' => 'your-logo', | |
'title' => '<img style="padding-top:5px;" src="' . plugins_url( 'img/your-logo.png', __FILE__ ) . '" />', | |
); | |
$wp_admin_bar->add_node( $args ); | |
}, 0 ); | |
add_action( 'admin_bar_menu', function( $wp_admin_bar ){ | |
$wp_admin_bar->remove_node( 'wp-logo' ); | |
}, 100 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment