Changeset 4316
- Timestamp:
- 11/03/2012 08:00:14 AM (12 years ago)
- Location:
- trunk/includes
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/includes/core/actions.php
r4303 r4316 246 246 * 3. Editing forums, topics, replies, users, and tags 247 247 */ 248 add_action( 'bbp_template_redirect', 'bbp_forum_enforce_blocked', -1 ); 248 249 add_action( 'bbp_template_redirect', 'bbp_forum_enforce_hidden', -1 ); 249 250 add_action( 'bbp_template_redirect', 'bbp_forum_enforce_private', -1 ); -
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.