From 31f5cfd97ccdc030a4afd68ee64974e96e6c2616 Mon Sep 17 00:00:00 2001 From: Tetrakern <26898880+Tetrakern@users.noreply.github.com> Date: Sat, 31 Aug 2024 17:32:22 +0200 Subject: [PATCH] Fixed comment edit screen missing moderation meta box --- functions.php | 5 +++++ includes/functions/comments/_comments_moderation.php | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/functions.php b/functions.php index b063eb66..ab71ca48 100644 --- a/functions.php +++ b/functions.php @@ -556,6 +556,11 @@ if ( strpos( $_SERVER['REQUEST_URI'], 'wp-json/fictioneer/' ) !== false ) { require_once __DIR__ . '/includes/functions/comments/_comments_threads.php'; } +if ( is_admin() ) { + // Required for comment edit + require_once __DIR__ . '/includes/functions/comments/_comments_moderation.php'; +} + if ( wp_doing_ajax() ) { // Required for AJAX require_once __DIR__ . '/includes/functions/comments/_comments_ajax.php'; diff --git a/includes/functions/comments/_comments_moderation.php b/includes/functions/comments/_comments_moderation.php index b4da0e80..d8a123c5 100644 --- a/includes/functions/comments/_comments_moderation.php +++ b/includes/functions/comments/_comments_moderation.php @@ -93,7 +93,7 @@ function fictioneer_add_comment_meta_box() { * @param object $comment The comment object. */ -function fictioneer_comment_meta_box ( $comment ) { +function fictioneer_comment_meta_box( $comment ) { // Setup $type = get_comment_type( $comment->comment_ID ); $user_reports = get_comment_meta( $comment->comment_ID, 'fictioneer_user_reports', true );