Skip to content

feat: support pages and other block-editor post types - #106

Open
onyx-og wants to merge 1 commit into
pento:mainfrom
onyx-og:feat/post-types
Open

onyx-og wants to merge 1 commit into
pento:mainfrom
onyx-og:feat/post-types

Conversation

@onyx-og

@onyx-og onyx-og commented Nov 28, 2026

Copy link
Copy Markdown

Summary

  • Resolve REST API routes from available WordPress post types and support pages and custom block-editor types in the MCP tools.
  • Carry post type metadata through command and collaboration flows so pages can be opened, viewed, listed, and identified correctly.
  • Closes Support all block-editor post types, not just posts #60

Test plan

  • MCP Vitest suite (1,351 tests)
  • Plugin JavaScript tests (471 tests)
  • Plugin PHP tests (155 tests)

Every post request went to /wp/v2/posts, so pages and custom post types
could not be opened, listed, created or viewed.

- Read each post type's REST route from /wp/v2/types on connect
  (rest_namespace + rest_base), falling back to the core post and page
  routes if that request fails.
- Add an optional postType to wp_list_posts, wp_open_post,
  wp_create_post and wp_view_post. Opening or viewing by ID alone tries
  the site's editable types (posts, pages, then custom types) and moves
  on only on a 404.
- Route metadata updates and the post health check through the open
  post's type.
- Include post_type in command objects, so pre-open and channel
  notifications open the right type and the plugin's "Editing: ..."
  title lookup no longer assumes 'post'.
- Show "Type: <slug>" in read output for anything other than posts.

Fixes pento#60
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.

Support all block-editor post types, not just posts

1 participant