'GitHub',
'gitee' => 'Gitee',
'qq' => 'QQ',
'google' => 'Google',
];
?>
$tab ) : ?>
>
>
>
>
>
get_recent_signins($user_id, 30);
$signin_dates = array_map(function ($entry) {
return $entry['signin_date'] ?? '';
}, $signin_log);
$signin_dates = array_filter($signin_dates);
}
?>
$user_id, 'page' => $credits_page, 'per_page' => 10 ] );
} else {
$log = [ 'items' => [], 'total' => 0 ];
}
if ( ! empty( $log['items'] ) ) :
?>
= 0 ? 'is-positive' : 'is-negative';
?>
1 ) {
aksrt_render_profile_pagination( $total_pages, $credits_page, 'credits_page' );
}
?>
()
0 ? '+' : '' ) . $delta ); ?>
>
get_frontend_bindings_data($user_id);
$user_email = $target_user->user_email ?: '';
$binding_name_map = [
'github' => 'GitHub',
'gitee' => 'Gitee',
'qq' => 'QQ',
'google' => 'Google',
];
$binding_rows = [];
foreach ( (array) ( $oauth_data['bindings'] ?? [] ) as $binding ) {
$key = $binding['key'] ?? '';
if ( ! $key ) continue;
$binding_rows[ $key ] = [
'key' => $key,
'name' => $binding_name_map[ $key ] ?? ( $binding['name'] ?? ucfirst( $key ) ),
'icon' => $binding['icon'] ?? '',
'is_bound' => true,
'url' => '',
];
}
foreach ( (array) ( $oauth_data['available'] ?? [] ) as $binding ) {
$key = $binding['key'] ?? '';
if ( ! $key ) continue;
$binding_rows[ $key ] = [
'key' => $key,
'name' => $binding_name_map[ $key ] ?? ( $binding['name'] ?? ucfirst( $key ) ),
'icon' => $binding['icon'] ?? '',
'is_bound' => false,
'url' => $binding['url'] ?? '',
];
}
?>
--
0
0
0
>
$user_id,
'posts_per_page' => $per_page,
'post_status' => 'publish',
'paged' => $posts_page,
'no_found_rows' => false,
'update_post_meta_cache' => false,
] );
if ( $author_posts->have_posts() ) : ?>
have_posts() ) : $author_posts->the_post();
set_query_var( 'aksrt_profile_item_action', [
'type' => 'view',
'url' => get_permalink(),
'label' => __( '阅读', 'aksrt' ),
] );
set_query_var( 'aksrt_profile_item_status', '' );
get_template_part( 'templates/parts/content', 'profile-list-item' );
endwhile; ?>
max_num_pages, $posts_page, 'posts_page' );
wp_reset_postdata();
set_query_var( 'aksrt_profile_item_action', [] );
else :
aksrt_render_profile_empty( $svg_empty_post, __( 'TA 还没有发布文章', 'aksrt' ) );
endif; ?>
>
$user_id,
'status' => 'approve',
'number' => $per_page,
'offset' => ( $comments_page - 1 ) * $per_page,
'type' => 'comment',
'update_comment_meta_cache' => false,
] );
if ( $user_comments ) : ?>
>
'post',
'post__in' => $favorite_post_ids,
'orderby' => 'post__in',
'posts_per_page' => $per_page,
'paged' => $favorites_page,
'no_found_rows' => false,
'update_post_meta_cache' => false,
] );
} else {
$favorite_query = null;
}
if ( $favorite_query && $favorite_query->have_posts() ) :
?>
have_posts() ) : $favorite_query->the_post();
set_query_var( 'aksrt_profile_item_action', [
'type' => 'view',
'url' => get_permalink(),
'label' => __( '阅读', 'aksrt' ),
] );
set_query_var( 'aksrt_profile_item_status', '' );
get_template_part( 'templates/parts/content', 'profile-list-item' );
endwhile; ?>
max_num_pages, $favorites_page, 'favorites_page' );
wp_reset_postdata();
set_query_var( 'aksrt_profile_item_action', [] );
else :
aksrt_render_profile_empty( $svg_empty_favorite, __( 'TA 还没有公开收藏内容', 'aksrt' ) );
endif; ?>