Skip to:
Content

bbPress.org


Ignore:
Timestamp:
06/12/2017 09:23:32 PM (8 years ago)
Author:
johnjamesjacoby
Message:

Engagements: Revert part of r6525, and adjust some actions.

  • Engagements will need to be "public only" for 2.6, and we can reconsider what private/hidden engagements look like later
  • Make sure that engagements are saved before voice counts are done
  • Use new is_public style wrapper function for topics & replies where appropriate
  • Remove a few current_filter() checks that should no longer be necessary with current action hook implementation
  • There may be more clean-up necessary here, but this is required to bring all unit-tests back to passing as they've been written, specifically things hooked to the bbp_insert_topic and bbp_insert_reply hooks

See #3068. Hat-tip netweb.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/includes/forums/functions.php

    r6529 r6534  
    12051205        $forum_id = bbp_get_topic_forum_id( $topic_id );
    12061206
    1207         // If this is a new, unpublished, topic, increase hidden count and bail.
    1208         if ( 'bbp_new_topic' === current_filter() && ( ! bbp_is_topic_published( $topic_id ) && ! bbp_is_topic_closed( $topic_id ) ) ) {
     1207        // Bail if not public.
     1208        if ( ! bbp_is_topic_public( $topic_id ) ) {
    12091209            bbp_increase_forum_topic_count_hidden( $forum_id );
    12101210            return;
     
    14191419    // If it's a reply, get the forum id.
    14201420    if ( bbp_is_reply( $forum_id ) ) {
    1421         $reply_id = $forum_id;
    1422         $forum_id = bbp_get_reply_forum_id( $reply_id );
    1423 
    1424         // Don't update if this is a new, unpublished, reply.
    1425         if ( 'bbp_new_reply' === current_filter() && ! bbp_is_reply_published( $reply_id ) ) {
    1426             return;
    1427         }
     1421        $forum_id = bbp_get_reply_forum_id( $forum_id );
    14281422    }
    14291423
Note: See TracChangeset for help on using the changeset viewer.