Admin bar blogname handling improvements. Kill visible property vestige. props ocean90, fixes #15308.
git-svn-id: http://svn.automattic.com/wordpress/trunk@16952 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
fe9e7af8a6
commit
27042c1f16
|
@ -114,16 +114,10 @@ function wp_admin_bar_my_sites_menu() {
|
|||
//$blavatar = '<img src="' . esc_url( blavatar_url( blavatar_domain( $blog->siteurl ), 'img', 16, $default ) ) . '" alt="Blavatar" width="16" height="16" />';
|
||||
$blavatar = '<img src="' . esc_url($default) . '" alt="' . esc_attr__( 'Blavatar' ) . '" width="16" height="16" class="blavatar"/>';
|
||||
|
||||
$marker = '';
|
||||
if ( strlen($blog->blogname) > 18 )
|
||||
$marker = '...';
|
||||
$blogname = empty( $blog->blogname ) ? $blog->domain : $blog->blogname;
|
||||
if ( strlen( $blogname ) > 15 )
|
||||
$blogname = substr( $blogname, 0, 15 ) . '…';
|
||||
|
||||
if ( empty( $blog->blogname ) )
|
||||
$blogname = $blog->domain;
|
||||
else
|
||||
$blogname = substr( $blog->blogname, 0, 18 ) . $marker;
|
||||
|
||||
if ( ! isset( $blog->visible ) || $blog->visible === true ) {
|
||||
$wp_admin_bar->add_menu( array( 'parent' => 'my-blogs', 'id' => 'blog-' . $blog->userblog_id, 'title' => $blavatar . $blogname, 'href' => get_admin_url($blog->userblog_id), ) );
|
||||
$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), ) );
|
||||
|
||||
|
@ -135,7 +129,6 @@ function wp_admin_bar_my_sites_menu() {
|
|||
$wp_admin_bar->add_menu( array( 'parent' => 'blog-' . $blog->userblog_id, 'id' => 'blog-' . $blog->userblog_id . '-v', 'title' => __( 'Visit Site' ), 'href' => get_home_url($blog->userblog_id), ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Provide a shortlink.
|
||||
|
|
Loading…
Reference in New Issue