From ea5c9eaab138ad5e38c8e2a2741d8da1231fa2c2 Mon Sep 17 00:00:00 2001 From: ashubawork Date: Wed, 22 Jun 2022 14:52:28 +0300 Subject: [PATCH] - add lazy load attribute to cover and profile photos --- includes/um-short-functions.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/um-short-functions.php b/includes/um-short-functions.php index 4388bae4..afd2fa7d 100644 --- a/includes/um-short-functions.php +++ b/includes/um-short-functions.php @@ -2516,7 +2516,7 @@ function um_user( $data, $attrs = null ) { case 'profile_photo': $data = um_get_user_avatar_data( um_user( 'ID' ), $attrs ); - return sprintf( '%s', + return sprintf( '%s', esc_attr( $data['url'] ), esc_attr( $data['class'] ), esc_attr( $data['size'] ), @@ -2566,7 +2566,7 @@ function um_user( $data, $attrs = null ) { $alt = um_profile( 'nickname' ); - $cover_html = $cover_uri ? '' . esc_attr( $alt ) . '' : ''; + $cover_html = $cover_uri ? '' . esc_attr( $alt ) . '' : ''; $cover_html = apply_filters( 'um_user_cover_photo_html__filter', $cover_html, $cover_uri, $alt, $is_default, $attrs ); return $cover_html;