Changeset 7864
- Timestamp:
- 10/08/2026 04:22:00 PM (2 weeks ago)
- Location:
- trunk/src/includes
- Files:
-
- 2 edited
-
replies/functions.php (modified) (1 diff)
-
topics/functions.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/includes/replies/functions.php
r7861 r7864 512 512 bbp_add_error( 'bbp_reply_moderated', esc_html__( 'Your reply is pending moderation.', 'bbpress' ) ); 513 513 unset( $_POST['bbp_reply_title'], $_POST['bbp_reply_content'], $_POST['bbp_topic_tags'] ); 514 return; 514 515 } else { 516 /** Redirect ******************************************************/ 517 518 // Redirect to 519 $redirect_to = bbp_get_redirect_to(); 520 521 // Get the reply URL 522 $reply_url = bbp_get_reply_url( $reply_id, $redirect_to ); 523 524 // Allow to be filtered 525 $reply_url = apply_filters( 'bbp_new_reply_redirect_to', $reply_url, $redirect_to, $reply_id ); 526 527 /** Successful Save ***************************************************/ 528 529 // Redirect back to new reply 530 bbp_redirect( $reply_url ); 515 531 } 516 517 /** Redirect **********************************************************/518 519 // Redirect to520 $redirect_to = bbp_get_redirect_to();521 522 // Get the reply URL523 $reply_url = bbp_get_reply_url( $reply_id, $redirect_to );524 525 // Allow to be filtered526 $reply_url = apply_filters( 'bbp_new_reply_redirect_to', $reply_url, $redirect_to, $reply_id );527 528 /** Successful Save ***************************************************/529 530 // Redirect back to new reply531 bbp_redirect( $reply_url );532 532 533 533 /** Errors ****************************************************************/ -
trunk/src/includes/topics/functions.php
r7861 r7864 407 407 bbp_add_error( 'bbp_topic_moderated', esc_html__( 'Your topic is pending moderation.', 'bbpress' ) ); 408 408 unset( $_POST['bbp_topic_title'], $_POST['bbp_topic_content'], $_POST['bbp_topic_tags'] ); 409 return; 410 } 411 412 /** Redirect **********************************************************/ 413 414 // Redirect to415 $redirect_to = bbp_get_redirect_to(); 416 417 // Get the topic URL418 $redirect_url = bbp_get_topic_permalink( $topic_id, $redirect_to ); 419 420 // Add view all?421 if ( bbp_get_view_all() || ! empty( $view_all ) ) { 422 423 // User can moderate, so redirect to topic with view all set424 if ( current_user_can( 'moderate', $topic_id ) ) {425 $redirect_url = bbp_add_view_all( $redirect_url ); 426 427 // User cannot moderate, so redirect to forum428 } else {429 $redirect_url = bbp_get_forum_permalink( $forum_id );409 410 } else { 411 /** Redirect ******************************************************/ 412 413 // Redirect to 414 $redirect_to = bbp_get_redirect_to(); 415 416 // Get the topic URL 417 $redirect_url = bbp_get_topic_permalink( $topic_id, $redirect_to ); 418 419 // Add view all? 420 if ( bbp_get_view_all() || ! empty( $view_all ) ) { 421 422 // User can moderate, so redirect to topic with view all set 423 if ( current_user_can( 'moderate', $topic_id ) ) { 424 $redirect_url = bbp_add_view_all( $redirect_url ); 425 426 // User cannot moderate, so redirect to forum 427 } else { 428 $redirect_url = bbp_get_forum_permalink( $forum_id ); 429 } 430 430 } 431 } 432 433 // Allow to be filtered434 $redirect_url = apply_filters( 'bbp_new_topic_redirect_to', $redirect_url, $redirect_to, $topic_id ); 435 436 /** Successful Save ***************************************************/ 437 438 // Redirect back to new topic439 bbp_redirect( $redirect_url );431 432 // Allow to be filtered 433 $redirect_url = apply_filters( 'bbp_new_topic_redirect_to', $redirect_url, $redirect_to, $topic_id ); 434 435 /** Successful Save ***************************************************/ 436 437 // Redirect back to new topic 438 bbp_redirect( $redirect_url ); 439 } 440 440 441 441 /** Errors ****************************************************************/
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)