mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-22 17:18:32 +01:00
Network and Sites: Display site icons in the My Sites menu.
This updates the My Sites dropdown menu on multisite installs to display the site icon for each site. When a site icon is not selected, the default WordPress logo will continue showing. Props rmccue, joemcgill, afercia, audrasjb, desrosj. Fixes 46657. Built from https://develop.svn.wordpress.org/trunk@50834 git-svn-id: http://core.svn.wordpress.org/trunk@50443 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
c8e4bb5d70
commit
41de9e3fd3
@ -582,7 +582,15 @@ function wp_admin_bar_my_sites_menu( $wp_admin_bar ) {
|
||||
foreach ( (array) $wp_admin_bar->user->blogs as $blog ) {
|
||||
switch_to_blog( $blog->userblog_id );
|
||||
|
||||
$blavatar = '<div class="blavatar"></div>';
|
||||
if ( has_site_icon() ) {
|
||||
$blavatar = sprintf(
|
||||
'<img class="blavatar" src="%s" srcset="%s 2x" alt="" width="16" height="16" />',
|
||||
esc_url( get_site_icon_url( 16 ) ),
|
||||
esc_url( get_site_icon_url( 32 ) )
|
||||
);
|
||||
} else {
|
||||
$blavatar = '<div class="blavatar"></div>';
|
||||
}
|
||||
|
||||
$blogname = $blog->blogname;
|
||||
|
||||
|
@ -518,14 +518,18 @@ html:lang(he-il) .rtl #wpadminbar * {
|
||||
color: #72aee6;
|
||||
}
|
||||
|
||||
#wpadminbar .quicklinks li .blavatar:before {
|
||||
content: "\f120";
|
||||
#wpadminbar .quicklinks li img.blavatar,
|
||||
#wpadminbar .quicklinks li div.blavatar:before {
|
||||
height: 16px;
|
||||
width: 16px;
|
||||
display: inline-block;
|
||||
margin: 0 -2px 2px 8px;
|
||||
}
|
||||
|
||||
#wpadminbar .quicklinks li div.blavatar:before {
|
||||
content: "\f120";
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
#wpadminbar #wp-admin-bar-appearance {
|
||||
margin-top: -12px;
|
||||
}
|
||||
|
2
wp-includes/css/admin-bar-rtl.min.css
vendored
2
wp-includes/css/admin-bar-rtl.min.css
vendored
File diff suppressed because one or more lines are too long
@ -517,14 +517,18 @@ html:lang(he-il) .rtl #wpadminbar * {
|
||||
color: #72aee6;
|
||||
}
|
||||
|
||||
#wpadminbar .quicklinks li .blavatar:before {
|
||||
content: "\f120";
|
||||
#wpadminbar .quicklinks li img.blavatar,
|
||||
#wpadminbar .quicklinks li div.blavatar:before {
|
||||
height: 16px;
|
||||
width: 16px;
|
||||
display: inline-block;
|
||||
margin: 0 8px 2px -2px;
|
||||
}
|
||||
|
||||
#wpadminbar .quicklinks li div.blavatar:before {
|
||||
content: "\f120";
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
#wpadminbar #wp-admin-bar-appearance {
|
||||
margin-top: -12px;
|
||||
}
|
||||
|
2
wp-includes/css/admin-bar.min.css
vendored
2
wp-includes/css/admin-bar.min.css
vendored
File diff suppressed because one or more lines are too long
@ -13,7 +13,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '5.8-alpha-50833';
|
||||
$wp_version = '5.8-alpha-50834';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
Loading…
Reference in New Issue
Block a user