How do I change the default admin color scheme in MP6

How do I set a different default admin color scheme for all users?

For example, it’s set to MP6 as default now, but I want to make it MP6 light by default.

The users may or may not change it later!

What I’ve learnt so far is that it could be done by hooking into get_user_option_admin_color

Here’s the code from the plugin author:

<?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 );

But as a non-savvy I couldn’t figure out where to put this code to make it work.

Can anyone help me?

1 Answer
1

If you are using a hook to add/edit a function. Add the piece of code in the active theme’s functions.php file.

Leave a Comment