From 7b4d2256e9007d2e0e69caad825811b4daffb418 Mon Sep 17 00:00:00 2001 From: Tetrakern <26898880+Tetrakern@users.noreply.github.com> Date: Sun, 12 Jan 2025 07:08:20 +0100 Subject: [PATCH] Hide floating suggestion button if comments are disabled --- includes/functions/hooks/_chapter_hooks.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/includes/functions/hooks/_chapter_hooks.php b/includes/functions/hooks/_chapter_hooks.php index 36bacebf..65f36602 100644 --- a/includes/functions/hooks/_chapter_hooks.php +++ b/includes/functions/hooks/_chapter_hooks.php @@ -772,8 +772,11 @@ function fictioneer_chapter_suggestion_tools() { return; } + // Setup + $hide_if_logged_out = get_option( 'comment_registration' ) ? 'hide-if-logged-out' : ''; // Safer for cached site + // Start HTML ---> ?> -