File tree Expand file tree Collapse file tree 2 files changed +13
-12
lines changed
Expand file tree Collapse file tree 2 files changed +13
-12
lines changed Original file line number Diff line number Diff line change @@ -2458,6 +2458,19 @@ function wp_new_comment_notify_postauthor( $comment_id ) {
24582458 return wp_notify_postauthor ( $ comment_id );
24592459}
24602460
2461+ /**
2462+ * Send a notification to the post author when a new note is added via the REST API.
2463+ *
2464+ * @since 6.9.0
2465+ *
2466+ * @param WP_Comment $comment The comment object.
2467+ */
2468+ function wp_new_comment_via_rest_notify_postauthor ( $ comment ) {
2469+ if ( 'note ' === $ comment ->comment_type ) {
2470+ wp_new_comment_notify_postauthor ( $ comment ->comment_ID );
2471+ }
2472+ }
2473+
24612474/**
24622475 * Sets the status of a comment.
24632476 *
Original file line number Diff line number Diff line change @@ -36,18 +36,6 @@ public function __construct() {
3636 $ this ->meta = new WP_REST_Comment_Meta_Fields ();
3737 }
3838
39- /**
40- * Send a notification to the post author when a new note is added via the REST API.
41- *
42- * @since 6.9.0
43- *
44- * @param WP_Comment $comment The comment object.
45- */
46- public static function wp_new_comment_via_rest_notify_postauthor ( $ comment ) {
47- if ( 'note ' === $ comment ->comment_type ) {
48- wp_new_comment_notify_postauthor ( $ comment ->comment_ID );
49- }
50- }
5139 /**
5240 * Registers the routes for comments.
5341 *
You can’t perform that action at this time.
0 commit comments