-
Notifications
You must be signed in to change notification settings - Fork 28
Allow filtering of the environment label #176
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
|
@mattradford-sage Thanks for submitting this PR! I know it's been a long time, but can you please update the README in the root to fully document the new filter? After that, we can talk to @darylldoyle to see about merging. |
|
One additional note from me on this, I think on top of just the label it would be super valuable to be able to filter the environment type to determine the color. Like I might not want the preprod site to appear in red to keep that only for the actual prod site. (But I have not looked at the actual code here so not sure how complex that would make it) |
|
@claytoncollie I've added the filter to the README. @fabiankaegy The plugin supports environments as defined by For our requirement to differentiate Preproduction, we can override the CSS for |
|
@fabiankaegy Sorry, I think I missed the point of your comment. I'd be happy to change the PR to include a filter for the environment type itself (probably at this line in This would be helpful as, for example, WP Engine does not support |
|
Lets not block this PR with that but I do think it would be useful :) |
|
@mattradford-sage I had some extra time and made this PR as a replacement that allows more customization, as @fabiankaegy suggested. If we introduce a filter for a single string it would be harder to convert to an array later on that supports the other properties--icon, color, etc. I want to close this PR and use #199 instead. This PR also solves #175 cc @darylldoyle |
Description of the Change
This PR allows the label of the environment type admin bar node to be set to a custom string, such as "Preproduction".
We use the 10up Experience plugin on one of our sites, which has a Preproduction environment. A label other than "Preproduction" could cause confusion.
This PR does not contend with the CSS associated with a non-standard label, but we can handle that outside of 10up Experience plugin. Perhaps that could be considered as part of the resolution for #175.
How to test the Change
Add a function to filter the environment label:
Changelog Entry
Credits
Props @mattradford-sage
Checklist:
-- not applicable