Changeset 9302 for sites/trunk/wordpress.org/public_html/wp-content/plugins/support-forums/inc/class-performance-optimizations.php
- Timestamp:
- 11/27/2019 12:06:32 AM (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
r9301 r9302 55 55 add_filter( 'bbp_get_forum_subscribers', '__return_empty_array' ); // bbPress 2.5; 2.6 deprecated 56 56 add_filter( 'bbp_get_subscribers', array( $this, 'bbp_get_subscribers' ), 10, 3 ); // bbPress 2.6 57 add_filter( 'bbp_get_user_subscribe_link', array( $this, 'bbp_get_user_subscribe_link' ), 10, 4 ); // Remove link. 57 58 } 58 59 … … 477 478 return $user_ids; 478 479 } 480 481 /** 482 * Disable the 'Subscribe' link for forums. 483 */ 484 function bbp_get_user_subscribe_link( $html, $r, $user_id, $object_id ) { 485 // We don't want end-users accidentally subscribing to a forum, lets remove those links. 486 if ( bbp_is_forum( $object_id ) ) { 487 $html = ''; 488 } 489 490 return $html; 491 } 479 492 }
Note: See TracChangeset
for help on using the changeset viewer.