Making WordPress.org

Changeset 4888


Ignore:
Timestamp:
02/07/2017 06:08:21 PM (8 years ago)
Author:
coffee2code
Message:

Support Theme: Remove code for limiting no-replies view to 21 days.

The code is moving to support-forums plugin.

See #2190.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-support/functions.php

    r4876 r4888  
    123123    unset( $view_count, $view_iterator, $view, $found, $all, $ordered );
    124124}
    125 
    126 /**
    127  * Limit No Replies view to 21 days by default.
    128  *
    129  * @param array $args
    130  * @return array
    131  */
    132 function wporg_support_limit_no_replies_view( $args ) {
    133     $days = 21;
    134 
    135     if ( isset( $_GET['days'] ) ) {
    136         $days = (int) $_GET['days'];
    137     }
    138 
    139     $args['date_query'] = array(
    140         array(
    141             'after'  => sprintf( '%s days ago', $days ),
    142         ),
    143     );
    144 
    145     return $args;
    146 }
    147 add_filter( 'bbp_register_view_no_replies', 'wporg_support_limit_no_replies_view' );
    148125
    149126/**
Note: See TracChangeset for help on using the changeset viewer.