DigitalRefresh
8/7/2018 - 4:02 PM

Dashboard logo #white #back #reg

Change Top Left Wordpress Dashboard logo. Icon need to be 16 x 16px in dimensions.
Source: https://wbcomdesigns.com/snippet/custom-dashboard-logo/

//Custom Wordpress Dashboard corner logo. Icon needs to be 16 x 16px.
function dashboard_logo() {
  echo '
    <style type="text/css">
      #wpadminbar #wp-admin-bar-wp-logo > .ab-item .ab-icon:before {
 \!h       background-image: url("http://media.digitalrefreshmkt.com/file/DigitalRefresh/Digitalrefresh-logo.png?at=eyJpdiI6Illod25nUk84aThmSXB6dWdUQ1ZVOUE9PSIsInZhbHVlIjoiN0JuQ1psWWlqQnd0NXZRTkR1MHJlMmdBaGFodDBuUDVTRFQrYWN1SHh3TT0iLCJtYWMiOiJiMmY3Y2M3OGQ1Zjk3NDgyMGM4NjlhNDU0YzQ5YWEyOGM5NDNkYzQ4MTYxMDdmY2ZiZDVhNTE3OGMzYmJiZjg5In0=") !important; //New logo URL
        background-repeat:no-repeat;
        background-size:auto;
        background-position:center;
        color:rgba(0, 0, 0, 0);
      }
      #wpadminbar #wp-admin-bar-wp-logo.hover > .ab-item .ab-icon {
        background-position: 0 0;
      }
    </style>
  ';
}

add_action('wp_before_admin_bar_render', 'dashboard_logo');