Created
April 30, 2019 02:59
-
-
Save KaineLabs/1579e30fa66d2fa480c2c9780ca57b18 to your computer and use it in GitHub Desktop.
Add My Member Directory My Profile Link.
This file contains 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 | |
/** | |
* Add My Member Directory My Profile Link. | |
*/ | |
function yzc_add_md_my_profile_link() { | |
if ( ! bp_is_members_directory() || ! is_user_logged_in() ) { | |
return; | |
} | |
?> | |
<li class="yzmd-my-profile"><a href="<?php echo bp_core_get_user_domain( bp_loggedin_user_id() ); ?>"><div style="background-image: url(<?php echo bp_core_fetch_avatar( array( 'item_id' => bp_loggedin_user_id(), 'type' => 'thumbnail', 'html' => false ) ); ?>); background-size: cover;vertical-align: middle; display: inline-block;"></div><?php _e( 'My Profile', 'ÿouzer' ); ?></a></li> | |
<?php | |
} | |
add_action( 'bp_members_directory_member_types', 'yzc_add_md_my_profile_link', 999 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment