From 4d07955c7563de3797513a15023b8370ad4b6830 Mon Sep 17 00:00:00 2001 From: Matthias Pfefferle Date: Sun, 24 Feb 2019 12:27:26 +0100 Subject: [PATCH] still refactoring --- activitypub.php | 6 ------ includes/class-activitypub.php | 6 ++++++ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/activitypub.php b/activitypub.php index 8b6a12a..a6487ab 100644 --- a/activitypub.php +++ b/activitypub.php @@ -47,12 +47,6 @@ function init() { require_once dirname( __FILE__ ) . '/includes/rest/class-nodeinfo.php'; \Activitypub\Rest\NodeInfo::init(); - add_post_type_support( 'post', 'activitypub' ); - add_post_type_support( 'page', 'activitypub' ); - - $post_types = get_post_types_by_support( 'activitypub' ); - add_action( 'transition_post_status', array( '\Activitypub\Activitypub', 'schedule_post_activity' ), 10, 3 ); - require_once dirname( __FILE__ ) . '/includes/class-admin.php'; \Activitypub\Admin::init(); diff --git a/includes/class-activitypub.php b/includes/class-activitypub.php index de4d35a..ca3edcb 100644 --- a/includes/class-activitypub.php +++ b/includes/class-activitypub.php @@ -12,6 +12,12 @@ class Activitypub { add_filter( 'query_vars', array( '\Activitypub\Activitypub', 'add_query_vars' ) ); add_action( 'init', array( '\Activitypub\Activitypub', 'add_rewrite_endpoint' ) ); add_filter( 'pre_get_avatar_data', array( '\Activitypub\Activitypub', 'pre_get_avatar_data' ), 11, 2 ); + + add_post_type_support( 'post', 'activitypub' ); + add_post_type_support( 'page', 'activitypub' ); + + $post_types = get_post_types_by_support( 'activitypub' ); + add_action( 'transition_post_status', array( '\Activitypub\Activitypub', 'schedule_post_activity' ), 10, 3 ); } /** * Return a AS2 JSON version of an author, post or page