Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- * Echo Filtered List
- */
- function filtered_list() {
- $authors = get_users('orderby=nicename');
- $all_authors = array();
- foreach($authors as $author)
- if(count_user_posts($author->id) > 0) {
- array_push($all_authors, $author)
- }
- }
- return $all_authors;
- }
- function contributors() {
- $authors = filtered_list();
- for($i = 0; $i < count($authors); $i++) {
- if ($i == count($authors) - 1) {
- echo "<li class='author-last clearfix'>";
- } else {
- echo "<li class='author clearfix'>";
- }
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement