Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: get avatar url #34

Open
selrond opened this issue Apr 5, 2018 · 0 comments
Open

Feature: get avatar url #34

selrond opened this issue Apr 5, 2018 · 0 comments

Comments

@selrond
Copy link

selrond commented Apr 5, 2018

I know this has been mentioned quite a few times, but it's really essential, as getting url from <img> tag from get_avatar() function is hacky beyond acceptable.

e.g. this solution from support forum

<?php
$my_custom_avatar = get_avatar(get_the_author_meta( 'ID' ));
$document = new DOMDocument();
@$document->loadHTML($my_custom_avatar);
$nodes = $document->getElementsByTagName('img');
echo $nodes->item(0)->getAttribute('src'); ?>

Any updates on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant