| 1 |
<?php |
| 2 |
/** |
| 3 |
* ActivityPub Blog JSON template. |
| 4 |
* |
| 5 |
* @package Activitypub |
| 6 |
*/ |
| 7 |
|
| 8 |
$object = \Activitypub\Query::get_instance()->get_activitypub_object(); |
| 9 |
|
| 10 |
/** |
| 11 |
* Fires before an ActivityPub blog profile is generated and sent to the client. |
| 12 |
* |
| 13 |
* @param int $user_id The ID of the WordPress blog user whose profile is being generated. |
| 14 |
*/ |
| 15 |
\do_action( 'activitypub_json_pre', $object ); |
| 16 |
|
| 17 |
\header( 'Content-Type: application/activity+json' ); |
| 18 |
echo $object->to_json(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped |
| 19 |
|
| 20 |
/** |
| 21 |
* Fires after an ActivityPub blog profile has been generated and sent to the client. |
| 22 |
* |
| 23 |
* @param int $user_id The ID of the WordPress blog user whose profile was generated. |
| 24 |
*/ |
| 25 |
\do_action( 'activitypub_json_post', $object ); |
| 26 |
|