bp_get_blog_create_button()

Get the Create a Site button.

Description

Return

(false|string)

Source

File: bp-blogs/bp-blogs-template.php

1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
function bp_get_blog_create_button() {
    if ( ! is_user_logged_in() ) {
        return false;
    }
 
    if ( ! bp_blog_signup_enabled() ) {
        return false;
    }
 
    $button_args = array(
        'id'         => 'create_blog',
        'component'  => 'blogs',
        'link_text'  => __( 'Create a Site', 'buddyboss' ),
        'link_class' => 'blog-create no-ajax',
        'link_href'  => trailingslashit( bp_get_blogs_directory_permalink() . 'create' ),
        'wrapper'    => false,
        'block_self' => false,
    );
 
    /**
     * Filters the Create a Site button.
     *
     * @since BuddyPress 2.0.0
     *
     * @param array $button_args Array of arguments to be used for the Create a Site button.
     */
    return bp_get_button( apply_filters( 'bp_get_blog_create_button', $button_args ) );
}

Changelog

Changelog
Version Description
BuddyPress 2.0.0 Introduced.

Questions?

We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.