From b31006a143efc986b13ff878388804c6b87b0943 Mon Sep 17 00:00:00 2001 From: Mykyta Synelnikov Date: Sun, 30 Jul 2023 22:59:49 +0300 Subject: [PATCH] - fixed templates version; --- includes/core/class-access.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/includes/core/class-access.php b/includes/core/class-access.php index 9c24d7f2..765fc357 100644 --- a/includes/core/class-access.php +++ b/includes/core/class-access.php @@ -1843,12 +1843,16 @@ if ( ! class_exists( 'um\core\Access' ) ) { * @param \WP_Post|int $post Post ID or object * @return bool|array */ - function get_post_privacy_settings( $post ) { + public function get_post_privacy_settings( $post ) { // break for incorrect post if ( empty( $post ) ) { return false; } + if ( ! is_numeric( $post ) && ! is_a( $post, \WP_Post::class ) ) { + return false; + } + static $cache = array(); $cache_key = is_numeric( $post ) ? $post : $post->ID;