bp_get_blog_create_button

Get the Create a Site button.

Description

(string) bp_get_blog_create_button(); 

Returns (string)


Usage

  1. if ( !function_exists( 'bp_get_blog_create_button' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddypress/bp-blogs/bp-blogs-template.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = bp_get_blog_create_button(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/bp-blogs/bp-blogs-template.php  
  1. function bp_get_blog_create_button() { 
  2. if ( ! is_user_logged_in() ) { 
  3. return false; 
  4.  
  5. if ( ! bp_blog_signup_enabled() ) { 
  6. return false; 
  7.  
  8. $button_args = array( 
  9. 'id' => 'create_blog',  
  10. 'component' => 'blogs',  
  11. 'link_text' => __( 'Create a Site', buddypress ),  
  12. 'link_class' => 'blog-create no-ajax',  
  13. 'link_href' => trailingslashit( bp_get_blogs_directory_permalink() . 'create' ),  
  14. 'wrapper' => false,  
  15. 'block_self' => false,  
  16. ); 
  17.  
  18. /** 
  19. * Filters the Create a Site button. 
  20. * @since 2.0.0 
  21. * @param array $button_args Array of arguments to be used for the Create a Site button. 
  22. */