Removing Admin Link from Activity/Site
-
The name “Admin” appears when creating a group, post updated, etc in the activity stream and other areas. I noticed that there is a “bp_get_activity_user_link” filter.
How can I create a function that “disables” the Admin link but creates link for all other users?
function disable_admin_profile_link( $link ) { if( $link != bp_loggedin_user_domain() ) $link = // custom url return $link; } add_filter( 'bp_get_activity_user_link', 'disable_admin_profile_link', 15, 1 );
vs something like this
function _bp_core_get_user_domain($domain) { $url = get_home_url(); $user_id = bp_get_member_user_id(); if (empty($user_id)) { $user_id = bp_get_activity_user_id(); } if (empty($user_id)) { //$user_id = bp_displayed_user_id(); } $user_info = get_userdata($user_id); $link = $user_info->display_name; $domain = '' . $url . '/profiles/' . $link . ''; return $domain; } add_filter('bp_core_get_user_domain', '_bp_core_get_user_domain', 10, 4); apply_filters( 'bp_get_activity_user_link', '_bp_core_get_user_domain', 15, 1);
Not sure how to code it… If user is Admin, then link to homepage. If not, then link to their profile?
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- You must be logged in to reply to this topic.