Opened 12 years ago
Closed 12 years ago
#19637 closed defect (bug) (fixed)
Update hierarchy when deleting hierarchical CPT
Reported by: | duck_ | Owned by: | duck_ |
---|---|---|---|
Milestone: | 3.4 | Priority: | normal |
Severity: | normal | Version: | 3.0 |
Component: | General | Keywords: | has-patch |
Focuses: | Cc: |
Description
When deleting a CPT post which is hierarchical its children don't have their post_parent properties updated. This updating code should be split out of the page specific branches into an is_post_type_hierarchical() check.
Noticed when patching #19636.
Attachments (1)
Change History (4)
Note: See
TracTickets for help on using
tickets.
Patch switches to clean_post_cache() from clean_page_cache() for is_post_type_hierarchical() children. This is because the page clean function does some page specific stuff that doesn't need to occur for each child or for non-page content types, and clean_post_cache() does the recursive cleaning normally anyway.