[wp-meta] [Making WordPress.org] #1965: Improve spam/unspam/approve/unapprove

Making WordPress.org noreply at wordpress.org
Sat Nov 9 17:55:41 UTC 2019

#1965: Improve spam/unspam/approve/unapprove
 Reporter:  Ipstenu         |       Owner:  (none)
     Type:  enhancement     |      Status:  new
 Priority:  high            |   Milestone:  Q1
Component:  Support Forums  |  Resolution:
 Keywords:  has-patch       |
Changes (by Clorith):

 * keywords:   => has-patch


 [attachment:"1965.patch"] Tries to tackle the various aspects considered
 in the original ticket description.

 It makes use of the bbpress body class filter to add singular bbPress view
 class for targeting the spam and pending views only (as this makes little
 sense to use in a regular thread elsewhere). I also opened a ticket to
 have this done in bbPress at some point in the future, at which point the
 filter adding will gracefully degrade, and not add duplicates.

 I made some conscious decisions on some of the displays and how it was
 implemented, which have some drawbacks, but for the most part are

 The JavaScript to fire the request is just doing a GET request to the
 regular link address, this saves us having to build a lot of ajax-ready
 nonces for the page all the time.
 If the request fails, the post blinks and a notice saying the request
 could not be completed is prepended to the message body.

 If the actions is completed, the post also blinks, and then shows a
 message stating the action (spam, pending or archival) was changed for the
 post. It does keep the "header" that shows what post/topic it was, in case
 you hit the wrong button it's then much easier to open the thread in a new
 tab (this was done since there's no direct ajax action, and thus we can't
 dynamically update the admin links).

 Removing the post content is made so that it's easier to work you way
 through the view and have things, for the most part, go away once it's

 As for why it states the status was changed, this is because the
 approve/unapprove spam/unspam etc all have the same class reference,
 nothing distinguishes the two states for our targeting, so this was the
 better approach.

Ticket URL: <https://meta.trac.wordpress.org/ticket/1965#comment:8>
Making WordPress.org <https://meta.trac.wordpress.org/>
Making WordPress.org

More information about the wp-meta mailing list