PluginProbe
ActivityPub / 3.2.2
ActivityPub v3.2.2
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
← All changes | includes/class-handler.php +19 -50 9.2.13.2.2 View file →
@@ -1,12 +1,14 @@
1 1 <?php
2 -/**
3 - * Handler class.
4 - *
5 - * @package Activitypub
6 - */
2 +namespace Activitypub;
7 3
8 -namespace Activitypub;
4 +use Activitypub\Handler\Announce;
5 +use Activitypub\Handler\Create;
6 +use Activitypub\Handler\Delete;
7 +use Activitypub\Handler\Follow;
8 +use Activitypub\Handler\Like;
9 +use Activitypub\Handler\Undo;
10 +use Activitypub\Handler\Update;
9 11
10 12 /**
11 13 * Handler class.
12 14 */
@@ -11,13 +13,12 @@
11 13 * Handler class.
12 14 */
13 15 class Handler {
14 16 /**
15 - * Initialize the class, registering WordPress hooks.
17 + * Initialize the class, registering WordPress hooks
16 18 */
17 19 public static function init() {
18 20 self::register_handlers();
19 - self::register_outbox_handlers();
20 21 }
21 22
22 23 /**
23 24 * Register handlers.
@@ -22,50 +23,18 @@
22 23 /**
23 24 * Register handlers.
24 25 */
25 26 public static function register_handlers() {
26 - Handler\Accept::init();
27 - Handler\Announce::init();
28 - Handler\Collection_Sync::init();
29 - Handler\Create::init();
30 - Handler\Delete::init();
31 - Handler\Feature_Request::init();
32 - Handler\Follow::init();
33 - Handler\Like::init();
34 - Handler\Move::init();
35 - Handler\Quote_Request::init();
36 - Handler\Reject::init();
37 - Handler\Undo::init();
38 - Handler\Update::init();
27 + Announce::init();
28 + Create::init();
29 + Delete::init();
30 + Follow::init();
31 + Undo::init();
32 + Update::init();
39 33
40 - /**
41 - * Register additional handlers.
42 - *
43 - * @since 1.3.0
44 - */
45 - \do_action( 'activitypub_register_handlers' );
46 - }
34 + if ( ! ACTIVITYPUB_DISABLE_REACTIONS ) {
35 + Like::init();
36 + }
47 37
48 - /**
49 - * Register outbox handlers.
50 - */
51 - public static function register_outbox_handlers() {
52 - Handler\Outbox\Add::init();
53 - Handler\Outbox\Announce::init();
54 - Handler\Outbox\Arrive::init();
55 - Handler\Outbox\Block::init();
56 - Handler\Outbox\Create::init();
57 - Handler\Outbox\Delete::init();
58 - Handler\Outbox\Follow::init();
59 - Handler\Outbox\Like::init();
60 - Handler\Outbox\Remove::init();
61 - Handler\Outbox\Undo::init();
62 - Handler\Outbox\Update::init();
63 -
64 - /**
65 - * Register additional outbox handlers.
66 - *
67 - * @since 8.1.0
68 - */
69 - \do_action( 'activitypub_register_outbox_handlers' );
38 + do_action( 'activitypub_register_handlers' );
70 39 }
71 40 }