-
Notifications
You must be signed in to change notification settings - Fork 6
mastodon_api_in_reply_to_id
Alex Kirk edited this page Nov 25, 2024
·
3 revisions
Allow modifying the in_reply_to_id before it gets used
For example, this could be a remapped blog id, or a remapped URL.
add_filter(
'mastodon_api_in_reply_to_id',
function (
string $in_reply_to_id,
WP_REST_Request $request
) {
// Your code here
return $in_reply_to_id;
},
10,
2
);
-
string
$in_reply_to_id
The user submitted in_reply_to_id. -
WP_REST_Request
$request
The REST request object.
string
The potentially modified in_reply_to_id.
apply_filters( 'mastodon_api_in_reply_to_id', $request->get_param( 'in_reply_to_id' ), $request )
apply_filters( 'mastodon_api_in_reply_to_id', $request->get_param( 'in_reply_to_id' ), $request )