XPressME Integration Kit

Trac

source: trunk/wp-content/themes/xpress_default/blocks/authors_block_theme.php @ 161

Last change on this file since 161 was 161, checked in by toemon, 15 years ago

#95 マルチユーザモード時の投稿者リストに「すべての投稿者」を追加

File size: 1.1 KB
Line 
1<?php
2function authors_block($options)
3{
4        $mydirname = empty( $options[0] ) ? 'xpress' : $options[0] ;
5        $this_template = empty( $options[1] ) ? 'db:'.$mydirname.'_block_authors.html' : trim( $options[1] );
6        $optioncount = empty( $options[2] ) ? false : true ;
7        $exclude_admin = empty( $options[3] ) ? false : true ;
8        $show_fullname = empty( $options[4] ) ? false : true ;
9        $hide_empty = empty( $options[5] ) ? false : true ;             
10        $mydirpath = get_xpress_dir_path();
11       
12        $param = array(
13                'optioncount' => $optioncount,
14                'exclude_admin' => $exclude_admin,
15                'format' => $format,
16                'show_fullname' => $show_fullname,
17                'hide_empty' => $hide_empty,
18                'feed' => '',
19                'feed_image' => ''
20        );
21        ob_start();
22                wp_list_authors($param);
23                $list_authors = ob_get_contents() ;
24        ob_end_clean();
25        if (xpress_is_multi_user()){
26                $all_link = '<li>' . '<a href="' . get_bloginfo('url'). '" title="' . __('All Authors','xpress') . '">' .__('All Authors','xpress') . '</a></li>';
27        } else {
28                $all_link = '';
29        }
30        $output = "<ul>\n" . $all_link . $list_authors . "\n</ul>\n";
31       
32        $block['authors'] = $output;
33       
34        return $block ;
35}
36?>
Note: See TracBrowser for help on using the repository browser.