Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added src/wp-includes/images/avatar-default.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions src/wp-includes/link-template.php
Original file line number Diff line number Diff line change
Expand Up @@ -4589,6 +4589,13 @@
$args['found_avatar'] = true;
}

// Serve local avatar if no email hash and default is 'mm'
if ( ! $email_hash && 'mm' === $args['default'] ) {
// wp_die('Early return');
$args['url'] = includes_url( 'images/avatar-default.png' );
return apply_filters( 'get_avatar_data', $args, $id_or_email );

Check warning on line 4596 in src/wp-includes/link-template.php

View workflow job for this annotation

GitHub Actions / PHP static analysis / Run PHP static analysis (all paths)

PHPStan: wordpress.hookDocMissing

apply_filters() call for hook "get_avatar_data" is not preceded by a docblock documenting the hook, nor by a "This filter/action is documented in <file>" reference comment.
}

$url_args = array(
's' => $args['size'],
'd' => $args['default'],
Expand Down
Loading