Rev | Line | |
---|
[122] | 1 | <?php
|
---|
| 2 |
|
---|
| 3 | function category_block($options)
|
---|
| 4 | {
|
---|
| 5 | $mydirname = empty( $options[0] ) ? 'xpress' : $options[0] ;
|
---|
| 6 | $this_template = empty( $options[1] ) ? 'db:'.$mydirname.'_block_category.html' : trim( $options[1] );
|
---|
| 7 | $show_option_all = empty( $options[2] ) ? '' : $options[2] ;
|
---|
| 8 | $orderby = empty( $options[3] ) ? 'name' : $options[3] ;
|
---|
| 9 | $order = empty( $options[4] ) ? 'ASC' : $options[4] ;
|
---|
| 10 | $show_last_updated = empty( $options[5] ) ? false : true ;
|
---|
| 11 | $show_count = empty( $options[6] ) ? false : true ;
|
---|
| 12 | $hide_empty = empty( $options[7] ) ? false : true ;
|
---|
| 13 | $use_desc_for_title = empty( $options[8] ) ? false : true ;
|
---|
| 14 | $exclude = empty( $options[9] ) ? '' : $options[9] ;
|
---|
| 15 | $includes = empty( $options[10] ) ? '' : $options[10] ;
|
---|
| 16 | $hierarchical = empty( $options[11] ) ? false : true ;
|
---|
| 17 | $depth = !is_numeric( $options[12] ) ? 0 : $options[12] ;
|
---|
| 18 |
|
---|
| 19 | $param = array(
|
---|
| 20 | 'show_option_all' => $show_option_all,
|
---|
| 21 | 'orderby' => $orderby,
|
---|
| 22 | 'order' => $order,
|
---|
| 23 | 'show_last_update' => $show_last_updated,
|
---|
| 24 | 'style' => 'list',
|
---|
| 25 | 'show_count' => $show_count,
|
---|
| 26 | 'hide_empty' => $hide_empty,
|
---|
| 27 | 'use_desc_for_title' => $use_desc_for_title,
|
---|
| 28 | 'child_of' => 0,
|
---|
| 29 | 'feed' => '',
|
---|
| 30 | 'feed_image' => '',
|
---|
| 31 | 'exclude' => $exclude,
|
---|
| 32 | 'include' => $includes,
|
---|
| 33 | 'hierarchical' => $hierarchical,
|
---|
| 34 | 'title_li' => '',
|
---|
| 35 | 'number' => '',
|
---|
| 36 | 'echo' => 0,
|
---|
| 37 | 'depth' => $depth
|
---|
| 38 | );
|
---|
| 39 | $block['categories'] = wp_list_categories($param);
|
---|
| 40 | return $block ;
|
---|
| 41 | }
|
---|
| 42 |
|
---|
| 43 | ?> |
---|
Note: See
TracBrowser
for help on using the repository browser.