grofiles_gravatars_to_append

Stores the gravatars' users that need extra profile data attached.

Description

grofiles_gravatars_to_append( (null) $author = null ); 

Getter/Setter

Parameters (1)

0. $author — Optional. (null) => null
Setter: User ID or email address. Getter: null.

Usage

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

Defined (1)

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

/modules/gravatar-hovercards.php  
  1. function grofiles_gravatars_to_append( $author = null ) { 
  2. static $authors = array(); 
  3.  
  4. // Get 
  5. if ( is_null( $author ) ) { 
  6. return array_keys( $authors ); 
  7.  
  8. // Set 
  9.  
  10. if ( is_numeric( $author ) ) { 
  11. $author = (int) $author; 
  12.  
  13. $authors[$author] = true;