Making WordPress.org


Ignore:
Timestamp:
07/09/2017 11:52:12 AM (8 years ago)
Author:
SergeyBiryukov
Message:

Support Forums: Remove resolved topics from "No Replies" view.

Fixes #832.

File:
1 edited

Legend:

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

    r5610 r5634  
    3636        add_filter( 'bbp_is_topic_closed', array( $this, 'auto_close_old_topics' ), 10, 2 );
    3737
    38         // Limit no-replies view to a certain number of days.
     38        // Limit no-replies view to a certain number of days and hide resolved topics.
    3939        add_filter( 'bbp_register_view_no_replies', array( $this, 'limit_no_replies_view' ) );
    4040
     
    259259
    260260    /**
    261      * Limits No Replies view to 21 days by default.
     261     * Limits No Replies view to 21 days by default and hides resolved topics.
    262262     *
    263263     * @param array $args Array of query args for the view.
     
    276276            ),
    277277        );
     278
     279        $args['meta_query'] = array( array(
     280            'key'     => 'topic_resolved',
     281            'type'    => 'CHAR',
     282            'value'   => 'no',
     283            'compare' => '='
     284        ) );
    278285
    279286        return $args;
Note: See TracChangeset for help on using the changeset viewer.