Last active
February 3, 2019 11:06
-
-
Save cryptexvinci/71028d766c2446b3292d52be36d84f70 to your computer and use it in GitHub Desktop.
Ultimate Member - Change the name of the 'Friends' tab to something else
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
| /** | |
| * 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