mirror of
https://git.sekbaer.de/Friendica/friendica.git
synced 2025-06-11 01:24:27 +02:00
Rename gravatar_img() more generic to avatar_img().
I would like to extend the Gravatar support to also use Libravatar, a decentralized avatar service. First step to extract Gravatar from core and put it into its own plugin. Later the Libravatar plugin can be done, too as a plugin.
This commit is contained in:
parent
d25a9df996
commit
93ffba58cc
3 changed files with 7 additions and 7 deletions
|
@ -692,13 +692,13 @@ function allowed_email($email) {
|
|||
}}
|
||||
|
||||
|
||||
if(! function_exists('gravatar_img')) {
|
||||
function gravatar_img($email) {
|
||||
if(! function_exists('avatar_img')) {
|
||||
function avatar_img($email) {
|
||||
$size = 175;
|
||||
$opt = 'identicon'; // psuedo-random geometric pattern if not found
|
||||
$rating = 'pg';
|
||||
$hash = md5(trim(strtolower($email)));
|
||||
|
||||
|
||||
$url = 'http://www.gravatar.com/avatar/' . $hash . '.jpg'
|
||||
. '?s=' . $size . '&d=' . $opt . '&r=' . $rating;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue