You are here

function jquerymenu_edit_box in JQuery menu 7.3

Same name and namespace in other branches
  1. 7.4 jquerymenu.module \jquerymenu_edit_box()

Render edit link for a menu item.

1 call to jquerymenu_edit_box()
theme_jquerymenu_links in ./jquerymenu.module
Render a single link, possibly with open/close link and/or edit button.

File

./jquerymenu.module, line 471
The jQuerymenu module parses hierarchical link arrays and renders them as click and expand menu blocks.

Code

function jquerymenu_edit_box($edit_path, $edit_title = NULL) {
  $options['html'] = TRUE;
  if (!empty($edit_title)) {
    $options['attributes']['title'] = $edit_title;
  }
  else {
    $options['attributes']['title'] = t('Edit');
  }
  $path = base_path() . drupal_get_path('module', 'jquerymenu');
  $editimage = '<img src="' . $path . '/images/edit.png" alt="edit menu" />';
  return '<span class="jquerymenu_link_edit">' . l($editimage, $edit_path, $options) . '</span>';
}