bbp_get_trash_days( string $context = 'forum' )
Get number of days something should remain trashed for before it is cleaned up by WordPress Cron. If set to 0, items will skip trash and be deleted immediately.
Description Description
Parameters Parameters
- $context
-
(Optional) Provide context for additional filtering
Default value: 'forum'
Return Return
(int) Number of days items remain in trash
Source Source
File: includes/common/functions.php
function bbp_get_trash_days( $context = 'forum' ) { // Sanitize the context $context = sanitize_key( $context ); // Check the WordPress constant $days = defined( 'EMPTY_TRASH_DAYS' ) ? (int) EMPTY_TRASH_DAYS : 30; // Filter & return return (int) apply_filters( 'bbp_get_trash_days', $days, $context ); }
Changelog Changelog
Version | Description |
---|---|
2.6.0 | Introduced. |