Commit f57dba3
committed
Block Hooks: Set ignored blocks meta in REST API response.
Set `_wp_ignored_hooked_blocks` post meta in the REST API response sent from post-like endpoints that support Block Hooks (see `rest_block_hooks_post_types` filter).
Previously, it was enough to set that post meta on write (i.e. save to DB). However, due to the way real-time collaboration syncs posts and reconciles them with content received from the server side, this information is now vital on the client side to ensure hooked blocks aren't duplicated.
Developed in #11410.
Reviewed by jonsurrell.
Merges [62219] to the 7.0 branch.
Props bernhard-reiter, czarate, ingeniumed.
Fixes #65008.
git-svn-id: https://develop.svn.wordpress.org/branches/7.0@62220 602fd350-edb4-49c9-b593-d223f7449a821 parent d6a9411 commit f57dba3
2 files changed
Lines changed: 92 additions & 9 deletions
File tree
- src/wp-includes
- tests/phpunit/tests/blocks
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1196 | 1196 | | |
1197 | 1197 | | |
1198 | 1198 | | |
| 1199 | + | |
1199 | 1200 | | |
1200 | 1201 | | |
1201 | 1202 | | |
| |||
1205 | 1206 | | |
1206 | 1207 | | |
1207 | 1208 | | |
| 1209 | + | |
| 1210 | + | |
| 1211 | + | |
1208 | 1212 | | |
1209 | 1213 | | |
1210 | | - | |
| 1214 | + | |
| 1215 | + | |
| 1216 | + | |
| 1217 | + | |
| 1218 | + | |
| 1219 | + | |
1211 | 1220 | | |
1212 | 1221 | | |
1213 | 1222 | | |
| |||
1287 | 1296 | | |
1288 | 1297 | | |
1289 | 1298 | | |
| 1299 | + | |
| 1300 | + | |
| 1301 | + | |
| 1302 | + | |
| 1303 | + | |
| 1304 | + | |
| 1305 | + | |
| 1306 | + | |
| 1307 | + | |
| 1308 | + | |
1290 | 1309 | | |
1291 | 1310 | | |
1292 | 1311 | | |
| |||
1449 | 1468 | | |
1450 | 1469 | | |
1451 | 1470 | | |
| 1471 | + | |
1452 | 1472 | | |
1453 | 1473 | | |
1454 | 1474 | | |
| |||
1459 | 1479 | | |
1460 | 1480 | | |
1461 | 1481 | | |
| 1482 | + | |
1462 | 1483 | | |
1463 | 1484 | | |
1464 | 1485 | | |
1465 | | - | |
| 1486 | + | |
| 1487 | + | |
1466 | 1488 | | |
1467 | 1489 | | |
| 1490 | + | |
| 1491 | + | |
| 1492 | + | |
| 1493 | + | |
1468 | 1494 | | |
1469 | 1495 | | |
1470 | 1496 | | |
| |||
Lines changed: 64 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
130 | 130 | | |
131 | 131 | | |
132 | 132 | | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
133 | 158 | | |
134 | 159 | | |
| 160 | + | |
135 | 161 | | |
136 | 162 | | |
137 | | - | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
138 | 169 | | |
139 | 170 | | |
140 | 171 | | |
141 | | - | |
| 172 | + | |
| 173 | + | |
142 | 174 | | |
143 | 175 | | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
144 | 181 | | |
145 | 182 | | |
146 | 183 | | |
147 | 184 | | |
| 185 | + | |
148 | 186 | | |
149 | 187 | | |
150 | 188 | | |
| |||
155 | 193 | | |
156 | 194 | | |
157 | 195 | | |
| 196 | + | |
| 197 | + | |
158 | 198 | | |
159 | | - | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
160 | 202 | | |
161 | 203 | | |
162 | 204 | | |
163 | 205 | | |
164 | 206 | | |
165 | 207 | | |
166 | | - | |
| 208 | + | |
| 209 | + | |
167 | 210 | | |
168 | 211 | | |
169 | 212 | | |
170 | | - | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
171 | 219 | | |
172 | 220 | | |
173 | 221 | | |
174 | 222 | | |
| 223 | + | |
175 | 224 | | |
176 | 225 | | |
| 226 | + | |
| 227 | + | |
177 | 228 | | |
178 | 229 | | |
179 | 230 | | |
180 | 231 | | |
181 | | - | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
182 | 240 | | |
183 | | - | |
184 | 241 | | |
185 | 242 | | |
0 commit comments