Last active
August 23, 2021 20:17
-
-
Save tillkruss/6401453 to your computer and use it in GitHub Desktop.
Change the default MP6 admin color 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
<?php | |
add_filter( 'get_user_option_admin_color', function( $color_scheme ) { | |
global $_wp_admin_css_colors; | |
if ( ! isset( $_wp_admin_css_colors[ $color_scheme ] ) ) { | |
$color_scheme = 'ectoplasm'; | |
} | |
return $color_scheme; | |
}, 5 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm under the impression that this method doesn't work anymore in WP 3.8, as new users will have their $color_scheme already defined as "fresh" (both in wp_color_scheme_settings(), and in user.php, line 1384).
@andrewsfreeman has created a fork: https://gist.github.com/andrewsfreeman/8062263
but since he's testing against "fresh", this won't allow users to select the "fresh" scheme, if they would prefer that.
Any better idea ?