feat(forum): add complete forum workflows

This commit is contained in:
kate522 committed 2026-11-11 00:09:43 +08:00
1 parent a254cbd3e9
commit ee65fc7fd2
39 files changed
+3425 -4

No files matched your search

+4 -2
View File
@@ -417,8 +417,10 @@ function jio_notify_post_author_of_comment(WP_Comment $comment): void {
if ($owner_id <= 0 || $owner_id === (int) $comment->user_id) return;
jio_add_user_notification($owner_id, [
'type' => 'comment',
'title' => __('文章收到评论', 'jio'),
'desc' => sprintf(__('%1$s 评论了你的文章《%2$s》。', 'jio'), get_comment_author($comment), get_the_title($post)),
'title' => $post->post_type === \Jio\Forum\Core::POST ? __('帖子收到回复', 'jio') : __('文章收到评论', 'jio'),
'desc' => $post->post_type === \Jio\Forum\Core::POST
? sprintf(__('%1$s 回复了你的帖子《%2$s》。', 'jio'), get_comment_author($comment), get_the_title($post))
: sprintf(__('%1$s 评论了你的文章《%2$s》。', 'jio'), get_comment_author($comment), get_the_title($post)),
'url' => get_comment_link($comment),
]);
update_comment_meta($comment->comment_ID, 'jio_post_comment_notified', 1);