Changeset 125 for trunk/wp-content/themes
- Timestamp:
- Mar 20, 2009, 12:47:52 PM (16 years ago)
- Location:
- trunk/wp-content/themes/xpress_default
- Files:
-
- 1 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-content/themes/xpress_default/blocks/archives_block_theme.php
r120 r125 4 4 $mydirname = empty( $options[0] ) ? 'xpress' : $options[0] ; 5 5 $this_template = empty( $options[1] ) ? 'db:'.$mydirname.'_archives_block.html' : trim( $options[1] ); 6 $type = empty( $options[2] ) ? false : true;7 $limit = empty( $options[3] ) ? '10': $options[3] ;6 $type = empty( $options[2] ) ? 'monthly' : $options[2] ; 7 $limit = !is_numeric( $options[3] ) ? 0 : $options[3] ; 8 8 $show_post_count = empty( $options[4] ) ? false : true ; 9 9 $drop_down = empty( $options[5] ) ? false : true ; 10 10 11 if ($type) { 12 $type_name = 'monthly'; 11 switch($type){ 12 case 'yearly': 13 $select_str = __('Select Yearly', 'xpress'); 14 break; 15 case 'monthly': 16 $select_str = __('Select Monthly', 'xpress'); 17 break; 18 case 'weekly': 19 $select_str = __('Select Weekly', 'xpress'); 20 break; 21 case 'daily': 22 $select_str = __('Select Daily', 'xpress'); 23 break; 24 case 'postbypost': 25 $select_str = __('Select Post', 'xpress'); 26 break; 27 default: 28 $select_str = __('Select Monthly', 'xpress'); 29 } 30 31 if ($drop_down) $format = 'option'; else $format = 'html'; 32 if ($limit == 0 ) $limit_str = ''; else $limit_str = $limit; 33 34 $param = array( 35 'type' => $type, 36 'limit' => $limit_str, 37 'format' => $format, 38 'before' => '', 39 'after' => '', 40 'show_post_count' => $show_post_count 41 ); 42 43 ob_start(); 44 wp_get_archives($param); 45 $get_archives_output = ob_get_contents(); 46 ob_end_clean(); 47 48 49 if($drop_down){ 50 51 52 $output = '<form id="archiveform" action="">'; 53 $output .= '<select name="archive_chrono" onchange="window.location = (document.forms.archiveform.archive_chrono[document.forms.archiveform.archive_chrono.selectedIndex].value);">'; 54 $output .= "<option value=''>" . $select_str . "</option>\n"; 55 $output .= $get_archives_output; 56 $output .= '</select>'; 57 $output .= '</form>'; 58 59 $output = '<select name="archive-dropdown"' . "onChange='document.location.href=this.options[this.selectedIndex].value;'>\n"; 60 $output .= '<option value="">'.attribute_escape($select_str) . "</option>\n"; 61 $output .= $get_archives_output; 62 $output .= "</select>\n"; 63 13 64 } else { 14 $type_name = 'weekly'; 15 } 16 17 $drop_down_list = '<form id="archiveform" action="">'; 18 $drop_down_list .= '<select name="archive_chrono" onchange="window.location = (document.forms.archiveform.archive_chrono[document.forms.archiveform.archive_chrono.selectedIndex].value);">'; 19 $drop_down_list .= "<option value=''>"; 20 if ($type) { 21 $drop_down_list .= __('Select Monthly', 'xpress'); 22 } else { 23 $drop_down_list .= __('Select Weekly', 'xpress'); 65 $output = "<ul>\n"; 66 $output .= $get_archives_output; 67 $output .= "</ul>\n"; 24 68 } 25 $drop_down_list .= '</option>'; 26 ob_start(); 27 get_archives($type_name,$limit,'option','','',$show_post_count); 28 $drop_down_list .= ob_get_contents(); 29 ob_end_clean(); 30 $drop_down_list .= '</select>'; 31 $drop_down_list .= '</form>'; 32 33 ob_start(); 34 get_archives($type_name,$limit,'custom','','|',$show_post_count); 35 $output = ob_get_contents(); 36 ob_end_clean(); 37 $output = preg_replace('/\|$/', '' ,$output); // "|" at the end of line is deleted. 38 $archives = explode('|',$output); 39 $item_no = 0; 40 foreach ($archives as $archive){ 41 $row_data = array( 42 'archive' => $archive 43 ); 44 $block['contents']['item'.$item_no] = $row_data; 45 $item_no++; 46 } 47 $block['data_count'] = $item_no; 48 $block['config']['is_archive_doropdown'] = $drop_down; 49 $block['archive_dropdown'] = $drop_down_list; 69 $block['archive'] = $output; 50 70 return $block ; 51 71 } -
trunk/wp-content/themes/xpress_default/ja.po
r122 r125 18 18 "Report-Msgid-Bugs-To: wp-polyglots@lists.automattic.com\n" 19 19 "POT-Creation-Date: 2008-08-15 21:16+0900\n" 20 "PO-Revision-Date: 2009-03- 19 16:41+0900\n"20 "PO-Revision-Date: 2009-03-20 12:18+0900\n" 21 21 "Last-Translator: toemon <toychee@toemon.com>\n" 22 22 "Language-Team: toemon <info@toemon.com>\n" … … 654 654 msgstr "この投稿を編集 " 655 655 656 #: xpress_default/blocks/archives_block_theme.php:21 656 #: xpress_default/blocks/archives_block_theme.php:13 657 msgid "Select Yearly" 658 msgstr "年を選択" 659 660 #: xpress_default/blocks/archives_block_theme.php:16 661 #: xpress_default/blocks/archives_block_theme.php:28 657 662 msgid "Select Monthly" 658 663 msgstr "月を選択" 659 664 660 #: xpress_default/blocks/archives_block_theme.php: 23665 #: xpress_default/blocks/archives_block_theme.php:19 661 666 msgid "Select Weekly" 662 667 msgstr "週を選択" 668 669 #: xpress_default/blocks/archives_block_theme.php:22 670 msgid "Select Daily" 671 msgstr "日を選択" 672 673 #: xpress_default/blocks/archives_block_theme.php:25 674 msgid "Select Post" 675 msgstr "記事を選択" 663 676 664 677 #: xpress_default/blocks/calender_block_theme.php:71
Note: See TracChangeset
for help on using the changeset viewer.