Changeset 5658 for trunk/src/includes/topics/functions.php
- Timestamp:
- 03/24/2015 01:32:20 PM (11 years ago)
- File:
-
- 1 edited
-
trunk/src/includes/topics/functions.php (modified) (16 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/includes/topics/functions.php
r5656 r5658 109 109 * @uses bbp_unstick_topic() To unstick the topic 110 110 * @uses bbp_get_topic_permalink() To get the topic permalink 111 * @uses wp_safe_redirect() To redirect to the topic link111 * @uses bbp_redirect() To redirect to the topic link 112 112 * @uses bbPress::errors::get_error_messages() To get the {@link WP_Error} error 113 113 * messages … … 428 428 429 429 // Redirect back to new topic 430 wp_safe_redirect( $redirect_url ); 431 432 // For good measure 433 exit(); 430 bbp_redirect( $redirect_url ); 434 431 435 432 // Errors … … 471 468 * to another 472 469 * @uses bbp_get_topic_permalink() To get the topic permalink 473 * @uses wp_safe_redirect() To redirect to the topic link470 * @uses bbp_redirect() To redirect to the topic link 474 471 * @uses bbPress::errors::get_error_messages() To get the {@link WP_Error} error 475 472 * messages … … 792 789 793 790 // Redirect back to new topic 794 wp_safe_redirect( $topic_url ); 795 796 // For good measure 797 exit(); 791 bbp_redirect( $topic_url ); 798 792 799 793 /** Errors ****************************************************************/ … … 1149 1143 * topic ids and source topic's forum id 1150 1144 * @uses bbp_get_topic_permalink() To get the topic permalink 1151 * @uses wp_safe_redirect() To redirect to the topic link1145 * @uses bbp_redirect() To redirect to the topic link 1152 1146 */ 1153 1147 function bbp_merge_topic_handler( $action = '' ) { … … 1362 1356 1363 1357 // Redirect back to new topic 1364 wp_safe_redirect( bbp_get_topic_permalink( $destination_topic->ID ) ); 1365 1366 // For good measure 1367 exit(); 1358 bbp_redirect( bbp_get_topic_permalink( $destination_topic->ID ) ); 1368 1359 } 1369 1360 … … 1449 1440 * source topic ids and source topic's forum id 1450 1441 * @uses bbp_get_topic_permalink() To get the topic permalink 1451 * @uses wp_safe_redirect() To redirect to the topic link1442 * @uses bbp_redirect() To redirect to the topic link 1452 1443 */ 1453 1444 function bbp_split_topic_handler( $action = '' ) { … … 1745 1736 1746 1737 // Redirect back to the topic 1747 wp_safe_redirect( bbp_get_topic_permalink( $destination_topic->ID ) ); 1748 1749 // For good measure 1750 exit(); 1738 bbp_redirect( bbp_get_topic_permalink( $destination_topic->ID ) ); 1751 1739 } 1752 1740 … … 1811 1799 * @uses do_action() Calls actions based on the actions with associated args 1812 1800 * @uses is_wp_error() To check if the value retrieved is a {@link WP_Error} 1813 * @uses wp_safe_redirect() To redirect to the url1801 * @uses bbp_redirect() To redirect to the url 1814 1802 */ 1815 1803 function bbp_edit_topic_tag_handler( $action = '' ) { … … 1980 1968 // Redirect back 1981 1969 $redirect = ( ! empty( $redirect ) && ! is_wp_error( $redirect ) ) ? $redirect : home_url(); 1982 wp_safe_redirect( $redirect ); 1983 1984 // For good measure 1985 exit(); 1970 bbp_redirect( $redirect ); 1986 1971 } 1987 1972 … … 2087 2072 * @uses bbp_get_topic_permalink() To get the topic link 2088 2073 * @uses add_query_arg() To add args to the url 2089 * @uses wp_safe_redirect() To redirect to the topic2074 * @uses bbp_redirect() To redirect to the topic 2090 2075 * @uses bbPress::errors:add() To log the error messages 2091 2076 */ … … 2232 2217 } 2233 2218 2234 wp_safe_redirect( $redirect ); 2235 2236 // For good measure 2237 exit(); 2219 bbp_redirect( $redirect ); 2238 2220 2239 2221 // Handle errors … … 3786 3768 * @uses current_user_can() 3787 3769 * @uses bbp_get_topic_id() 3788 * @uses wp_safe_redirect()3770 * @uses bbp_redirect() 3789 3771 * @uses bbp_get_topic_permalink() 3790 3772 */ … … 3798 3780 // User cannot edit topic, so redirect back to topic 3799 3781 if ( ! current_user_can( 'edit_topic', bbp_get_topic_id() ) ) { 3800 wp_safe_redirect( bbp_get_topic_permalink() ); 3801 exit(); 3782 bbp_redirect( bbp_get_topic_permalink() ); 3802 3783 } 3803 3784 } … … 3811 3792 * @uses current_user_can() 3812 3793 * @uses bbp_get_topic_tag_id() 3813 * @uses wp_safe_redirect()3794 * @uses bbp_redirect() 3814 3795 * @uses bbp_get_topic_tag_link() 3815 3796 */ … … 3823 3804 // Bail if current user cannot edit topic tags 3824 3805 if ( ! current_user_can( 'edit_topic_tags', bbp_get_topic_tag_id() ) ) { 3825 wp_safe_redirect( bbp_get_topic_tag_link() ); 3826 exit(); 3827 } 3828 } 3806 bbp_redirect( bbp_get_topic_tag_link() ); 3807 } 3808 }
Note: See TracChangeset
for help on using the changeset viewer.