20 if (!empty(
$vars[
'confirm']) && !isset(
$vars[
'is_action'])) {
21 $vars[
'is_action'] =
true;
24 if (!empty(
$vars[
'confirm'])) {
28 if (
$vars[
'data-confirm'] ===
true) {
36 unset(
$vars[
'value']);
39 if (isset(
$vars[
'text'])) {
41 $text = htmlspecialchars(
$vars[
'text'], ENT_QUOTES,
'UTF-8',
false);
47 $text = htmlspecialchars(
$url, ENT_QUOTES,
'UTF-8',
false);
50 unset(
$vars[
'encode_text']);
62 if (!isset(
$vars[
'rel'])) {
63 if ($is_trusted === null) {
67 $is_trusted = $url_host == $site_url_host;
69 if ($is_trusted ===
false) {
71 $vars[
'rel'] =
'nofollow';
79 if (!isset(
$vars[
'title']) && isset(
$vars[
'data-confirm'])) {
83 unset(
$vars[
'is_action']);
84 unset(
$vars[
'is_trusted']);
85 unset(
$vars[
'confirm']);
88 echo "<a $attributes>$text</a>";
elgg_add_action_tokens_to_url($url, $html_encode=false)
Adds action tokens to URL.
elgg parse_url
Parse a URL into its parts.
if(!empty($vars['confirm'])&&!isset($vars['is_action'])) if(!empty($vars['confirm'])) $url
elgg_echo($message_key, $args=array(), $language="")
Given a message key, returns an appropriately translated full-text string.
elgg echo
Translates a string.
elgg_get_site_url($site_guid=0)
Get the URL for the current (or specified) site.
elgg_format_attributes(array $attrs=array())
Converts an associative array into a string of well-formed attributes.
elgg_extract($key, $array, $default=null, $strict=true)
Checks for $array[$key] and returns its value if it exists, else returns $default.