adamdoe
10/26/2017 - 8:35 PM

Add WordPress Logo To Admin Area

Add WordPress Logo To Admin Area

/******************************************************************
 * Update the theme logo in backend.
 ******************************************************************/
 function mic_custom_logo() {
  echo '
  <style type="text/css">
  #wpadminbar #wp-admin-bar-wp-logo > .ab-item .ab-icon:before {
  background-image: url(' . get_bloginfo('stylesheet_directory') . '/images/backend-logo.png) !important;
  background-position: 0 0;
  color:rgba(0, 0, 0, 0);
  }
  #wpadminbar #wp-admin-bar-wp-logo.hover > .ab-item .ab-icon {
  background-position: 0 0;
  }
  </style>
  ';
}
 
//hook into the administrative header output
add_action('wp_before_admin_bar_render', 'mic_custom_logo');