Created
October 30, 2017 19:08
-
-
Save carasmo/2aea96d9d44acd4f15f39a38953693b1 to your computer and use it in GitHub Desktop.
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
<?php | |
//DO NOT COPY THE ABOVE PHP tag -- change yourprefix_ in two locations | |
add_filter( 'pre_get_avatar_data', 'yourprefix_remove_gravatars_from_pinterest_choices', 10, 2 ); | |
/** | |
* Add html5 atts on all avatars to remove from Pinterst choices | |
*/ | |
function yourprefix_remove_gravatars_from_pinterest_choices( $args, $id_or_email ) { | |
$args['extra_attr'] = 'data-pin-no-hover="true" data-pin-nopin="true"'; | |
return $args; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment