Changeset 339 for trunk/xpressme_integration_kit/wp-content
- Timestamp:
- Jul 15, 2009, 12:58:34 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/widget_block_theme.php
r252 r339 4 4 $mydirname = empty( $options[0] ) ? 'xpress' : $options[0] ; 5 5 $this_template = empty( $options[1] ) ? 'db:'.$mydirname.'_block_widget.html' : trim( $options[1] ); 6 $selected = array_slice($options,2); // get allowed cats 6 $title_show = empty( $options[2] ) ? false : true ; 7 $selected = array_slice($options,3); // get allowed cats 7 8 8 9 $output = ''; … … 17 18 ob_end_clean(); 18 19 } 19 // if (count($selected) > 1) 20 $block['widget'] = "<ul>\n" . $output . "\n</ul>\n"; 21 // else 22 // $block['widget'] = $output; 20 if (count($selected) > 1){ 21 $output = "<ul>\n" . $output . "\n</ul>\n"; 22 } else { 23 if(!$title_show){ 24 $del_pattern = '<[^>]*class\s*=\s*[\'|"]widgettitle[\'|"]\s*>[^<]*<\/[^>]*>'; 25 $output = preg_replace('/' . $del_pattern . '/', '', $output); 26 } 27 if (preg_match('/^<li[^>]*>.*<\/li>$/s',$output)){ 28 $output = preg_replace('/^<li[^>]*>/', '', $output); 29 $output = preg_replace('/<\/li>$/', '', $output); 30 } 31 } 32 $block['widget'] = $output; 23 33 return $block ; 24 34 }
Note: See TracChangeset
for help on using the changeset viewer.