diff options
Diffstat (limited to 'templates/actor_profile_page.php')
| -rw-r--r-- | templates/actor_profile_page.php | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/templates/actor_profile_page.php b/templates/actor_profile_page.php index dbeb86a..1b2981d 100644 --- a/templates/actor_profile_page.php +++ b/templates/actor_profile_page.php @@ -2,6 +2,10 @@ use Digitigrade\Model\Note; use Digitigrade\Model\UserAccount; +use Digitigrade\UserSettings; + +$lang = get_ui_language(); +$actorUser = UserAccount::findByLinkedActor($actor); call_template('skeleton', [ 'pageTitle' => "$actor->displayName - @" . $actor->getFullHandle(), @@ -10,9 +14,22 @@ call_template('skeleton', [ 'ogDesc' => $actor->bio, 'ogImage' => $actor->avatar ?? path_to_uri('/static/default-avatar.png'), 'ogType' => 'profile', - 'ogHandle' => '@' . $actor->getFullHandle(true) -], function () { - global $actor; + 'ogHandle' => '@' . $actor->getFullHandle(true), + 'headLinks' => ($actorUser != null && (new UserSettings($actorUser))->getBool('profile.rssEnabled')) ? [ + [ + 'rel' => 'alternate', + 'type' => 'application/rss+xml', + 'href' => "/actor/$actor->id/feed/$lang/feed.rss", + 'title' => __('user.profile.feed.rss') + ], + [ + 'rel' => 'alternate', + 'type' => 'application/atom+xml', + 'href' => "/actor/$actor->id/feed/$lang/feed.atom", + 'title' => __('user.profile.feed.atom') + ] + ] : [] +], function () use ($actor) { $user = UserAccount::findByCurrentSession(); call_template('actor_profile', ['actor' => $actor]); |
