Making WordPress.org

Changeset 9479


Ignore:
Timestamp:
02/07/2020 08:02:17 AM (4 years ago)
Author:
dd32
Message:

Support Forums: Unresolved Topics: Attempt to exclude threads which have been auto-closed after 6 months.

Fixes #4972.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-bbp-topic-resolution/inc/class-plugin.php

    r9477 r9479  
    352352            __( 'Unresolved topics', 'wporg-forums' ),
    353353            apply_filters( 'wporg_bbp_topic_resolution_view_unresolved', array(
     354                // Note: Do not merge into the below meta_query, this needs to use the `meta_key` property.
    354355                'meta_key'      => 'topic_resolved',
    355356                'meta_type'     => 'CHAR',
    356357                'meta_value'    => 'no',
    357358                'meta_compare'  => '=',
     359                // Only query for posts that haven't been auto-closed after 6mths from last reply.
     360                'meta_query'    => [
     361                    'key'       => '_bbp_last_active_time',
     362                    'compare'   => '>',
     363                    'value'     => gmdate( 'Y-m-d H:i:s', time() - 6*MONTH_IN_SECONDS ),
     364                ],
    358365                'orderby'       => '',
    359366                'show_stickies' => false,
     367                // Only query for topics that are not closed
    360368                'post_status'   => 'publish',
    361369            ) )
Note: See TracChangeset for help on using the changeset viewer.