Commit 783a875
authored
Query monitor: WordPress Playground compatibility (#215)
Follows up in #212. Accounts for the WordPress Playground runtime, where
the sapi name is `cli` and the `$wpdb` variable [may not be
available](https://github.com/WordPress/wordpress-playground/blob/c27a05386ce480c19a67be316d9bc093ffeec256/packages/playground/wordpress/src/index.ts#L391-L462).
## Testing instructions
Just confirm it doesn't break CI. We don't have an easy way of running
this PR in Playground (simply installing the plugin will trigger
different code paths).1 file changed
Lines changed: 7 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
43 | 45 | | |
44 | 46 | | |
45 | 47 | | |
| |||
56 | 58 | | |
57 | 59 | | |
58 | 60 | | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
59 | 65 | | |
60 | 66 | | |
61 | 67 | | |
| |||
0 commit comments