theme_menu_local_action

Versions
7
theme_menu_local_action($variables)

Generate the HTML output for a single local action link.

Parameters

$variables An associative array containing:

  • #link: A menu link array with 'title', 'href', and 'localized_options' keys.

Related topics

Code

includes/menu.inc, line 1446

<?php
function theme_menu_local_action($variables) {
  $link = $variables['element']['#link'];

  $output = '<li>';
  if (isset($link['href'])) {
    $output .= l($link['title'], $link['href'], isset($link['localized_options']) ? $link['localized_options'] : array());
  }
  elseif (!empty($link['localized_options']['html'])) {
    $output .= $link['title'];
  }
  else {
    $output .= check_plain($link['title']);
  }
  $output .= "</li>\n";

  return $output;
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.