No longer force non-admin user admin color scheme to sunrise
authorLaury GvR <laury@gaslightmedia.com>
Thu, 9 May 2019 19:36:08 +0000 (15:36 -0400)
committerLaury GvR <laury@gaslightmedia.com>
Thu, 9 May 2019 19:36:08 +0000 (15:36 -0400)
functions.php

index fd81833..eef2234 100644 (file)
@@ -211,30 +211,10 @@ function remove_admin_bar() {
     }
 }
 
-/*
- * If the current user is not an admin and is a member,
- * return 'sunrise' as the default admin color
- */
-add_filter('get_user_option_admin_color', function($result) {
-    if (!current_user_can('administrator') && current_user_can("glm_members_member")) {
-        return 'sunrise';
-    }
-    return $result;
-});
 add_filter('get_template_url', function() {
     return get_template_directory_uri();
 });
 
-/*
- * If the current user is not an admin and is a member,
- * return 'sunrise' as the default admin color
- */
-add_filter('get_user_option_admin_color', function($result) {
-    if (!current_user_can('administrator') && current_user_can("glm_members_member")) {
-        return 'sunrise';
-    }
-    return $result;
-});
 function is_post_type($type){
     global $wp_query;
     if($type == get_post_type($wp_query->post->ID)) return true;