Users: Add user's Gravatar to 'About the user' section on user profile page.
Add `user_profile_picture_description` filter for the description text displayed under the Gravatar. Props carolinegeven, obrienlabs, SergeyBiryukov. Fixes #32286. git-svn-id: https://develop.svn.wordpress.org/trunk@35610 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
5310c447b8
commit
7674a767ed
|
@ -437,6 +437,32 @@ if ( is_multisite() && is_network_admin() && ! IS_PROFILE_PAGE && current_user_c
|
||||||
<p class="description"><?php _e('Share a little biographical information to fill out your profile. This may be shown publicly.'); ?></p></td>
|
<p class="description"><?php _e('Share a little biographical information to fill out your profile. This may be shown publicly.'); ?></p></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
|
<tr class="user-profile-picture">
|
||||||
|
<th><?php _e( 'Profile Picture' ); ?></th>
|
||||||
|
<td>
|
||||||
|
<?php echo get_avatar( $user_id ); ?>
|
||||||
|
<p class="description"><?php
|
||||||
|
if ( IS_PROFILE_PAGE ) {
|
||||||
|
/* translators: %s: Gravatar URL */
|
||||||
|
$description = sprintf( __( 'You can change your profile picture on <a href="%s">Gravatar</a>.' ),
|
||||||
|
__( 'https://en.gravatar.com/' )
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
$description = '';
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Filter the user profile picture description displayed under the Gravatar.
|
||||||
|
*
|
||||||
|
* @since 4.4.0
|
||||||
|
*
|
||||||
|
* @param string $description The description that will be printed.
|
||||||
|
*/
|
||||||
|
echo apply_filters( 'user_profile_picture_description', $description );
|
||||||
|
?></p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Filter the display of the password fields.
|
* Filter the display of the password fields.
|
||||||
|
|
Loading…
Reference in New Issue