Make WordPress Core

Changes between Initial Version and Version 4 of Ticket #52326


Ignore:
Timestamp:
01/20/2021 02:07:25 AM (5 years ago)
Author:
peterwilsoncc
Comment:

Putting this on the milestone as it's going to be helpful for #5272.

Will need a comment in the general dev note (rather than a dedicated one) that the get_post_status filter now runs for attachments too.

trash changes were introduced in 4.0.0 but various other bugs have been around since the function was introduced in 2.2.0.

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #52326

    • Property Status changed from new to assigned
    • Property Owner set to peterwilsoncc
    • Property Version changed from to 2.2
    • Property Milestone changed from Awaiting Review to 5.7
    • Property Keywords has-patch needs-dev-note added
  • Ticket #52326 – Description

    initial v4  
    33* Attachment with `inherit` status from `future` post: returns `'publish'`, ought to be `'future'`
    44* Attachment with status `draft` and no parent: returns `'publish'`, ought to be `'draft'` (can't be done in admin, only via code)
    5 * Attachment with `inherit` status and `post_parent` set to existent post: returns `false`, ought to be `'publish'`.
     5* Attachment with `inherit` status and `post_parent` set to nonexistent post: returns `false`, ought to be `'publish'`.
    66
    77I've attached unit tests to demonstrate.