| Line |   | 
|---|
| 1 | <?php
 | 
|---|
| 2 | function 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.