fix(user-home): add reference tab loading skeletons
This commit is contained in:
1 parent
4c6b02a6b9
commit
5a17b399a0
7 files changed
+166
-12
No files matched your search
@@ -21,6 +21,17 @@ extract($args, EXTR_SKIP); // phpcs:ignore WordPress.PHP.DontExtract.extract_ext
|
||||
$follow_page = max(1, (int) ($follow_page ?? 1));
|
||||
$follow_sub = in_array($follow_sub ?? 'followers', ['following', 'followers'], true) ? $follow_sub : 'followers';
|
||||
|
||||
if (!empty($placeholder_only)) :
|
||||
?>
|
||||
<?php echo aksrt_get_user_home_follow_placeholder(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- 固定骨架由本主题 helper 输出。 ?>
|
||||
<div class="uh-panel-load-error" role="alert">
|
||||
<span><?php esc_html_e('加载失败,请重试', 'aksrt'); ?></span>
|
||||
<button type="button" data-uh-retry><?php esc_html_e('重试', 'aksrt'); ?></button>
|
||||
</div>
|
||||
<?php
|
||||
return;
|
||||
endif;
|
||||
|
||||
$follow_instance = class_exists('\AKSRT\User\Follow') ? \AKSRT\User\Follow::get_instance() : null;
|
||||
$following_count = $follow_instance ? (int) $follow_instance->get_following_count((int) $user_id) : 0;
|
||||
$follower_count = $follow_instance ? (int) $follow_instance->get_follower_count((int) $user_id) : 0;
|
||||
@@ -63,3 +74,4 @@ $total_pages = max(1, (int) ($list['total_pages'] ?? 1));
|
||||
aksrt_render_profile_empty($svg_empty_follow ?? $svg_empty_post ?? '', $empty_msg);
|
||||
?>
|
||||
<?php endif; ?>
|
||||
<?php echo aksrt_get_user_home_follow_placeholder(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- 固定骨架由本主题 helper 输出。 ?>
|
||||
Reference in new issue
Block a user