function fp_render_menu_item

6.x theme.inc fp_render_menu_item($item, $bool_check_user_access = TRUE)
4.x theme.inc fp_render_menu_item($item, $bool_check_user_access = TRUE)
5.x theme.inc fp_render_menu_item($item, $bool_check_user_access = TRUE)
1 call to fp_render_menu_item()
fp_render_menu_block in includes/theme.inc
Render a "menu" block of menu items which are all rooted at the menu_root. So if the menu root is tools, it might return items whose paths look like: tools/fun tools/here/there So long as the menu type is "MENU_TYPE_NORMAL_ITEM". …

File

includes/theme.inc, line 1157

Code

function fp_render_menu_item($item, $bool_check_user_access = TRUE) {
  $rtn = "";

  if ($bool_check_user_access) {
    if (!menu_check_user_access($item)) {
      return "";
    }
  }

  $description = $item ["description"];
  $title = $item ["title"];
  $url = $GLOBALS ["fp_system_settings"]["base_path"] . "/" . $item ["path"];
  $target = $item ["page_settings"]["target"];
  $menu_icon = $item ["page_settings"]["menu_icon"];
  if ($menu_icon != "") {
    $icon_img = "<img src='$menu_icon' border='0'>";
  }
  else {
    $icon_img = "<span class='fp-menu-item-no-icon'></span>";
  }

  if (!$description) {
    $extra_class = "fp-menu-item-tight";
  }

  $rtn .= "<div class='fp-menu-item $extra_class'>
            <div class='fp-menu-item-link-line'>
              <a href='$url' target='$target'>$icon_img $title</a>
            </div>
            ";
  if ($description) {
    $rtn .= " <div class='fp-menu-item-description'>$description</div>";
  }
  $rtn .= "</div>";

  return $rtn;
}