PluginProbe
ActivityPub / 8.2.1
ActivityPub v8.2.1
9.3.1 9.3.0 9.2.2 9.2.1 9.2.0 9.1.0 9.0.2 9.0.1 9.0.0 8.3.0 8.2.1 8.2.0 8.1.1 1.0.5 1.0.6 1.0.7 1.0.8 1.0.9 1.1.0 1.2.0 1.3.0 2.0.0 2.0.1 2.1.0 2.1.1 All 160 releases
activitypub / templates / activitypub-json.php

activitypub-json.php in ActivityPub 8.2.1, at templates/activitypub-json.php

26 lines 655 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * ActivityPub JSON template.
4 *
5 * @package Activitypub
6 */
7
8 $object = \Activitypub\Query::get_instance()->get_activitypub_object();
9
10 /**
11 * Fires before an ActivityPub object is generated and sent to the client.
12 *
13 * @param object $object The ActivityPub object.
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 object is generated and sent to the client.
22 *
23 * @param object $object The ActivityPub object.
24 */
25 \do_action( 'activitypub_json_post', $object );
26