Opened 19 months ago
Last modified 2 weeks ago
#3525 new enhancement
Show custom post types in REST
Reported by: | undemian | Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | normal | Version: | trunk |
Component: | Appearance - Theme Compatibility | Keywords: | has-patch |
Cc: |
Description
Allow custom post types to be available in the block editor via REST api, this should complement the nice work from https://bbpress.trac.wordpress.org/ticket/3487 to make it easier for bbPress to support block themes and full site editing.
Attachments (3)
Change History (8)
@
17 months ago
Since I couldn't get the previous patch to work, I wrote the same code again and created this patch. Now bbPress forum, topic and reply can be edited using Gutenberg block
#1
@
17 months ago
I have tested the changes he made and Forum, Topic, and Reply are editable using Gutenberg editor. It is a good enhancement.
This ticket was mentioned in PR #9 on bbpress/bbPress by @arafatjamil01.
17 months ago
#2
Showing bbPress post types in REST API, to enable editing experience with Gutenberg editor.
Track link:
https://bbpress.trac.wordpress.org/ticket/3525
#3
@
17 months ago
I would argue that this should be optional, so the following filter allows this without affecting the core plugin
<?php add_filter ('bbp_register_forum_post_type', 'rew_gutenberg_editor') ; add_filter ('bbp_register_topic_post_type', 'rew_gutenberg_editor') ; add_filter ('bbp_register_reply_post_type', 'rew_gutenberg_editor') ; function rew_gutenberg_editor ($settings) { $settings['show_in_rest'] = true ; return $settings ; }
Lots of plugins add stuff to the custom post type pages which affects how these metaboxes display, and at best makes them look odd.
But it could be argued that it should be in, with the filter allowing opt-out.
I couldn't apply the patch directly, I couldn't figure out why it was rejecting.