Skip to content

Commit

Permalink
Add wpcom logo instead
Browse files Browse the repository at this point in the history
  • Loading branch information
fushar committed Jul 19, 2024
1 parent f42892f commit c2cf3bf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,11 @@ function wpcom_enqueue_admin_bar_assets() {
add_action( 'admin_bar_menu', 'wpcom_enqueue_admin_bar_assets' );

/**
* Repurposes the WP logo as a link to /sites.
* Replaces the WP logo as a link to /sites.
*
* @param WP_Admin_Bar $wp_admin_bar The WP_Admin_Bar core object.
*/
function wpcom_repurpose_wp_logo_as_all_sites_menu( $wp_admin_bar ) {
function wpcom_replace_wp_logo_with_wpcom_all_sites_menu( $wp_admin_bar ) {
foreach ( $wp_admin_bar->get_nodes() as $node ) {
if ( $node->parent === 'wp-logo' || $node->parent === 'wp-logo-external' ) {
$wp_admin_bar->remove_node( $node->id );
Expand All @@ -75,7 +75,7 @@ function wpcom_repurpose_wp_logo_as_all_sites_menu( $wp_admin_bar ) {
$wp_admin_bar->remove_node( 'wp-logo' );
$wp_admin_bar->add_node(
array(
'id' => 'wp-logo',
'id' => 'wpcom-logo',
'title' => '<span class="ab-icon" aria-hidden="true"></span><span class="screen-reader-text">' .
/* translators: Hidden accessibility text. */
__( 'All Sites', 'jetpack-mu-wpcom' ) .
Expand All @@ -87,7 +87,7 @@ function wpcom_repurpose_wp_logo_as_all_sites_menu( $wp_admin_bar ) {
)
);
}
add_action( 'admin_bar_menu', 'wpcom_repurpose_wp_logo_as_all_sites_menu', 11 );
add_action( 'admin_bar_menu', 'wpcom_replace_wp_logo_with_wpcom_all_sites_menu', 11 );

/**
* Adds the Reader menu.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
/**
* WP logo menu
*/
#wpadminbar #wp-admin-bar-wp-logo>.ab-item .ab-icon:before {
#wpadminbar #wp-admin-bar-wpcom-logo>.ab-item .ab-icon:before {
display: flex;
content: "";
width: 20px;
Expand Down

0 comments on commit c2cf3bf

Please sign in to comment.