wordpress-activitypub/includes/class-rest-activitypub-webfinger.php

21 lines
479 B
PHP
Raw Normal View History

2018-12-08 00:02:18 +01:00
<?php
class Rest_Activitypub_Webfinger {
/**
* Add WebFinger discovery links
*
* @param array $array the jrd array
* @param string $resource the WebFinger resource
* @param WP_User $user the WordPress user
*/
public static function add_webfinger_discovery( $array, $resource, $user ) {
$array['links'][] = array(
'rel' => 'self',
'type' => 'application/activity+json',
'href' => get_author_posts_url( $user->ID ),
);
return $array;
}
}