Making WordPress.org


Ignore:
Timestamp:
07/20/2017 08:56:04 PM (8 years ago)
Author:
SergeyBiryukov
Message:

Support Forums: Don't update reply counts when arching or unarchiving a pending or spam post, as the number of hidden replies does not change in that case.

See #1971, #2171.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/support-forums/inc/class-moderators.php

    r5688 r5710  
    497497                    bbp_update_topic_voice_count( $topic_id );
    498498
    499                     bbp_decrease_topic_reply_count( $topic_id );
    500                     bbp_increase_topic_reply_count_hidden( $topic_id );
     499                    if ( 'publish' === $post->post_status ) {
     500                        bbp_decrease_topic_reply_count( $topic_id );
     501                        bbp_increase_topic_reply_count_hidden( $topic_id );
     502                    }
    501503                } else {
    502504                    bbp_unstick_topic( $post->ID );
     
    541543                    bbp_update_topic_voice_count( $topic_id );
    542544
    543                     bbp_increase_topic_reply_count( $topic_id );
    544                     bbp_decrease_topic_reply_count_hidden( $topic_id );
     545                    if ( 'publish' === $post_status ) {
     546                        bbp_increase_topic_reply_count( $topic_id );
     547                        bbp_decrease_topic_reply_count_hidden( $topic_id );
     548                    }
    545549                }
    546550
Note: See TracChangeset for help on using the changeset viewer.