File tree Expand file tree Collapse file tree 3 files changed +5
-8
lines changed Expand file tree Collapse file tree 3 files changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ public static function instance()
19
19
20
20
public function environment ()
21
21
{
22
- return ( getenv ( ' WP_ENV ' ) ?: ( defined ( ' WP_ENV ' ) ? WP_ENV : null ) );
22
+ return \ Rollbar \ Wordpress \Plugin:: getEnvironment ( );
23
23
}
24
24
25
25
public function root ()
Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ private function initSettings() {
53
53
Settings::init ();
54
54
}
55
55
56
- private function getEnvironment ()
56
+ public static function getEnvironment ()
57
57
{
58
58
return ( getenv ('WP_ENV ' ) ?: ( defined ( 'WP_ENV ' ) ? WP_ENV : null ) );
59
59
}
Original file line number Diff line number Diff line change @@ -217,16 +217,13 @@ public static function status($settings)
217
217
</p>
218
218
<?php
219
219
}
220
-
221
- public static function getEnvironment ()
222
- {
223
- return ( getenv ('WP_ENV ' ) ?: ( defined ( 'WP_ENV ' ) ? WP_ENV : null ) );
224
- }
225
220
226
221
public static function environmentSettingNote ()
227
222
{
223
+ $ env = \Rollbar \Wordpress \Plugin::getEnvironment ();
224
+
228
225
$ output =
229
- '<p><code>WP_ENV</code> environment variable: <code> ' . self :: getEnvironment () . ' </code></p> ' .
226
+ '<p><code>WP_ENV</code> environment variable: <code> ' . $ env . '</code></p> ' .
230
227
'<p><small><strong>Rollbar for Wordpress honors the WP_ENV environment variable.</strong> ' .
231
228
'If the <code>environment</code> setting is not specified here, it will take ' .
232
229
'precendence over the default value.</strong></small></p> ' ;
You can’t perform that action at this time.
0 commit comments