Fixed comment edit screen missing moderation meta box

This commit is contained in:
Tetrakern 2024-08-31 17:32:22 +02:00
parent 8be1c912fb
commit 31f5cfd97c
2 changed files with 6 additions and 1 deletions

View File

@ -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';

View File

@ -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 );