This repository was archived by the owner on Jan 13, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathauthor.php
52 lines (44 loc) · 1.66 KB
/
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<?php get_header(); ?>
<?php
$curauth = (get_query_var('author_name')) ? get_user_by('slug', get_query_var('author_name')) : get_userdata(get_query_var('author'));
$userinfo = array(
array('label'=>'Description', 'value'=>$curauth->user_description),
array('label'=>'Website', 'value'=>'<a href="'.$curauth->user_url.'">'.$curauth->user_url.'</a>'),
array('label'=>'E-mail', 'value'=>'<a href="mailto:'.$curauth->user_email.'">'.$curauth->user_email.'</a>'),
array('label'=>'Twitter', 'value'=>'<a href="http://twitter.com/'.$curauth->twitter.'">'.$curauth->twitter.'</a>'),
array('label'=>'Facebook', 'value'=>$curauth->facebook),
array('label'=>'Jabber', 'value'=>$curauth->jabber),
array('label'=>'AIM', 'value'=>$curauth->aim),
);
?>
<article class="panel" id="user">
<div class="avatar" style="float: right;">
<?php echo get_avatar( $curauth->ID, 120 ); ?>
</div>
<header>
<h2><?php echo $curauth->first_name.' '.$curauth->last_name; ?></h2>
</header>
<dl>
<?php foreach($userinfo as $info) { if($info['value']) { ?>
<dt><?php echo $info['label']; ?></dt>
<dd><?php echo $info['value']; ?></dd>
<?php } } ?>
</dl>
<section class="col-1-2">
<h3>Blog</h3>
<ul>
<?php if (have_posts()) { while (have_posts()) { the_post(); ?>
<li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li>
<?php } } ?>
</ul>
</section>
<section class="col-1-2">
<h3>Новини</h3>
<ul>
<?php if (have_posts()) { while (have_posts()) { the_post(); ?>
<li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li>
<?php } } ?>
</ul>
</section>
</article>
<?php get_footer(); ?>