XPressME Integration Kit

Trac

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

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

WP2011の投稿者ブロックのブロックオプションが無効になるバグ修正 fixes #156

File size: 1.3 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] ) ? 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 ;           
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        $param_str = 'optioncount='. $optioncount . '&exclude_admin=' . $exclude_admin .'&format=' . $format . '&show_fullname='. $show_fullname . '&hide_empty=' . $hide_empty;
22        ob_start();
23//              wp_list_authors($param);
24                wp_list_authors($param_str); //WP2011 wp_list_authors() used only parse_str()
25                $list_authors = ob_get_contents() ;
26        ob_end_clean();
27        if (xpress_is_multi_user()){
28                $all_link = '<li>' . '<a href="' . get_bloginfo('url'). '" title="' . __('All Authors','xpress') . '">' .__('All Authors','xpress') . '</a></li>';
29        } else {
30                $all_link = '';
31        }
32        $output = "<ul>\n" . $all_link . $list_authors . "\n</ul>\n";
33       
34        $block['authors'] = $output;
35       
36        return $block ;
37}
38?>
Note: See TracBrowser for help on using the repository browser.