Dotclear


Ignore:
Timestamp:
02/14/14 14:49:43 (11 years ago)
Author:
franck <carnet.franck.paul@…>
Branch:
default
Message:

New rendering method (renderTitle) for widget title, fixes #1827

File:
1 edited

Legend:

Unmodified
Added
Removed
  • plugins/widgets/class.widgets.php

    r2566 r2662  
    185185     } 
    186186 
     187     /* Widget rendering tool 
     188     --------------------------------------------------- */ 
     189     public function renderTitle($title) 
     190     { 
     191          global $core; 
     192 
     193          if (!$title) { 
     194               return ''; 
     195          } 
     196 
     197          $wtscheme = $core->themes->moduleInfo($core->blog->settings->system->theme,'widgettitleformat'); 
     198          if (empty($wtscheme)) { 
     199               $tplset = $core->themes->moduleInfo($core->blog->settings->system->theme,'tplset'); 
     200               if (empty($tplset) || $tplset == DC_DEFAULT_TPLSET) { 
     201                    // Use H2 for mustek based themes 
     202                    $wtscheme = '<h2>%s</h2>'; 
     203               } else { 
     204                    // Use H3 for currywurst based themes 
     205                    $wtscheme = '<h3>%s</h3>'; 
     206               } 
     207          } 
     208          $ret = sprintf($wtscheme,$title); 
     209 
     210          return $ret; 
     211     } 
     212 
    187213     /* Widget settings 
    188214     --------------------------------------------------- */ 
Note: See TracChangeset for help on using the changeset viewer.

Sites map