Created
November 10, 2015 16:38
-
-
Save strangerstudios/b61ceebb01416e37120b to your computer and use it in GitHub Desktop.
Display a member's gravatar and a link to update at Gravatar on the Membership Account page "Profile" section.
This file contains hidden or 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 | |
function my_pmpro_account_bullets_top_avatar() | |
{ | |
global $current_user; | |
echo '<li class="alignright" style="display: inline-block; list-style: none; margin: -5rem 0 0 0;">' . get_avatar($current_user->ID, 200) . '</li>'; | |
} | |
add_action("pmpro_account_bullets_top","my_pmpro_account_bullets_top_avatar"); | |
function my_pmpro_account_bullets_bottom_avatar() | |
{ | |
global $current_user; | |
echo '<li><strong>' . __('Avatar','wp') . ':</strong> <a href="http://gravatar.com/" target="_blank">' . __('Update at Gravatar.com','pmpro') . '</a></li>'; | |
} | |
add_action("pmpro_account_bullets_bottom","my_pmpro_account_bullets_bottom_avatar"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment