22 lines
No EOL
543 B
PHP
22 lines
No EOL
543 B
PHP
<?php defined('KOBLOG') or die('Koblog CMS.');
|
|
|
|
class Social {
|
|
|
|
public $slug;
|
|
public $url;
|
|
public $emoji;
|
|
public $name;
|
|
|
|
function __construct($name, $url)
|
|
{
|
|
$this->name = $name;
|
|
$this->slug = Text::cleanUrl($name);
|
|
$this->emoji = $GLOBALS['SOCIAL_NETWORKS_EMOJI'][$this->slug];
|
|
$this->url = $url;
|
|
}
|
|
|
|
function getLink($useEmoji = false) {
|
|
return "<a href='". $this->url ."' rel='me'>".($useEmoji ? '<span aria-hidden="true">'.$this->emoji."</span>" : ""). " " . $this->name."</a>";
|
|
}
|
|
|
|
} |