WordPress.org

Make WordPress Core


Ignore:
Timestamp:
11/28/2014 08:12:13 AM (6 years ago)
Author:
SergeyBiryukov
Message:

Consistently handle an empty site title in Site and My Sites toolbar menus.

see #28682.

File:
1 edited

Legend:

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

    r30459 r30598  
    271271    $blogname = get_bloginfo('name');
    272272
    273     if ( empty( $blogname ) )
     273    if ( ! $blogname ) {
    274274        $blogname = preg_replace( '#^(https?://)?(www.)?#', '', get_home_url() );
     275    }
    275276
    276277    if ( is_network_admin() ) {
     
    403404        $blavatar = '<div class="blavatar"></div>';
    404405
    405         $blogname = empty( $blog->blogname ) ? $blog->domain : $blog->blogname;
     406        $blogname = $blog->blogname;
     407
     408        if ( ! $blogname ) {
     409            $blogname = preg_replace( '#^(https?://)?(www.)?#', '', get_home_url() );
     410        }
     411
    406412        $menu_id  = 'blog-' . $blog->userblog_id;
    407413
Note: See TracChangeset for help on using the changeset viewer.