Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

add user role to wp admin page css

function wpa66834_role_admin_body_class( $classes ) {
    global $current_user;
    foreach( $current_user->roles as $role )
        $classes .= ' role-' . $role;
    return trim( $classes );
}
add_filter( 'admin_body_class', 'wpa66834_role_admin_body_class' );
Source by wordpress.stackexchange.com #
 
PREVIOUS NEXT
Tagged: #add #user #role #wp #admin #page #css
ADD COMMENT
Topic
Name
5+5 =