Changeset 11533
- Timestamp:
- 02/09/2022 01:20:09 AM (3 years ago)
- Location:
- sites/trunk/wordpress.org/public_html/wp-content/plugins
- Files:
-
- 1 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/support-forums/inc/class-plugin.php
r9802 r11533 44 44 $this->report_topic = new Report_Topic; 45 45 $this->nsfw_handler = new NSFW_Handler; 46 $this->stats = new Stats; 46 47 47 48 // These modifications are specific to https://wordpress.org/support/ -
sites/trunk/wordpress.org/public_html/wp-content/plugins/support-forums/support-forums.php
r9802 r11533 27 27 include( dirname( __FILE__ ) . '/inc/class-report-topic.php' ); 28 28 include( dirname( __FILE__ ) . '/inc/class-nsfw-handler.php' ); 29 include( dirname( __FILE__ ) . '/inc/class-stats.php' ); 29 30 30 31 // Compat-only includes. -
sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-bbp-term-subscription/inc/class-plugin.php
r11530 r11533 248 248 249 249 // Replace forum subscriber list with term subscribers, avoiding duplicates. 250 add_filter( 'bbp_forum_subscription_user_ids', array( $this, 'add_term_subscribers _to_forum' ) );250 add_filter( 'bbp_forum_subscription_user_ids', array( $this, 'add_term_subscribers' ) ); 251 251 252 252 // Actually notify our term subscribers. … … 254 254 255 255 // Remove filters. 256 remove_filter( 'bbp_forum_subscription_user_ids', array( $this, 'add_term_subscribers _to_forum' ) );256 remove_filter( 'bbp_forum_subscription_user_ids', array( $this, 'add_term_subscribers' ) ); 257 257 remove_filter( 'bbp_forum_subscription_mail_message', array( $this, 'replace_forum_subscription_mail_message' ), 10 ); 258 258 … … 262 262 * Temporarily replace the forum subscriber list with any unincluded term subscribers. 263 263 */ 264 public function add_term_subscribers _to_forum( $users ) {264 public function add_term_subscribers( $users ) { 265 265 return array_diff( $this->subscribers, $users ); 266 266 } … … 369 369 370 370 // Replace forum subscriber list with term subscribers, avoiding duplicates. 371 add_filter( 'bbp_topic_subscription_user_ids', array( $this, 'add_term_subscribers _to_topic' ) );371 add_filter( 'bbp_topic_subscription_user_ids', array( $this, 'add_term_subscribers' ) ); 372 372 373 373 // Actually notify our term subscribers. … … 375 375 376 376 // Remove filters. 377 remove_filter( 'bbp_topic_subscription_user_ids', array( $this, 'add_term_subscribers _to_topic' ) );377 remove_filter( 'bbp_topic_subscription_user_ids', array( $this, 'add_term_subscribers' ) ); 378 378 remove_filter( 'bbp_subscription_mail_message', array( $this, 'replace_topic_subscription_mail_message' ) ); 379 }380 381 /**382 * Temporarily replace the forum subscriber list with any unincluded term subscribers.383 */384 public function add_term_subscribers_to_topic( $users ) {385 return array_diff( $this->subscribers, $users );386 379 } 387 380 … … 566 559 * @return bool False if invalid, otherwise true 567 560 */ 568 public static function add_user_subscription( $user_id = 0, $term_id = 0) {561 public static function add_user_subscription( $user_id, $term_id ) { 569 562 if ( empty( $user_id ) || empty( $term_id ) ) { 570 563 return false; … … 575 568 wp_cache_delete( 'wporg_bbp_get_term_subscribers_' . $term_id, 'bbpress_users' ); 576 569 } 570 577 571 do_action( 'wporg_bbp_add_user_term_subscription', $user_id, $term_id ); 578 572 … … 587 581 * @return bool False if invalid, otherwise true 588 582 */ 589 public static function remove_user_subscription( $user_id = 0, $term_id = 0) {583 public static function remove_user_subscription( $user_id, $term_id ) { 590 584 if ( empty( $user_id ) || empty( $term_id ) ) { 591 585 return false; … … 596 590 wp_cache_delete( 'wporg_bbp_get_term_subscribers_' . $term_id, 'bbpress_users' ); 597 591 } 592 598 593 do_action( 'wporg_bbp_remove_user_term_subscription', $user_id, $term_id ); 599 594 -
sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-bbp-term-subscription/wporg-bbp-term-subscription.php
r4005 r11533 20 20 21 21 // Instantiate the Plugin 22 new Plugin();22 $GLOBALS['wporg_bbp_topic_term_subscriptions'] = new Plugin(); 23 23 24 24 // Easy access for templates
Note: See TracChangeset
for help on using the changeset viewer.