24 unset(
$vars[
'excerpt_length']);
26 if (!empty(
$vars[
'confirm']) && !isset(
$vars[
'is_action'])) {
27 $vars[
'is_action'] =
true;
30 if (!empty(
$vars[
'confirm'])) {
34 if (
$vars[
'data-confirm'] ===
true) {
39 unset(
$vars[
'confirm']);
46 unset(
$vars[
'allowed_schemes']);
50 $url =
'javascript:void(0);';
56 unset(
$vars[
'value']);
63 if (isset(
$vars[
'text'])) {
65 $text = htmlspecialchars(
$vars[
'text'], ENT_QUOTES,
'UTF-8',
false);
75 unset(
$vars[
'encode_text']);
83 $url =
"denied:{$url}";
93 if (!isset(
$vars[
'rel'])) {
94 if ($is_trusted === null) {
98 $is_trusted = $url_host == $site_url_host;
101 if ($is_trusted ===
false) {
103 $vars[
'rel'] =
'nofollow';
111 if (!isset(
$vars[
'title']) && isset(
$vars[
'data-confirm'])) {
115 unset(
$vars[
'is_action']);
116 unset(
$vars[
'is_trusted']);
122 'class' =>
'elgg-anchor-label',
127 unset(
$vars[
'icon']);
131 'class' =>
'elgg-anchor-icon',
136 unset(
$vars[
'icon_alt']);
140 'class' =>
'elgg-anchor-icon-alt',
145 unset(
$vars[
'badge']);
152 if (in_array(
'elgg-popup',
$classes)) {
if($text!==false &&$text!== '') $icon
if($icon &&!str_starts_with($icon, '<')) $icon_alt
elgg_get_excerpt(string $text, int $num_chars=250)
Returns an excerpt.
elgg_add_action_tokens_to_url(string $url, bool $html_encode=false)
Adds action tokens to URL.
elgg_echo(string $message_key, array $args=[], string $language= '')
Elgg language module Functions to manage language and translations.
$excerpt_length
Elgg URL display Displays a URL as a link.
elgg parse_url
Parse a URL into its parts.
elgg_extract_class(array $array, $existing=[], $extract_key= 'class')
Extract class names from an array, optionally merging into a preexisting set.
elgg_extract($key, $array, $default=null, bool $strict=true)
Checks for $array[$key] and returns its value if it exists, else returns $default.
if(!is_null($badge)) $classes
elgg_get_site_url()
Get the URL for the current (or specified) site, ending with "/".
elgg_view_icon(string $name, array $vars=[])
View an icon glyph.
if($icon_alt &&!str_starts_with($icon_alt, '<')) $badge
elgg_format_element(string $tag_name, array $attributes=[], string $text= '', array $options=[])
Format an HTML element.
elgg_normalize_url(string $url)
elgg_require_js(string $name)
Request that Elgg load an AMD module onto the page.