Commit 79aa948
Survicate: skip network and user admin pages
is_admin() returns true for /wp-admin/network/* and /wp-admin/user/*
too, so the existing should_load() guard was still enqueuing Survicate
on wpcom's network admin (e.g. wordpress.com/wp-admin/network/admin.php)
— an internal tools surface that the P2 check doesn't cover because the
main wpcom blog isn't a P2.
Adds an is_network_admin() || is_user_admin() short-circuit and tests
that route through WP_Screen via the -network / -user hook suffix,
since the screen-based branch of is_network_admin() takes precedence
over the WP_NETWORK_ADMIN define once a current_screen is set.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 7fbb6cf commit 79aa948
3 files changed
Lines changed: 34 additions & 1 deletion
File tree
- projects/packages/jetpack-mu-wpcom
- changelog
- src/features/survicate
- tests/php/features/survicate
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
58 | 63 | | |
59 | 64 | | |
60 | 65 | | |
| |||
Lines changed: 28 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
217 | 217 | | |
218 | 218 | | |
219 | 219 | | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
220 | 248 | | |
221 | 249 | | |
222 | 250 | | |
| |||
0 commit comments