Created
April 30, 2020 09:24
-
-
Save rajucs/a54edd06dca7fddd27cd03cd69098e7c 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( 'get_user_option_admin_color', 'wpse_238039_set_admin_color' ); | |
function wpse_238039_set_admin_color() | |
{ | |
$current_user = wp_get_current_user(); | |
// Check for the user role | |
if ( user_can( $current_user, 'dsm_teacher' )) | |
{ | |
// Remove the Admin Color Scheme picker | |
remove_action( 'admin_color_scheme_picker', 'admin_color_scheme_picker' ); | |
// Set the Admin Color Scheme you want for this role | |
return 'sunrise'; | |
} | |
} // end function |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment