Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
03/20/2015 03:39:44 PM (9 years ago)
Author:
imath
Message:

Blogs component: use the site url if the blog name is not set when registering a blog

So far when the blog name was not set, bp_blogs_record_blog() was not recording the blog. We will now use the blog url as a fallback but make sure the blog is recorded.

Props wolfhoundjesse

Fixes #4852

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-blogs/bp-blogs-functions.php

    r9517 r9632  
    235235
    236236    $name = get_blog_option( $blog_id, 'blogname' );
     237    $url  = get_home_url( $blog_id );
    237238
    238239    if ( empty( $name ) ) {
    239         return false;
    240     }
    241 
    242     $url             = get_home_url( $blog_id );
     240        $name = $url;
     241    }
     242
    243243    $description     = get_blog_option( $blog_id, 'blogdescription' );
    244244    $close_old_posts = get_blog_option( $blog_id, 'close_comments_for_old_posts' );
Note: See TracChangeset for help on using the changeset viewer.