Skip to content

Commit

Permalink
Update includes/class-simple-local-avatars.php
Browse files Browse the repository at this point in the history
  • Loading branch information
faisal-alvi authored Sep 13, 2024
1 parent eeb66bc commit 4d775cc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion includes/class-simple-local-avatars.php
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,7 @@ public function get_simple_local_avatar_alt( $id_or_email ) {

// Fetch local avatar from meta and make sure we have a media ID.
$local_avatars = $this->get_user_local_avatar( $user_id );
if ( empty( $local_avatars['media_id'] ) ) {
if ( ! isset( $local_avatars['media_id'] ) || empty( $local_avatars['media_id'] ) ) {
$alt = '';
// If no avatar is set, check if we are using a default avatar with alt text.
if ( 'simple_local_avatar' === get_option( 'avatar_default' ) ) {
Expand Down

0 comments on commit 4d775cc

Please sign in to comment.