Created
August 24, 2018 14:20
-
-
Save WordBits/a598b9584061add6bd355dce87f484a9 to your computer and use it in GitHub Desktop.
This snippet will allow you to automatically empty your post, page, or comment trash inside WordPress. Helpful when you need to keep performance high but don't want to manually go in and delete things from trash. By default, this snippet will delete items from the trash after being there for 7 days. As always, adjust it to your needs as you see …
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Download this snippet as a plugin and more at: https://wordbits.io/snippet/automatically-empty-post-page-comment-trash/ | |
// Created by: jeffmatson | |
?> | |
<?php | |
define('EMPTY_TRASH_DAYS', 7 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment