Opened 3 years ago
Last modified 4 months ago
#3525 new enhancement
Show custom post types in REST
| Reported by: |
|
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 (9)
@
3 years 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
@
3 years 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.
3 years 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
@
3 years 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.
#4
@
3 years ago
The blocks everywhere plugin adds Gutenberg to the front end, but personally I'd not inflict ugly blocks on users who have no idea about wordpress
20 months ago
#5
Branch restored. PR re-opened. This was accidental.
This PR doesn't need to be rebased to trunk, that'll be done by the committer.
@johnjamesjacoby commented on PR #9:
4 months ago
#6
See #30.
I couldn't apply the patch directly, I couldn't figure out why it was rejecting.