Changeset 4848 for sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-support/functions.php
- Timestamp:
- 02/01/2017 01:28:56 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-support/functions.php
r4847 r4848 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 $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' ); 125 148 126 149 /**
Note: See TracChangeset
for help on using the changeset viewer.