You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With WP 4.4, a description below a users avatar on its profile page was introduced. It is advertising for Gravatar and of no use if the user already uploaded a custom avatar. As we already properly display a custom avatar there, we should change this.
It only shows when IS_PROFILE_PAGE is set and true. The user_profile_picture_description-filter allows changing this string. We should do that:
add_filter( 'user_profile_picture_description', function( $descr ) {
if (
defined( 'IS_PROFILE_PAGE' ) andIS_PROFILE_PAGE
&& apply_filters( 'wcm.avatar.enable_custom_avatar', TRUE )
) {
$has = get_user_meta(
get_current_user_id(),
apply_filters( 'wcm.avatar.meta_key', 'user_avatar' ),
TRUE
);
$descr = $has
? 'You can change your avatar by defining a new one <a href="#tmpl-main--container">here</a>.'
: 'You can upload an avatar <a href="#tmpl-main--container">on top</a>.';
}
return$descr;
} );
/Cc @stephenharris Maybe you got some input on how to phrase the description?
The text was updated successfully, but these errors were encountered:
Do we really need the IS_PROFILE_PAGE check? It looks like this filter isn't used anywhere else anyway.
Concerning the wording I'd make it consistent.
'You can change your avatar by uploading a new one <a href="#tmpl-main--container">here</a>.'
'You can upload an avatar <a href="#tmpl-main--container">here</a>.';
Also I think we should avoid mentioning any location considering #31
About the localisation: Did you link the wrong ticket?
No I didn't and I said location, not localisation. 😄
If we make the positioning of the UI flexible as proposed in #31 using the word "top" could be wrong, so better avoid any wording like that.
With WP 4.4, a description below a users avatar on its profile page was introduced. It is advertising for Gravatar and of no use if the user already uploaded a custom avatar. As we already properly display a custom avatar there, we should change this.
It only shows when
IS_PROFILE_PAGE
is set andtrue
. Theuser_profile_picture_description
-filter allows changing this string. We should do that:/Cc @stephenharris Maybe you got some input on how to phrase the description?
The text was updated successfully, but these errors were encountered: