Changeset 2667:ef63c4e390be for plugins/widgets/class.widgets.php
- Timestamp:
- 02/22/14 10:04:16 (11 years ago)
- Branch:
- default
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
plugins/widgets/class.widgets.php
r2662 r2667 187 187 /* Widget rendering tool 188 188 --------------------------------------------------- */ 189 public function renderDiv($content_only,$class,$attr,$content) 190 { 191 if ($content_only) { 192 return $content; 193 } 194 $ret = '<div class="widget'.($class ? ' '.html::escapeHTML($class) : '').'"'.($attr ? ' '.$attr : '').'>'."\n"; 195 $ret .= $content."\n"; 196 $ret .= '</div>'."\n"; 197 198 return $ret; 199 } 200 189 201 public function renderTitle($title) 190 202 { … … 208 220 $ret = sprintf($wtscheme,$title); 209 221 222 return $ret; 223 } 224 225 public function renderSubtitle($title,$render=true) 226 { 227 global $core; 228 229 if (!$title && $render) { 230 return ''; 231 } 232 233 $wtscheme = $core->themes->moduleInfo($core->blog->settings->system->theme,'widgetsubtitleformat'); 234 if (empty($wtscheme)) { 235 $tplset = $core->themes->moduleInfo($core->blog->settings->system->theme,'tplset'); 236 if (empty($tplset) || $tplset == DC_DEFAULT_TPLSET) { 237 // Use H2 for mustek based themes 238 $wtscheme = '<h3>%s</h3>'; 239 } else { 240 // Use H3 for currywurst based themes 241 $wtscheme = '<h4>%s</h4>'; 242 } 243 } 244 if (!$render) { 245 return $wtscheme; 246 } 247 248 $ret = sprintf($wtscheme,$title); 210 249 return $ret; 211 250 }
Note: See TracChangeset
for help on using the changeset viewer.