用户功能设置收口与废弃后台链路清理
This commit is contained in:
@@ -102,7 +102,7 @@ $is_self = is_user_logged_in() && get_current_user_id() === $author_id;
|
||||
}
|
||||
?>
|
||||
<?php if ($show_bio) : ?>
|
||||
<?php $bio = trim((string) get_the_author_meta('description')); ?>
|
||||
<?php $bio = function_exists('aksrt_get_user_description') ? aksrt_get_user_description($author_id) : trim((string) get_the_author_meta('description')); ?>
|
||||
<?php if ($bio !== '') : ?>
|
||||
<span class="icon-circle"><?php echo esc_html($bio); ?></span>
|
||||
<?php endif; ?>
|
||||
|
||||
@@ -47,7 +47,7 @@ $has_more_details = $registered_time !== '' || $last_login_time !== '' || !empty
|
||||
$signals = $dashboard['profile_signals'] ?? [];
|
||||
$notice = $dashboard['profile_notice'] ?? null;
|
||||
$show_report = !empty($dashboard['show_report']);
|
||||
$bg_url = $dashboard['background_url'] ?? '';
|
||||
$bg_url = function_exists('aksrt_get_user_cover_url') ? aksrt_get_user_cover_url($user_id) : '';
|
||||
$is_own = !empty($dashboard['is_own_profile']);
|
||||
|
||||
$follower_count = (int) ($tab_counts['follow'] ?? 0);
|
||||
@@ -60,7 +60,7 @@ $unread_count = $is_own ? aksrt_get_user_unread_notification_count($user_id) : 0
|
||||
?><div class="aksrt-author-hero<?php echo $show_cover ? '' : ' aksrt-author-hero--no-cover'; ?>">
|
||||
<?php if ($show_cover) : ?>
|
||||
<div class="aksrt-author-hero__cover">
|
||||
<img<?php echo aksrt_get_lazy_attr('lazy_cover', (string) ($bg_url ? $bg_url : get_theme_file_uri('assets/img/person_background.png')), 'aksrt-author-hero__cover-img', aksrt_get_lazy_thumb('lg')); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?> alt="">
|
||||
<img<?php echo aksrt_get_lazy_attr('lazy_cover', (string) $bg_url, 'aksrt-author-hero__cover-img', aksrt_get_lazy_thumb('lg')); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?> alt="">
|
||||
<div class="aksrt-author-hero__cover-mask"></div>
|
||||
<?php if ($follower_count > 0) : ?>
|
||||
<div class="aksrt-author-hero__cover-metas" aria-label="<?php esc_attr_e('主页数据', 'aksrt'); ?>">
|
||||
@@ -124,8 +124,9 @@ $unread_count = $is_own ? aksrt_get_user_unread_notification_count($user_id) : 0
|
||||
<?php echo $city_badge; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php if ($show_desc && $user->description) : ?>
|
||||
<p class="aksrt-author-hero__desc"><?php echo esc_html($user->description); ?></p>
|
||||
<?php $user_description = function_exists('aksrt_get_user_description') ? aksrt_get_user_description($user_id) : (string) $user->description; ?>
|
||||
<?php if ($show_desc && $user_description !== '') : ?>
|
||||
<p class="aksrt-author-hero__desc"><?php echo esc_html($user_description); ?></p>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if (!empty($notice) && is_array($notice)) : ?>
|
||||
|
||||
@@ -36,7 +36,7 @@ $avatar = function_exists('aksrt_get_avatar_url') ? aksrt_get_avatar_url($use
|
||||
$home_url = function_exists('aksrt_get_user_home_url') ? aksrt_get_user_home_url($user) : get_author_posts_url($user_id);
|
||||
$credits = function_exists('aksrt_user_credits') ? (int) aksrt_user_credits($user_id) : 0;
|
||||
$post_count = (int) count_user_posts($user_id, 'post', true);
|
||||
$bio = (string) get_the_author_meta('description', $user_id);
|
||||
$bio = function_exists('aksrt_get_user_description') ? aksrt_get_user_description($user_id) : (string) get_the_author_meta('description', $user_id);
|
||||
$show_credits = class_exists('\AKSRT\Settings\Settings') ? \AKSRT\Settings\Settings::credits_enabled() : true;
|
||||
?>
|
||||
<div class="aksrt-profile-card aksrt-profile-card--shortcode">
|
||||
|
||||
Reference in New Issue
Block a user