Mark up link to original as a repost for repeats

http://indiewebcamp.com/repost
This commit is contained in:
Stephen Paul Weber 2015-10-23 19:00:08 +00:00
parent 0ba53edd96
commit 033ed7e4aa

View File

@ -516,6 +516,19 @@ class NoticeListItem extends Widget
if (!$this->notice->isLocal()) { if (!$this->notice->isLocal()) {
$class .= ' external'; $class .= ' external';
} }
try {
if($this->repeat) {
$this->out->element('a',
array('href' => $this->repeat->getUrl(),
'class' => 'u-url'),
'');
$class = str_replace('u-url', 'u-repost-of', $class);
}
} catch (InvalidUrlException $e) {
// no permalink available
}
try { try {
$this->out->element('a', $this->out->element('a',
array('href' => $this->notice->getUrl(), array('href' => $this->notice->getUrl(),