Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Define the environment if we don't have one already
- if ( ! defined( 'WPE_ENVIRONMENT' ) ) {
- // Test to see if we're in staging
- if ( isset( $_SERVER['IS_WPE_SNAPSHOT'] ) && $_SERVER['IS_WPE_SNAPSHOT'] ) {
- define( 'WPE_ENVIRONMENT', 'staging' );
- } else {
- define( 'WPE_ENVIRONMENT', 'production' );
- }
- }
- // Filter the body classes to add our environment
- function wpe_filter_body_classes( $classes ) {
- $classes[] = strtolower( WPE_ENVIRONMENT );
- return $classes;
- }
- add_filter( 'body_class', 'wpe_filter_body_classes' );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement