Commit 1c9e7ef
committed
REST API: Allow comment content to be updated to empty when allow_empty_comment filter returns true
This filter was already respected during comment creation, but not updates. This was inconsistent between POST and PUT, and prevented erasing content of moderated comments via the API without deleting the entire object.
Props adamsilverstein, kadamwhite, davidbaumwald, mukesh27, timothyblynjacobs.
Fixes #64049.
git-svn-id: https://develop.svn.wordpress.org/trunk@60937 602fd350-edb4-49c9-b593-d223f7449a821 parent a721cf9 commit 1c9e7ef
File tree
2 files changed
+29
-2
lines changed- src/wp-includes/rest-api/endpoints
- tests/phpunit/tests/rest-api
2 files changed
+29
-2
lines changedLines changed: 5 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
859 | 859 | | |
860 | 860 | | |
861 | 861 | | |
862 | | - | |
863 | | - | |
| 862 | + | |
864 | 863 | | |
865 | 864 | | |
866 | 865 | | |
| |||
1903 | 1902 | | |
1904 | 1903 | | |
1905 | 1904 | | |
| 1905 | + | |
| 1906 | + | |
| 1907 | + | |
| 1908 | + | |
1906 | 1909 | | |
1907 | 1910 | | |
1908 | 1911 | | |
| |||
Lines changed: 24 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2493 | 2493 | | |
2494 | 2494 | | |
2495 | 2495 | | |
| 2496 | + | |
| 2497 | + | |
| 2498 | + | |
| 2499 | + | |
| 2500 | + | |
| 2501 | + | |
| 2502 | + | |
| 2503 | + | |
| 2504 | + | |
| 2505 | + | |
| 2506 | + | |
| 2507 | + | |
| 2508 | + | |
| 2509 | + | |
| 2510 | + | |
| 2511 | + | |
| 2512 | + | |
| 2513 | + | |
| 2514 | + | |
| 2515 | + | |
| 2516 | + | |
| 2517 | + | |
| 2518 | + | |
| 2519 | + | |
2496 | 2520 | | |
2497 | 2521 | | |
2498 | 2522 | | |
| |||
0 commit comments