#20433 closed defect (bug) (fixed)
Don't update last_updated when deleting non-published posts
Reported by: | ryan | Owned by: | ryan |
---|---|---|---|
Milestone: | 3.4 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Multisite | Keywords: | has-patch |
Focuses: | Cc: |
Description
add_action( 'delete_post', 'wpmu_update_blogs_date' );
Instead of that, let's hook in an action that checks the post status and updates only when published posts are deleted. This will avoid lots of updates to wp_blogs when cleaning out old auto-draft posts.
Inspired by #19663. [20440] caused massive numbers of updates to wp_blogs.
Attachments (2)
Change History (10)
#1
@
13 years ago
- Summary changed from Don't update last_updated when deleting nn-published posts to Don't update last_updated when deleting non-published posts
#3
@
13 years ago
- Keywords has-patch added
Just removing the action seems enough. _update_blog_date_on_post_publish()
handles the rest.
#4
@
13 years ago
Perhaps also bypass it when deleting trashed posts. Form the user's point of view they are long gone and nothing has changed.
#5
@
13 years ago
Just removing the action will work fine for trashed posted that are later deleted as_update_blog_date_on_post_publish() will indeed handle things. But, it won't work for forced deletions. We don't care about the auto-draft forced deletions, but are there forced deletes we should care about?
#6
@
13 years ago
20433.2.patch introduces _update_blog_date_on_post_delete()
.
#7
@
13 years ago
- Owner set to ryan
- Resolution set to fixed
- Status changed from new to closed
In [20461]:
We can probably re-purpose what went in for [19129].