Skip to content

Commit bbb6357

Browse files
authored
Federated Reactions: Redirect edit requests (#1887)
1 parent dc4cfe6 commit bbb6357

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Significance: patch
2+
Type: changed
3+
4+
Notification emails for new reactions received from the Fediverse now link to the moderation page instead of the edit page, preventing errors and making comment management smoother.

includes/wp-admin/class-admin.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,13 @@ function ( $all_caps, $caps, $arg ) {
270270
1,
271271
3
272272
);
273+
274+
// phpcs:ignore WordPress.Security.NonceVerification
275+
if ( Comment::was_received( absint( $_GET['c'] ?? 0 ) ) ) {
276+
// Redirect to the pending comments page.
277+
\wp_safe_redirect( \admin_url( 'edit-comments.php?comment_status=moderated' ) );
278+
exit;
279+
}
273280
}
274281

275282
/**

0 commit comments

Comments
 (0)