WordPress.org

Make WordPress Core


Ignore:
Timestamp:
01/12/2011 04:02:56 PM (11 years ago)
Author:
westi
Message:

Admin Bar - show fullsite name in the tooltip. Correct some escaping. Fixes #16197 props nacin.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/admin-bar.php

    r17263 r17269  
    115115        $blavatar = '<img src="' . esc_url($default) . '" alt="' . esc_attr__( 'Blavatar' ) . '" width="16" height="16" class="blavatar"/>';
    116116
    117         $blogname = empty( $blog->blogname ) ? $blog->domain : $blog->blogname;
     117        $full_blogname = $blogname = empty( $blog->blogname ) ? $blog->domain : $blog->blogname;
    118118        if ( strlen( $blogname ) > 15 )
    119119            $blogname = substr( $blogname, 0, 15 ) . '&hellip;';
    120 
    121         $wp_admin_bar->add_menu( array( 'parent' => 'my-blogs', 'id' => 'blog-' . $blog->userblog_id, 'title' => $blavatar . $blogname,  'href' => get_admin_url($blog->userblog_id), ) );
     120        else
     121            $full_blogname = '';
     122
     123        $wp_admin_bar->add_menu( array( 'parent' => 'my-blogs', 'id' => 'blog-' . $blog->userblog_id, 'title' => $blavatar . $blogname,  'href' => get_admin_url($blog->userblog_id), 'meta' => array( 'title' => $full_blogname ) ) );
    122124        $wp_admin_bar->add_menu( array( 'parent' => 'blog-' . $blog->userblog_id, 'id' => 'blog-' . $blog->userblog_id . '-d', 'title' => __( 'Dashboard' ), 'href' => get_admin_url($blog->userblog_id) ) );
    123125
Note: See TracChangeset for help on using the changeset viewer.