From 6b41f813c177f388ab798f50d5ad6af993b8b659 Mon Sep 17 00:00:00 2001 From: Tetrakern <26898880+Tetrakern@users.noreply.github.com> Date: Wed, 7 Aug 2024 16:33:27 +0200 Subject: [PATCH] Hide some paragraph tools if user cannot comment --- includes/functions/hooks/_chapter_hooks.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/includes/functions/hooks/_chapter_hooks.php b/includes/functions/hooks/_chapter_hooks.php index 4c5936dd..292b7d05 100644 --- a/includes/functions/hooks/_chapter_hooks.php +++ b/includes/functions/hooks/_chapter_hooks.php @@ -683,6 +683,7 @@ add_action( 'fictioneer_chapter_after_main', 'fictioneer_chapter_micro_menu', 10 function fictioneer_chapter_paragraph_tools() { // Setup $can_comment = ! fictioneer_is_commenting_disabled( get_the_ID() ) && comments_open(); + $hide_if_logged_out = get_option( 'comment_registration' ) ? 'hide-if-logged-out' : ''; // Safer for cached site // Start HTML ---> ?>