Skip to:
Content

bbPress.org

Changeset 6310


Ignore:
Timestamp:
02/26/2017 02:45:33 AM (5 years ago)
Author:
johnjamesjacoby
Message:

Voices: Only update voice counts when saving or deleting.

Prevents overzealous recalculations of voice counts when it's not necessary or applicable.

Props thebrandonallen. See #1799.

File:
1 edited

Legend:

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

    r6306 r6310  
    10191019                bbp_update_topic_last_active_time( $ancestor, $topic_last_active_time );
    10201020
    1021                 // Counts
    1022                 bbp_update_topic_voice_count( $ancestor );
    1023 
    10241021                // Only update reply count if we're deleting a reply, or in the dashboard.
    10251022                if ( in_array( current_filter(), array( 'bbp_deleted_reply', 'save_post' ), true ) ) {
    10261023                    bbp_update_topic_reply_count(        $ancestor );
    10271024                    bbp_update_topic_reply_count_hidden( $ancestor );
     1025                    bbp_update_topic_voice_count(        $ancestor );
    10281026                }
    10291027
Note: See TracChangeset for help on using the changeset viewer.