mirror of
https://github.com/Automattic/wordpress-activitypub
synced 2024-10-18 14:23:31 +00:00
ef666772ec
* PHPCS: Include all files by default * simplify menu highlighting * Update includes/transformer/class-factory.php Co-authored-by: Matthias Pfefferle <pfefferle@users.noreply.github.com> --------- Co-authored-by: Matthias Pfefferle <pfefferle@users.noreply.github.com>
21 lines
627 B
PHP
21 lines
627 B
PHP
<?php
|
|
/**
|
|
* ActivityPub User JSON template.
|
|
*
|
|
* @package Activitypub
|
|
*/
|
|
|
|
$user = \Activitypub\Collection\Users::get_by_id( \get_the_author_meta( 'ID' ) );
|
|
|
|
/**
|
|
* Action triggered prior to the ActivityPub profile being created and sent to the client
|
|
*/
|
|
\do_action( 'activitypub_json_author_pre', $user->get__id() );
|
|
|
|
\header( 'Content-Type: application/activity+json' );
|
|
echo $user->to_json(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
|
|
|
/**
|
|
* Action triggered after the ActivityPub profile has been created and sent to the client
|
|
*/
|
|
\do_action( 'activitypub_json_author_post', $user->get__id() );
|