Changeset 7191 for trunk/src/includes/forums/functions.php
- Timestamp:
- 02/18/2021 06:31:34 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/includes/forums/functions.php
r7170 r7191 243 243 /** Forum Moderation ******************************************************/ 244 244 245 $post_status = bbp_get_public_status_id(); 245 // Default to published 246 $forum_status = bbp_get_public_status_id(); 247 248 // Maybe force into pending 246 249 if ( ! bbp_check_for_moderation( $anonymous_data, $forum_author, $forum_title, $forum_content ) ) { 247 $ post_status = bbp_get_pending_status_id();250 $forum_status = bbp_get_pending_status_id(); 248 251 } 249 252 … … 266 269 'post_content' => $forum_content, 267 270 'post_parent' => $forum_parent_id, 268 'post_status' => $ post_status,271 'post_status' => $forum_status, 269 272 'post_type' => bbp_get_forum_post_type(), 270 273 'comment_status' => 'closed' … … 482 485 /** Forum Moderation ******************************************************/ 483 486 484 $post_status = bbp_get_public_status_id(); 487 // Use existing post_status 488 $forum_status = $forum->post_status; 489 490 // Maybe force into pending 485 491 if ( ! bbp_check_for_moderation( $anonymous_data, bbp_get_forum_author_id( $forum_id ), $forum_title, $forum_content ) ) { 486 $ post_status = bbp_get_pending_status_id();492 $forum_status = bbp_get_pending_status_id(); 487 493 } 488 494 … … 504 510 'post_title' => $forum_title, 505 511 'post_content' => $forum_content, 506 'post_status' => $ post_status,512 'post_status' => $forum_status, 507 513 'post_parent' => $forum_parent_id 508 514 ) );
Note: See TracChangeset
for help on using the changeset viewer.