Changeset 3583:d1b90256107c for plugins/simpleMenu
- Timestamp:
- 09/03/17 19:50:53 (8 years ago)
- Branch:
- allow-target-blank-simpleMenu
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
plugins/simpleMenu/_public.php
r3582 r3583 101 101 $href = html::escapeHTML($href); 102 102 103 $targetBlank = ((isset($m['targetBlank'])) && ($m['targetBlank']))? true:false; 104 103 105 # Active item test 104 106 $active = false; … … 110 112 } 111 113 $title = $span = ''; 114 112 115 if ($m['descr']) { 113 if ($description == 'title' || $description == 'both') { 116 if (($description == 'title' || $description == 'both') && $targetBlank) { 117 $title = ' title="'.html::escapeHTML(__($m['descr'])).' ('. 118 __("the link will open a new window").')"'; 119 }elseif($description == 'title' || $description == 'both'){ 114 120 $title = ' title="'.html::escapeHTML(__($m['descr'])).'"'; 115 121 } … … 118 124 } 119 125 } 126 127 if( empty($title) && $targetBlank){ 128 $title = ' title="'.__("the link will open a new window").'"'; 129 } 130 120 131 $label = html::escapeHTML(__($m['label'])); 121 132 … … 139 150 '">'. 140 151 '<a href="'.$href.'"'.$item['title']. 141 ((isset($m['targetBlank']) && ($m['targetBlank'])) ? 142 'target="_blank" title="'.__("the link will open a new window").'"' 143 : '').'>'. 152 (($targetBlank) ? 'target="_blank"': '').'>'. 144 153 '<span class="simple-menu-label">'.$item['label'].'</span>'. 145 154 $item['span'].'</a>'.
Note: See TracChangeset
for help on using the changeset viewer.