wordpress-activitypub/includes/class-handler.php
Konstantin Obenland 00a57c39a4
PHPCS: Enable Commenting sniff (#925)
* PHPCS: Enable Commenting sniff

* Apply suggestions from code review

Co-authored-by: Matthias Pfefferle <pfefferle@users.noreply.github.com>

* Fix param alignment.

---------

Co-authored-by: Matthias Pfefferle <pfefferle@users.noreply.github.com>
2024-10-07 13:25:51 +02:00

51 lines
856 B
PHP

<?php
/**
* Handler class.
*
* @package Activitypub
*/
namespace Activitypub;
use Activitypub\Handler\Announce;
use Activitypub\Handler\Create;
use Activitypub\Handler\Delete;
use Activitypub\Handler\Follow;
use Activitypub\Handler\Like;
use Activitypub\Handler\Undo;
use Activitypub\Handler\Update;
/**
* Handler class.
*/
class Handler {
/**
* Initialize the class, registering WordPress hooks.
*/
public static function init() {
self::register_handlers();
}
/**
* Register handlers.
*/
public static function register_handlers() {
Announce::init();
Create::init();
Delete::init();
Follow::init();
Undo::init();
Update::init();
if ( ! ACTIVITYPUB_DISABLE_REACTIONS ) {
Like::init();
}
/**
* Register additional handlers.
*
* @since 1.3.0
*/
do_action( 'activitypub_register_handlers' );
}
}