#5775 closed enhancement (fixed)
Pluggable get_avatar()
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 2.5 | Priority: | normal |
Severity: | normal | Version: | 2.5 |
Component: | General | Keywords: | avatar |
Focuses: | Cc: |
Description ¶
So that themes can rely on an avatar function always being available, let's introduce a get_avatar() pluggable function. By default it can use gravatar (disclaimer, my company owns gravatar), but plugins can replace the function altogether or hook onto a filter to use a different service. We might need new options to select avatar rating and allow avatars to not be displayed at all.
Pull Requests
- Loading…
Change History (23)
#2
@
17 years ago
apologies for the off-topic: With Gravatar, would it be possible in the future to allow setting it for a domain? I use contact+<sitename>@host for most commenting/signing up to blogs.. So its utterly useless to me at present :P
As to this ticket, It sounds like a good idea for themes, but, i feel by default it might be best not to have the gravatar stuff in there, I'd like it to be linked to my wordpress.com username instead somehow, if that means i have to add a plugin to enable wordpress.com integration, or add a plugin to enable gravaar integration then thats fine by me, so maybe WordPress should just have a stub in place?
(But In other words, I'd rather it linked to wordpress.com than gravatar.com)
#3
@ Lead Tester
17 years ago
wordpress.com doesn't have any external avatar lookup. wordpress.com avatars might someday be served from gravatar anyway.
#4
@
17 years ago
wordpress.com doesn't have any external avatar lookup. wordpress.com avatars might someday be served from gravatar anyway.
Ah ok.
#6
@ Lead Tester
17 years ago
The UI isn't there yet. I'm thinking of "Show Avatars" <yes|no> and "Show Avatars Rated:" <g|pg|r|x> options in Options->Reading. I can rough in something and let the designers decide on layout and wording.
I updated the patch to return false if the 'show_avatars' option is not true. Themes would need to check for a false return and style accordingly.
#8
@
17 years ago
- Version set to 2.5
"Show Avatars Rated" should be more clear. I know what it means, but noobs may not. Either that, it needs some explanation text.
#11
@ Lead Tester
17 years ago
Removed the default avatar images. We're going to serve those off of gravatar. The images aren't on gravatar yet so the gravatar branded default will show for now.
#13
@
17 years ago
- Type changed from defect to enhancement
Shouldn't the "Don't show Avatars" / "Show Avatars" option box be a checkbox instead?
Or is there an intention to add more options to this box? If not, it should definitely become a checkbox.
#14
follow-up:
↓ 19
@ Lead Tester
17 years ago
A checkbox is fine. Anyone want to patch it up? Also, anyone have a suggestion for better text than "Show Avatars Rated"?
#17
@
17 years ago
$default is getting urlencoded to soon and prevents usage as an img src later in the function.
Sample implementation. Not yet tested.