From 5d12151c75a023c2bcf9258e230fbe566b46e3ad Mon Sep 17 00:00:00 2001 From: Dharmesh Patel Date: Mon, 19 Feb 2024 13:25:42 +0530 Subject: [PATCH] Removed type declaration from the `attachment_is_pdf()` parameter. --- includes/Classifai/Helpers.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/Classifai/Helpers.php b/includes/Classifai/Helpers.php index 9e16003d3..cb1575114 100644 --- a/includes/Classifai/Helpers.php +++ b/includes/Classifai/Helpers.php @@ -279,10 +279,10 @@ function get_modified_image_source_url( int $post_id ) { /** * Check if attachment is PDF document. * - * @param \WP_Post $post Post object for the attachment being viewed. + * @param int|\WP_Post $post Post object for the attachment being viewed. * @return bool */ -function attachment_is_pdf( \WP_Post $post ): bool { +function attachment_is_pdf( $post ): bool { $mime_type = get_post_mime_type( $post ); $matched_extensions = explode( '|', array_search( $mime_type, wp_get_mime_types(), true ) );