File tree Expand file tree Collapse file tree 3 files changed +7
-20
lines changed
Expand file tree Collapse file tree 3 files changed +7
-20
lines changed Original file line number Diff line number Diff line change 1+ ### 2.3.0: October 16th, 2025
2+ * Add background colors to environment menu
3+
14### 2.2.0: May 31st, 2022
25* Multisite refactor
36
Original file line number Diff line number Diff line change @@ -10,19 +10,17 @@ A WordPress plugin that allows you to switch between different environments from
1010
1111You'll need to have ` ENVIRONMENTS ` and ` WP_ENV ` defined in your WordPress config.
1212
13- The ` ENVIRONMENTS ` constant must be a serialized array of ` 'environment' => 'url' ` elements:
13+ The ` ENVIRONMENTS ` constant must be an array of ` 'environment' => 'url' ` elements:
1414
1515``` php
1616$envs = [
1717 'development' => 'http://example.dev',
1818 'staging' => 'http://staging.example.com',
1919 'production' => 'http://example.com'
2020];
21- Config::define('ENVIRONMENTS', serialize( $envs) );
21+ Config::define('ENVIRONMENTS', $envs);
2222```
2323
24- Note: the ` serialize() ` call is not needed on PHP 7.0 or newer.
25-
2624` WP_ENV ` must be defined as the current environment:
2725
2826``` php
@@ -39,16 +37,6 @@ This plugin must be installed via Composer. Add wp-stage-switcher to your projec
3937composer require roots/wp-stage-switcher
4038```
4139
42- Or manually add it to your ` composer.json ` :
43-
44- ``` json
45- "require" : {
46- "php" : " >=7.1" ,
47- "roots/wordpress" : " 5.1.1" ,
48- "roots/wp-stage-switcher" : " ~2.1"
49- }
50- ```
51-
5240## Filters
5341
5442### ` bedrock/stage_switcher_colors `
Original file line number Diff line number Diff line change 33Plugin Name: Stage Switcher
44Plugin URI: https://roots.io/plugins/stage-switcher/
55Description: A WordPress plugin that allows you to switch between different environments from the admin bar.
6- Version: 2.2 .0
6+ Version: 2.3 .0
77Author: Roots
88Author URI: https://roots.io/
99License: MIT License
2323 * 'production' => 'http://example.com'
2424 * ];
2525 *
26- * define( 'ENVIRONMENTS', $envs );
27- *
28- * If you're using PHP 5.6 or older you must serialize $envs first:
29- *
30- * define('ENVIRONMENTS', serialize($envs));
26+ * Config::define('ENVIRONMENTS', $envs);
3127 *
3228 * WP_ENV must be defined as the current environment.
3329 *
You can’t perform that action at this time.
0 commit comments