Created
April 1, 2014 17:42
-
-
Save javierarques/9919188 to your computer and use it in GitHub Desktop.
Removes facebook avatar metas saved by wp fb autoconnect plugin when a Buddypress user upload a new avatar
This file contains 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
/** | |
* Removes facebook avatar URL save in user metas by wp fb autoconnect plugin | |
* requires Buddypress & wp-fb-autoconnect | |
* @global type $bp | |
*/ | |
function remove_facebook_avatar () { | |
global $bp; | |
delete_user_meta($bp->displayed_user->id, 'facebook_avatar_full'); | |
delete_user_meta($bp->displayed_user->id, 'facebook_avatar_thumb'); | |
} | |
add_action( 'xprofile_avatar_uploaded', 'remove_facebook_avatar' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment