<?php
function authors_block($options)
{
	$mydirname = empty( $options[0] ) ? 'xpress' : $options[0] ;
	$this_template = empty( $options[1] ) ? 'db:'.$mydirname.'_block_authors.html' : trim( $options[1] );
	$optioncount = empty( $options[2] ) ? false : true ;
	$exclude_admin = empty( $options[3] ) ? false : true ;
	$show_fullname = empty( $options[4] ) ? false : true ;
	$hide_empty = empty( $options[5] ) ? false : true ;		
	$mydirpath = get_xpress_dir_path();
	
	ob_start();
//		wp_list_authors($optioncount, $exclude_admin, $show_fullname,$hide_empty);
		list_authors($optioncount, $exclude_admin, $show_fullname,$hide_empty);
		$output=ob_get_contents() ;
	ob_end_clean();
	$output = preg_replace('/<li>/', '' ,$output); // "<li>" is deleted. 
	$output = preg_replace('/<\/li>/', '|' ,$output); // "</li>" replace "|". 
	$output = preg_replace('/\|$/', '' ,$output); // "|" at the end of line is deleted. 

	$authors = explode('|',$output);
	$item_no = 0;
	foreach ($authors as $author){
		$row_data = array(
			'author'		=> $author
		);
		$block['contents']['item'.$item_no] = $row_data;
		$item_no++;
	}
	$block['data_count'] = $item_no;
	
	return $block ;
}
?>