apply_filters( 'wp_privacy_export_expiration', int $expiration )
- Since
- 4.9.6
Filters the lifetime, in seconds, of a personal data export file.
Description
By default, the lifetime is 3 days. Once the file reaches that age, it will automatically be deleted by a cron job.
Compatibility
- WordPress
- since 4.9.6
- 6.7.7
- 6.8.8
- 6.9.7
- 7.0.4
- 7.1.0
Present in every tracked release (6.7.7 to 7.1.0).
Parameters
$expirationint- The expiration age of the export, in seconds.
Where this hook fires · 2
wp-admin/includes/privacy-tools.php:604wp_privacy_send_personal_data_export_email()wp-includes/functions.php:8501wp_privacy_delete_old_export_files()
Source code
* be deleted by a cron job. * * @since 4.9.6 * * @param int $expiration The expiration age of the export, in seconds. */ $expiration = apply_filters( 'wp_privacy_export_expiration', 3 * DAY_IN_SECONDS ); foreach ( (array) $export_files as $export_file ) { $file_age_in_seconds = time() - filemtime( $export_file ); if ( $expiration < $file_age_in_seconds ) { unlink( $export_file );Changelog
Introduced in 4.9.6. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
About this page
- Parsed data
- Generated from the wordpress-develop 7.0.4 tag, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
- Corrections
- Something wrong on this page? Report it and it gets fixed in the next regeneration.