grofiles_hovercards_data_html

Echoes the data from grofiles_hovercards_data() as HTML elements.

Description

grofiles_hovercards_data_html( (int|string) $author ); 

Parameters (1)

0. $author (int|string)
User ID or email address

Usage

  1. if ( !function_exists( 'grofiles_hovercards_data_html' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'jetpack-by-wordpress-com/modules/gravatar-hovercards.php'; 
  3.  
  4. // User ID or email address 
  5. $author = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = grofiles_hovercards_data_html($author); 
  9.  

Defined (1)

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

/modules/gravatar-hovercards.php  
  1. function grofiles_hovercards_data_html( $author ) { 
  2. $data = grofiles_hovercards_data( $author ); 
  3. if ( is_numeric( $author ) ) { 
  4. $user = get_userdata( $author ); 
  5. $hash = md5( $user->user_email ); 
  6. } else { 
  7. $hash = md5( $author ); 
  8. ?> 
  9. <div class="grofile-hash-map-<?php echo $hash; ?>"> 
  10. <?php foreach ( $data as $key => $value ) : ?> 
  11. <span class="<?php echo esc_attr( $key ); ?>"><?php echo esc_html( $value ); ?></span> 
  12. <?php endforeach; ?> 
  13. </div> 
  14. <?php