bp_create_blog_link

Output a "Create a Site" link for users viewing their own profiles.

Description

bp_create_blog_link(); 

This function is not used by BuddyPress as of 1.2, but is kept here for older themes that may still be using it.


Usage

  1. if ( !function_exists( 'bp_create_blog_link' ) ) { 
  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_create_blog_link(); 
  7.  

Defined (1)

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

/bp-blogs/bp-blogs-template.php  
  1. function bp_create_blog_link() { 
  2.  
  3. // Don't show this link when not on your own profile. 
  4. if ( ! bp_is_my_profile() ) { 
  5. return; 
  6.  
  7. /** 
  8. * Filters "Create a Site" links for users viewing their own profiles. 
  9. * @since 1.0.0 
  10. * @param string $value HTML link for creating a site. 
  11. */ 
  12. echo apply_filters( 'bp_create_blog_link', '<a href="' . trailingslashit( bp_get_blogs_directory_permalink() . 'create' ) . '">' . __( 'Create a Site', buddypress ) . '</a>' );