feat(user-center): redesign sidebar and wallet tips
This commit is contained in:
1 parent
82e71d1bf9
commit
a7f3caec59
24 files changed
+895
-528
No files matched your search
@@ -32,55 +32,6 @@ extract($context, EXTR_SKIP); // phpcs:ignore WordPress.PHP.DontExtract.extract_
|
||||
|
||||
<?php require __DIR__ . '/form-contacts.php'; ?>
|
||||
|
||||
<?php
|
||||
$rewards_on = function_exists('aksrt_rewards_enabled') ? aksrt_rewards_enabled() : false;
|
||||
$rw = (string) get_user_meta((int) $user_id, 'aksrt_rewards_weixin', true);
|
||||
$ra = (string) get_user_meta((int) $user_id, 'aksrt_rewards_alipay', true);
|
||||
$rw_url = '';
|
||||
$ra_url = '';
|
||||
if (function_exists('aksrt_get_user_rewards_img_urls')) {
|
||||
$urls = aksrt_get_user_rewards_img_urls((int) $user_id);
|
||||
$rw_url = (string) ($urls['weixin'] ?? '');
|
||||
$ra_url = (string) ($urls['alipay'] ?? '');
|
||||
}
|
||||
?>
|
||||
<?php if ($rewards_on) : ?>
|
||||
<div class="widget-card">
|
||||
<h3 class="widget-title"><?php esc_html_e('打赏收款码', 'aksrt'); ?></h3>
|
||||
<p class="profile-hint"><?php esc_html_e('上传微信/支付宝收款码后,读者可在文章与作者卡赞赏你。留空则不显示赞赏按钮。', 'aksrt'); ?></p>
|
||||
<div class="aksrt-reward-upload-grid">
|
||||
<div class="aksrt-reward-upload">
|
||||
<label class="aksrt-reward-upload__label"><?php esc_html_e('微信收款码', 'aksrt'); ?></label>
|
||||
<div class="aksrt-reward-upload__preview" data-reward-preview="weixin">
|
||||
<?php if ($rw_url !== '') : ?>
|
||||
<img src="<?php echo esc_url($rw_url); ?>" alt="" />
|
||||
<?php else : ?>
|
||||
<span class="muted-2-color em09"><?php esc_html_e('未上传', 'aksrt'); ?></span>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<input type="hidden" name="rewards_weixin" id="rewards-weixin" value="<?php echo esc_attr($rw); ?>" />
|
||||
<input type="file" id="rewards-weixin-file" accept="image/*" class="aksrt-reward-upload__file" data-reward-kind="weixin" />
|
||||
<button type="button" class="btn-primary btn-sm" data-reward-upload="weixin"><?php esc_html_e('选择图片', 'aksrt'); ?></button>
|
||||
<button type="button" class="btn-sm" data-reward-clear="weixin"><?php esc_html_e('清除', 'aksrt'); ?></button>
|
||||
</div>
|
||||
<div class="aksrt-reward-upload">
|
||||
<label class="aksrt-reward-upload__label"><?php esc_html_e('支付宝收款码', 'aksrt'); ?></label>
|
||||
<div class="aksrt-reward-upload__preview" data-reward-preview="alipay">
|
||||
<?php if ($ra_url !== '') : ?>
|
||||
<img src="<?php echo esc_url($ra_url); ?>" alt="" />
|
||||
<?php else : ?>
|
||||
<span class="muted-2-color em09"><?php esc_html_e('未上传', 'aksrt'); ?></span>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<input type="hidden" name="rewards_alipay" id="rewards-alipay" value="<?php echo esc_attr($ra); ?>" />
|
||||
<input type="file" id="rewards-alipay-file" accept="image/*" class="aksrt-reward-upload__file" data-reward-kind="alipay" />
|
||||
<button type="button" class="btn-primary btn-sm" data-reward-upload="alipay"><?php esc_html_e('选择图片', 'aksrt'); ?></button>
|
||||
<button type="button" class="btn-sm" data-reward-clear="alipay"><?php esc_html_e('清除', 'aksrt'); ?></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
<div class="profile-form__submit">
|
||||
<button type="submit" class="btn-primary btn-lg" id="profile-save-btn">
|
||||
|
||||
Reference in new issue
Block a user