Last active
October 30, 2018 14:44
-
-
Save nfsarmento/815546e18384d6fe1e1c346ca308f31b to your computer and use it in GitHub Desktop.
Force users to use default colour scheme
This file contains 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
/** | |
* Force users to use the ocean colour scheme | |
* | |
* https://www.nuno-sarmento.com | |
*/ | |
function aet_change_admin_color( $result ) { | |
return 'ocean'; | |
} | |
add_filter( 'get_user_option_admin_color', 'aet_change_admin_color' ); | |
if ( !current_user_can('manage_options') ) | |
remove_action( 'admin_color_scheme_picker', 'admin_color_scheme_picker' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment