Changeset 2928:0471a74f04ed for plugins
- Timestamp:
- 01/26/15 13:44:21 (11 years ago)
- Branch:
- default
- Location:
- plugins/simpleMenu
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
plugins/simpleMenu/_public.php
r2912 r2928 31 31 $description = isset($attr['description']) ? trim($attr['description']) : ''; 32 32 33 if (!preg_match('#^(title|span )$#',$description)) {33 if (!preg_match('#^(title|span|both|none)$#',$description)) { 34 34 $description = ''; 35 35 } … … 47 47 global $core, $_ctx; 48 48 49 $descr_type = array(0 => 'span',1 => 'title',2 => 'both',3 => 'none'); 50 49 51 if (!(boolean) $core->blog->settings->system->simpleMenu_active) 50 52 return; … … 58 60 } 59 61 60 $menu = tplSimpleMenu::displayMenu('','','title'); 62 $description = 'title'; 63 if (isset($descr_type[$w->description])) { 64 $description = $descr_type[$w->description]; 65 } 66 $menu = tplSimpleMenu::displayMenu('','',$description); 61 67 if ($menu == '') { 62 68 return; … … 107 113 $title = $span = ''; 108 114 if ($m['descr']) { 109 if ($description == 'title' ) {115 if ($description == 'title' || $description == 'both') { 110 116 $title = ' title="'.html::escapeHTML(__($m['descr'])).'"'; 111 } else { 117 } 118 if ($description == 'span' || $description == 'both') { 112 119 $span = ' <span>'.html::escapeHTML(__($m['descr'])).'</span>'; 113 120 } -
plugins/simpleMenu/_widgets.php
r2778 r2928 20 20 $w->create('simplemenu',__('Simple menu'),array('tplSimpleMenu','simpleMenuWidget'),null,'List of simple menu items'); 21 21 $w->simplemenu->setting('title',__('Title (optional)').' :',__('Menu')); 22 $w->simplemenu->setting('description',__('Item description'),0,'combo', 23 array( 24 __('Displayed in link') => 0, // span 25 __('Used as link title') => 1, // title 26 __('Displayed in link and used as title') => 2, // both 27 __('Not displayed nor used') => 3 // none 28 ) 29 ); 22 30 $w->simplemenu->setting('homeonly',__('Display on:'),0,'combo', 23 31 array( … … 26 34 __('Except on home page') => 2 27 35 ) 28 );36 ); 29 37 $w->simplemenu->setting('content_only',__('Content only'),0,'check'); 30 38 $w->simplemenu->setting('class',__('CSS class:'),'');
Note: See TracChangeset
for help on using the changeset viewer.