Hide admin menu items for different environments?


#1

Is there an easy-ish way in Bedrock/Sage to show/hide different admin menu items based on environment? Let’s say I don’t want clients to be able to see a bunch of plugin menu items or something for example.


#2

Try Intervention. By “environment” do you mean development, staging, and production? If so, combine Intervention with those environment variables (i.e. env('WP_ENV')).


#3

Yup thanks that’s perfect.


#4

I’m also doing this in my sage-advanced-custom-fields package to hide the ACF menus on production. You can see how I did it there, if that’s helpful.