bb_get_current_poster

Get the current, non-logged-in poster data.

Description

(array) bb_get_current_poster(); 

Returns (array)

The associative array of author, email, and url data.


Usage

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

Defined (1)

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

/bp-forums/bbpress/bb-includes/functions.bb-posts.php  
  1. function bb_get_current_poster() { 
  2. // Cookies should already be sanitized. 
  3. $post_author = ''; 
  4. if ( isset( $_COOKIE['post_author_' . BB_HASH] ) ) 
  5. $post_author = $_COOKIE['post_author_' . BB_HASH]; 
  6.  
  7. $post_author_email = ''; 
  8. if ( isset( $_COOKIE['post_author_email_' . BB_HASH] ) ) 
  9. $post_author_email = $_COOKIE['post_author_email_' . BB_HASH]; 
  10.  
  11. $post_author_url = ''; 
  12. if ( isset( $_COOKIE['post_author_url_' . BB_HASH] ) ) 
  13. $post_author_url = $_COOKIE['post_author_url_' . BB_HASH]; 
  14.  
  15. return compact( 'post_author', 'post_author_email', 'post_author_url' );