删除私信分支链路
This commit is contained in:
@@ -396,8 +396,6 @@ if (!function_exists('aksrt_single_render_author_card')) :
|
||||
}
|
||||
$is_self = is_user_logged_in() && get_current_user_id() === $author_id;
|
||||
$login_url = function_exists('aksrt_get_login_url') ? aksrt_get_login_url() : wp_login_url(get_permalink());
|
||||
$aksrt_pm_on = class_exists('\AKSRT\Settings\Settings') && !empty(\AKSRT\Settings\Settings::private_message_settings()['enabled']);
|
||||
$aksrt_msg_url = function_exists('aksrt_get_messages_page_url') ? aksrt_get_messages_page_url() : '';
|
||||
$aksrt_post_settings = class_exists('\AKSRT\Settings\Settings') && method_exists('\AKSRT\Settings\Settings', 'get_post_page_settings')
|
||||
? \AKSRT\Settings\Settings::get_post_page_settings()
|
||||
: [];
|
||||
@@ -448,14 +446,9 @@ if (!function_exists('aksrt_single_render_author_card')) :
|
||||
<a href="<?php echo esc_url($login_url); ?>" class="but pw-1em mr6 c-red follow">
|
||||
<i class="fa fas fa-heart em09" aria-hidden="true"></i> <span><?php esc_html_e('关注', 'aksrt'); ?></span>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
<?php if (is_user_logged_in() && $aksrt_pm_on && $aksrt_msg_url !== '') : ?>
|
||||
<a class="but pw-1em mr6 c-blue" href="<?php echo esc_url(add_query_arg('msg_type', 'conversation', $aksrt_msg_url)); ?>">
|
||||
<i class="fa fas fa-comment em09" aria-hidden="true"></i> <?php esc_html_e('私信', 'aksrt'); ?>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
$tip = function_exists('aksrt_get_rewards_button') ? aksrt_get_rewards_button($author_id, 'but pw-1em mr6 c-yellow', get_the_ID()) : '';
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
$tip = function_exists('aksrt_get_rewards_button') ? aksrt_get_rewards_button($author_id, 'but pw-1em mr6 c-yellow', get_the_ID()) : '';
|
||||
if ($tip !== '') {
|
||||
echo $tip; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
||||
if (function_exists('aksrt_render_rewards_modal_for_user')) {
|
||||
|
||||
@@ -226,7 +226,6 @@ function aksrt_is_lazy(string $key, bool $default = false): bool {
|
||||
'lazy_avatar' => true,
|
||||
'lazy_posts_content' => false,
|
||||
'lazy_comment' => true,
|
||||
'lazy_private' => true,
|
||||
'lazy_sider' => true,
|
||||
'lazy_cover' => true,
|
||||
'lazy_other' => true,
|
||||
|
||||
@@ -19,7 +19,6 @@ $page = max(1, isset($_GET['follow_page']) ? (int) $_GET['follow_page'] : 1);
|
||||
$result = $follow
|
||||
? ($active_list === 'following' ? $follow->get_following((int) $user_id, $page, 20) : $follow->get_followers((int) $user_id, $page, 20))
|
||||
: ['items' => [], 'total_pages' => 1];
|
||||
$messages_enabled = !empty($messages_url);
|
||||
?>
|
||||
<div class="widget-card uc-follow-management">
|
||||
<div class="profile-list-header">
|
||||
@@ -39,17 +38,15 @@ $messages_enabled = !empty($messages_url);
|
||||
</div>
|
||||
<?php if (!empty($result['items'])) : ?>
|
||||
<div class="uc-follow-management__list">
|
||||
<?php foreach ($result['items'] as $item) :
|
||||
$member_id = (int) ($item['user_id'] ?? 0);
|
||||
$home_url = function_exists('aksrt_get_user_home_url') ? aksrt_get_user_home_url($member_id) : '';
|
||||
$message_url = $messages_enabled ? add_query_arg('msg_type', 'conversation', $messages_url) : '';
|
||||
?>
|
||||
<?php foreach ($result['items'] as $item) :
|
||||
$member_id = (int) ($item['user_id'] ?? 0);
|
||||
$home_url = function_exists('aksrt_get_user_home_url') ? aksrt_get_user_home_url($member_id) : '';
|
||||
?>
|
||||
<div class="uc-follow-management__item" data-follow-user="<?php echo esc_attr((string) $member_id); ?>">
|
||||
<a href="<?php echo esc_url($home_url); ?>" class="uc-follow-management__avatar"><?php echo get_avatar($member_id, 48, '', (string) ($item['display_name'] ?? '')); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></a>
|
||||
<div class="uc-follow-management__identity"><a href="<?php echo esc_url($home_url); ?>"><?php echo esc_html((string) ($item['display_name'] ?? '')); ?></a><span><?php echo esc_html(sprintf(__('关注于 %s', 'aksrt'), get_date_from_gmt((string) ($item['created_at'] ?? ''), get_option('date_format')))); ?></span></div>
|
||||
<div class="uc-follow-management__actions">
|
||||
<a class="btn-ghost btn-sm" href="<?php echo esc_url($home_url); ?>"><?php esc_html_e('主页', 'aksrt'); ?></a>
|
||||
<?php if ($messages_enabled) : ?><a class="btn-ghost btn-sm" href="<?php echo esc_url($message_url); ?>"><?php esc_html_e('私信', 'aksrt'); ?></a><?php endif; ?>
|
||||
<?php if ($active_list === 'following') : ?><button type="button" class="btn-outline btn-sm is-following" data-aksrt-follow="<?php echo esc_attr((string) $member_id); ?>"><i class="fa fas fa-heart" aria-hidden="true"></i><span><?php esc_html_e('已关注', 'aksrt'); ?></span></button><?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user