#11260 closed feature request (fixed)
Should be able to undo "Marking [comment] as Spam"
Reported by: | lloydbudd | Owned by: | |
---|---|---|---|
Milestone: | 2.9 | Priority: | normal |
Severity: | normal | Version: | 2.9 |
Component: | Trash | Keywords: | has-patch |
Focuses: | Cc: |
Description
Should be able to undo "Marking [comment] as Spam"
ENV: 2.9-beta-1 (TRUNK r12273)
With WP 2.9 can undo "Moving to Trash", but can't undo "Marking as Spam".
Attachments (3)
Change History (9)
#1
@
15 years ago
- Milestone changed from 3.0 to 2.9
- Type changed from defect (bug) to feature request
#2
@
15 years ago
The patch implements undo in the ajax comment interface, but not without js or for bulk.
One problem is that unlike with trash, the previous status of a spam comment isn't stored. Rather than making undo always approve the comment, which would be really confusing and annoying, I have made the js interface check whether the comment is currently approved or not when spamming the comment, and create a custom undo link based on this.
Even like this, I've had to modify admin-ajax.php and comment.php too, and it feels a bit hacky. Furthermore, it will be difficult to extend to non-js, and really difficult to extend to bulk.
I think I'll start again and just store the previous status for spam like we do for trash.
But feel free to look at and comment on the interface of the current patch...
#3
@
15 years ago
- Keywords has-patch added; Spam Trash Comments removed
Latest patch fully implements undo for spam by storing the previous status, as described above.
The _wp_trash_meta_status is renamed to _wp_previous_status, and extended to work with spam too, enabling full undo for spam.
Undo for spam has the same interface as undo for trash, with minor differences.
Yes, I agree that this feature should be added, and I have always intended to do so when the Undo for comments has been finished. I will do so in the end. It won't be difficult, but I would rather finalise the interface for comments first so that this can be the same.
I can easily do this before the release of 2.9, and I think that would be better than waiting until 3.0, since undo for comments is already implemented in 2.9.