Created
May 4, 2016 06:48
-
-
Save kish2011/b15048658c1763c5edb616915e22647c to your computer and use it in GitHub Desktop.
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
add_filter('um_profile_tabs', 'resume_pages_tab', 1000 ); | |
function resume_pages_tab( $tabs ) { | |
$user_id = um_profile_id(); // or get the current user id | |
$user_data = get_userdata( $user_id ); | |
$user_roles = $user_data->roles; | |
if( in_array( 'employer', $user_roles ) ) { // match user role | |
unset($tabs['resume']); // remove tabs | |
} | |
return $tabs; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment