修复了一些问题
This commit is contained in:
1 parent
c8d199a694
commit
3dbd196e06
9 files changed
+99
-25
No files matched your search
@@ -35,7 +35,6 @@ $show_follow = !array_key_exists('follow', $settings) || !empty($settings['follo
|
||||
$show_avatar = !array_key_exists('avatar', $settings) || !empty($settings['avatar']);
|
||||
$show_name = !array_key_exists('name', $settings) || !empty($settings['name']);
|
||||
$show_desc = !array_key_exists('desc', $settings) || !empty($settings['desc']);
|
||||
$show_message = !array_key_exists('message', $settings) || !empty($settings['message']);
|
||||
|
||||
$profile_details = is_array($dashboard['profile_details'] ?? null) ? $dashboard['profile_details'] : [];
|
||||
// Registration time is always present, so the details dialog always has
|
||||
@@ -55,7 +54,12 @@ if ($follower_count <= 0 && class_exists('\AKSRT\User\Follow')) {
|
||||
$follower_count = (int) \AKSRT\User\Follow::get_instance()->get_follower_count($user_id);
|
||||
}
|
||||
|
||||
$messages_url = function_exists('aksrt_get_messages_page_url') ? aksrt_get_messages_page_url() : '';
|
||||
$notification_settings = class_exists('\AKSRT\Settings\Settings')
|
||||
? \AKSRT\Settings\Settings::notification_settings()
|
||||
: ['enabled' => false, 'icon_show' => []];
|
||||
$show_header_notification = !empty($notification_settings['enabled'])
|
||||
&& in_array('user_home_header', (array) ($notification_settings['icon_show'] ?? []), true);
|
||||
$messages_url = $show_header_notification && function_exists('aksrt_get_messages_page_url') ? aksrt_get_messages_page_url() : '';
|
||||
$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) : ?>
|
||||
@@ -143,7 +147,7 @@ $unread_count = $is_own ? aksrt_get_user_unread_notification_count($user_id) : 0
|
||||
<i class="fa fas fa-user" aria-hidden="true"></i>
|
||||
<span><?php esc_html_e('用户中心', 'aksrt'); ?></span>
|
||||
</a>
|
||||
<?php if ($show_message && $messages_url !== '') : ?>
|
||||
<?php if ($messages_url !== '') : ?>
|
||||
<a href="<?php echo esc_url($messages_url); ?>" class="btn-ghost btn-sm btn-icon aksrt-author-hero__message-btn" aria-label="<?php esc_attr_e('消息通知', 'aksrt'); ?>" title="<?php esc_attr_e('消息通知', 'aksrt'); ?>">
|
||||
<i class="fa fas fa-bell" aria-hidden="true"></i>
|
||||
<?php if ($unread_count > 0) : ?>
|
||||
|
||||
Reference in new issue
Block a user