Changeset 6432
- Timestamp:
- 05/26/2017 09:46:51 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/includes/common/functions.php
r6415 r6432 193 193 194 194 return apply_filters( 'bbp_past_edit_lock', (bool) $retval, $cur_time, $lock_time, $post_date_gmt ); 195 } 196 197 /** 198 * Get number of days something should remain trashed for before it is cleaned 199 * up by WordPress Cron. If set to 0, items will skip trash and be deleted 200 * immediately. 201 * 202 * @since 2.6.0 bbPress (r6424) 203 * 204 * @param string $context Provide context for additional filtering 205 * @return int Number of days items remain in trash 206 */ 207 function bbp_get_trash_days( $context = 'forum' ) { 208 209 // Sanitize the context 210 $context = sanitize_key( $context ); 211 212 // Check the WordPress constant 213 $days = defined( 'EMPTY_TRASH_DAYS' ) 214 ? (int) EMPTY_TRASH_DAYS 215 : 30; 216 217 // Filter & return 218 return (int) apply_filters( 'bbp_get_trash_days', $days, $context ); 195 219 } 196 220
Note: See TracChangeset
for help on using the changeset viewer.