diff --git a/activitypub.php b/activitypub.php index 08bf607..547c188 100644 --- a/activitypub.php +++ b/activitypub.php @@ -19,13 +19,15 @@ function activitypub_init() { require_once dirname( __FILE__ ) . '/includes/functions.php'; require_once dirname( __FILE__ ) . '/includes/class-activitypub.php'; - add_filter( 'template_include', array( 'Activitypub', 'render_profile' ), 99 ); + add_filter( 'template_include', array( 'Activitypub', 'render_json_template' ), 99 ); add_action( 'webfinger_user_data', array( 'Activitypub', 'add_webfinger_discovery' ), 10, 3 ); add_filter( 'query_vars', array( 'Activitypub', 'add_query_vars' ) ); add_action( 'init', array( 'Activitypub', 'add_rewrite_endpoint' ) ); require_once dirname( __FILE__ ) . '/includes/class-activitypub-outbox.php'; + require_once dirname( __FILE__ ) . '/includes/class-activitypub-inbox.php'; // Configure the REST API route add_action( 'rest_api_init', array( 'Activitypub_Outbox', 'register_routes' ) ); + add_action( 'rest_api_init', array( 'Activitypub_Inbox', 'register_routes' ) ); } add_action( 'plugins_loaded', 'activitypub_init' );