Created
August 30, 2018 01:24
Star
You must be signed in to star a gist
Custom Profile Link Tag {loggedin_user}
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 | |
/** | |
* Filter Custom Tab Url. | |
*/ | |
function yzc_profile_custom_tab_url( $link = null ) { | |
// Get Displayed profile username. | |
$displayed_username = bp_core_get_username( bp_loggedin_user_id() ); | |
// Replace Tags. | |
$link = wp_kses_decode_entities( str_replace( '{loggedin_user}', $displayed_username, $link ) ); | |
return $link; | |
} | |
add_filter( 'yz_profile_custom_tab_url', 'yzc_profile_custom_tab_url', 999 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment