Last active
April 27, 2016 10:40
-
-
Save gadiener/c38ed4c20126fcc06bac8992531eb358 to your computer and use it in GitHub Desktop.
Remove admin color scheme picker and set default scheme for new user in wordpress
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
<?php | |
add_action( 'init', function() { | |
remove_action( 'admin_color_scheme_picker', 'admin_color_scheme_picker' ); | |
}); | |
add_action( 'user_register', function ($user_id) { | |
wp_update_user([ | |
'ID' => $user_id, | |
'admin_color' => 'Default' // Light | Blue | Midnight | Sunrise | Ectoplasm | Ocean | Coffee | |
]); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment