Repository navigation
Commit fdbe530
committed
Media: Rename the original attachment to the edit root.
`wp_get_original_attachment_id()` sat next to `wp_get_original_image_path()`
and `wp_get_original_image_url()`, which describe the unscaled upload of
the same attachment rather than the attachment a chain of edits started
from. The names now say which one they mean:
- `wp_get_original_attachment_id()` -> `wp_get_edit_root_attachment_id()`
- `_wp_delete_original_attachment_id()` -> `_wp_delete_edit_root_attachment_id()`
- `_wp_attachment_original_id` postmeta -> `_wp_attachment_edit_root_id`
- `original_attachment` REST field -> `edit_root`
- `wp:original-attachment` link relation -> `wp:edit-root`
No change in behaviour.
See #65987.1 parent 65af124 commit fdbe530
4 files changed
Lines changed: 73 additions & 73 deletions
File tree
- src/wp-includes
- rest-api/endpoints
- tests/phpunit/tests/rest-api
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
696 | 696 | | |
697 | 697 | | |
698 | 698 | | |
699 | | - | |
| 699 | + | |
700 | 700 | | |
701 | 701 | | |
702 | 702 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8827 | 8827 | | |
8828 | 8828 | | |
8829 | 8829 | | |
8830 | | - | |
| 8830 | + | |
8831 | 8831 | | |
8832 | 8832 | | |
8833 | 8833 | | |
8834 | 8834 | | |
8835 | 8835 | | |
8836 | 8836 | | |
8837 | | - | |
| 8837 | + | |
8838 | 8838 | | |
8839 | 8839 | | |
8840 | 8840 | | |
| |||
8846 | 8846 | | |
8847 | 8847 | | |
8848 | 8848 | | |
8849 | | - | |
8850 | | - | |
| 8849 | + | |
| 8850 | + | |
8851 | 8851 | | |
8852 | | - | |
| 8852 | + | |
8853 | 8853 | | |
8854 | 8854 | | |
8855 | 8855 | | |
8856 | | - | |
| 8856 | + | |
8857 | 8857 | | |
8858 | 8858 | | |
8859 | 8859 | | |
8860 | 8860 | | |
8861 | 8861 | | |
8862 | 8862 | | |
8863 | | - | |
| 8863 | + | |
8864 | 8864 | | |
8865 | 8865 | | |
8866 | 8866 | | |
8867 | 8867 | | |
8868 | 8868 | | |
8869 | 8869 | | |
8870 | 8870 | | |
8871 | | - | |
| 8871 | + | |
8872 | 8872 | | |
8873 | 8873 | | |
8874 | 8874 | | |
8875 | 8875 | | |
8876 | 8876 | | |
8877 | 8877 | | |
8878 | 8878 | | |
8879 | | - | |
| 8879 | + | |
8880 | 8880 | | |
8881 | 8881 | | |
8882 | 8882 | | |
8883 | | - | |
| 8883 | + | |
8884 | 8884 | | |
8885 | 8885 | | |
8886 | 8886 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1357 | 1357 | | |
1358 | 1358 | | |
1359 | 1359 | | |
1360 | | - | |
| 1360 | + | |
1361 | 1361 | | |
1362 | | - | |
| 1362 | + | |
1363 | 1363 | | |
1364 | 1364 | | |
1365 | 1365 | | |
1366 | 1366 | | |
1367 | | - | |
1368 | | - | |
| 1367 | + | |
| 1368 | + | |
1369 | 1369 | | |
1370 | 1370 | | |
1371 | 1371 | | |
| |||
1526 | 1526 | | |
1527 | 1527 | | |
1528 | 1528 | | |
1529 | | - | |
1530 | | - | |
| 1529 | + | |
| 1530 | + | |
1531 | 1531 | | |
1532 | | - | |
| 1532 | + | |
1533 | 1533 | | |
1534 | 1534 | | |
1535 | 1535 | | |
| |||
1691 | 1691 | | |
1692 | 1692 | | |
1693 | 1693 | | |
1694 | | - | |
| 1694 | + | |
1695 | 1695 | | |
1696 | 1696 | | |
1697 | 1697 | | |
1698 | 1698 | | |
1699 | | - | |
| 1699 | + | |
1700 | 1700 | | |
1701 | | - | |
1702 | | - | |
| 1701 | + | |
| 1702 | + | |
1703 | 1703 | | |
1704 | 1704 | | |
1705 | 1705 | | |
| |||
1842 | 1842 | | |
1843 | 1843 | | |
1844 | 1844 | | |
1845 | | - | |
| 1845 | + | |
1846 | 1846 | | |
1847 | 1847 | | |
1848 | 1848 | | |
| |||
0 commit comments