Make WordPress Core

Opened 6 weeks ago

Closed 5 days ago

#64189 closed feature request (fixed)

Include value of EMPTY_TRASH_DAYS constant

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

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.


5 weeks 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
5 days ago

  • Milestone changed from Awaiting Review to 7.0

#3 @SergeyBiryukov
5 days ago

  • Owner set to SergeyBiryukov
  • Resolution set to fixed
  • Status changed from new to 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.