Skip to content

Commit bd6de83

Browse files
authored
Merge pull request #123 from pfefferle/pfefferle-patch-1
Add missing `author_id` to actions and filters
2 parents 51a3745 + ae8d511 commit bd6de83

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

templates/author-json.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,12 +82,12 @@
8282
*/
8383

8484
// filter output
85-
$json = \apply_filters( 'activitypub_json_author_array', $json );
85+
$json = \apply_filters( 'activitypub_json_author_array', $json, $author_id );
8686

8787
/*
8888
* Action triggerd prior to the ActivityPub profile being created and sent to the client
8989
*/
90-
\do_action( 'activitypub_json_author_pre' );
90+
\do_action( 'activitypub_json_author_pre', $author_id );
9191

9292
$options = 0;
9393
// JSON_PRETTY_PRINT added in PHP 5.4
@@ -102,12 +102,12 @@
102102
*
103103
* @param int $options The current options flags
104104
*/
105-
$options = \apply_filters( 'activitypub_json_author_options', $options );
105+
$options = \apply_filters( 'activitypub_json_author_options', $options, $author_id );
106106

107107
\header( 'Content-Type: application/activity+json' );
108108
echo \wp_json_encode( $json, $options );
109109

110110
/*
111111
* Action triggerd after the ActivityPub profile has been created and sent to the client
112112
*/
113-
\do_action( 'activitypub_json_author_post' );
113+
\do_action( 'activitypub_json_author_post', $author_id );

0 commit comments

Comments
 (0)