Skip to:
Content

bbPress.org

Opened 13 months ago

Last modified 13 days ago

#3525 new enhancement

Show custom post types in REST

Reported by: undemian's profile 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)

show_in_rest.patch (704 bytes) - added by undemian 13 months ago.
rejected_patch.jpg (79.7 KB) - added by arafatjamil01 11 months ago.
I couldn't apply the patch directly, I couldn't figure out why it was rejecting.
3525.1_show_in_rest.patch (720 bytes) - added by arafatjamil01 11 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

Download all attachments as: .zip

Change History (7)

@arafatjamil01
11 months ago

I couldn't apply the patch directly, I couldn't figure out why it was rejecting.

@arafatjamil01
11 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 @arafatjamil01
11 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.


11 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 @Robin W
11 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.

Last edited 11 months ago by Robin W (previous) (diff)

#4 @Robin W
11 months 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

Note: See TracTickets for help on using tickets.