Skip to content

Instantly share code, notes, and snippets.

@cryptexvinci
Last active February 3, 2019 11:06
Show Gist options
  • Select an option

  • Save cryptexvinci/71028d766c2446b3292d52be36d84f70 to your computer and use it in GitHub Desktop.

Select an option

Save cryptexvinci/71028d766c2446b3292d52be36d84f70 to your computer and use it in GitHub Desktop.
Ultimate Member - Change the name of the 'Friends' tab to something else
/**
* Ultimate Member - Friends Extension
*/
function custom_um_friends_add_tabs( $tabs ) {
$user_id = um_user( 'ID' );
if ( ! $user_id ) {
return $tabs;
}
$enabled_tab = UM()->options()->get( 'profile_tab_friends' );
if ( ! empty( $enabled_tab ) || is_admin() ) {
$tabs['friends'] = array(
'name' => __( 'Tutors', 'um-friends' ),
'icon' => 'um-faicon-users',
'_builtin' => true,
);
}
return $tabs;
}
add_filter( 'um_profile_tabs', 'custom_um_friends_add_tabs', 2000 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment