Commit 262e4264 authored by jhodgdon's avatar jhodgdon

Issue #1779120 by TravisCarden: Improve documentation of l function

parent 74f917aa
......@@ -2247,21 +2247,22 @@ function drupal_http_header_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
* "". 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
......@@ -2278,8 +2279,10 @@ function drupal_http_header_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()) {
static $use_theme = NULL;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment