Commit 7fbb6cf
Use Status\Host::is_p2_site() instead of a new helper
Survicate calls the canonical Automattic\Jetpack\Status\Host::is_p2_site()
in src/features/survicate/class-survicate.php directly. Drops the
short-lived wpcom_is_p2_site() helper from src/utils.php — the same
package already wraps Status\Host for is_woa_site() but the dedicated
P2 helper makes its own wrapper unnecessary.
Status\Host::is_p2_site() short-circuits to false when there is no
wpcom site id, so the P2 stylesheet/WPForTeams tests now define
IS_WPCOM in their isolated process to route get_wpcom_site_id()
through get_current_blog_id() (matching the pattern in
projects/packages/status/tests/php/Host_Test.php).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent a88ac97 commit 7fbb6cf
3 files changed
Lines changed: 20 additions & 26 deletions
File tree
- projects/packages/jetpack-mu-wpcom
- src
- features/survicate
- tests/php/features/survicate
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
64 | | - | |
| 64 | + | |
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
213 | 213 | | |
214 | 214 | | |
215 | 215 | | |
216 | | - | |
217 | | - | |
218 | | - | |
219 | | - | |
220 | | - | |
221 | | - | |
222 | | - | |
223 | | - | |
224 | | - | |
225 | | - | |
226 | | - | |
227 | | - | |
228 | | - | |
229 | | - | |
230 | | - | |
231 | | - | |
232 | | - | |
Lines changed: 19 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
219 | 219 | | |
220 | 220 | | |
221 | 221 | | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
222 | 228 | | |
| 229 | + | |
| 230 | + | |
223 | 231 | | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
224 | 238 | | |
225 | 239 | | |
226 | 240 | | |
227 | | - | |
228 | | - | |
229 | | - | |
230 | | - | |
231 | | - | |
232 | | - | |
233 | | - | |
234 | | - | |
| 241 | + | |
235 | 242 | | |
236 | 243 | | |
237 | 244 | | |
| |||
243 | 250 | | |
244 | 251 | | |
245 | 252 | | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
246 | 257 | | |
247 | 258 | | |
248 | 259 | | |
| |||
0 commit comments