-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathauthor.php
30 lines (29 loc) · 1008 Bytes
/
author.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<?php
$user_data = get_queried_object()->data;
$user_id = $user_data->ID;
get_header();
?>
<main class="column has-text-centered" style="margin-top:1.5rem;">
<div class="columns">
<div class="column has-text-centered content">
<div id="user-avatar">
<?php echo get_avatar($user_id, '100'); ?>
</div>
<?php if (!empty($user_data->user_url)) { ?>
<h3 class="center">博客:<a href="<?php echo $user_data->user_url; ?>" target="_blank" rel="nofollow">@<?php wp_title(''); ?></a></h3>
<?php } ?>
<div id="user-description">
<?php echo get_user_meta($user_id, 'description', 1); ?>
</div>
<?php
if (wnd_is_manager()) {
echo '<h3>管理</h3>';
echo wnd_modal_button('删除用户', 'wnd_delete_user_form', ['user_id' => $user_id], 'is-danger is-outlined is-small');
echo ' ' . wnd_modal_button('封禁用户', 'wnd_account_status_form', ['user_id' => $user_id], 'is-danger is-outlined is-small');
}
?>
</div>
</div>
</main>
<?php
get_footer();