diff options
author | Callum Macrae <callum@macr.ae> | 2015-05-28 18:05:07 +0200 |
---|---|---|
committer | Callum Macrae <callum@macr.ae> | 2015-05-28 18:05:07 +0200 |
commit | be1d1c7d05a0b0dec259da967e2ed277fb8f632f (patch) | |
tree | d57555e08c1014e690661848c644d145dab2b497 /phpBB/includes/functions_compatibility.php | |
parent | 44fcdd007fd82dbedf3188a035075416818161ab (diff) | |
download | forums-be1d1c7d05a0b0dec259da967e2ed277fb8f632f.tar forums-be1d1c7d05a0b0dec259da967e2ed277fb8f632f.tar.gz forums-be1d1c7d05a0b0dec259da967e2ed277fb8f632f.tar.bz2 forums-be1d1c7d05a0b0dec259da967e2ed277fb8f632f.tar.xz forums-be1d1c7d05a0b0dec259da967e2ed277fb8f632f.zip |
[ticket/13882] Lazy load the notification avatars.
This moves them further down the waterfall, making the page load
quicker.
PHPBB3-13882
Diffstat (limited to 'phpBB/includes/functions_compatibility.php')
-rw-r--r-- | phpBB/includes/functions_compatibility.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/phpBB/includes/functions_compatibility.php b/phpBB/includes/functions_compatibility.php index 43952ae57a..b59c7376e9 100644 --- a/phpBB/includes/functions_compatibility.php +++ b/phpBB/includes/functions_compatibility.php @@ -30,10 +30,11 @@ if (!defined('IN_PHPBB')) * @param string $avatar_height Height of users avatar * @param string $alt Optional language string for alt tag within image, can be a language key or text * @param bool $ignore_config Ignores the config-setting, to be still able to view the avatar in the UCP +* @param bool $lazy If true, will be lazy loaded (requires JS) * * @return string Avatar image */ -function get_user_avatar($avatar, $avatar_type, $avatar_width, $avatar_height, $alt = 'USER_AVATAR', $ignore_config = false) +function get_user_avatar($avatar, $avatar_type, $avatar_width, $avatar_height, $alt = 'USER_AVATAR', $ignore_config = false, $lazy = false) { // map arguments to new function phpbb_get_avatar() $row = array( @@ -43,7 +44,7 @@ function get_user_avatar($avatar, $avatar_type, $avatar_width, $avatar_height, $ 'avatar_height' => $avatar_height, ); - return phpbb_get_avatar($row, $alt, $ignore_config); + return phpbb_get_avatar($row, $alt, $ignore_config, $lazy); } /** |