Skip to content

Environment indicator labels

An environment indicator label will display by default on local development environments, and can be selectively enabled for non-production VIP Platform environments.

When enabled, the environment indicator label is located in the bottom left of the browser window, and displays the text “NON-PRODUCTION“.

Example screenshot of the environment indicator label

The environment indicator label is only visible for user roles with the edit_posts capability.

Disable the environment indicator label

To disable the environment indicator label on a local development environment, return false with the vip_show_non_prod_bar filter. For example:

/themes/example-theme/functions.php
add_filter( 'vip_show_non_prod_bar', '__return_false' ); 

Enable the environment indicator label

To enable the environment indicator label on a non-production VIP Platform environment, define the vip_show_non_prod_bar filter as true. The indicator label can be enabled for specific environment types in an application by writing environment-specific code.

For example, to enable the indicator label only on a staging environment:

/themes/example-theme/functions.php
if ( defined( 'VIP_GO_APP_ENVIRONMENT' ) && VIP_GO_APP_ENVIRONMENT === 'staging' ) {
    add_filter( 'vip_show_non_prod_bar', 'true' ); 
} 

Last updated: December 22, 2023

Relevant to

  • WordPress