Commit 0cb83bd
committed
Add support for WP_ENVIRONMENT_TYPE
New behaviour:
1. Resolve the environment type:
1. Use the value of the `WP_ENV` constant if defined and palpable.
2. Otherwise, use the value of the `wp_get_environment_type()` function if defined (introduced in WordPress 5.0.0).
3. Otherwise, use `NULL`.
2. Filter the environment type with the following hook:
* `roots/bedrock/disallow_indexing_environment_type`
3. Display the notice:
1. If the environment type is palpable, display the notice with the filtered environment type.
2. Otherwise, display a shorter notice that does not reference the environment type.1 parent b9af3f0 commit 0cb83bd
2 files changed
+23
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
| 31 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
30 | 47 | | |
31 | 48 | | |
32 | 49 | | |
0 commit comments