bp_blogs_get_blogs_for_user

Get all of a user's blogs, as tracked by BuddyPress.

Description

(array) bp_blogs_get_blogs_for_user( (int) $user_id, (bool) $show_hidden = false ); 

Returns (array)

See {@BP_Blogs_Blog::get_blogs_for_user()}.

Parameters (2)

0. $user_id (int)
The user id.
1. $show_hidden — Optional. (bool) => false
The show hidden.

Usage

  1. if ( !function_exists( 'bp_blogs_get_blogs_for_user' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddypress/bp-blogs/bp-blogs-functions.php'; 
  3.  
  4. // The user id. 
  5. $user_id = -1; 
  6.  
  7. // The show hidden. 
  8. $show_hidden = false; 
  9.  
  10. // NOTICE! Understand what this does before running. 
  11. $result = bp_blogs_get_blogs_for_user($user_id, $show_hidden); 
  12.  

Defined (1)

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

/bp-blogs/bp-blogs-functions.php  
  1. function bp_blogs_get_blogs_for_user( $user_id, $show_hidden = false ) { 
  2. return BP_Blogs_Blog::get_blogs_for_user( $user_id, $show_hidden );