Skip to content

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.

Auto-generated Example

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
);

Parameters

  • string $in_reply_to_id The user submitted in_reply_to_id.
  • WP_REST_Request $request The REST request object.

Returns

string The potentially modified in_reply_to_id.

Files

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 )

Hooks

Clone this wiki locally