Skip to content

Commit 57c33e5

Browse files
committed
2 parents f412e83 + 0498433 commit 57c33e5

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

activitypub.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,8 @@ function add_rewrite_rules() {
116116
\add_rewrite_rule( '^.well-known/nodeinfo', 'index.php?rest_route=/activitypub/1.0/nodeinfo/discovery', 'top' );
117117
\add_rewrite_rule( '^.well-known/x-nodeinfo2', 'index.php?rest_route=/activitypub/1.0/nodeinfo2', 'top' );
118118
}
119+
120+
\add_rewrite_endpoint( 'activitypub', EP_AUTHORS | EP_PERMALINK | EP_PAGES );
119121
}
120122
\add_action( 'init', '\Activitypub\add_rewrite_rules', 1 );
121123

includes/class-activitypub.php

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ class Activitypub {
1313
public static function init() {
1414
\add_filter( 'template_include', array( '\Activitypub\Activitypub', 'render_json_template' ), 99 );
1515
\add_filter( 'query_vars', array( '\Activitypub\Activitypub', 'add_query_vars' ) );
16-
\add_action( 'init', array( '\Activitypub\Activitypub', 'add_rewrite_endpoint' ) );
1716
\add_filter( 'pre_get_avatar_data', array( '\Activitypub\Activitypub', 'pre_get_avatar_data' ), 11, 2 );
1817

1918
// Add support for ActivityPub to custom post types
@@ -96,13 +95,6 @@ public static function add_query_vars( $vars ) {
9695
return $vars;
9796
}
9897

99-
/**
100-
* Add our rewrite endpoint to permalinks and pages.
101-
*/
102-
public static function add_rewrite_endpoint() {
103-
\add_rewrite_endpoint( 'activitypub', EP_AUTHORS | EP_PERMALINK | EP_PAGES );
104-
}
105-
10698
/**
10799
* Schedule Activities.
108100
*

0 commit comments

Comments
 (0)