Skip to content

mastodon_api_status_context

github-actions[bot] edited this page Jul 24, 2026 · 20 revisions

Get the status context (ancestors and descendants).

Auto-generated Example

add_filter(
    'mastodon_api_status_context',
    function (
        array,
        int $context_post_id,
        string $url
    ) {
        // Your code here
        return array;
    },
    10,
    3
);

Parameters

  • array $context The context with 'ancestors' and 'descendants' arrays. Other variable names: $context
  • int $context_post_id The post ID to get context for.
  • string $url The permalink of the post.

Returns

array The context with 'ancestors' and 'descendants' arrays.

Files

apply_filters( 'mastodon_api_status_context', $context, $context_post_id, $url )

Hooks

Clone this wiki locally