Skip to content

Commit f887528

Browse files
committed
attachments have post status inherit, not publish
1 parent ce57bda commit f887528

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

classes/suggested-tasks/providers/class-improve-pdf-handling.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ public function should_add_task() {
9292
[
9393
'post_type' => 'attachment',
9494
'post_mime_type' => 'application/pdf',
95-
'post_status' => 'publish',
95+
'post_status' => 'inherit',
9696
'posts_per_page' => static::MIN_PDF_FILES + 1, // We want to get at least 11 PDF files to be sure we have enough.
9797
'fields' => 'ids',
9898
]
@@ -101,7 +101,7 @@ public function should_add_task() {
101101
\progress_planner()->get_utils__cache()->set( 'pdf_files_count', $pdf_files_count, DAY_IN_SECONDS );
102102
}
103103

104-
return static::MIN_PDF_FILES < $pdf_files_count;
104+
return static::MIN_PDF_FILES < (int) $pdf_files_count;
105105
}
106106

107107
/**

0 commit comments

Comments
 (0)