diff options
author | Jennifer Hodgdon <yahgrp@poplarware.com> | 2012-09-11 08:46:58 -0700 |
---|---|---|
committer | Jennifer Hodgdon <yahgrp@poplarware.com> | 2012-09-11 08:46:58 -0700 |
commit | a8566322fc84586af7e871243f2a85880cf394b4 (patch) | |
tree | 246e10fc550155a9395ee30dd81a0e10dc826703 /includes | |
parent | 33234ac2df45783eb6d730bb40cda84c250a66fe (diff) | |
download | brdo-a8566322fc84586af7e871243f2a85880cf394b4.tar.gz brdo-a8566322fc84586af7e871243f2a85880cf394b4.tar.bz2 |
Issue #1779120 by TravisCarden: Improve documentation of l function
Diffstat (limited to 'includes')
-rw-r--r-- | includes/common.inc | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/includes/common.inc b/includes/common.inc index ef2cffbb4..d7b413ce9 100644 --- a/includes/common.inc +++ b/includes/common.inc @@ -2359,21 +2359,22 @@ function drupal_attributes(array $attributes = array()) { /** * Formats an internal or external URL link as an HTML anchor tag. * - * This function correctly handles aliased paths, and adds an 'active' class + * This function correctly handles aliased paths and adds an 'active' class * attribute to links that point to the current page (for theming), so all * internal links output by modules should be generated by this function if * possible. * - * @param $text - * The link text for the anchor tag. - * @param $path + * @param string $text + * The translated link text for the anchor tag. + * @param string $path * The internal path or external URL being linked to, such as "node/34" or * "http://example.com/foo". After the url() function is called to construct * the URL from $path and $options, the resulting URL is passed through * check_plain() before it is inserted into the HTML anchor tag, to ensure * well-formed HTML. See url() for more information and notes. * @param array $options - * An associative array of additional options, with the following elements: + * An associative array of additional options. Defaults to an empty array. It + * may contain the following elements. * - 'attributes': An associative array of HTML attributes to apply to the * anchor tag. If element 'class' is included, it must be an array; 'title' * must be a string; other elements are more flexible, as they just need @@ -2389,8 +2390,10 @@ function drupal_attributes(array $attributes = array()) { * well as the path must match). This element is also used by url(). * - Additional $options elements used by the url() function. * - * @return + * @return string * An HTML string containing a link to the given path. + * + * @see url() */ function l($text, $path, array $options = array()) { global $language_url; |