Last change
on this file since 383 was
360,
checked in by toemon, 15 years ago
|
WP2.1.3MEへの対応 fixed #199
但しWP2.1.3ME自体のバグ(MySQL4.1以上でEUC-JPを使用したときの文字化け)があるので注意
|
File size:
1.4 KB
|
Rev | Line | |
---|
[110] | 1 | <?php
|
---|
| 2 | function authors_block($options)
|
---|
| 3 | {
|
---|
| 4 | $mydirname = empty( $options[0] ) ? 'xpress' : $options[0] ;
|
---|
[120] | 5 | $this_template = empty( $options[1] ) ? 'db:'.$mydirname.'_block_authors.html' : trim( $options[1] );
|
---|
[284] | 6 | $optioncount = empty( $options[2] ) ? 0 : 1 ;
|
---|
| 7 | $exclude_admin = empty( $options[3] ) ? 0 : 1 ;
|
---|
| 8 | $show_fullname = empty( $options[4] ) ? 0 : 1 ;
|
---|
| 9 | $hide_empty = empty( $options[5] ) ? 0 : 1 ;
|
---|
[110] | 10 | $mydirpath = get_xpress_dir_path();
|
---|
| 11 |
|
---|
[360] | 12 | if(xpress_is_wp_version('<','2.3') ){
|
---|
[292] | 13 | $param_str = 'optioncount='. $optioncount . '&exclude_admin=' . $exclude_admin .'&show_fullname='. $show_fullname . '&hide_empty=' . $hide_empty;
|
---|
| 14 | ob_start();
|
---|
| 15 | wp_list_authors($param_str); //WP2011 wp_list_authors() used only parse_str()
|
---|
| 16 | $list_authors = ob_get_contents() ;
|
---|
| 17 | ob_end_clean();
|
---|
| 18 | } else {
|
---|
| 19 | $param = array(
|
---|
| 20 | 'optioncount' => $optioncount,
|
---|
| 21 | 'exclude_admin' => $exclude_admin,
|
---|
| 22 | 'show_fullname' => $show_fullname,
|
---|
| 23 | 'hide_empty' => $hide_empty,
|
---|
| 24 | 'feed' => '',
|
---|
| 25 | 'feed_image' => '',
|
---|
| 26 | 'echo' => false
|
---|
| 27 | );
|
---|
| 28 | $list_authors = wp_list_authors($param);
|
---|
| 29 | }
|
---|
[161] | 30 | if (xpress_is_multi_user()){
|
---|
| 31 | $all_link = '<li>' . '<a href="' . get_bloginfo('url'). '" title="' . __('All Authors','xpress') . '">' .__('All Authors','xpress') . '</a></li>';
|
---|
| 32 | } else {
|
---|
| 33 | $all_link = '';
|
---|
| 34 | }
|
---|
| 35 | $output = "<ul>\n" . $all_link . $list_authors . "\n</ul>\n";
|
---|
[110] | 36 |
|
---|
[126] | 37 | $block['authors'] = $output;
|
---|
| 38 |
|
---|
[110] | 39 | return $block ;
|
---|
| 40 | }
|
---|
| 41 | ?> |
---|
Note: See
TracBrowser
for help on using the repository browser.