Skip to:
Content

bbPress.org


Ignore:
Timestamp:
05/25/2016 01:23:29 AM (10 years ago)
Author:
johnjamesjacoby
Message:

Moderators: pass current forum/topic/reply ID into moderate capability checks, providing additional context about what's being moderated so more targeted decisions can be made.

See #459.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/includes/admin/topics.php

    r5951 r6032  
    10041004                }
    10051005
    1006                 // Add Empty Spam button
     1006                // Add "Empty Spam" button for moderators
    10071007                if ( ! empty( $_GET['post_status'] ) && ( bbp_get_spam_status_id() === $_GET['post_status'] ) && current_user_can( 'moderate' ) ) {
    10081008                        wp_nonce_field( 'bulk-destroy', '_destroy_nonce' );
    1009                         $title = esc_attr__( 'Empty Spam', 'bbpress' );
    1010                         submit_button( $title, 'button-secondary apply', 'delete_all', false );
     1009                        submit_button(
     1010                                esc_attr__( 'Empty Spam', 'bbpress' ),
     1011                                'button-secondary apply',
     1012                                'delete_all',
     1013                                false
     1014                        );
    10111015                }
    10121016
    10131017                // Get which forum is selected
    1014                 $selected = ! empty( $_GET['bbp_forum_id'] ) ? $_GET['bbp_forum_id'] : '';
     1018                $selected = ! empty( $_GET['bbp_forum_id'] )
     1019                        ? (int) $_GET['bbp_forum_id']
     1020                        : 0;
    10151021
    10161022                // Show the forums dropdown
Note: See TracChangeset for help on using the changeset viewer.