fix(identity): complete native certification review flow
This commit is contained in:
1 parent
32658be87d
commit
2dfaa10798
16 files changed
+571
-1167
No files matched your search
@@ -17,7 +17,8 @@ $settings = class_exists(AuthApply::class) ? AuthApply::settings() : ['enabled'
|
||||
$status = $user_id > 0 && class_exists(AuthApply::class) ? AuthApply::get_status($user_id) : '';
|
||||
$info = $user_id > 0 && class_exists(AuthApply::class) ? AuthApply::get_auth_info($user_id) : [];
|
||||
$apply = $user_id > 0 && class_exists(AuthApply::class) ? AuthApply::get_apply_payload($user_id) : [];
|
||||
$evidence = class_exists(AuthApply::class) ? AuthApply::get_evidence_items($apply) : [];
|
||||
$reason = $user_id > 0 && class_exists(AuthApply::class) ? (string) get_user_meta($user_id, AuthApply::REASON_META, true) : '';
|
||||
$evidence = class_exists(AuthApply::class) ? AuthApply::get_evidence_items($apply, $user_id) : [];
|
||||
$type_labels = [];
|
||||
foreach ((array) ($settings['types'] ?? []) as $type) {
|
||||
$type_labels[(string) ($type['slug'] ?? '')] = (string) ($type['label'] ?? '');
|
||||
@@ -54,7 +55,13 @@ $can_apply = !empty($settings['enabled']) && !empty($settings['allow_apply']) &&
|
||||
<div class="uc-auth-card__notice"><?php echo wp_kses_post(nl2br(esc_html((string) ($settings['disable_desc'] ?? __('暂时不能申请身份认证', 'aksrt'))))); ?></div>
|
||||
<?php elseif ($blocked_level) : ?>
|
||||
<div class="uc-auth-card__notice"><?php printf(esc_html__('达到 LV.%d 后即可申请', 'aksrt'), $limit); ?></div>
|
||||
<?php elseif ($can_apply) : ?>
|
||||
<?php elseif (in_array($status, ['rejected', 'cancelled'], true) && $reason !== '') : ?>
|
||||
<div class="uc-auth-card__notice">
|
||||
<strong><?php echo $status === 'cancelled' ? esc_html__('认证已取消', 'aksrt') : esc_html__('上次申请未通过', 'aksrt'); ?></strong><br>
|
||||
<?php echo nl2br(esc_html($reason)); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php if ($can_apply) : ?>
|
||||
<button type="button" class="btn-primary uc-auth-apply-open" data-auth-modal-open>
|
||||
<?php echo $status === 'pending' ? esc_html__('查看申请进度', 'aksrt') : esc_html__('申请认证', 'aksrt'); ?>
|
||||
</button>
|
||||
|
||||
Reference in new issue
Block a user