vanilla / wordpress-vanilla

Official WordPress plugin for Vanilla Forums integration.
https://open.vanillaforums.com
GNU Lesser General Public License v3.0
17 stars 6 forks source link

Use get_avatar_url instead of get_avatar + SimpleXMLElement #5

Closed x00 closed 8 years ago

x00 commented 9 years ago

Why do you use this fudge (your own words)?

https://github.com/vanilla/wordpress-vanilla/blob/master/functions.php#L354-L359

tburry commented 9 years ago

The get_avatar_url() function was added in Wordpress 4.2. We wrote the plugin way before that.

x00 commented 9 years ago

ok but xml parsing is a bit overkill.

something like preg_match('/src="([^"]+)"/', $img, $match); would do.

xml parsing did cause a bug with vanilla user, it is expected a closing slash or something.