Last active
April 27, 2021 15:44
-
-
Save champsupertramp/f2c37356396f6c7d2366 to your computer and use it in GitHub Desktop.
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
<?php | |
/*** | |
*** @Dettach um default avatar | |
***/ | |
add_filter('avatar_defaults', 'um_avatar_defaults', 99999 ); | |
function um_avatar_defaults($avatar_defaults) { | |
remove_filter('get_avatar', 'um_get_avatar', 99999, 5); | |
return $avatar_defaults; | |
} | |
/*** | |
*** @Override avatars with a high priority | |
***/ | |
add_filter('get_avatar', 'my_own_avatar', 999999, 5); | |
function my_own_avatar($avatar = '', $id_or_email='', $size = '96', $avatar_class = '', $default = '', $alt = '') { | |
// Insert new source of avatar | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks, however it is not working.
I tried adding this to functions.php but I still see the old default avatar