Changeset 7255 for branches/2.6/src/includes/replies/functions.php
- Timestamp:
- 06/23/2024 08:27:45 PM (18 months ago)
- File:
-
- 1 edited
-
branches/2.6/src/includes/replies/functions.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/2.6/src/includes/replies/functions.php
r7242 r7255 641 641 /** Reply Status **********************************************************/ 642 642 643 // Get available reply statuses 644 $reply_statuses = bbp_get_reply_statuses( $reply_id ); 645 643 646 // Use existing post_status 644 647 $reply_status = $reply->post_status; … … 647 650 if ( bbp_is_reply_public( $reply_id ) && ! bbp_check_for_moderation( $anonymous_data, $reply_author, $reply_title, $reply_content ) ) { 648 651 $reply_status = bbp_get_pending_status_id(); 652 653 // Check for possible posted reply status 654 } elseif ( ! empty( $_POST['bbp_reply_status'] ) && in_array( $_POST['bbp_reply_status'], array_keys( $reply_statuses ), true ) ) { 655 656 // Allow capable users to explicitly override the status 657 if ( current_user_can( 'moderate', $reply_id ) ) { 658 $reply_status = sanitize_key( $_POST['bbp_reply_status'] ); 659 660 // Not capable 661 } else { 662 bbp_add_error( 'bbp_edit_reply_status', __( '<strong>Error</strong>: You do not have permission to do that.', 'bbpress' ) ); 663 } 649 664 } 650 665 … … 2057 2072 * 2058 2073 * @param string $where 2074 * @param WP_Query $query 2059 2075 * @return string 2060 2076 */
Note: See TracChangeset
for help on using the changeset viewer.