bplau_users_show_last_active_column_content

Display the last active date.

Description

(string) bplau_users_show_last_active_column_content( (string) $value, (string) $column_name, (int) $user_id ); 

Returns (string)

Parameters (3)

0. $value (string)
The value.
1. $column_name (string)
The column name.
2. $user_id (int)
The user id.

Usage

  1. if ( !function_exists( 'bplau_users_show_last_active_column_content' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddypress-last-active-users-wp-admin/bpla-users.php'; 
  3.  
  4. // The value. 
  5. $value = ''; 
  6.  
  7. // The column name. 
  8. $column_name = ''; 
  9.  
  10. // The user id. 
  11. $user_id = -1; 
  12.  
  13. // NOTICE! Understand what this does before running. 
  14. $result = bplau_users_show_last_active_column_content($value, $column_name, $user_id); 
  15.  

Defined (1)

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

/bpla-users.php  
  1. function bplau_users_show_last_active_column_content( $value, $column_name, $user_id ) { 
  2. $last_active = bp_get_last_activity( $user_id ); 
  3.  
  4. if ( 'bp_last_active' == $column_name ) { 
  5. return $last_active; 
  6.  
  7. return $value;