Changeset 5658 for trunk/src/includes/replies/functions.php
- Timestamp:
- 03/24/2015 01:32:20 PM (11 years ago)
- File:
-
- 1 edited
-
trunk/src/includes/replies/functions.php (modified) (10 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/includes/replies/functions.php
r5651 r5658 102 102 * the reply to id 103 103 * @uses bbp_get_reply_url() To get the paginated url to the reply 104 * @uses wp_safe_redirect() To redirect to the reply url104 * @uses bbp_redirect() To redirect to the reply url 105 105 * @uses bbPress::errors::get_error_message() To get the {@link WP_Error} error 106 106 * message … … 450 450 451 451 // Redirect back to new reply 452 wp_safe_redirect( $reply_url ); 453 454 // For good measure 455 exit(); 452 bbp_redirect( $reply_url ); 456 453 457 454 /** Errors ****************************************************************/ … … 492 489 * and the reply to id 493 490 * @uses bbp_get_reply_url() To get the paginated url to the reply 494 * @uses wp_safe_redirect() To redirect to the reply url491 * @uses bbp_redirect() To redirect to the reply url 495 492 * @uses bbPress::errors::get_error_message() To get the {@link WP_Error} error 496 493 * message … … 762 759 763 760 // Redirect back to new reply 764 wp_safe_redirect( $reply_url ); 765 766 // For good measure 767 exit(); 761 bbp_redirect( $reply_url ); 768 762 769 763 /** Errors ****************************************************************/ … … 1274 1268 * source topic ids and source topic's forum id 1275 1269 * @uses bbp_get_topic_permalink() To get the topic permalink 1276 * @uses wp_safe_redirect() To redirect to the topic link1270 * @uses bbp_redirect() To redirect to the topic link 1277 1271 */ 1278 1272 function bbp_move_reply_handler( $action = '' ) { … … 1497 1491 1498 1492 // Redirect back to the topic 1499 wp_safe_redirect( bbp_get_topic_permalink( $destination_topic->ID ) ); 1500 1501 // For good measure 1502 exit(); 1493 bbp_redirect( bbp_get_topic_permalink( $destination_topic->ID ) ); 1503 1494 } 1504 1495 … … 1570 1561 * @uses bbp_get_reply_url() To get the reply url 1571 1562 * @uses add_query_arg() To add custom args to the reply url 1572 * @uses wp_safe_redirect() To redirect to the reply1563 * @uses bbp_redirect() To redirect to the reply 1573 1564 * @uses bbPress::errors:add() To log the error messages 1574 1565 */ … … 1694 1685 1695 1686 // Redirect back to reply 1696 wp_safe_redirect( $reply_url ); 1697 1698 // For good measure 1699 exit(); 1687 bbp_redirect( $reply_url ); 1700 1688 1701 1689 // Handle errors … … 2311 2299 * @uses current_user_can() 2312 2300 * @uses bbp_get_topic_id() 2313 * @uses wp_safe_redirect()2301 * @uses bbp_redirect() 2314 2302 * @uses bbp_get_topic_permalink() 2315 2303 */ … … 2317 2305 2318 2306 // Bail if not editing a topic 2319 if ( ! bbp_is_reply_edit() ) {2307 if ( ! bbp_is_reply_edit() ) { 2320 2308 return; 2321 2309 } 2322 2310 2323 2311 // User cannot edit topic, so redirect back to reply 2324 if ( !current_user_can( 'edit_reply', bbp_get_reply_id() ) ) { 2325 wp_safe_redirect( bbp_get_reply_url() ); 2326 exit(); 2312 if ( ! current_user_can( 'edit_reply', bbp_get_reply_id() ) ) { 2313 bbp_redirect( bbp_get_reply_url() ); 2327 2314 } 2328 2315 }
Note: See TracChangeset
for help on using the changeset viewer.