Changeset 6269
- Timestamp:
- 01/30/2017 11:02:04 PM (9 years ago)
- File:
-
- 1 edited
-
trunk/src/includes/topics/functions.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/includes/topics/functions.php
r6254 r6269 2330 2330 check_ajax_referer( "trash-{$nonce_suffix}" ); 2331 2331 2332 $retval['view_all'] = true; 2333 $retval['status'] = wp_trash_post( $r['id'] ); 2334 $retval['message'] = __( '<strong>ERROR</strong>: There was a problem trashing the topic.', 'bbpress' ); 2332 $retval['view_all'] = true; 2333 $retval['status'] = wp_trash_post( $r['id'] ); 2334 $retval['message'] = __( '<strong>ERROR</strong>: There was a problem trashing the topic.', 'bbpress' ); 2335 $retval['redirect_to'] = bbp_get_topic_permalink( $r['id'] ); 2335 2336 2336 2337 break; … … 2339 2340 check_ajax_referer( "untrash-{$nonce_suffix}" ); 2340 2341 2341 $retval['status'] = wp_untrash_post( $r['id'] ); 2342 $retval['message'] = __( '<strong>ERROR</strong>: There was a problem untrashing the topic.', 'bbpress' ); 2342 $retval['status'] = wp_untrash_post( $r['id'] ); 2343 $retval['message'] = __( '<strong>ERROR</strong>: There was a problem untrashing the topic.', 'bbpress' ); 2344 $retval['redirect_to'] = bbp_get_topic_permalink( $r['id'] ); 2343 2345 2344 2346 break; … … 2347 2349 check_ajax_referer( "delete-{$nonce_suffix}" ); 2348 2350 2349 $retval['status'] = wp_delete_post( $r['id'] ); 2350 $retval['message'] = __( '<strong>ERROR</strong>: There was a problem deleting the topic.', 'bbpress' ); 2351 $retval['status'] = wp_delete_post( $r['id'] ); 2352 $retval['message'] = __( '<strong>ERROR</strong>: There was a problem deleting the topic.', 'bbpress' ); 2353 $retval['redirect_to'] = bbp_get_forum_permalink( $retval['status']->post_parent ); 2351 2354 2352 2355 break; … … 2354 2357 2355 2358 break; 2356 }2357 2358 // Maybe redirect back to the topic's forum2359 if ( isset( $r['sub_action'] ) && ( 'delete' === $r['sub_action'] ) ) {2360 $retval['redirect_to'] = bbp_get_forum_permalink( $retval['status']->post_parent );2361 2359 } 2362 2360
Note: See TracChangeset
for help on using the changeset viewer.