bp_blogs_get_allowed_roles

The allowed blog roles a member must have to be recorded into the `bp_user_blogs` pointer table.

Description

(string) bp_blogs_get_allowed_roles(); 

This added and was made filterable in BuddyPress 2.1.0 to make it easier to extend the functionality of the Blogs component.

Returns (string)


Usage

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

Defined (1)

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

/bp-blogs/bp-blogs-functions.php  
  1. function bp_blogs_get_allowed_roles() { 
  2.  
  3. /** 
  4. * Filters the allowed roles a member must have to be recorded into bp_user_blogs pointer table. 
  5. * @since 2.1.0 
  6. * @param array $value Array of potential roles user needs. 
  7. */ 
  8. return apply_filters( 'bp_blogs_get_allowed_roles', array( 'contributor', 'author', 'editor', 'administrator' ) );