Function __global->cns_choose_default_avatar

Definitions

sources/cns_members2.php

  • Pick a default avatar for a member.Does not support gravatar, that is supported by get_member_avatar_url.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: string

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$email_address EMAIL No No Blank (empty string) N/A N/A E-mail address is used to create a bias (or perhaps something else if this function is overridden)
$algorithm string No No avoid_conflict avoid_conflict dynamic N/A Algorithm to use (if possible). 'avoid_conflict' tries to avoid conflict with existing members. 'dynamic' uses the $email_address as a bias

Returns

  • Avatar (blank: none)
  • Type: URLPATH
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Pick a default avatar for a member.Does not support gravatar, that is supported by get_member_avatar_url.
 *
 * @param  EMAIL $email_address E-mail address is used to create a bias (or perhaps something else if this function is overridden)
 * @param  string $algorithm Algorithm to use (if possible). 'avoid_conflict' tries to avoid conflict with existing members. 'dynamic' uses the $email_address as a bias
 * @set avoid_conflict dynamic
 * @return URLPATH Avatar (blank: none)
 */

function cns_choose_default_avatar(string $email_address = '', string $algorithm = 'avoid_conflict') : string