Skip to content
Snippets Groups Projects
Commit 99777ead authored by Jennifer Hodgdon's avatar Jennifer Hodgdon
Browse files

Issue #1596598 by mr.baileys: Fix up documentation of drupal_goto()

parent 5f93c263
No related branches found
No related tags found
No related merge requests found
......@@ -296,14 +296,16 @@ function drupal_get_destination() {
* statement in your menu callback.
*
* @param $path
* A Drupal path or a full URL.
* (optional) A Drupal path or a full URL, which will be passed to url() to
* compute the redirect for the URL.
* @param $query
* A URL-encoded query string to append to the link, or an array of query
* key/value-pairs without any URL-encoding. Passed to url().
* (optional) A URL-encoded query string to append to the link, or an array of
* query key/value-pairs without any URL-encoding. Passed to url().
* @param $fragment
* A destination fragment identifier (named anchor).
* (optional) A destination fragment identifier (named anchor).
* @param $http_response_code
* Valid values for an actual "goto" as per RFC 2616 section 10.3 are:
* (optional) The HTTP status code to use for the redirection, defaults to
* 302. Valid values for an actual "goto" as per RFC 2616 section 10.3 are:
* - 301 Moved Permanently (the recommended value for most redirects)
* - 302 Found (default in Drupal and PHP, sometimes used for spamming search
* engines)
......@@ -1423,8 +1425,9 @@ function format_date($timestamp, $type = 'medium', $format = '', $timezone = NUL
* alternative than url().
*
* @param $path
* The internal path or external URL being linked to, such as "node/34" or
* "http://example.com/foo". A few notes:
* (optional) The internal path or external URL being linked to, such as
* "node/34" or "http://example.com/foo". The default value is equivalent to
* passing in '<front>'. A few notes:
* - If you provide a full URL, it will be considered an external URL.
* - If you provide only the path (e.g. "node/34"), it will be
* considered an internal link. In this case, it should be a system URL,
......@@ -1440,7 +1443,8 @@ function format_date($timestamp, $type = 'medium', $format = '', $timezone = NUL
* include them in $path, or use $options['query'] to let this function
* URL encode them.
* @param $options
* An associative array of additional options, with the following elements:
* (optional) An associative array of additional options, with the following
* elements:
* - 'query': A URL-encoded query string to append to the link, or an array of
* query key/value-pairs without any URL-encoding.
* - 'fragment': A fragment identifier (named anchor) to append to the URL.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment