bp_get_profile_last_updated

Return a formatted string displaying when a profile was last updated.

Description

(bool|string) bp_get_profile_last_updated(); 

Returns (bool|string)


Usage

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

Defined (1)

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

/bp-xprofile/bp-xprofile-template.php  
  1. function bp_get_profile_last_updated() { 
  2.  
  3. $last_updated = bp_get_user_meta( bp_displayed_user_id(), 'profile_last_updated', true ); 
  4.  
  5. if ( ! empty( $last_updated ) ) { 
  6.  
  7. /** 
  8. * Filters the formatted string used to display when a profile was last updated. 
  9. * @since 1.0.0 
  10. * @param string $value Formatted last updated indicator string. 
  11. */ 
  12. return apply_filters( 'bp_get_profile_last_updated', sprintf( __( 'Profile updated %s', buddypress ), bp_core_time_since( strtotime( $last_updated ) ) ) ); 
  13.  
  14. return false;