feat(admin): rebuild the restrictions tab on the reference ban modal
Replace the self-invented CRUD (warn/mute/suspend/ban + scope selector) with the reference-theme ban model: ban method (blackroom suspend / login ban), duration radios (1/7/14/30/100 days or permanent, default 7), preset reason chips with an other-reason input, ban note, delete-all- content switch (posts/comments to trash), and a no-appeal switch with a required notice that also gates the frontend appeal entry. Banned users render the status info view (status/start/end/reason) with an unban leave-a-message form; the record list uses the reference columns and per-user unban links. Bans notify the user in-site like the reference zib_updata_user_ban_msg.
This commit is contained in:
1 parent
970b377b9a
commit
c38616b290
4 files changed
+290
-58
No files matched your search
@@ -97,6 +97,11 @@ class BanAppeal {
|
||||
if (!$banned) {
|
||||
wp_send_json(['error' => 1, 'msg' => __('当前账号未处于禁封状态', 'aksrt')]);
|
||||
}
|
||||
// 禁封时勾选“禁止用户申诉”的门禁(参考主题 no_appeal 同语义)。
|
||||
$no_appeal = get_user_meta($user_id, '_aksrt_no_appeal', true);
|
||||
if (is_array($no_appeal) && $no_appeal['desc'] !== '') {
|
||||
wp_send_json(['error' => 1, 'msg' => sprintf(__('当前账号已被限制申诉:%s', 'aksrt'), (string) $no_appeal['desc'])]);
|
||||
}
|
||||
if (self::get_status($user_id) === 'pending') {
|
||||
wp_send_json(['error' => 1, 'msg' => __('申诉正在处理中,请勿重复提交', 'aksrt')]);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user