Hide the color options in the user profile in WordPress

Hide the color options in the user profile in WordPress on child sites.

Snippet Type

Execute on Child Sites

Snippet

add_action( 'admin_init', 'hide_color_in_userprofile', 1 );
function hide_color_in_userprofile(){
    global $_wp_admin_css_colors;
    $fresh_color_data = $_wp_admin_css_colors['fresh'];
    $_wp_admin_css_colors = array( 'fresh' => $fresh_color_data );
}
1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.