Changeset 4888
- Timestamp:
- 02/07/2017 06:08:21 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-support/functions.php
r4876 r4888 123 123 unset( $view_count, $view_iterator, $view, $found, $all, $ordered ); 124 124 } 125 126 /**127 * Limit No Replies view to 21 days by default.128 *129 * @param array $args130 * @return array131 */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' );148 125 149 126 /**
Note: See TracChangeset
for help on using the changeset viewer.