Skip to content

Commit

Permalink
Merge pull request #281 from 10up/fix/default-avatar-issue
Browse files Browse the repository at this point in the history
Fix Default Avatar Fallback (Param: `default` vs `url`)
  • Loading branch information
faisal-alvi authored May 16, 2024
2 parents e3fe490 + ec519b9 commit c1a1f1e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions includes/class-simple-local-avatars.php
Original file line number Diff line number Diff line change
Expand Up @@ -276,10 +276,12 @@ public function get_avatar_data( $args, $id_or_email ) {

// Local only mode
if ( ! $simple_local_avatar_url ) {
$default_url = $this->get_default_avatar_url( $args['size'] );
$default_url = $this->get_default_avatar_url( $args['size'] );
$avatar_default = get_option( 'avatar_default' );

if ( ! empty( $this->options['only'] ) ) {
$args['url'] = $default_url;
} else {
} elseif ( 'simple_local_avatar' === $avatar_default ) {
$args['default'] = $default_url;
}
}
Expand Down

0 comments on commit c1a1f1e

Please sign in to comment.