function om_maximenu_link_option in OM Maximenu 8
Same name and namespace in other branches
- 6 inc/om_maximenu.utils.inc \om_maximenu_link_option()
- 7 inc/om_maximenu.utils.inc \om_maximenu_link_option()
Link Options
5 calls to om_maximenu_link_option()
- template_preprocess_om_maximenu_accordion_links in inc/
om_maximenu.render.inc - Process variables for om_maximenu_accordion_links.tpl.php
- template_preprocess_om_maximenu_modal_links in inc/
om_maximenu.render.inc - Process variables for om_maximenu_modal_links.tpl.php
- template_preprocess_om_maximenu_roundabout_links in inc/
om_maximenu.render.inc - Process variables for om_maximenu_roundabout_links.tpl.php
- template_preprocess_om_maximenu_submenu_links in inc/
om_maximenu.render.inc - Process variables for om_maximenu_submenu_links.tpl.php
- template_preprocess_om_maximenu_tabbed_links in inc/
om_maximenu.render.inc - Process variables for om_maximenu_tabbed_links.tpl.php
File
- inc/
om_maximenu.utils.inc, line 50 - OM Maximenu Admin Utilities
Code
function om_maximenu_link_option($content = array()) {
// img hover replacement class
$icon_option = isset($content['icon_option']) && $content['icon_option'] == 1 ? 'class="om-hover"' : '';
// title, icon options
$link_title = stripslashes($content['link_title']);
$link_title_option = $content['link_title_option'];
$link_icon = !empty($content['path_icon']) ? '<img ' . $icon_option . ' src="' . url($content['path_icon']) . '" alt="' . om_string_name($link_title, FALSE) . '" />' : '';
if ($link_title_option == 'title_icon') {
$link_option = $link_icon . ' ' . $link_title;
}
elseif ($link_title_option == 'icon') {
$link_option = $link_icon;
}
else {
$link_option = $link_title;
}
// description as subtitle
$link_subtitle = !empty($content['description']) && $content['description_option'] != 'hover' ? '<span class="om-subtitle">' . check_plain($content['description']) . '</span>' : '';
return $link_option . $link_subtitle;
}