XPressME Integration Kit

Trac

source: trunk/wp-content/themes/xpress_mu_home/blocks/tag_cloud_block_theme.php @ 213

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

WordPressMU時、メイン homeテーマ追加

File size: 1.1 KB
Line 
1<?php
2function tag_cloud_block($options)
3{
4        $mydirname = empty( $options[0] ) ? 'xpress' : $options[0] ;
5        $this_template = empty( $options[1] ) ? 'db:'.$mydirname.'_block_meta.html' : trim( $options[1]);
6        $smallest = !is_numeric( $options[2] ) ? 8 : $options[2] ;
7        $largest = !is_numeric( $options[3] ) ? 22 : $options[3] ;
8        $unit = empty( $options[4] ) ? 'pt' : $options[4] ;
9        $number = !is_numeric( $options[5] ) ? 45 : $options[5] ;
10        $format = empty( $options[6] ) ? 'flat' : $options[6] ;
11        $orderby = empty( $options[7] ) ? 'name' : $options[7] ;
12        $order = empty( $options[8] ) ? 'ASC' : $options[8] ;
13        $exclude = is_null( $options[9] ) ? '' : $options[9] ;
14        $wp_include = is_null( $options[10] ) ? '' : $options[10] ;
15       
16        $param=array(
17                'smallest' => $smallest,
18                'largest' => $largest,
19                'unit' => $unit,
20                'number' => $number,
21                'format' => $format,
22                'orderby' => $orderby,
23                'order' => $order,
24                'exclude' => $exclude,
25                'include' => $wp_include
26        );
27        ob_start();
28                wp_tag_cloud($param);
29                $output = ob_get_contents();
30        ob_end_clean();
31
32        $block['tag_cloud'] = $output;                                                         
33        return $block ;
34}
35?>
Note: See TracBrowser for help on using the repository browser.