Commit 49edb01
Add more missing json_encode flags (#46204)
The functions `wp_send_json()`, `wp_send_json_success()`, and
`wp_send_json_error()` also have a `$flags` argument that defaults to 0.
Given the nature of these functions (returning-and-exiting from ajax
endpoints after setting the content type header),
`JSON_UNESCAPED_SLASHES` is likely correct for all of them.
Also there was one `wp_json_encode` missed, one done incorrectly in an
unused test, and three added since the last PR.
Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/20037516287
Upstream-Ref: Automattic/jetpack@65164161 parent 00299e6 commit 49edb01
1 file changed
+4
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
378 | 378 | | |
379 | 379 | | |
380 | 380 | | |
381 | | - | |
| 381 | + | |
382 | 382 | | |
383 | 383 | | |
384 | 384 | | |
385 | 385 | | |
386 | 386 | | |
387 | | - | |
| 387 | + | |
388 | 388 | | |
389 | 389 | | |
390 | 390 | | |
391 | 391 | | |
392 | | - | |
| 392 | + | |
393 | 393 | | |
394 | 394 | | |
395 | 395 | | |
| |||
3310 | 3310 | | |
3311 | 3311 | | |
3312 | 3312 | | |
3313 | | - | |
| 3313 | + | |
3314 | 3314 | | |
3315 | 3315 | | |
3316 | 3316 | | |
| |||
0 commit comments