[wp-trac] [WordPress Trac] #47041: Custom Post type author empty
WordPress Trac
noreply at wordpress.org
Thu Apr 25 11:30:06 UTC 2019
#47041: Custom Post type author empty
-------------------------------+-----------------------------
Reporter: dipesh.kakadiya | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Posts, Post Types | Version: 5.1.1
Severity: normal | Keywords:
Focuses: |
-------------------------------+-----------------------------
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
{{{#!php
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);
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/47041>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list