Skip to:
Content

bbPress.org

Changeset 6616


Ignore:
Timestamp:
07/04/2017 05:43:05 PM (5 years ago)
Author:
johnjamesjacoby
Message:

Subscriptions: Include closed status in subscription triggers.

This change allows activity in closed topics to trigger subscription emails. It also fully implements bbp_get_subscribers() completing the deprecation of topic/forum specific handlers.

Fixes #2729.

Location:
trunk/src/includes
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/includes/admin/metaboxes.php

    r6573 r6616  
    746746
    747747    // Get user IDs
    748     $user_ids = bbp_get_topic_subscribers( $post->ID );
     748    $user_ids = bbp_get_subscribers( $post->ID );
    749749
    750750    // Output
     
    782782
    783783    // Get user IDs
    784     $user_ids = bbp_get_forum_subscribers( $post->ID );
     784    $user_ids = bbp_get_subscribers( $post->ID );
    785785
    786786    // Output
  • trunk/src/includes/common/functions.php

    r6614 r6616  
    10401040    /** Topic *****************************************************************/
    10411041
    1042     // Bail if topic is not published
    1043     if ( ! bbp_is_topic_published( $topic_id ) ) {
     1042    // Bail if topic is not public (includes closed)
     1043    if ( ! bbp_is_topic_public( $topic_id ) ) {
    10441044        return false;
    10451045    }
     
    10581058
    10591059    // Get topic subscribers and bail if empty
    1060     $user_ids = bbp_get_topic_subscribers( $topic_id, true );
     1060    $user_ids = bbp_get_subscribers( $topic_id );
    10611061
    10621062    // Dedicated filter to manipulate user ID's to send emails to
     
    12001200    /** Topic *****************************************************************/
    12011201
    1202     // Bail if topic is not published
    1203     if ( ! bbp_is_topic_published( $topic_id ) ) {
     1202    // Bail if topic is not public (includes closed)
     1203    if ( ! bbp_is_topic_public( $topic_id ) ) {
    12041204        return false;
    12051205    }
     
    12111211
    12121212    // Get topic subscribers and bail if empty
    1213     $user_ids = bbp_get_forum_subscribers( $forum_id, true );
     1213    $user_ids = bbp_get_subscribers( $forum_id );
    12141214
    12151215    // Dedicated filter to manipulate user ID's to send emails to
  • trunk/src/includes/topics/functions.php

    r6612 r6616  
    11401140
    11411141    // Get subscribers from source topic
    1142     $subscribers = bbp_get_topic_subscribers( $source_topic->ID );
     1142    $subscribers = bbp_get_subscribers( $source_topic->ID );
    11431143
    11441144    // Maybe migrate subscriptions
     
    14661466
    14671467        // Get the subscribers
    1468         $subscribers = bbp_get_topic_subscribers( $source_topic->ID );
     1468        $subscribers = bbp_get_subscribers( $source_topic->ID );
    14691469
    14701470        if ( ! empty( $subscribers ) ) {
  • trunk/src/includes/users/engagements.php

    r6612 r6616  
    657657
    658658    // Filter & return
    659     return (array) apply_filters( 'bbp_get_forum_subscribers', $users, $object_id, $type );
     659    return (array) apply_filters( 'bbp_get_subscribers', $users, $object_id, $type );
    660660}
    661661
Note: See TracChangeset for help on using the changeset viewer.