Support » Plugin: MP6 » Custom Color Schemes for WP 3.8?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Till Krüss

    (@tillkruess)

    You place your color scheme anywhere, just register it using wp_admin_css_color() and point $url to your location.

    Okay, I know how to register it. Now which function can I use in functions.php to allow me to have the theme use a specific color scheme?

    Plugin Author Till Krüss

    (@tillkruess)

    You could force all users to use a specific theme like this:

    add_action( 'admin_init', function() {
    
    	// check if current theme is "Twenty Fourteen"
    	if ( wp_get_theme()->get( 'Name' ) == 'Twenty Fourteen' ) {
    
    		// remove the color scheme picker
    		remove_action( 'admin_color_scheme_picker', 'admin_color_scheme_picker' );
    
    		// force all users to use the "Ectoplasm" color scheme
    		add_filter( 'get_user_option_admin_color', function() {
    			return 'ectoplasm';
    		});
    
    	}
    
    });
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Custom Color Schemes for WP 3.8?’ is closed to new replies.