https://github.com/aaronpk/p3k-core
From 78aea731f5bb2564cffe155c9ac9591ccc43cef4 Mon Sep 17 00:00:00 2001
From: Aaron Parecki <aaron@parecki.com>
Date: Wed, 5 Nov 2014 19:46:01 -0800
Subject: [PATCH] don't include local URL in the h-cite. include a "reposted
___" content in the h-entry so that it's not garbage.
---
src/p3k/HEntry.php | 2 +-
src/p3k/Post/Repost.php | 4 +++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/p3k/HEntry.php b/src/p3k/HEntry.php
index 4ae0f57..3b06686 100644
--- a/src/p3k/HEntry.php
+++ b/src/p3k/HEntry.php
@@ -127,7 +127,7 @@ class HEntry {
<?php endif; ?>
<?php if($repost): ?>
- <a href="<?= $repost->fullURL ?>" class="meta u-url">(reposted on <?= $repost->date->format('F j, Y g:ia T') ?>)</a>
+ <a href="<?= $repost->fullURL ?>" class="meta">(reposted on <?= $repost->date->format('F j, Y g:ia T') ?>)</a>
<?php endif; ?>
</div>
diff --git a/src/p3k/Post/Repost.php b/src/p3k/Post/Repost.php
index 143a03e..e137d81 100644
--- a/src/p3k/Post/Repost.php
+++ b/src/p3k/Post/Repost.php
@@ -91,7 +91,9 @@ class Repost extends \p3k\Post {
$url = $this->meta('repost-of');
$this->loadExternalURL();
if($this->hEntry) {
- return HEntry::renderHEntry($this->hEntry, $url, $this);
+ $html = HEntry::renderHEntry($this->hEntry, $url, $this);
+ $html .= '<span class="e-content p-name" style="display:none;">Reposted <a href="'.$this->meta('repost-of').'">'.$this->meta('repost-of').'</a></span>';
+ return $html;
}
return parent::simpleHTML();
--
1.8.0