Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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?

share|improve this question
    
Nice snippit that one –  byronyasgur Nov 21 '13 at 1:26

1 Answer 1

up vote 1 down vote accepted

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

share|improve this answer
1  
great it worked thanks :) –  Sam DG Nov 18 '13 at 18:42

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.