Repository navigation
feat: Add default avatar image locally for users without an email hash - #9354
AKSHAT2802 wants to merge 3 commits into
Conversation
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. Core Committers: Use this line as a base for the props when committing in SVN: To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. Props Bot commandsYou can trigger Props Bot actions by commenting on this PR:
|
Test using WordPress PlaygroundThe changes in this pull request can previewed and tested using a WordPress Playground instance. WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser. Some things to be aware of
For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation. |
|
| Location | Error | Identifier | First reported |
|---|---|---|---|
src/wp-includes/link-template.php:4596 |
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. |
wordpress.hookDocMissing |
415ed17 |
Running PHPStan locally
To run the analysis on your own machine, use npm run typecheck:php, or composer phpstan outside the Docker environment.
Trac ticket: https://core.trac.wordpress.org/ticket/48088
This PR enhances the get_avatar_data() function by serving a local default avatar (the Mystery Man) when no email or hash is available, thereby avoiding unnecessary external requests to Gravatar.
What This PR Does
wp-includes/images/avatar-default.png
How to Test
echo get_avatar( '', 96, 'mm' );