Repository navigation
Commit 4ecdf88
committed
Posts: Only infer the password visibility when the caller sent none.
The inference is meant to fill a gap, not to outrank the caller. Reading it
after the caller's own value let the two contradict each other, with the
inferred one applied last:
- `visibility => 'public'` sent with a non-empty password kept the password,
where trunk dropped it.
- `visibility => 'private'` sent with a password left the post public and
password protected instead of private. Quick Edit reaches this pair through
`wp_ajax_inline_save()`, which sets `visibility` to `private` whenever
"Private" is ticked.
Guarding the inference with `! isset( $post_data['visibility'] )` confines the
behaviour change to the reported case, a caller that sends no visibility at all.
The `private` characterisation test now sends a password alongside, and the
precedence test is inverted: an explicit visibility survives.
See #64810.1 parent 5540b57 commit 4ecdf88
2 files changed
Lines changed: 18 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
301 | 301 | | |
302 | 302 | | |
303 | 303 | | |
304 | | - | |
305 | | - | |
| 304 | + | |
| 305 | + | |
306 | 306 | | |
307 | 307 | | |
308 | 308 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1492 | 1492 | | |
1493 | 1493 | | |
1494 | 1494 | | |
| 1495 | + | |
| 1496 | + | |
| 1497 | + | |
| 1498 | + | |
| 1499 | + | |
1495 | 1500 | | |
1496 | 1501 | | |
1497 | 1502 | | |
| |||
1513 | 1518 | | |
1514 | 1519 | | |
1515 | 1520 | | |
1516 | | - | |
| 1521 | + | |
1517 | 1522 | | |
1518 | 1523 | | |
1519 | 1524 | | |
| |||
1527 | 1532 | | |
1528 | 1533 | | |
1529 | 1534 | | |
1530 | | - | |
| 1535 | + | |
1531 | 1536 | | |
1532 | | - | |
1533 | | - | |
1534 | | - | |
1535 | | - | |
| 1537 | + | |
| 1538 | + | |
| 1539 | + | |
1536 | 1540 | | |
1537 | 1541 | | |
1538 | 1542 | | |
1539 | 1543 | | |
1540 | 1544 | | |
1541 | | - | |
| 1545 | + | |
1542 | 1546 | | |
1543 | 1547 | | |
1544 | 1548 | | |
| |||
1558 | 1562 | | |
1559 | 1563 | | |
1560 | 1564 | | |
1561 | | - | |
| 1565 | + | |
| 1566 | + | |
| 1567 | + | |
| 1568 | + | |
| 1569 | + | |
1562 | 1570 | | |
1563 | 1571 | | |
0 commit comments