XPressME Integration Kit

Trac

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

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

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

File size: 469 bytes
Line 
1<?php
2function sidebar_block($options)
3{
4        $templates = array();
5        $templates[] = "sidebar.php";
6        $sidebar_path = locate_template($templates, false);
7        ob_start();
8                require($sidebar_path);
9                $output = ob_get_contents();
10        ob_end_clean();
11        $pattern = '<div\s+id\s*=\s*["\']xpress_sidebar["\']\s*>';
12        $output = preg_replace("/".$pattern."/s" , '<div class="xpress_sidebar_block">' , $output);
13
14        $block['sidebar'] = $output;                                                           
15        return $block ;
16
17}
18
19?>
Note: See TracBrowser for help on using the repository browser.