bp_get_blog_create_button()

Get the Create a Site button.

Description

Return

(false|string)

Source

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

	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.