Skip to content

Instantly share code, notes, and snippets.

akudo shesgottadevelopit

Block or report user

Report or block shesgottadevelopit

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
shesgottadevelopit / validate_gravatar.php
Created Jul 14, 2016 — forked from justinph/validate_gravatar.php
In wordpress, a better way to check if an author has a gravatar or not. Sometimes you might want to check to see if a gravatar exists and not display any image if there isn't one. Uses the wordpress HTTP and caching apis. A better version of this:
View validate_gravatar.php
* Utility function to check if a gravatar exists for a given email or id
* @param int|string|object $id_or_email A user ID, email address, or comment object
* @return bool if the gravatar exists or not
function validate_gravatar($id_or_email) {
//id or email code borrowed from wp-includes/pluggable.php
$email = '';
You can’t perform that action at this time.