RyanBayne / TwitchPress

TwitchPress is a system of plugins that combines the power of Twitch.tv with WordPress
http://twitchpress.wordpress.com
GNU General Public License v3.0
12 stars 6 forks source link

Support Function wp_get_environment_type() #367

Open RyanBayne opened 3 years ago

RyanBayne commented 3 years ago

Put debug and error related functionality and configuration within a wp_get_environment_type() argument.

switch ( wp_get_environment_type() ) { case 'local': case 'development': do_nothing(); break;

case 'staging':
    do_staging_thing();
    break;

case 'production':
default:
    do_production_thing();
    break;

}