+<?php if ( get_option( 'show_avatars' ) ) : ?>
+<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 endif; ?>
+