diff options
Diffstat (limited to 'includes/common.inc')
-rw-r--r-- | includes/common.inc | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/includes/common.inc b/includes/common.inc index 8276576e0..39836589f 100644 --- a/includes/common.inc +++ b/includes/common.inc @@ -2379,6 +2379,14 @@ function drupal_attributes(array $attributes = array()) { * internal links output by modules should be generated by this function if * possible. * + * However, for links enclosed in translatable text you should use t() and + * embed the HTML anchor tag directly in the translated string. For example: + * @code + * t('Visit the <a href="@url">settings</a> page', array('@url' => url('admin'))); + * @endcode + * This keeps the context of the link title ('settings' in the example) for + * translators. + * * @param string $text * The translated link text for the anchor tag. * @param string $path @@ -5038,6 +5046,11 @@ function drupal_get_private_key() { * * @param $value * An additional value to base the token on. + * + * @return string + * A 43-character URL-safe token for validation, based on the user session ID, + * the global $drupal_hash_salt variable from settings.php, and the + * 'drupal_private_key' configuration variable. */ function drupal_get_token($value = '') { return drupal_hmac_base64($value, session_id() . drupal_get_private_key() . drupal_get_hash_salt()); |