diff options
author | Matt Friedman <maf675@gmail.com> | 2015-06-16 11:58:31 -0700 |
---|---|---|
committer | Matt Friedman <maf675@gmail.com> | 2015-06-16 11:58:31 -0700 |
commit | 4f05364eb9ba8db297b7f694198241c9c9717c0e (patch) | |
tree | a2772aec3acea5ba2ca2375bd332488462e3e098 /phpBB/includes/functions.php | |
parent | 0bab5db1dd8e3c3e855b258471b0b24a1ace268d (diff) | |
download | forums-4f05364eb9ba8db297b7f694198241c9c9717c0e.tar forums-4f05364eb9ba8db297b7f694198241c9c9717c0e.tar.gz forums-4f05364eb9ba8db297b7f694198241c9c9717c0e.tar.bz2 forums-4f05364eb9ba8db297b7f694198241c9c9717c0e.tar.xz forums-4f05364eb9ba8db297b7f694198241c9c9717c0e.zip |
[ticket/13882] Add lazy load avatars to phpbb wrappers
PHPBB3-13882
Diffstat (limited to 'phpBB/includes/functions.php')
-rw-r--r-- | phpBB/includes/functions.php | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index 68020458c7..27c286c598 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -4783,13 +4783,14 @@ function phpbb_build_hidden_fields_for_query_params($request, $exclude = null) * @param array $user_row Row from the users table * @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 html */ -function phpbb_get_user_avatar($user_row, $alt = 'USER_AVATAR', $ignore_config = false) +function phpbb_get_user_avatar($user_row, $alt = 'USER_AVATAR', $ignore_config = false, $lazy = false) { $row = \phpbb\avatar\manager::clean_row($user_row, 'user'); - return phpbb_get_avatar($row, $alt, $ignore_config); + return phpbb_get_avatar($row, $alt, $ignore_config, $lazy); } /** @@ -4798,13 +4799,14 @@ function phpbb_get_user_avatar($user_row, $alt = 'USER_AVATAR', $ignore_config = * @param array $group_row Row from the groups table * @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 html */ -function phpbb_get_group_avatar($user_row, $alt = 'GROUP_AVATAR', $ignore_config = false) +function phpbb_get_group_avatar($user_row, $alt = 'GROUP_AVATAR', $ignore_config = false, $lazy = false) { $row = \phpbb\avatar\manager::clean_row($user_row, 'group'); - return phpbb_get_avatar($row, $alt, $ignore_config); + return phpbb_get_avatar($row, $alt, $ignore_config, $lazy); } /** |