Created
April 29, 2020 16:16
-
-
Save cryptexvinci/f37a1e19c941e18b1e4e4e457063240b to your computer and use it in GitHub Desktop.
Remove post tab from all roles except Model role.
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', 'add_post_tab_only_model_role', 1000 ); | |
function add_post_tab_only_model_role( $tabs ) { | |
$display_roles = array( 'model' ); | |
if ( !in_array( um_user('role') , $display_roles ) ) { | |
unset($tabs['posts']); | |
} | |
return $tabs; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment