forked from christianwach/commentpress-responsive
-
Notifications
You must be signed in to change notification settings - Fork 0
/
group.php
115 lines (52 loc) · 1.24 KB
/
group.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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
<?php
/*
Template Name: Group
*/
// get_users_of_blog() is deprecated in WP 3.1+
if ( version_compare( $wp_version, '3.1', '>=' ) ) {
// set args
$args = array(
'orderby' => 'nicename'
);
// get users of this blog (blog_id is provided by default)
$_users = get_users( $args );
} else {
// get the users of this blog
$_users = get_users_of_blog();
}
?>
<?php get_header(); ?>
<!-- group.php -->
<div id="wrapper">
<div id="main_wrapper" class="clearfix">
<div id="page_wrapper">
<div id="content">
<div class="post">
<h2 class="post_title">Group Members</h2>
<?php
// did we get any?
if ( count( $_users ) > 0 ) {
// open list
echo '<ul id="group_list">'."\n";
// loop
foreach( $_users AS $_user ) {
// exclude admin
if( $_user->user_id != '1' ) {
// open item
echo '<li>'."\n";
// show display name
echo '<a href="'.home_url().'/author/'.$_user->user_login.'/">'.$_user->display_name.'</a>';
// close item
echo '</li>'."\n\n";
}
}
// close list
echo '</ul>'."\n\n";
} ?>
</div><!-- /post -->
</div><!-- /content -->
</div><!-- /page_wrapper -->
</div><!-- /main_wrapper -->
</div><!-- /wrapper -->
<?php get_sidebar(); ?>
<?php get_footer(); ?>