XPressME Integration Kit

Trac

source: trunk/wp-content/themes/xpress_default/blocks/search_block_theme.php @ 121

Last change on this file since 121 was 121, checked in by toemon, 16 years ago

ブロックオプションのうち$this_templateをポストしていなかったため、オプション変更時にデータずれが発生するバグを修正

File size: 691 bytes
Line 
1<?php
2
3function search_block($options)
4{
5        $mydirname = empty( $options[0] ) ? 'xpress' : $options[0] ;
6        $this_template = empty( $options[1] ) ? 'db:'.$mydirname.'_block_search.html' : trim( $options[1] );
7        $input_length = empty( $options[2] ) ? '18' : $options[2] ;
8        $mydirpath = get_xpress_dir_path();
9
10        $act_url = get_bloginfo('siteurl');
11        $output  = '<form method="get" id="searchform" action="' . $act_url . '">' ."\n";
12        $output .= '<input type="text" name="s" id="s" size="' . $input_length . '" />' ."\n";
13        $output .= '<input type="submit" id="searchsubmit" value="' . __('Search', 'xpress') . '" />' ."\n";
14        $output .= "</form>\n";
15
16        $block['search'] = $output;
17        return $block ;
18}
19
20?>
Note: See TracBrowser for help on using the repository browser.