mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00:00
[ticket/14191] Add core.get_gravatar_url_after event
PHPBB3-14191
This commit is contained in:
parent
7e379c4cea
commit
d5f625382b
1 changed files with 13 additions and 0 deletions
|
@ -172,6 +172,8 @@ class gravatar extends \phpbb\avatar\driver\driver
|
|||
*/
|
||||
protected function get_gravatar_url($row)
|
||||
{
|
||||
global $phpbb_dispatcher;
|
||||
|
||||
$url = self::GRAVATAR_URL;
|
||||
$url .= md5(strtolower(trim($row['avatar'])));
|
||||
|
||||
|
@ -180,6 +182,17 @@ class gravatar extends \phpbb\avatar\driver\driver
|
|||
$url .= '?s=' . max($row['avatar_width'], $row['avatar_height']);
|
||||
}
|
||||
|
||||
/**
|
||||
* Modify gravatar url
|
||||
*
|
||||
* @event core.get_gravatar_url_after
|
||||
* @var string row User data or group data
|
||||
* @var string url Gravatar URL
|
||||
* @since 3.1.7-RC1
|
||||
*/
|
||||
$vars = array('row', 'url');
|
||||
extract($phpbb_dispatcher->trigger_event('core.get_gravatar_url_after', compact($vars)));
|
||||
|
||||
return $url;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue