chore(cleanup): 移除用户中心孤儿签到日历渲染器
credits-signin.php 已无任何引用(用户中心视图映射无 signin 项,profile-credits.php 亦不再挂载),整包删除,不保留兼容分支。 其专属 .uc-signin-calendar__title 样式与 public.css / public.min.css 产物同步移除;签到日历仍由 src/Credits/Signin.php 在签到弹窗内输出,enhancements2.js 的日历渲染逻辑保持不变。
This commit is contained in:
@@ -1,32 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* User center credits: sign-in captcha + recent calendar.
|
||||
*
|
||||
* Expects extracted $context vars.
|
||||
*
|
||||
* @package AKSRT
|
||||
*/
|
||||
|
||||
defined('ABSPATH') || exit;
|
||||
|
||||
$credits_enabled = !empty($credits_enabled);
|
||||
if (!$credits_enabled) {
|
||||
return;
|
||||
}
|
||||
|
||||
$signin_dates = [];
|
||||
if (class_exists('\AKSRT\Credits\Signin')) {
|
||||
$signin_log = \AKSRT\Credits\Signin::get_instance()->get_recent_signins($user_id, 30);
|
||||
$signin_dates = array_filter(array_map(static function ($entry) {
|
||||
return $entry['signin_date'] ?? '';
|
||||
}, $signin_log));
|
||||
}
|
||||
|
||||
?>
|
||||
<div class="uc-signin-calendar" style="margin-bottom:16px;">
|
||||
<h4 class="uc-signin-calendar__title">
|
||||
<i class="fa fas fa-calendar" aria-hidden="true"></i>
|
||||
<?php esc_html_e('最近 30 天签到', 'aksrt'); ?>
|
||||
</h4>
|
||||
<div data-aksrt-signin-calendar='<?php echo esc_attr(wp_json_encode(array_values($signin_dates))); ?>'></div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user