Changeset 9301
- Timestamp:
- 11/26/2019 11:54:02 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/support-forums/inc/class-performance-optimizations.php
r9242 r9301 53 53 54 54 // Disable entire-forum subscriptions. 55 add_filter( 'bbp_get_forum_subscribers', '__return_empty_array' ); 55 add_filter( 'bbp_get_forum_subscribers', '__return_empty_array' ); // bbPress 2.5; 2.6 deprecated 56 add_filter( 'bbp_get_subscribers', array( $this, 'bbp_get_subscribers' ), 10, 3 ); // bbPress 2.6 56 57 } 57 58 … … 462 463 bbp_deregister_view( 'popular' ); 463 464 } 465 466 /** 467 * Block forum subscriptions. 468 * 469 * No user ever actually intends to subscribe to an entire forum, so lets just never do that. 470 */ 471 function bbp_get_subscribers( $user_ids, $object_id, $type ) { 472 // We don't want anyone subscribing to a forum, null it out if that happens. 473 if ( 'post' === $type && bbp_is_forum( $object_id ) ) { 474 $user_ids = array(); 475 } 476 477 return $user_ids; 478 } 464 479 }
Note: See TracChangeset
for help on using the changeset viewer.