[wp-trac] [WordPress Trac] #21195: get_avatar_url

WordPress Trac noreply at wordpress.org
Thu Aug 28 02:15:12 UTC 2014


#21195: get_avatar_url
-----------------------------+-----------------------------
 Reporter:  pathawks         |       Owner:
     Type:  feature request  |      Status:  new
 Priority:  normal           |   Milestone:  Future Release
Component:  General          |     Version:  2.5
 Severity:  normal           |  Resolution:
 Keywords:  has-patch        |     Focuses:
-----------------------------+-----------------------------

Comment (by pathawks):

 Because `get_avatar` is pluggable, we cannot safely assume that it will
 always even return an `<img>` tag. It could, for instance, return a
 `<div>` with a backgroud set to an avatar image, or something silly.

 Because of the (albeit remote) possibility of this, running a regex on the
 return from `get_avatar` only works well when you are certain that nothing
 odd has plugged `get_avatar`. A safe assumption for WordPress.com, perhaps
 not a safe assumption for  the rest of the world.

 What would be the possible advantage of adding a new function to
 `pluggable.php`? Why not just send output (Gravatar URL) through a filter?

--
Ticket URL: <https://core.trac.wordpress.org/ticket/21195#comment:42>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list