22 if (!empty(
$vars[
'confirm']) && !isset(
$vars[
'is_action'])) {
23 $vars[
'is_action'] =
true;
26 if (!empty(
$vars[
'confirm'])) {
30 if (
$vars[
'data-confirm'] ===
true) {
38 unset(
$vars[
'value']);
41 if (isset(
$vars[
'text'])) {
43 $text = htmlspecialchars(
$vars[
'text'], ENT_QUOTES,
'UTF-8',
false);
49 $text = htmlspecialchars(
$url, ENT_QUOTES,
'UTF-8',
false);
52 unset(
$vars[
'encode_text']);
64 if (!isset(
$vars[
'rel'])) {
65 if ($is_trusted === null) {
69 $is_trusted = $url_host == $site_url_host;
71 if ($is_trusted ===
false) {
73 $vars[
'rel'] =
'nofollow';
81 if (!isset(
$vars[
'title']) && isset(
$vars[
'data-confirm'])) {
85 unset(
$vars[
'is_action']);
86 unset(
$vars[
'is_trusted']);
87 unset(
$vars[
'confirm']);
90 echo "<a $attributes>$text</a>";
elgg_add_action_tokens_to_url($url, $html_encode=false)
Adds action tokens to URL.
elgg_echo($message_key, $args=array(), $language="")
Given a message key, returns an appropriately translated full-text string.
elgg parse_url
Parse a URL into its parts.
if(!empty($vars['confirm'])&&!isset($vars['is_action'])) if(!empty($vars['confirm'])) $url
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 HTML/XML attributes Returns a concatenated...
elgg_extract($key, $array, $default=null, $strict=true)
Checks for $array[$key] and returns its value if it exists, else returns $default.