bp_show_verified_badge_activity_comment

Bp_show_verified_badge_activity_comment function.

Description

(string) bp_show_verified_badge_activity_comment( (mixed) $object ); 

Returns (string)

Parameters (1)

0. $object (mixed)
The object.

Usage

  1. if ( !function_exists( 'bp_show_verified_badge_activity_comment' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddyverified/includes/class-functions.php'; 
  3.  
  4. // The object. 
  5. $object = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = bp_show_verified_badge_activity_comment($object); 
  9.  

Defined (1)

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

/includes/class-functions.php  
  1. function bp_show_verified_badge_activity_comment( $object ) { 
  2. global $bp, $activities_template; 
  3.  
  4. if ( ! bp_is_active( 'activity' ) ) { 
  5. return; 
  6.  
  7. $comments = isset( $activities_template->activity->current_comment ) ? $activities_template->activity->current_comment->user_id : (int) $activities_template->activity->user_id; 
  8. $verified_meta = bp_get_verified_meta( $comments ); 
  9.  
  10. if ( ! empty( $verified_meta ) ) { 
  11. if ( isset( $verified_meta['activity'] ) && 'yes' === $verified_meta['activity'] && bp_is_verified( $comments ) ) { 
  12. $object = '<span class="buddyverified-comment">' . bp_get_verified_image( $verified_meta['image'] ) . '</span>' . $object; 
  13.  
  14.  
  15. return $object;