WordPress.org

Making WordPress.org

Changeset 5088


Ignore:
Timestamp:
03/06/17 01:10:49 (9 months ago)
Author:
SergeyBiryukov
Message:

Support Forums: When archiving or unarchiving a reply, reflect the change in the topic's hidden replies count.

Props denisco.
Fixes #2171.

File:
1 edited

Legend:

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

    r4987 r5088  
    251251                update_post_meta( $post->ID, self::ARCHIVED_META, $post->post_status ); 
    252252                update_post_meta( $post->ID, self::MODERATOR_META, wp_get_current_user()->user_login ); 
     253 
     254                if ( bbp_is_reply( $post->ID ) ) { 
     255                    bbp_increase_topic_reply_count_hidden( bbp_get_reply_topic_id( $post->ID ) ); 
     256                } 
     257 
    253258                return true; 
    254259            } 
     
    280285                delete_post_meta( $post->ID, self::ARCHIVED_META ); 
    281286                update_post_meta( $post->ID, self::MODERATOR_META, wp_get_current_user()->user_login ); 
     287 
     288                if ( bbp_is_reply( $post->ID ) ) { 
     289                    bbp_decrease_topic_reply_count_hidden( bbp_get_reply_topic_id( $post->ID ) ); 
     290                } 
     291 
    282292                return true; 
    283293            } 
Note: See TracChangeset for help on using the changeset viewer.