Make WordPress Core

#64189 closed feature request (fixed)

Include value of EMPTY_TRASH_DAYS constant

Reported by: desrosj Owned by: SergeyBiryukov
Priority: normal Milestone: 7.0
Component: Site Health Version:
Severity: normal Keywords: good-first-bug has-patch
Cc: Focuses:

Description

The EMPTY_TRASH_DAYS constant controls how long posts and comments remain in the trash before wp_scheduled_delete() deletes them permanently.

The default value is 30, but setting the constant to a falsey value will skip the trash entirely any time delete post/comment is clicked. This value could be useful for debugging certain behaviors in a WordPress site.

Change History (3)

This ticket was mentioned in ​PR #10475 on ​WordPress/wordpress-develop by ​@deepakprajapati.


12 months ago
#1

  • Keywords has-patch added

This PR introduces visibility for the EMPTY_TRASH_DAYS constant in the Site Health “WordPress Constants” section.
It helps site administrators quickly identify how long trashed content is retained before permanent deletion — or whether the trash feature is disabled.

Trac ticket: https://core.trac.wordpress.org/ticket/64189

Screenshot
https://github.com/user-attachments/assets/f759f274-b4e6-47e8-90c1-7abe2e0d5bb7

#2 @SergeyBiryukov
11 months ago

  • Milestone Awaiting Review → 7.0

#3 @SergeyBiryukov
11 months ago

  • Owner set to SergeyBiryukov
  • Resolution → fixed
  • Status new → closed

In 61359:

Site Health: Include value of EMPTY_TRASH_DAYS constant in debug data.

Follow-up to [44986], [45078], [58855].

Props deepakprajapati, desrosj, dhruvang21, SergeyBiryukov.
Fixes #64189.

Note: See TracTickets for help on using tickets.