WordPress.org

Making WordPress.org


Ignore:
Timestamp:
07/19/2017 02:52:31 PM (12 months ago)
Author:
SergeyBiryukov
Message:

Support Forums: In Dropin::update_old_reply_meta(), don't recalculate position for archived replies.

Archived replies are not returned by bbp_get_all_child_ids(), so they end up with a zero position.

See #2110, #2481.

File:
1 edited

Legend:

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

    r5693 r5695  
    146146     */
    147147    function update_old_reply_meta( $reply_id ) {
    148         // Only run on topics older than 2017-07-17.
     148        // Only run on replies older than 2017-07-17.
    149149        if ( get_post_field( 'post_date', $reply_id ) >= '2017-07-17' ) {
     150            return;
     151        }
     152
     153        // Don't recaculate position for archived replies.
     154        if ( 'archived' === get_post_status( $reply_id ) ) {
    150155            return;
    151156        }
Note: See TracChangeset for help on using the changeset viewer.