feat(user-ban): frontend ban modal replaces the backend restrictions tab
1:1 replicate the reference theme user-ban flow on the frontend: - Ban/unban modal rendered by inc/helpers/user-ban.php, opened via AksrtModalRuntime.openRemote (600px desktop dialog, 360px initial height, mobile bottom drawer, c-yellow colorful unban header). - Three entry points wired: user homepage cover three-dot menu, comment section menu, article author card menu (ban item takes priority over report, matching the reference hook order). - REST endpoints /user-ban/modal and /user-ban/set under aksrt/v1, guarded by check_permission, persisted through User\Restriction. - Submit semantics match zib_ajax_set_user_ban: ban reloads the page, unban only closes the modal. Cleanup (no dual-track): the backend ban-restrictions tab, its form handlers and flash keys are removed; ticket processing links to the frontend user homepage as the reference theme does; admin/report and appeal notification URLs move to type/status query args. Verification: 337/337 widget-system contract tests, 41/41 admin and front-submit tests, php -l clean on all changed PHP files.
This commit is contained in:
1 parent
a1eb545bef
commit
7597972eea
18 files changed
+1080
-374
No files matched your search
@@ -217,7 +217,9 @@ if (!function_exists('aksrt_get_comments_action_dropdown_html')) :
|
||||
if (!empty($perms['can_delete'])) {
|
||||
$lists .= '<li><a class="comment-trash-link c-red" data-comment-action="delete" data-commentid="' . (int) $comment->comment_ID . '" data-postid="' . (int) $comment->comment_post_ID . '" href="javascript:;"><i class="fa far fa-trash-alt mr10 fa-fw" aria-hidden="true"></i>' . esc_html__('删除', 'aksrt') . '</a></li>';
|
||||
}
|
||||
$lists .= aksrt_get_comment_report_html($comment);
|
||||
// 末项(参考主题 comments_action_lists 钩子顺序):管理员 → 禁封用户;
|
||||
// 否则 → 举报(登录且非本人且举报开启时,既有评论举报契约)。
|
||||
$lists .= aksrt_get_comment_ban_or_report_item($comment);
|
||||
|
||||
if ($lists === '') {
|
||||
return '';
|
||||
|
||||
Reference in new issue
Block a user