diff options
author | Dries Buytaert <dries@buytaert.net> | 2008-11-02 14:46:57 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2008-11-02 14:46:57 +0000 |
commit | bb5a8e8074dc4cddd0a82269a31f5aec9416da0b (patch) | |
tree | 01aed4f47de23f986eb8c50d90d146a1bea9429d | |
parent | bd22265b458032ad71f22bb471ed69995874d37c (diff) | |
download | brdo-bb5a8e8074dc4cddd0a82269a31f5aec9416da0b.tar.gz brdo-bb5a8e8074dc4cddd0a82269a31f5aec9416da0b.tar.bz2 |
- Patch #272395 by ghoti: improved documentation of theme_links.
-rw-r--r-- | includes/theme.inc | 11 |
1 files changed, 8 insertions, 3 deletions
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 <span> for adding title and class attributes + // Some links are actually not links, but we wrap these in <span> for adding title and class attributes. if (empty($link['html'])) { $link['title'] = check_plain($link['title']); } |