Changeset 3605 for branches/2.0/bbp-includes/bbp-reply-functions.php
- Timestamp:
- 11/14/2011 03:33:48 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.0/bbp-includes/bbp-reply-functions.php
r3544 r3605 1444 1444 } 1445 1445 1446 /** Permissions ***************************************************************/ 1447 1448 /** 1449 * Redirect if unathorized user is attempting to edit a reply 1450 * 1451 * @since bbPress (r3605) 1452 * 1453 * @uses bbp_is_reply_edit() 1454 * @uses current_user_can() 1455 * @uses bbp_get_topic_id() 1456 * @uses wp_safe_redirect() 1457 * @uses bbp_get_topic_permalink() 1458 */ 1459 function bbp_check_reply_edit() { 1460 1461 // Bail if not editing a topic 1462 if ( !bbp_is_reply_edit() ) 1463 return; 1464 1465 // User cannot edit topic, so redirect back to reply 1466 if ( !current_user_can( 'edit_reply', bbp_get_reply_id() ) ) { 1467 wp_safe_redirect( bbp_get_reply_url() ); 1468 exit(); 1469 } 1470 } 1471 1446 1472 ?>
Note: See TracChangeset
for help on using the changeset viewer.