Elgg  Version master
Variables
url.php File Reference

Go to the source code of this file.

Variables

 $excerpt_length = elgg_extract('excerpt_length', $vars, 100)
 Elgg URL display Displays a URL as a link. More...
 
 $allowed_schemes = elgg_extract('allowed_schemes', $vars, ['http', 'https', 'ftp', 'sftp', 'ssh', 'file', 'mailto', 'tel'])
 
 $url = elgg_extract('href', $vars)
 
if($url===false) if(! $url &&isset($vars['value'])) if(elgg_is_empty($url)) if(isset($vars['text'])) else
 
 $vars ['class'] = elgg_extract_class($vars, 'elgg-anchor')
 
if($icon &&!str_starts_with($icon, '<')) $icon_alt = (string) elgg_extract('icon_alt', $vars)
 
if($icon_alt &&!str_starts_with($icon_alt, '<')) $badge = (string) elgg_extract('badge', $vars)
 
if(!elgg_is_empty($badge)) $classes = elgg_extract_class($vars)
 
if(in_array('elgg-popup', $classes)) if (in_array( 'elgg-toggle', $classes))
 

Variable Documentation

◆ $allowed_schemes

$allowed_schemes = elgg_extract('allowed_schemes', $vars, ['http', 'https', 'ftp', 'sftp', 'ssh', 'file', 'mailto', 'tel'])

Definition at line 41 of file url.php.

◆ $badge

if ( $icon_alt &&!str_starts_with( $icon_alt, '<')) $badge = (string) elgg_extract('badge', $vars)

Definition at line 153 of file url.php.

◆ $classes

if (!elgg_is_empty( $badge)) $classes = elgg_extract_class($vars)

Definition at line 160 of file url.php.

◆ $excerpt_length

$excerpt_length = elgg_extract('excerpt_length', $vars, 100)

Elgg URL display Displays a URL as a link.

@uses string $vars['text'] The HTML between the tags. @uses string $vars['href'] The raw, un-encoded URL. "" = current URL. "/" = site home page. @uses bool $vars['encode_text'] Run $vars['text'] through htmlspecialchars() (false) @uses bool $vars['is_action'] Is this a link to an action (default: false, unless 'confirm' parameter is set) @uses bool $vars['is_trusted'] Is this link trusted (false) @uses mixed $vars['confirm'] Confirmation dialog text | (bool) true Note that if 'confirm' is set to true or a dialog text, 'is_action' parameter will default to true @uses string $vars['icon'] Name of the Elgg icon, or icon HTML, appended before the text label @uses string $vars['icon_alt'] Name of the Elgg icon, or icon HTML, appended after the text label @uses string $vars['badge'] HTML content of the badge appended after the text label @uses int $vars['excerpt_length'] Length of the URL excerpt if text is not given. @uses string[] $vars['allowed_schemes'] An array of strings with the schemes the URL is allowed to have

Definition at line 23 of file url.php.

◆ $icon_alt

if ( $icon &&!str_starts_with( $icon, '<')) $icon_alt = (string) elgg_extract('icon_alt', $vars)

Definition at line 144 of file url.php.

◆ $url

$url = elgg_extract('href', $vars)

Definition at line 48 of file url.php.

◆ $vars

$vars[ 'class'] = elgg_extract_class($vars, 'elgg-anchor')

Definition at line 118 of file url.php.

◆ else

if (!isset( $vars[ 'aria-label']) &&!isset( $vars[ 'aria-labelledby']) &&!isset( $vars[ 'title']) &&empty(elgg_strip_tags((string) $text))) if (!elgg_is_empty( $text)) else
Initial value:
{
$text = htmlspecialchars(elgg_get_excerpt((string) $url, $excerpt_length), ENT_QUOTES, 'UTF-8', false)
$text
Definition: button.php:33
$excerpt_length
Elgg URL display Displays a URL as a link.
Definition: url.php:23
$url
Definition: url.php:48
elgg_get_excerpt(string $text, int $num_chars=250)
Returns an excerpt.
Definition: output.php:83

Definition at line 71 of file url.php.

◆ if

if (in_array( 'elgg-popup', $classes)) if(in_array('elgg-toggle', $classes)) ( in_array( 'elgg-toggle', $classes)  )

Definition at line 165 of file url.php.