From bb5a8e8074dc4cddd0a82269a31f5aec9416da0b Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Sun, 2 Nov 2008 14:46:57 +0000 Subject: - Patch #272395 by ghoti: improved documentation of theme_links. --- includes/theme.inc | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'includes') diff --git a/includes/theme.inc b/includes/theme.inc index ac6f95580..5a5c4d3fa 100644 --- a/includes/theme.inc +++ b/includes/theme.inc @@ -1122,9 +1122,14 @@ function theme_status_messages($display = NULL) { * Return a themed set of links. * * @param $links - * A keyed array of links to be themed. + * A keyed array of links to be themed. The key for each link is used as its css class. + * Each link should be itself an array, with the following keys: + * - title: the link text + * - href: the link URL. If omitted, the 'title' is shown as a plain text item in the links list. + * - html: (optional) set this to TRUE if 'title' is HTML so it will be escaped. + * Array items are passed on to the l() function's $options parameter when creating the link. * @param $attributes - * A keyed array of attributes + * A keyed array of attributes. * @return * A string containing an unordered list of links. */ @@ -1157,7 +1162,7 @@ function theme_links($links, $attributes = array('class' => 'links')) { $output .= l($link['title'], $link['href'], $link); } elseif (!empty($link['title'])) { - // Some links are actually not links, but we wrap these in for adding title and class attributes + // Some links are actually not links, but we wrap these in for adding title and class attributes. if (empty($link['html'])) { $link['title'] = check_plain($link['title']); } -- cgit v1.2.3