Changeset 3607 for branches/plugin/bbp-includes/bbp-reply-functions.php
- Timestamp:
- 11/14/2011 03:50:25 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/plugin/bbp-includes/bbp-reply-functions.php
r3589 r3607 1459 1459 } 1460 1460 1461 /** Permissions ***************************************************************/ 1462 1463 /** 1464 * Redirect if unathorized user is attempting to edit a reply 1465 * 1466 * @since bbPress (r3605) 1467 * 1468 * @uses bbp_is_reply_edit() 1469 * @uses current_user_can() 1470 * @uses bbp_get_topic_id() 1471 * @uses wp_safe_redirect() 1472 * @uses bbp_get_topic_permalink() 1473 */ 1474 function bbp_check_reply_edit() { 1475 1476 // Bail if not editing a topic 1477 if ( !bbp_is_reply_edit() ) 1478 return; 1479 1480 // User cannot edit topic, so redirect back to reply 1481 if ( !current_user_can( 'edit_reply', bbp_get_reply_id() ) ) { 1482 wp_safe_redirect( bbp_get_reply_url() ); 1483 exit(); 1484 } 1485 } 1486 1461 1487 ?>
Note: See TracChangeset
for help on using the changeset viewer.