Skip to content

Instantly share code, notes, and snippets.

@javierarques
Created April 1, 2014 17:42
Show Gist options
  • Save javierarques/9919188 to your computer and use it in GitHub Desktop.
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
/**
* 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