Skip to content

Fix incorrect return types in timeline and statuses filter documentation#295

Merged
akirk merged 1 commit intomainfrom
fix/timeline-filter-docblocks
Apr 9, 2026
Merged

Fix incorrect return types in timeline and statuses filter documentation#295
akirk merged 1 commit intomainfrom
fix/timeline-filter-docblocks

Conversation

@akirk
Copy link
Copy Markdown
Owner

@akirk akirk commented Apr 9, 2026

Summary

  • Fixed mastodon_api_timelines, mastodon_api_tag_timeline, mastodon_api_public_timeline, and mastodon_api_statuses filter docblocks: they documented Entity\Status[] / array|null as param/return types but the handlers return WP_REST_Response via get_posts()
  • Added missing docblock to Handler::get_posts() method
  • Added concrete code examples to the three timeline filters that previously had empty Example: blocks
  • Fixed "simeline" typo in api_public_timeline docblock

Test plan

  • Verify the docblock types match what the filter callbacks actually receive and return
  • Review the examples for correctness

The timeline filters (mastodon_api_timelines, mastodon_api_tag_timeline,
mastodon_api_public_timeline) and the mastodon_api_statuses filter were
documented as returning Entity\Status[] but actually return WP_REST_Response
via the get_posts() method. Also adds a missing docblock to get_posts(),
fills in empty code examples, and fixes a "simeline" typo.
@akirk akirk merged commit f4fc76d into main Apr 9, 2026
18 checks passed
@akirk akirk deleted the fix/timeline-filter-docblocks branch April 9, 2026 07:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant