From bee62f4685371e09f6bb06ca27ba74cfd7bb509f Mon Sep 17 00:00:00 2001 From: Darren Jacoby Date: Thu, 27 May 2021 16:48:47 +0200 Subject: [PATCH] Update Acf.php --- src/Module/Acf.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Module/Acf.php b/src/Module/Acf.php index 69cd82a..7989d77 100644 --- a/src/Module/Acf.php +++ b/src/Module/Acf.php @@ -95,6 +95,10 @@ public function setData($acf) { $query = get_queried_object(); + if (!acf_get_valid_post_id($query)) { + return; + } + if (is_bool($acf)) { $this->data = get_fields($query); }