This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* The way this is written there are 2 major assumptions: | |
* | |
* 1) There will only ever be one `.email_subscribe` on the page (and if there’s more, | |
* they’re all going to open/close at the same time) | |
* 2) These elements will exist on document load…so if these things get built by js or are | |
* loaded after docload, these click events won’t do anything | |
*/ | |
$('.subscribe-close').on('click', function(){ | |
$('.email_subscribe').removeClass('email_subscribe--opened'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 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 = ''; |