Skip to content
This repository was archived by the owner on Sep 26, 2022. It is now read-only.

Conversation

@davidsword
Copy link
Contributor

@davidsword davidsword commented Feb 7, 2019

screen shot 2019-02-07 at 2 18 55 pm

In the users list, if _vip_support_user user meta value is set, that users role list will always show up as "VIP Support", regardless of their current role(s). Any role list with "VIP Support" text is then replaced with a badge. A little hacky with the jQuery, but the Roles column does not have a filter, and the roles themselves can't be edited to include HTML. (The alternative was to add an extra column, but that seemed a bit overkill).

Does not currently factor in edit user / profile screen, just the Users list, can easily include in future if there's further interest in this PR.

The only caveat I could think of was the role of a VIP Support user is actually "hidden" by the badge, but any VIP staff would be using WPCLI and know how to get this info anyways. I was going to tuck the actual role list in a title attribute on the badge, but that would include the VIP Support role, which may or may not be true.

Badge displays if `_vip_support_user` user meta value is set.

Always shows "VIP Support" as a role for VIP Support users, regardless
if they have a vip_support role or not.

Does not currently factor in edit user / profile screen,
just the Users list.
@GaryJones
Copy link

How will the background-coloured block look if the screen is narrow enough to wrap the wording?

Maybe consider having a   between VIP and Support?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants