Skip to content
Corex

WpSubmissionTrashStore

Corex\Config\Submissions\WpSubmissionTrashStore · class · Config layer

The trash, as WordPress stores it: a submission’s post is trash (spec 105, plan D1). Every read of submissions asks for private posts, so a trashed one leaves the inbox, its counts, the exports and the Data screen at once, with no query to change. It is not trashed with wp_trash_post(). That deletes on the spot when EMPTY_TRASH_DAYS is 0, and writes _wp_trash_meta_time, the one thing WordPress’s daily wp_scheduled_delete() selects by: a submission trashed that way is deleted for good 30 days later, with nothing said and anything uploaded with it left on disk. CoreX writes its own record instead, and without that meta WordPress’s clean-up never finds the post.

__construct(SubmissionInboxReader $reader)

Section titled “__construct(SubmissionInboxReader $reader)”

trash(int $id, int $actorId, string $via): void

Section titled “trash(int $id, int $actorId, string $via): void”

trashedBefore(DateTimeImmutable $cutoff, int $limit): array

Section titled “trashedBefore(DateTimeImmutable $cutoff, int $limit): array”