# activitypub/3.2.2/templates/blog-json.php

ActivityPub, version 3.2.2. 16 lines.

- Page: https://pluginprobe.com/plugins/activitypub/3.2.2/code/templates/blog-json.php
- Raw: https://pluginprobe.com/plugins/activitypub/3.2.2/raw/templates/blog-json.php
- Modified: 2024-06-05T13:38:00+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/activitypub/3.2.2/code/templates/blog-json.php#L10-L20`.

```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() );

```
