WordPress.org

Make WordPress Core

Opened 8 months ago

Last modified 8 months ago

#47041 new defect (bug)

Custom Post type author empty

Reported by: dipesh.kakadiya Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 5.1.1
Component: Posts, Post Types Keywords:
Focuses: rest-api Cc:
PR Number:

Description

If I created Custom post type with rest enabled [ for Gutenberg support ] and I try to created/publish custom post type then Post author is empty instead of the current user

I checked with bbPress Post type forum, For enabled rest support, refer the following code

function twentyseventeen_rest_support_bbpress() {
        global $wp_post_types;
        $forum_post_type = bbp_get_forum_post_type();
        if (isset($wp_post_types[$forum_post_type])) {
               $wp_post_types[ $forum_post_type ]->show_in_rest = true;
        }
}
add_action('init', 'twentyseventeen_rest_support_bbpress', 25);

Change History (1)

#1 @SergeyBiryukov
8 months ago

  • Focuses rest-api added
Note: See TracTickets for help on using tickets.