Skip to content

Commit 122d8f7

Browse files
delete old auto-draft posts created before today
1 parent 40afe0b commit 122d8f7

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

classes/Visualizer/Module/Chart.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,8 +249,14 @@ private function deleteOldCharts() {
249249
'update_post_meta_cache' => false,
250250
'update_post_term_cache' => false,
251251
'posts_per_page' => 50,
252+
'date_query' => array(
253+
array(
254+
'before' => 'today',
255+
),
256+
),
252257
)
253258
);
259+
254260
if ( $query->have_posts() ) {
255261
$ids = array();
256262
while ( $query->have_posts() ) {

0 commit comments

Comments
 (0)