Skip to content

Instantly share code, notes, and snippets.

@gadiener
Last active April 27, 2016 10:40
Show Gist options
  • Save gadiener/c38ed4c20126fcc06bac8992531eb358 to your computer and use it in GitHub Desktop.
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
<?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