Changeset 4316 for trunk/includes/users/functions.php
- Timestamp:
- 11/03/2012 08:00:14 AM (13 years ago)
- File:
-
- 1 edited
-
trunk/includes/users/functions.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/includes/users/functions.php
r4298 r4316 1486 1486 } 1487 1487 1488 /** 1489 * Check if a user is blocked, or cannot spectate the forums. 1490 * 1491 * @since bbPress (r2996) 1492 * 1493 * @uses is_user_logged_in() To check if user is logged in 1494 * @uses is_super_admin() To check if user is a super admin 1495 * @uses current_user_can() To check if the current user can spectate 1496 * @uses is_bbpress() To check if in a bbPress section of the site 1497 * @uses bbp_set_404() To set a 404 status 1498 */ 1499 function bbp_forum_enforce_blocked() { 1500 1501 // Bail if not logged in or super admin 1502 if ( ! is_user_logged_in() || is_super_admin() ) { 1503 return; 1504 } 1505 1506 // Set 404 if in bbPress and user cannot spectate 1507 if ( is_bbpress() && ! current_user_can( 'spectate' ) ) { 1508 bbp_set_404(); 1509 } 1510 } 1511 1488 1512 /** Converter *****************************************************************/ 1489 1513
Note: See TracChangeset
for help on using the changeset viewer.