Tag Info

Hot answers tagged

7

I think the problem is simply that your default avatar isn't publicly available. Try for example http://upload.wikimedia.org/wikipedia/en/b/b0/Avatar-Teaser-Poster.jpg instead of http://loalhost:888/wordpress/wp-content/themes/blog-theme/img/icons/avatar.jpg Notice that the default gravatar is served via http{|s}://i{0,1,2}.wp.com/... From the docs: ...


1

This function bp_get_user_has_avatar() calls bp_core_fetch_avatar with this argument 'no_grav' => true so you could write your own function to see if a user is not using the default avatar: function lurie_avatar_check( $user_id ) { $retval = false; if ( bp_core_fetch_avatar( array( 'item_id' => $user_id, 'no_grav' => false, 'html' ...


1

Two notes: get_avatar() is a "pluggable" function. That means, that you can write a plugin to hold a new function named get_avatar(), which then will overwrite the original function used by WP. get_avatar() also has a filter return apply_filters( 'get_avatar', $avatar, $id_or_email, $size, $default, $alt ); that you can use to change the return value: ...


1

I'm afraid it's not possible to do it without any plugin. Author's image (gravatar) is not published in RSS, and it's computed based on author's e-mail address, which also is not published in RSS... But if you have control over both of these sites, then you could use JSON API/XML RPC to get the newest blog posts - then you could get all info from these ...


1

I successfully replaced all gravitar.com avatars with my own locally hosted avatar image by adding this to my theme's function.php file: define('DEFAULT_AVATAR_URL', get_template_directory_uri() . '/images/user.png'); function no_gravatars( $avatar ) { return preg_replace( "/http.*?gravatar\.com[^\']*/", DEFAULT_AVATAR_URL, $avatar ); } add_filter( ...



Only top voted, non community-wiki answers of a minimum length are eligible