-
Couldn't load subscription status.
- Fork 84
activitypub_pre_http_post
github-actions[bot] edited this page Sep 9, 2025
·
9 revisions
Fires before an HTTP POST request is made.
/**
* Fires before an HTTP POST request is made.
*
* @param string $url
* @param string $body
* @param int $user_id
* @return string The filtered value.
*/
function my_activitypub_pre_http_post_callback( string $url, string $body, int $user_id ) {
// Your code here.
return $url;
}
add_filter( 'activitypub_pre_http_post', 'my_activitypub_pre_http_post_callback', 10, 3 );-
string$urlThe URL endpoint. -
string$bodyThe POST body. -
int$user_idThe WordPress User ID.
\do_action( 'activitypub_pre_http_post', $url, $body, $user_id )Follow @[email protected] for updates and news.