[wp-meta] [Making WordPress.org] #1688: Exempt Admins from comment throttle

Making WordPress.org noreply at wordpress.org
Thu May 12 02:24:37 UTC 2016

#1688: Exempt Admins from comment throttle
 Reporter:  obenland          |       Owner:
     Type:  defect            |      Status:  new
 Priority:  normal            |   Milestone:  Plugin Directory v3 - M3
Component:  Plugin Directory  |  Resolution:
 Keywords:                    |

Comment (by danieliser):

 Ok got 2 possible solutions for this one, I am thinking the second is
 probably better in terms of being more specific how it is applied.

 Simplest may be to simply remove the following action when current users
 role is plugin admin, or plugin reviewer.

 `remove_action( 'check_comment_flood',      'check_comment_flood_db',
 10, 3 );`

 Alternatively and probably more ideal as it will only fire in the specific
 event we are trying to solve, would be to simply filter
 `'comment_flood_filter'` and return false if the user role is whitelisted
 and the `$_REQUEST['comment_type'] == 'internal-note'`.

 Either solution should do the trick, just depends on how widespread the
 throttle exemption should be.

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

More information about the wp-meta mailing list