wordpress-activitypub/templates/blog-json.php
Matthias Pfefferle 3fde5bbe96
Improve lemmy compatibility (#752)
* improve lemmy compatibility

* simplify code

* fix tests

* use string instead of array

* use `actors` instead of `users`

* optimize ID generation

* update ID

* the #threadiverse needs Announces for everything! :)

* change to full Announce Object

* fix indents
2024-05-16 17:30:08 +02:00

15 lines
509 B
PHP

<?php
$user = new \Activitypub\Model\Blog();
/*
* Action triggerd 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 triggerd after the ActivityPub profile has been created and sent to the client
*/
\do_action( 'activitypub_json_author_post', $user->get__id() );